mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-06 15:54:31 +01:00
Simplify widgets
This commit is contained in:
1 parent
d01986238f
commit
a1660747f8
1 file changed
+3
-5
@@ -124,7 +124,7 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
Text(nutritionalValues.protein.toStringAsFixed(0) +
|
||||
AppLocalizations.of(context).g),
|
||||
Text(valuesPercentage.protein.toStringAsFixed(1)),
|
||||
valuesGperKg != null ? Text(valuesGperKg.protein.toStringAsFixed(1)) : Text(''),
|
||||
Text(valuesGperKg != null ? valuesGperKg.protein.toStringAsFixed(1) : ''),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
@@ -136,9 +136,7 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
Text(nutritionalValues.carbohydrates.toStringAsFixed(0) +
|
||||
AppLocalizations.of(context).g),
|
||||
Text(valuesPercentage.carbohydrates.toStringAsFixed(1)),
|
||||
valuesGperKg != null
|
||||
? Text(valuesGperKg.carbohydrates.toStringAsFixed(1))
|
||||
: Text(''),
|
||||
Text(valuesGperKg != null ? valuesGperKg.carbohydrates.toStringAsFixed(1) : ''),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
@@ -161,7 +159,7 @@ class NutritionalPlanDetailWidget extends StatelessWidget {
|
||||
),
|
||||
Text(nutritionalValues.fat.toStringAsFixed(0) + AppLocalizations.of(context).g),
|
||||
Text(valuesPercentage.fat.toStringAsFixed(1)),
|
||||
valuesGperKg != null ? Text(valuesGperKg.fat.toStringAsFixed(1)) : Text(''),
|
||||
Text(valuesGperKg != null ? valuesGperKg.fat.toStringAsFixed(1) : ''),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
|
||||
Reference in new issue
Block a user