fix(plans, recipes): added new end points for plans and recipes creation

This commit is contained in:
Username1548
2025-05-19 21:23:13 +07:00
parent cffa48d2ca
commit b942168167
13 changed files with 460 additions and 193 deletions

View File

@@ -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),
);
},
),
),
],
),