Skip to content

Commit

Permalink
ignore values
Browse files Browse the repository at this point in the history
  • Loading branch information
fremartini committed Sep 28, 2023
1 parent 42f61d0 commit 98edc13
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/core/widgets/components/loading_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ class LoadingOverlay {
},
);

static void hide<T>(BuildContext context) =>
static void hide<T extends Object?>(BuildContext context) =>
Navigator.of(context, rootNavigator: true).pop();
}
2 changes: 1 addition & 1 deletion lib/core/widgets/pages/splash/splash_error_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class _SplashErrorPageState extends State<SplashErrorPage> {
onPressed: () async {
final environmentLoaded =
context.read<EnvironmentCubit>().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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class _LoginPagePasscodeState extends State<LoginPagePasscode> {
previous is LoginLoading || current is LoginLoading,
listener: (context, state) {
if (state is LoginLoading) {
LoadingOverlay.show(context);
LoadingOverlay.show(context).ignore();
} else {
LoadingOverlay.hide(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ForgotPasscodeForm extends StatelessWidget {
}

Future<void> _onSubmit(BuildContext context, String email) async {
LoadingOverlay.show(context);
LoadingOverlay.show(context).ignore();

final either =
await sl<AccountRemoteDataSource>().requestPasscodeReset(email);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class _RegisterNameFormState extends State<RegisterNameForm> {
}

Future<void> _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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 98edc13

Please sign in to comment.