Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #1472 Stop on boarding next button to get spammed #1611

Merged
merged 2 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/smooth_app/lib/data_models/onboarding_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class OnboardingLoader {
future: _downloadData(),
title: AppLocalizations.of(context)!
.onboarding_welcome_loading_dialog_title,
dismissible: false,
);
return;
case OnboardingPage.NOT_STARTED:
Expand Down
4 changes: 4 additions & 0 deletions packages/smooth_app/lib/generic_lib/loading_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ class LoadingDialog<T> {
required final BuildContext context,
required final Future<T> future,
final String? title,
final bool? dismissible,
}) {
final AppLocalizations? appLocalizations = AppLocalizations.of(context);
return LoadingDialog<T>._()._run(
context: context,
future: future,
title: title ?? appLocalizations!.loading_dialog_default_title,
dismissible: dismissible ?? true,
);
}

Expand Down Expand Up @@ -60,8 +62,10 @@ class LoadingDialog<T> {
required final BuildContext context,
required final Future<T> future,
required final String title,
final bool? dismissible,
}) async =>
showDialog<T>(
barrierDismissible: dismissible ?? true,
context: context,
builder: (BuildContext context) {
return _getDialog(context, title, future);
Expand Down