Skip to content

Commit 8b44147

Browse files
committed
handle #101
1 parent 48e9351 commit 8b44147

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/src/helper/dialog_proxy.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DialogProxy {
4242
factory DialogProxy() => instance;
4343
static DialogProxy? _instance;
4444

45-
static DialogProxy get instance => _instance ??= DialogProxy._();
45+
static DialogProxy get instance => _instance ??= DialogProxy._internal();
4646

4747
static late BuildContext contextCustom;
4848
static late BuildContext contextAttach;
@@ -54,12 +54,12 @@ class DialogProxy {
5454
///set default toast widget
5555
late FlutterSmartToastBuilder toastBuilder;
5656

57-
DialogProxy._();
58-
59-
void initialize(Set<SmartInitType> initType) {
57+
DialogProxy._internal() {
6058
config = SmartConfig();
6159
dialogQueue = ListQueue();
60+
}
6261

62+
void initialize(Set<SmartInitType> initType) {
6363
if (initType.contains(SmartInitType.loading)) {
6464
entryLoading = SmartOverlayEntry(builder: (_) => _loading.getWidget());
6565
_loading = CustomLoading(overlayEntry: entryLoading);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description:
33
An elegant Flutter Dialog solution,
44
Easily implement Toast, Loading and custom Dialog,
55
Make the use of the dialog easier!
6-
version: 4.8.1
6+
version: 4.8.2
77
homepage: https://github.com/fluttercandies/flutter_smart_dialog
88
# flutter pub publish --server=https://pub.dartlang.org
99

0 commit comments

Comments
 (0)