forked from eatvio/eatvio_app
fix(plans, recipes): added new end points for plans and recipes creation
This commit is contained in:
@@ -35,19 +35,21 @@ class IngredientsWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
final portion = Portion.getPortionFromValue(recipe.ingredients![index].unit ?? '');
|
||||
Expanded(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final portion = Portion.getPortionFromValue(recipe.ingredients![index].unit ?? '');
|
||||
|
||||
String? portionName;
|
||||
if (portion != null) {
|
||||
portionName = getLocalizedMeasurementUnits(s, portion);
|
||||
}
|
||||
return Text(
|
||||
'${recipe.ingredients![index].name} - ${recipe.ingredients![index].portion} $portionName',
|
||||
style: TextStyles.textMMedium.copyWith(color: appTheme.black),
|
||||
);
|
||||
},
|
||||
String? portionName;
|
||||
if (portion != null) {
|
||||
portionName = getLocalizedMeasurementUnits(s, portion);
|
||||
}
|
||||
return Text(
|
||||
'${recipe.ingredients![index].name} - ${recipe.ingredients![index].portion} $portionName',
|
||||
style: TextStyles.textMMedium.copyWith(color: appTheme.black),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user