|
|
|
@ -9,7 +9,6 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
|
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
|
|
|
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
|
|
|
import 'package:mohem_flutter_app/classes/date_uitl.dart';
|
|
|
|
|
|
|
|
import 'package:mohem_flutter_app/config/routes.dart';
|
|
|
|
import 'package:mohem_flutter_app/config/routes.dart';
|
|
|
|
import 'package:mohem_flutter_app/exceptions/api_exception.dart';
|
|
|
|
import 'package:mohem_flutter_app/exceptions/api_exception.dart';
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
|
|
@ -66,6 +65,7 @@ class Utils {
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
barrierColor: Colors.black.withOpacity(0.5),
|
|
|
|
barrierColor: Colors.black.withOpacity(0.5),
|
|
|
|
|
|
|
|
useRootNavigator: false,
|
|
|
|
builder: (BuildContext context) => LoadingDialog(),
|
|
|
|
builder: (BuildContext context) => LoadingDialog(),
|
|
|
|
).then((value) {
|
|
|
|
).then((value) {
|
|
|
|
_isLoadingVisible = false;
|
|
|
|
_isLoadingVisible = false;
|
|
|
|
@ -121,8 +121,11 @@ class Utils {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
showToast(errorMessage);
|
|
|
|
if (cxt != null) {
|
|
|
|
// confirmDialog(cxt, errorMessage);
|
|
|
|
confirmDialog(cxt, errorMessage);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
showToast(errorMessage);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|