From 0ad428d2895d72a64bd194f1ff7b400de3f26234 Mon Sep 17 00:00:00 2001 From: monsieurtanuki Date: Fri, 1 Nov 2024 19:38:14 +0100 Subject: [PATCH] Minor code cleaning --- .../lib/pages/product/nutrition_page_loaded.dart | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart b/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart index 1d33870be19b..8424986c52d1 100644 --- a/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart +++ b/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart @@ -524,11 +524,6 @@ class _NutrientValueCell extends StatelessWidget { context.watch(); 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, @@ -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,