diff --git a/lib/core/widgets/pages/splash/splash_error_page.dart b/lib/core/widgets/pages/splash/splash_error_page.dart index de0386233..f6ae79b65 100644 --- a/lib/core/widgets/pages/splash/splash_error_page.dart +++ b/lib/core/widgets/pages/splash/splash_error_page.dart @@ -1,3 +1,4 @@ +import 'package:coffeecard/core/ignore_value.dart'; import 'package:coffeecard/core/strings.dart'; import 'package:coffeecard/core/styles/app_colors.dart'; import 'package:coffeecard/core/styles/app_text_styles.dart'; @@ -43,7 +44,7 @@ class _SplashErrorPageState extends State { onPressed: () async { final environmentLoaded = context.read().getConfig(); - LoadingOverlay.show(context).ignore(); + ignoreValue(LoadingOverlay.show(context)); // Delay since it is otherwise not obvious // a load is happening with no internet final _ = await Future.delayed(const Duration(milliseconds: 200)); diff --git a/lib/features/login/presentation/pages/login_page_passcode.dart b/lib/features/login/presentation/pages/login_page_passcode.dart index ddcc930b3..88b445747 100644 --- a/lib/features/login/presentation/pages/login_page_passcode.dart +++ b/lib/features/login/presentation/pages/login_page_passcode.dart @@ -1,3 +1,4 @@ +import 'package:coffeecard/core/ignore_value.dart'; import 'package:coffeecard/core/strings.dart'; import 'package:coffeecard/core/widgets/components/dialog.dart'; import 'package:coffeecard/core/widgets/components/loading_overlay.dart'; @@ -68,7 +69,7 @@ class _LoginPagePasscodeState extends State { previous is LoginLoading || current is LoginLoading, listener: (context, state) { if (state is LoginLoading) { - LoadingOverlay.show(context).ignore(); + ignoreValue(LoadingOverlay.show(context)); } else { LoadingOverlay.hide(context); } diff --git a/lib/features/login/presentation/widgets/forgot_passcode_form.dart b/lib/features/login/presentation/widgets/forgot_passcode_form.dart index 2dba28ce6..0da3c35a5 100644 --- a/lib/features/login/presentation/widgets/forgot_passcode_form.dart +++ b/lib/features/login/presentation/widgets/forgot_passcode_form.dart @@ -1,3 +1,4 @@ +import 'package:coffeecard/core/ignore_value.dart'; import 'package:coffeecard/core/strings.dart'; import 'package:coffeecard/core/validator/input_validator.dart'; import 'package:coffeecard/core/widgets/components/dialog.dart'; @@ -50,7 +51,7 @@ class ForgotPasscodeForm extends StatelessWidget { } Future _onSubmit(BuildContext context, String email) async { - LoadingOverlay.show(context).ignore(); + ignoreValue(LoadingOverlay.show(context)); final either = await sl().requestPasscodeReset(email); diff --git a/lib/features/product/presentation/pages/buy_tickets_page.dart b/lib/features/product/presentation/pages/buy_tickets_page.dart index 3b3d6ee95..b6038768c 100644 --- a/lib/features/product/presentation/pages/buy_tickets_page.dart +++ b/lib/features/product/presentation/pages/buy_tickets_page.dart @@ -116,7 +116,7 @@ class BuyTicketsPage extends StatelessWidget { final updateReceiptsRequest = context.read().fetchReceipts(); - ReceiptOverlay.show( + final _ = ReceiptOverlay.show( isTestEnvironment: envState is EnvironmentLoaded && envState.env.isTest, status: Strings.purchased, diff --git a/lib/features/register/presentation/widgets/forms/register_name_form.dart b/lib/features/register/presentation/widgets/forms/register_name_form.dart index ff6e627f7..548467dc8 100644 --- a/lib/features/register/presentation/widgets/forms/register_name_form.dart +++ b/lib/features/register/presentation/widgets/forms/register_name_form.dart @@ -1,3 +1,4 @@ +import 'package:coffeecard/core/ignore_value.dart'; import 'package:coffeecard/core/strings.dart'; import 'package:coffeecard/core/validator/input_validator.dart'; import 'package:coffeecard/core/widgets/components/dialog.dart'; @@ -40,9 +41,9 @@ class _RegisterNameFormState extends State { } Future _showTerms(BuildContext context, String name) async { - LoadingOverlay.show(context).ignore(); + ignoreValue(LoadingOverlay.show(context)); // Allow keyboard to disappear before showing dialog - final _ = await Future.delayed(const Duration(milliseconds: 350)); + ignoreValue(await Future.delayed(const Duration(milliseconds: 350))); if (!mounted) return; // Shows the terms to the user before proceeding with the registration. diff --git a/lib/features/ticket/presentation/widgets/tickets_section.dart b/lib/features/ticket/presentation/widgets/tickets_section.dart index c44df5eb9..34d1dd7c1 100644 --- a/lib/features/ticket/presentation/widgets/tickets_section.dart +++ b/lib/features/ticket/presentation/widgets/tickets_section.dart @@ -37,7 +37,7 @@ class TicketSection extends StatelessWidget { Navigator.of(context, rootNavigator: true).pop(); } - LoadingOverlay.show(context).ignore(); + final _ = LoadingOverlay.show(context); } if (state is TicketUsed) { // Refresh or load user info (for updated rank stats) @@ -46,7 +46,7 @@ class TicketSection extends StatelessWidget { final envState = context.read().state; LoadingOverlay.hide(context); - ReceiptOverlay.show( + final _ = ReceiptOverlay.show( isTestEnvironment: envState is EnvironmentLoaded && envState.env.isTest, status: state.receipt is PurchaseReceipt