|
@@ -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; |
|
|