Skip to content

Commit

Permalink
handle #101
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed Jan 20, 2023
1 parent 48e9351 commit 8b44147
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/src/helper/dialog_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DialogProxy {
factory DialogProxy() => instance;
static DialogProxy? _instance;

static DialogProxy get instance => _instance ??= DialogProxy._();
static DialogProxy get instance => _instance ??= DialogProxy._internal();

static late BuildContext contextCustom;
static late BuildContext contextAttach;
Expand All @@ -54,12 +54,12 @@ class DialogProxy {
///set default toast widget
late FlutterSmartToastBuilder toastBuilder;

DialogProxy._();

void initialize(Set<SmartInitType> initType) {
DialogProxy._internal() {
config = SmartConfig();
dialogQueue = ListQueue();
}

void initialize(Set<SmartInitType> initType) {
if (initType.contains(SmartInitType.loading)) {
entryLoading = SmartOverlayEntry(builder: (_) => _loading.getWidget());
_loading = CustomLoading(overlayEntry: entryLoading);
Expand Down
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.8.1
version: 4.8.2
homepage: https://github.com/fluttercandies/flutter_smart_dialog
# flutter pub publish --server=https://pub.dartlang.org

Expand Down

0 comments on commit 8b44147

Please sign in to comment.