Fix error handling in various admin and inventory screens
Test Suite / test (24.15.0) (push) Has been cancelled

- Updated error handling in AdminAliasesPanel, AdminDatabasePanel, AdminPendingProductsPanel, and AdminProductsPanel to ensure consistent snackbar display without extra parentheses.
- Refined error handling in ConsumeInventoryScreen, CreateInventoryScreen, InventoryDetailScreen, InventoryEditScreen, and SwipeableInventoryTile to maintain consistent snackbar formatting.
- Improved error handling in MealPlanScreen, PantryScreen, ProfileScreen, and RecipeDetailScreen to ensure proper user feedback on errors.
This commit is contained in:
Nils-Johan Gynther
2026-05-04 22:25:56 +02:00
parent db02f6f0fb
commit 505c89c731
17 changed files with 85583 additions and 75920 deletions
@@ -193,7 +193,7 @@ class RecipeDetailScreen extends ConsumerWidget {
} on ApiException catch (e) {
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context))),
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context)),
);
}
}
@@ -281,7 +281,7 @@ class RecipeDetailScreen extends ConsumerWidget {
} on ApiException catch (e) {
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context))),
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context)),
);
}
}
@@ -353,7 +353,7 @@ class _DeleteButton extends ConsumerWidget {
} on ApiException catch (e) {
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context))),
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context)),
);
}
}