Skip to content

Commit

Permalink
Minor code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurtanuki committed Nov 1, 2024
1 parent f480f28 commit 0ad428d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,6 @@ class _NutrientValueCell extends StatelessWidget {
context.watch<TextEditingControllerWithHistory>();
final bool isLast = position == focusNodes.length - 1;
final Nutrient? nutrient = orderedNutrient.nutrient;
final Widget? ownerFieldIcon = nutrient == null ||
product.getOwnerFieldTimestamp(OwnerField.nutrient(nutrient)) ==
null
? null
: const Icon(ProductQuery.ownerFieldIconData);

return TextFormField(
controller: controller,
Expand All @@ -537,7 +532,11 @@ class _NutrientValueCell extends StatelessWidget {
decoration: InputDecoration(
enabledBorder: const UnderlineInputBorder(),
labelText: orderedNutrient.name,
suffixIcon: ownerFieldIcon,
suffixIcon: nutrient == null ||
product.getOwnerFieldTimestamp(OwnerField.nutrient(nutrient)) ==
null
? null
: const Icon(ProductQuery.ownerFieldIconData),
),
keyboardType: const TextInputType.numberWithOptions(
signed: false,
Expand Down

0 comments on commit 0ad428d

Please sign in to comment.