|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:connectivity/connectivity.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
@ -8,6 +9,7 @@ import 'app_toast.dart';
|
|
|
|
|
AppSharedPreferences sharedPref = new AppSharedPreferences();
|
|
|
|
|
|
|
|
|
|
class Utils {
|
|
|
|
|
// static ProgressDialog pr;
|
|
|
|
|
|
|
|
|
|
///show custom Error Toast
|
|
|
|
|
/// [message] to show for user
|
|
|
|
|
@ -106,4 +108,34 @@ class Utils {
|
|
|
|
|
var length = loginType == 1 ? 10 : 7;
|
|
|
|
|
return "([0-9]{" + length.toString() + "})";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static showProgressDialog(context, [String message = "Loading..."]) async {
|
|
|
|
|
// pr = ProgressDialog(context,
|
|
|
|
|
// type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
|
|
|
|
|
// pr.style(
|
|
|
|
|
// message: message,
|
|
|
|
|
// borderRadius: 10.0,
|
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
|
// elevation: 10.0,
|
|
|
|
|
// insetAnimCurve: Curves.easeInOut,
|
|
|
|
|
// progress: 0.0,
|
|
|
|
|
// maxProgress: 100.0,
|
|
|
|
|
// progressTextStyle: TextStyle(
|
|
|
|
|
// color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400),
|
|
|
|
|
// messageTextStyle: TextStyle(
|
|
|
|
|
// color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600));
|
|
|
|
|
|
|
|
|
|
// if (!pr.isShowing()) {
|
|
|
|
|
// await pr.show();
|
|
|
|
|
// } else {
|
|
|
|
|
// await pr.hide();
|
|
|
|
|
// await pr.show();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static hideProgressDialog() async {
|
|
|
|
|
// if (pr.isShowing()) {
|
|
|
|
|
// await pr.hide();
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|