feat: enhance error handling; implement copyable SnackBar for user messages across various screens
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-04 22:10:23 +02:00
parent 2c8d6b69ae
commit 1b1d5d006d
15 changed files with 60 additions and 31 deletions
@@ -193,7 +193,7 @@ class RecipeDetailScreen extends ConsumerWidget {
} on ApiException catch (e) {
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(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(
SnackBar(content: Text(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(
SnackBar(content: Text(mapErrorToUserMessage(e, context))),
buildCopyableErrorSnackBar(context, mapErrorToUserMessage(e, context))),
);
}
}
@@ -697,3 +697,4 @@ class _IngredientPreviewRow extends StatelessWidget {
);
}
}