|
|
|
@ -115,8 +115,8 @@ class AppSettings {
|
|
|
|
|
static String UpdateTankerUrl = host + 'updateTankers';
|
|
|
|
|
static String addDeliveryboyUrl = host + 'addDeliveryboys';
|
|
|
|
|
static String getAllDeliverboyUrl = host + 'getalldeliveryboys';
|
|
|
|
|
static String updateDeliveryboyUrl = host + 'editDeliveryBoy';
|
|
|
|
|
static String deleteDeliveryboyUrl = host + 'deleteDeliveryBoy';
|
|
|
|
|
static String updateDeliveryboyUrl = host + 'updatedeliveryboy';
|
|
|
|
|
static String deleteDeliveryboyUrl = host + 'deletedeliveryboy';
|
|
|
|
|
static String pendingCustomersUrl = host + 'pendingCustomers';
|
|
|
|
|
static String connectedCustomersUrl = host + 'connectedCustomers';
|
|
|
|
|
static String bookingRequestsUrl = host + 'getAllTankersBookingdetails';
|
|
|
|
@ -160,6 +160,8 @@ class AppSettings {
|
|
|
|
|
Dialogs.showLoadingDialog(context, preLoaderKey);
|
|
|
|
|
} catch (error) {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static Future<String> uploadImageHTTPNew(file) async {
|
|
|
|
|
|
|
|
|
|
var request = http.MultipartRequest('POST', Uri.parse(uploadPicUrl + '/' + supplierId));
|
|
|
|
@ -202,6 +204,7 @@ class AppSettings {
|
|
|
|
|
await sharedPreferences.setDouble(_key, _value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static getData(String _key, type) async {
|
|
|
|
|
sharedPreferences = await SharedPreferences.getInstance();
|
|
|
|
|
if (type == 'STRING') {
|
|
|
|
@ -214,6 +217,7 @@ class AppSettings {
|
|
|
|
|
return sharedPreferences.getDouble(_key) ?? -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static clearSharedPreferences() async {
|
|
|
|
|
sharedPreferences = await SharedPreferences.getInstance();
|
|
|
|
|
await sharedPreferences.clear();
|
|
|
|
@ -229,6 +233,8 @@ class AppSettings {
|
|
|
|
|
}
|
|
|
|
|
return isSignInCheck;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static Future<bool> internetConnectivity() async {
|
|
|
|
|
try {
|
|
|
|
|
final result = await InternetAddress.lookup('google.com');
|
|
|
|
@ -241,11 +247,6 @@ class AppSettings {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*Apis Starts here*/
|
|
|
|
|
|
|
|
|
|
static Future<bool> login(payload) async {
|
|
|
|
|