Skip to content

Commit

Permalink
process #142
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed Jul 14, 2023
1 parent 0b58652 commit 31eb947
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* fix [#135](https://github.com/fluttercandies/flutter_smart_dialog/issues/135)
* optimize loading [#137](https://github.com/fluttercandies/flutter_smart_dialog/issues/137)
* optimize 'show debug point'
* fix [#142](https://github.com/fluttercandies/flutter_smart_dialog/issues/142)


# [4.9.0]
Expand Down
13 changes: 8 additions & 5 deletions lib/src/custom/custom_loading.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,18 @@ class CustomLoading extends BaseDialog {
}

Future<void> _realDismiss({CloseType closeType = CloseType.normal}) async {
if (!_loadingBackDismiss && closeType == CloseType.back) {
return;
}
SmartDialog.config.loading.isExist = false;
await mainDialog.dismiss(closeType: closeType);
}

Future<void> dismiss({CloseType closeType = CloseType.normal}) async {
SmartDialog.config.loading.isExist = false;
if (!_loadingBackDismiss && closeType == CloseType.back) {
return;
}
_canDismissCallback = () => _realDismiss(closeType: closeType);
if (_canDismiss) await _canDismissCallback?.call();
if (_canDismiss) {
SmartDialog.config.loading.isExist = false;
await _canDismissCallback?.call();
}
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
An elegant Flutter Dialog solution,
Easily implement Toast, Loading and custom Dialog,
Make the use of the dialog easier!
version: 4.9.3+1
version: 4.9.3+2
homepage: https://github.com/fluttercandies/flutter_smart_dialog
# flutter pub publish --server=https://pub.dartlang.org

Expand Down

0 comments on commit 31eb947

Please sign in to comment.