From 98edc131697223abc16e67e2e305b087430dd02b Mon Sep 17 00:00:00 2001 From: fremartini Date: Thu, 28 Sep 2023 18:14:55 +0200 Subject: [PATCH] ignore values --- lib/core/widgets/components/loading_overlay.dart | 2 +- lib/core/widgets/pages/splash/splash_error_page.dart | 2 +- lib/features/login/presentation/pages/login_page_passcode.dart | 2 +- .../login/presentation/widgets/forgot_passcode_form.dart | 2 +- .../register/presentation/widgets/forms/register_name_form.dart | 2 +- lib/features/ticket/presentation/widgets/tickets_section.dart | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/widgets/components/loading_overlay.dart b/lib/core/widgets/components/loading_overlay.dart index be3da25df..91cd43cf5 100644 --- a/lib/core/widgets/components/loading_overlay.dart +++ b/lib/core/widgets/components/loading_overlay.dart @@ -17,6 +17,6 @@ class LoadingOverlay { }, ); - static void hide(BuildContext context) => + static void hide(BuildContext context) => Navigator.of(context, rootNavigator: true).pop(); } diff --git a/lib/core/widgets/pages/splash/splash_error_page.dart b/lib/core/widgets/pages/splash/splash_error_page.dart index 87a5056c4..de0386233 100644 --- a/lib/core/widgets/pages/splash/splash_error_page.dart +++ b/lib/core/widgets/pages/splash/splash_error_page.dart @@ -43,7 +43,7 @@ class _SplashErrorPageState extends State { onPressed: () async { final environmentLoaded = context.read().getConfig(); - LoadingOverlay.show(context); + LoadingOverlay.show(context).ignore(); // 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 a9b40595d..ddcc930b3 100644 --- a/lib/features/login/presentation/pages/login_page_passcode.dart +++ b/lib/features/login/presentation/pages/login_page_passcode.dart @@ -68,7 +68,7 @@ class _LoginPagePasscodeState extends State { previous is LoginLoading || current is LoginLoading, listener: (context, state) { if (state is LoginLoading) { - LoadingOverlay.show(context); + LoadingOverlay.show(context).ignore(); } 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 2b6275a45..2dba28ce6 100644 --- a/lib/features/login/presentation/widgets/forgot_passcode_form.dart +++ b/lib/features/login/presentation/widgets/forgot_passcode_form.dart @@ -50,7 +50,7 @@ class ForgotPasscodeForm extends StatelessWidget { } Future _onSubmit(BuildContext context, String email) async { - LoadingOverlay.show(context); + LoadingOverlay.show(context).ignore(); final either = await sl().requestPasscodeReset(email); 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 aae2a71a9..ff6e627f7 100644 --- a/lib/features/register/presentation/widgets/forms/register_name_form.dart +++ b/lib/features/register/presentation/widgets/forms/register_name_form.dart @@ -40,7 +40,7 @@ class _RegisterNameFormState extends State { } Future _showTerms(BuildContext context, String name) async { - LoadingOverlay.show(context); + LoadingOverlay.show(context).ignore(); // Allow keyboard to disappear before showing dialog final _ = await Future.delayed(const Duration(milliseconds: 350)); if (!mounted) return; diff --git a/lib/features/ticket/presentation/widgets/tickets_section.dart b/lib/features/ticket/presentation/widgets/tickets_section.dart index feb334ba9..c44df5eb9 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); + LoadingOverlay.show(context).ignore(); } if (state is TicketUsed) { // Refresh or load user info (for updated rank stats)