Skip to content

Commit 2e5506d

Browse files
committed
process #191
1 parent 2ed9b0e commit 2e5506d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

example/lib/demo/issue191_toast.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,14 @@ class MyApp extends StatelessWidget {
2727
await Future.delayed(const Duration(seconds: 1));
2828
await SmartDialog.dismiss(status: SmartStatus.loading);
2929
SmartDialog.showToast('test toast');
30+
// SmartDialog.show(
31+
// builder: (_) {
32+
// return Container(
33+
// color: Colors.white,
34+
// padding: const EdgeInsets.all(30),
35+
// child: const Text('test dialog'),
36+
// );
37+
// },
38+
// );
3039
}
3140
}

lib/src/custom/main_dialog.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ class MainDialog {
233233
);
234234

235235
DialogProxy.instance.smartOverlayController.dismiss();
236+
237+
// safety await
238+
await Future.delayed(const Duration(milliseconds: 20));
236239
}
237240

238241
Widget getWidget() => Offstage(offstage: !visible, child: _widget);

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.9.7+5
6+
version: 4.9.7+6
77
homepage: https://github.com/fluttercandies/flutter_smart_dialog
88
# flutter pub publish --server=https://pub.dartlang.org
99
# flutter build web --release --base-href="/flutter_smart_dialog/web/"

0 commit comments

Comments
 (0)