|
|
@@ -6,8 +6,7 @@ class Loading { |
|
|
|
static LoadingDialog _dialog; |
|
|
|
static BuildContext _context; |
|
|
|
|
|
|
|
static Future show( |
|
|
|
BuildContext context, { |
|
|
|
static Future show(BuildContext context, { |
|
|
|
String msg, |
|
|
|
}) async { |
|
|
|
dismiss(); |
|
|
@@ -24,7 +23,9 @@ class Loading { |
|
|
|
|
|
|
|
static dismiss() { |
|
|
|
if (_dialog != null && _context != null) { |
|
|
|
Navigator.pop(_context); |
|
|
|
if (Navigator.canPop(_context)) { |
|
|
|
Navigator.pop(_context); |
|
|
|
} |
|
|
|
} |
|
|
|
_context = null; |
|
|
|
_dialog = null; |
|
|
|