Skip to content

Commit

Permalink
make dismissible dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
AshAman999 committed Apr 22, 2022
1 parent 6bd6be3 commit 876b7d0
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit 876b7d0

Please sign in to comment.