Browse Source

更新loading

tags/0.0.1
Weller 4 years ago
parent
commit
9fd0b16c6a
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      lib/dialog/loading/loading.dart

+ 4
- 3
lib/dialog/loading/loading.dart View File

@@ -6,8 +6,7 @@ class Loading {
static LoadingDialog _dialog; static LoadingDialog _dialog;
static BuildContext _context; static BuildContext _context;


static Future show(
BuildContext context, {
static Future show(BuildContext context, {
String msg, String msg,
}) async { }) async {
dismiss(); dismiss();
@@ -24,7 +23,9 @@ class Loading {


static dismiss() { static dismiss() {
if (_dialog != null && _context != null) { if (_dialog != null && _context != null) {
Navigator.pop(_context);
if (Navigator.canPop(_context)) {
Navigator.pop(_context);
}
} }
_context = null; _context = null;
_dialog = null; _dialog = null;


Loading…
Cancel
Save