fix(shopinbit): show ticket retry request errors as a dialog
What changed, and why it matters
This commit changes how error messages are shown to the user when a ticket retry request fails in the ShopInBit feature. Previously, a brief floating notification (a 'flush bar') appeared; now, a modal dialog box appears instead. There is no security issue here—this is purely a user-interface improvement.
No security action required. Treat as a routine UI/UX change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch replaces two calls to showFloatingFlushBar with showDialog<StackOkDialog> in lib/pages/shopinbit/shopinbit_ticket_detail.dart. It also changes unawaited(...) to await for the dialog and imports stack_dialog.dart. No logic, network handling, authentication, cryptography, or data validation is modified.
Changed components
lib/pages/shopinbit/shopinbit_ticket_detail.dartInspect captured patch +16 / −9
diff --git a/lib/pages/shopinbit/shopinbit_ticket_detail.dart b/lib/pages/shopinbit/shopinbit_ticket_detail.dart
index 65a0b8e..597c8bb 100644
--- a/lib/pages/shopinbit/shopinbit_ticket_detail.dart
+++ b/lib/pages/shopinbit/shopinbit_ticket_detail.dart
@@ -25,6 +25,7 @@ import '../../widgets/dialogs/s_dialog.dart';
import '../../widgets/refresh_control.dart';
import '../../widgets/rounded_container.dart';
import '../../widgets/rounded_white_container.dart';
+import '../../widgets/stack_dialog.dart';
import 'shopinbit_offer_view.dart';
class ShopInBitTicketDetail extends ConsumerStatefulWidget {
@@ -139,11 +140,14 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail> {
if (reqResp.hasError || reqResp.value == null) {
if (mounted) {
setState(() => _retrying = false);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
- message: reqResp.exception?.message ?? "Failed to create request",
- context: context,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to create request",
+ maxWidth: Util.isDesktop ? 500 : null,
+ message: reqResp.exception?.message,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
@@ -183,11 +187,14 @@ class _ShopInBitTicketDetailState extends ConsumerState<ShopInBitTicketDetail> {
} catch (e) {
if (mounted) {
setState(() => _retrying = false);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to create request",
+ maxWidth: Util.isDesktop ? 500 : null,
message: e.toString(),
- context: context,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.