Refactor code structure for improved readability and maintainability
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-06 07:37:59 +02:00
parent e4f201ea36
commit 969dafdbc6
273 changed files with 11357 additions and 39 deletions
@@ -646,6 +646,9 @@ class _IngredientPreviewRow extends StatelessWidget {
Widget build(BuildContext context) {
final theme = Theme.of(context);
final cs = theme.colorScheme;
final label = ingredient.productName.trim().isEmpty
? 'Okänd ingrediens'
: ingredient.productName;
final (icon, color) = ingredient.fromPantry
? (Icons.kitchen_outlined, cs.secondary)
@@ -687,7 +690,7 @@ class _IngredientPreviewRow extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'${ingredient.productName}'
'$label'
'${ingredient.note != null ? ' (${ingredient.note})' : ''}'
' $requiredStr',
style: theme.textTheme.bodyMedium,