changes & Null to Dynamic

dev_v3.13.6_voipcall
devamirsaleemahmad 2 years ago
parent 8544b3ce3d
commit 3f1ba19c64

@ -545,6 +545,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_COMPILATION_MODE = singlefile;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@ -727,6 +728,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_COMPILATION_MODE = singlefile;
"SWIFT_COMPILATION_MODE[arch=*]" = singlefile;
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

@ -621,7 +621,7 @@ class AppGlobal {
AppSharedPreferences sharedPref = AppSharedPreferences();
static bool isNetworkDebugEnabled = false;
static bool isNetworkDebugEnabled = true;
static String appLanguage = "";
Request getPublicRequest() {

@ -7,7 +7,7 @@ class CheckActivationCodeForEReferralResponseModel {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;

@ -5,7 +5,7 @@ class GetAllCitiesRequestModel {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;

@ -1,11 +1,11 @@
class GetAllProjectsResponseModel {
String? desciption;
Null desciptionN;
dynamic desciptionN;
int? iD;
String? legalName;
String? legalNameN;
String? name;
Null nameN;
dynamic nameN;
String? phoneNumber;
String? setupID;
int? distanceInKilometers;
@ -13,7 +13,7 @@ class GetAllProjectsResponseModel {
String? latitude;
String? longitude;
int? mainProjectID;
Null projectOutSA;
dynamic projectOutSA;
bool? usingInDoctorApp;
GetAllProjectsResponseModel(

@ -5,7 +5,7 @@ class GetAllRelationshipTypeRequestModel {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;

@ -6,7 +6,7 @@ class SearchEReferralRequestModel {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
int? referralNumber;

@ -7,7 +7,7 @@ class SendActivationCodeForEReferralRequestModel {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;

@ -10,8 +10,8 @@ class ClinicCategory {
String? fullmageAR;
bool? isActive;
bool? isCategoryGroup;
Null sortOrderAR;
Null sortOrderEN;
dynamic sortOrderAR;
dynamic sortOrderEN;
String? clinicName;
ClinicCategory(

@ -3,10 +3,10 @@ class DiseasesByClinic {
String? diseasesEN;
String? diseasesAR;
int? diseasesCategoryID;
Null diseasesCategoryEN;
Null diseasesCategoryAR;
dynamic diseasesCategoryEN;
dynamic diseasesCategoryAR;
String? diseases;
Null diseasesCategory;
dynamic diseasesCategory;
DiseasesByClinic(
{this.diseasesID,

@ -1,42 +1,42 @@
class CreateNewUser_New {
Null date;
dynamic date;
int? languageID;
int? serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
dynamic time;
dynamic androidLink;
dynamic authenticationTokenID;
dynamic data;
bool? dataw;
int? dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
dynamic errorCode;
dynamic errorEndUserMessage;
dynamic errorEndUserMessageN;
dynamic errorMessage;
int? errorType;
int? foodCategory;
Null iOSLink;
dynamic iOSLink;
bool? isAuthenticated;
int? mealOrderStatus;
int? mealType;
int? messageStatus;
int? numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null htmlResult;
dynamic patientBlodType;
dynamic successMsg;
dynamic successMsgN;
dynamic htmlResult;
bool? isHMGPatient;
bool? isRegister;
bool? isSendSMS;
Null listBabyInformationModel;
Null listBabyNeedReminderModel;
Null listCreateVaccinationTableModel;
Null listHisPatientModel;
Null listUserInformationModel;
Null listUserInformationModelNew;
Null listVaccinationTableModel;
Null tokinID;
dynamic listBabyInformationModel;
dynamic listBabyNeedReminderModel;
dynamic listCreateVaccinationTableModel;
dynamic listHisPatientModel;
dynamic listUserInformationModel;
dynamic listUserInformationModelNew;
dynamic listVaccinationTableModel;
dynamic tokinID;
int? userID;
Null verificationCode;
dynamic verificationCode;
CreateNewUser_New(
{this.date,

@ -1,34 +1,34 @@
class DoctorProfile {
int? doctorID;
String? doctorName;
Null doctorNameN;
dynamic doctorNameN;
int? clinicID;
String? clinicDescription;
Null clinicDescriptionN;
Null licenseExpiry;
dynamic clinicDescriptionN;
dynamic licenseExpiry;
int? employmentType;
Null setupID;
dynamic setupID;
int? projectID;
String? projectName;
String? nationalityID;
String? nationalityName;
Null nationalityNameN;
dynamic nationalityNameN;
int? gender;
String? genderDescription;
Null genderDescriptionN;
Null doctorTitle;
Null projectNameN;
dynamic genderDescriptionN;
dynamic doctorTitle;
dynamic projectNameN;
bool? isAllowWaitList;
String? titleDescription;
Null titleDescriptionN;
Null isRegistered;
Null isDoctorDummy;
dynamic titleDescriptionN;
dynamic isRegistered;
dynamic isDoctorDummy;
bool? isActive;
Null isDoctorAppointmentDisplayed;
dynamic isDoctorAppointmentDisplayed;
bool? doctorClinicActive;
Null isbookingAllowed;
dynamic isbookingAllowed;
String? doctorCases;
Null doctorPicture;
dynamic doctorPicture;
String? doctorProfileInfo;
List<String>? specialty;
int? actualDoctorRate;

@ -1,6 +1,6 @@
class DoctorRating {
Null projectID;
Null clinicID;
dynamic projectID;
dynamic clinicID;
int? doctorID;
int? patientNumber;
int? doctorRate;

@ -5,7 +5,7 @@ class AppoimentAllHistoryResultList {
int? projectID;
int? appointmentNo;
String? appointmentDate;
Null appointmentDateN;
dynamic appointmentDateN;
int? appointmentType;
DateTime? bookDate;
dynamic patientType;
@ -26,14 +26,14 @@ class AppoimentAllHistoryResultList {
String? confirmedOn;
int? arrivalChangedBy;
String? arrivedOn;
Null editedBy;
Null editedOn;
Null doctorName;
Null doctorNameN;
dynamic editedBy;
dynamic editedOn;
dynamic doctorName;
dynamic doctorNameN;
String? statusDesc;
Null statusDescN;
dynamic statusDescN;
bool? vitalStatus;
Null vitalSignAppointmentNo;
dynamic vitalSignAppointmentNo;
int? episodeID;
int? actualDoctorRate;
String? clinicName;

@ -1,5 +1,5 @@
class COCItem {
Null appointment;
dynamic appointment;
String? appointmentClinicName;
String? appointmentDate;
String? appointmentProjectName;

@ -4,13 +4,13 @@ class PatientLabOrders {
int? actualDoctorRate;
String? clinicDescription;
String? clinicDescriptionEnglish;
Null clinicDescriptionN;
dynamic clinicDescriptionN;
int? clinicID;
int? doctorID;
String? doctorImageURL;
String? doctorName;
String? doctorNameEnglish;
Null doctorNameN;
dynamic doctorNameN;
int? doctorRate;
String ?doctorTitle;
int? gender;
@ -31,7 +31,7 @@ class PatientLabOrders {
String? patientID;
String? projectID;
String? projectName;
Null projectNameN;
dynamic projectNameN;
String? qR;
String? setupID;
List<String>? speciality;

@ -5,18 +5,18 @@ class PatientInfoAndMobileNumber {
int? patientType;
int? patientID;
String? firstName;
Null middleName;
Null lastName;
Null firstNameN;
Null middleNameN;
Null lastNameN;
Null gender;
Null dateofBirth;
Null dateofBirthN;
Null nationalityID;
dynamic middleName;
dynamic lastName;
dynamic firstNameN;
dynamic middleNameN;
dynamic lastNameN;
dynamic gender;
dynamic dateofBirth;
dynamic dateofBirthN;
dynamic nationalityID;
String? mobileNumber;
String? emailAddress;
Null zipCode;
dynamic zipCode;
PatientInfoAndMobileNumber(
{this.setupID,

@ -16,7 +16,7 @@ class Reviews {
int? helpfulNoTotal;
String? createdOnUtc;
Customer? customer;
//Null product;
//dynamic product;
Reviews(
{this.id,

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'
class ShoppingCart {
int? languageId;
String? id;
// List<Null> productAttributes;
// List<dynamic> productAttributes;
double? customerEnteredPrice;
int? quantity;
dynamic discountAmountInclTax;
@ -74,9 +74,9 @@ class ShoppingCart {
languageId = json['language_id'];
id = json['id'];
/*if (json['product_attributes'] != null) {
productAttributes = new List<Null>();
productAttributes = new List<dynamic>();
json['product_attributes'].forEach((v) {
productAttributes.add(new Null.fromJson(v));
productAttributes.add(new dynamic.fromJson(v));
});
}*/
customerEnteredPrice = json['customer_entered_price'];

@ -57,7 +57,7 @@ class RecommendedProductModel {
bool? allowBackInStockSubscriptions;
dynamic orderMinimumQuantity;
dynamic orderMaximumQuantity;
// Null allowedQuantities;
// dynamic allowedQuantities;
bool? allowAddingOnlyExistingAttributeCombinations;
bool? disableBuyButton;
bool? disableWishlistButton;
@ -336,28 +336,28 @@ class RecommendedProductModel {
productType = json['product_type'];
parentGroupedProductId = json['parent_grouped_product_id'];
// if (json['role_ids'] != null) {
// roleIds = new List<Null>();
// roleIds = new List<dynamic>();
// json['role_ids'].forEach((v) {
// roleIds.add(new Null.fromJson(v));
// roleIds.add(new dynamic.fromJson(v));
// });
// }
// if (json['discount_ids'] != null) {
// discountIds = new List<Null>();
// discountIds = new List<dynamic>();
// json['discount_ids'].forEach((v) {
// discountIds.add(new Null.fromJson(v));
// discountIds.add(new dynamic.fromJson(v));
// });
// }
// if (json['store_ids'] != null) {
// storeIds = new List<Null>();
// storeIds = new List<dynamic>();
// json['store_ids'].forEach((v) {
// storeIds.add(new Null.fromJson(v));
// storeIds.add(new dynamic.fromJson(v));
// });
// }
manufacturerIds = json['manufacturer_ids'].cast<dynamic>();
// if (json['reviews'] != null) {
// reviews = new List<Null>();
// reviews = new List<dynamic>();
// json['reviews'].forEach((v) {
// reviews.add(new Null.fromJson(v));
// reviews.add(new dynamic.fromJson(v));
// });
// }
if (json['images'] != null) {
@ -367,9 +367,9 @@ class RecommendedProductModel {
});
}
// if (json['attributes'] != null) {
// attributes = new List<Null>();
// attributes = new List<dynamic>();
// json['attributes'].forEach((v) {
// attributes.add(new Null.fromJson(v));
// attributes.add(new dynamic.fromJson(v));
// });
// }
if (json['specifications'] != null) {
@ -379,15 +379,15 @@ class RecommendedProductModel {
});
}
// if (json['associated_product_ids'] != null) {
// associatedProductIds = new List<Null>();
// associatedProductIds = new List<dynamic>();
// json['associated_product_ids'].forEach((v) {
// associatedProductIds.add(new Null.fromJson(v));
// associatedProductIds.add(new dynamic.fromJson(v));
// });
// }
// if (json['tags'] != null) {
// tags = new List<Null>();
// tags = new List<dynamic>();
// json['tags'].forEach((v) {
// tags.add(new Null.fromJson(v));
// tags.add(new dynamic.fromJson(v));
// });
// }
vendorId = json['vendor_id'];

@ -2,7 +2,7 @@ class BrandsModel {
String? id;
String? name;
String? namen;
Null image;
dynamic image;
BrandsModel({this.id, this.name, this.namen, this.image});

@ -3,7 +3,7 @@ class OffersModel {
String? name;
String? namen;
List<LocalizedNames>? localizedNames;
Null description;
dynamic description;
int? categoryTemplateId;
String? metaKeywords;
String? metaDescription;
@ -11,10 +11,10 @@ class OffersModel {
int? parentCategoryId;
int? pageSize;
String? pageSizeOptions;
Null priceRanges;
dynamic priceRanges;
bool? showOnHomePage;
bool? includeInTopMenu;
Null hasDiscountsApplied;
dynamic hasDiscountsApplied;
bool? published;
bool? deleted;
int? displayOrder;
@ -154,8 +154,8 @@ class LocalizedNames {
class Image {
String? src;
Null thumb;
Null attachment;
dynamic thumb;
dynamic attachment;
Image({this.src, this.thumb, this.attachment});

@ -72,8 +72,8 @@ class LocalizedNames {
class Image {
String? src;
Null thumb;
Null attachment;
dynamic thumb;
dynamic attachment;
Image({this.src, this.thumb, this.attachment});

@ -9,11 +9,11 @@ class PharmacyPrescriptions {
String? locationDescription;
dynamic locationDescriptionN;
String? itemDescription;
Null itemDescriptionN;
dynamic itemDescriptionN;
String? alias;
int? locationTypeID;
int? barcode;
Null companybarcode;
dynamic companybarcode;
int? cityID;
String? cityName;
dynamic distanceInKilometers;
@ -22,7 +22,7 @@ class PharmacyPrescriptions {
String? longitude;
String? phoneNumber;
String? projectImageURL;
Null sortOrder;
dynamic sortOrder;
PharmacyPrescriptions(
{this.expiryDate,

@ -2,16 +2,16 @@ class PrescriptionReportEnh {
String? address;
int? appointmentNo;
String? clinic;
Null companyName;
dynamic companyName;
int? days;
String? doctorName;
num? doseDailyQuantity;
String? frequency;
int? frequencyNumber;
Null image;
Null imageExtension;
dynamic image;
dynamic imageExtension;
String? imageSRCUrl;
Null imageString;
dynamic imageString;
String? imageThumbUrl;
String? isCovered;
String? itemDescription;
@ -21,10 +21,10 @@ class PrescriptionReportEnh {
int? patientID;
String? patientName;
String? phoneOffice1;
Null prescriptionQR;
dynamic prescriptionQR;
num? prescriptionTimes;
Null productImage;
Null productImageBase64;
dynamic productImage;
dynamic productImageBase64;
String? productImageString;
int? projectID;
String? projectName;

@ -20,7 +20,7 @@ class PrescriptionReportINP {
String? orderDate;
int? doseDailyQuantity;
int? itemID;
Null productImage;
dynamic productImage;
String? sKU;
String? itemDescriptionN;
String? routeN;

@ -1,11 +1,11 @@
class QRParkingModel {
Null totalRecords;
Null nRowID;
dynamic totalRecords;
dynamic nRowID;
int? qRParkingID;
String? description;
String? descriptionN;
Null qRCompare;
Null qRValue;
dynamic qRCompare;
dynamic qRValue;
String? imagePath;
bool? isActive;
int? parkingID;
@ -15,11 +15,11 @@ class QRParkingModel {
int? rowID;
int? gateID;
int? floorID;
Null imagePath1;
dynamic imagePath1;
int? createdBy;
String? createdOn;
Null editedBy;
Null editedOn;
dynamic editedBy;
dynamic editedOn;
String? parkingDescription;
String? parkingDescriptionN;
String? gateDescription;

@ -14,7 +14,7 @@ class FinalRadiology {
String? imageURL;
String? procedureID;
int? appointmentNo;
Null dIAPacsURL;
dynamic dIAPacsURL;
bool? isRead;
String? readOn;
var admissionNo;

@ -26,12 +26,12 @@ class AppoitmentRated {
String? arrivedOn;
int? editedBy;
String? editedOn;
Null doctorName;
dynamic doctorName;
String? doctorNameN;
String? statusDesc;
String? statusDescN;
bool? vitalStatus;
Null vitalSignAppointmentNo;
dynamic vitalSignAppointmentNo;
int? episodeID;
String? doctorTitle;
bool? isAppoitmentLiveCare;

@ -19,7 +19,7 @@ class Reports {
String? clinicDescription;
dynamic clinicDescriptionN;
String? docName;
Null docNameN;
dynamic docNameN;
String? doctorImageURL;
dynamic doctorName;
dynamic doctorNameN;

@ -28,7 +28,7 @@ class SickLeave {
String? isInOutPatientDescription;
String? isInOutPatientDescriptionN;
int? noOfPatientsRate;
Null patientName;
dynamic patientName;
String? projectName;
String? qR;
List<String>? speciality;

@ -1,34 +1,34 @@
class WeatherIndicatorModel {
Null date;
dynamic date;
int? languageID;
int? serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
dynamic time;
dynamic androidLink;
dynamic authenticationTokenID;
dynamic data;
bool? dataw;
int? dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
dynamic errorCode;
dynamic errorEndUserMessage;
dynamic errorEndUserMessageN;
dynamic errorMessage;
int? errorType;
int? foodCategory;
Null iOSLink;
dynamic iOSLink;
bool? isAuthenticated;
int? mealOrderStatus;
int? mealType;
int? messageStatus;
int? numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null citiesList;
Null cityName;
Null get5DaysWeatherForecastList;
dynamic patientBlodType;
dynamic successMsg;
dynamic successMsgN;
dynamic citiesList;
dynamic cityName;
dynamic get5DaysWeatherForecastList;
List<GetCityInfoList>? getCityInfoList;
Null getTodayWeatherForecastList;
Null iniciesList;
dynamic getTodayWeatherForecastList;
dynamic iniciesList;
WeatherIndicatorModel(
{this.date,

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class AuthenticatedUserObject {
AuthenticatedUser? user;
AuthenticatedUser user = AuthenticatedUser();
AppSharedPreferences sharedPref = AppSharedPreferences();
bool isLogin = false;
@ -11,20 +11,24 @@ class AuthenticatedUserObject {
getUser();
}
getUser({bool getUser = false}) async {
Future<void> getUser({bool getUser = false}) async {
if (getUser) {
var userData;
await sharedPref.getObject(USER_PROFILE).then((value) {
userData = value;
});
if (userData != null) user = AuthenticatedUser.fromJson(userData);
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) {
user = AuthenticatedUser.fromJson(userData);
}
} else if (user == null) {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
if (userData != null) {
// user = AuthenticatedUser.fromJson(userData);
user = AuthenticatedUser(
patientID: 1,
);
}
}
}
logout() async {
void logout() {
isLogin = false;
}
}

@ -18,7 +18,7 @@ class BaseService {
BaseService() {
authenticatedUserObject.getUser();
user = authenticatedUserObject.user!;
user = authenticatedUserObject.user;
// getUser();
}

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -58,7 +59,7 @@ class BaseAppClient {
var user = await sharedPref.getObject(USER_PROFILE);
Map<String, String> headers = {'Content-Type': 'application/json', 'Accept': 'application/json'};
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
var token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (endPoint == SEND_ACTIVATION_CODE) {
languageID = 'en';

@ -120,7 +120,7 @@ class InsuranceCardService extends BaseService {
sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
print("------------"+error.toString());
throw error;
}
}

@ -2,27 +2,35 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/main.dart';
class PrivilegeService extends BaseService {
List<PrivilegeModel> privilegeModelList =[];
List<VidaPlusProjectListModel> vidaPlusProjectListModel =[];
List<PrivilegeModel> privilegeModelList = [];
List<VidaPlusProjectListModel> vidaPlusProjectListModel = [];
Future getPrivilege() async {
Map<String, dynamic> body = Map();
body['PatientType'] = 4;
await baseAppClient.post(GET_PRIVILEGE, onSuccess: (dynamic response, int statusCode) {
response['ServicePrivilegeList'].forEach((item) {
privilegeModelList.add(PrivilegeModel.fromJson(item));
});
if (response['ProjectListVidaPlus'].length != 0) {
response['ProjectListVidaPlus'].forEach((item) {
vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
await baseAppClient.post(
GET_PRIVILEGE,
onSuccess: (dynamic response, int statusCode) {
response['ServicePrivilegeList'].forEach((item) {
privilegeModelList.add(PrivilegeModel.fromJson(item));
});
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
if (response['ProjectListVidaPlus'].length != 0) {
response['ProjectListVidaPlus'].forEach((item) {
vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item));
});
}
},
onFailure: (String error, int statusCode) {
print(error);
print(statusCode);
hasError = true;
super.error = error;
},
body: body,
);
}
}

@ -58,7 +58,7 @@ class Addresses {
dynamic company;
int? countryId;
String? country;
Null stateProvinceId;
dynamic stateProvinceId;
String? city;
String? address1;
String? address2;

@ -17,7 +17,7 @@ class BaseViewModel extends ChangeNotifier {
String error = "";
String languageID = "en";
AuthenticatedUser? user;
late AuthenticatedUser user;
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@ -33,10 +33,10 @@ class BaseViewModel extends ChangeNotifier {
this.user = user;
notifyListeners();
}
BaseViewModel() {
//authenticatedUserObject.getUser();
user = authenticatedUserObject.user;
user = authenticatedUserObject.user!;
this.isLogin = authenticatedUserObject.isLogin;
}

@ -1,8 +1,7 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart';
@ -15,7 +14,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
var isAppArabic = false;
bool isAppArabic = false;
class ProjectViewModel extends BaseViewModel {
GAnalytics get analytics => locator<GAnalytics>();
@ -35,18 +34,10 @@ class ProjectViewModel extends BaseViewModel {
String error = '';
dynamic searchvalue;
bool isLogin = false;
int? laserSelectionDuration;
double? _latitude;
double? _longitude;
RegisterInfoResponse _registerInfo = RegisterInfoResponse();
RegisterInfoResponse? _registerInfo = RegisterInfoResponse();
double get latitude => _latitude!;
double get longitude => _longitude!;
RegisterInfoResponse get registerInfo => _registerInfo!;
RegisterInfoResponse get registerInfo => _registerInfo;
dynamic get searchValue => searchvalue;
@ -57,47 +48,52 @@ class ProjectViewModel extends BaseViewModel {
bool get isArabic => _isArabic;
bool isLoginChild = false;
List<PrivilegeModel> privilegeRootUser =[];
List<PrivilegeModel> privilegeChildUser =[];
List<VidaPlusProjectListModel> _vidaPlusProjectListModel =[];
List<PrivilegeModel> privilegeRootUser = [];
List<PrivilegeModel> privilegeChildUser = [];
List<VidaPlusProjectListModel> _vidaPlusProjectListModel = [];
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
List<LaserBodyPart> selectedBodyPartList = [];
List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser;
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
late StreamSubscription subscription;
List<LaserBodyPart> selectedBodyPartList = [];
late double _latitude;
late double _longitude;
double get latitude => _latitude;
StreamSubscription? subscription;
double get longitude => _longitude;
late int laserSelectionDuration;
ProjectViewModel() {
loadSharedPrefLanguage();
subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
break;
case ConnectivityResult.mobile:
try {
loadSharedPrefLanguage();
subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) {
if (result == ConnectivityResult.mobile) {
isInternetConnection = true;
break;
case ConnectivityResult.none:
} else if (result == ConnectivityResult.wifi) {
} else if (result == ConnectivityResult.none) {
isInternetConnection = false;
break;
}
notifyListeners();
});
}
void setLatitudeLongitude(double lat, double long) {
_latitude = lat;
_longitude = long;
notifyListeners();
}
notifyListeners();
});
} catch (e) {
print(e);
}
}
Future loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage);
isAppArabic = _isArabic = currentLanguage == 'ar';
notifyListeners();
try {
currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage);
isAppArabic = _isArabic = currentLanguage == 'ar';
notifyListeners();
} catch (e) {
print(e);
}
}
void changeLanguage(String lan) {
@ -120,18 +116,11 @@ class ProjectViewModel extends BaseViewModel {
this.isLoginChild = isLoginChild;
privilegeRootUser = privilege!;
AppGlobal.isNetworkDebugEnabled = havePrivilege(93);
notifyListeners();
}
setVidaPlusProjectList(List<VidaPlusProjectListModel> vidaPlusProjectListModelInput) {
_vidaPlusProjectListModel = vidaPlusProjectListModelInput;
notifyListeners();
}
setPrivilege({privilegeList, bool isLoginChild = false}) {
List<PrivilegeModel> privilege =[];
List<PrivilegeModel> privilege = [];
privilegeList['List'][0]['ListPrivilege'].forEach((item) {
privilege.add(PrivilegeModel.fromJson(item));
@ -151,23 +140,32 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners();
}
setVidaPlusProjectList(List<VidaPlusProjectListModel> vidaPlusProjectListModelInput) {
_vidaPlusProjectListModel = vidaPlusProjectListModelInput;
notifyListeners();
}
bool havePrivilege(int id) {
bool isHavePrivilege = false;
if (isLoginChild)
privilegeChildUser.forEach((element) {
if (element.iD == id) isHavePrivilege = element.privilege!;
});
else {
privilegeRootUser.forEach((element) {
if (element.iD == id) isHavePrivilege = element.privilege!;
});
try {
if (isLoginChild) {
privilegeChildUser.forEach((element) {
if (element.iD == id) isHavePrivilege = element.privilege!;
});
} else {
privilegeRootUser.forEach((element) {
if (element.iD == id) isHavePrivilege = element.privilege!;
});
}
} catch (e) {
print(e);
}
return isHavePrivilege;
}
@override
void dispose() {
if (subscription != null) subscription!.cancel();
if (subscription != null) subscription.cancel();
super.dispose();
}
@ -176,6 +174,12 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners();
}
void setLatitudeLongitude(double lat, double long) {
_latitude = lat;
_longitude = long;
notifyListeners();
}
setRegisterData(RegisterInfoResponse data) {
_registerInfo = data;
notifyListeners();

@ -19,7 +19,7 @@ class DQIcons {
DQIcons._();
static const _kFontFam = 'DQIcons';
static const Null _kFontPkg = null;
static const dynamic _kFontPkg = null;
static const IconData blood_pressure =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/splashPage.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
@ -15,7 +16,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:in_app_update/in_app_update.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart';
import 'config/size_config.dart';
@ -24,6 +25,22 @@ import 'core/viewModels/project_view_model.dart';
import 'locator.dart';
import 'pages/pharmacies/compare-list.dart';
var logger = Logger(
printer: PrettyPrinter(
methodCount: 2,
// Number of method calls to be displayed
errorMethodCount: 8,
// Number of method calls if stacktrace is provided
lineLength: 500,
// Width of the output
colors: true,
// Colorful log messages
printEmojis: true,
// Print an emoji for each log message
printTime: false // Should each log print contain a timestamp
),
);
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
@ -45,23 +62,27 @@ class MyHttpOverrides extends HttpOverrides {
}
class _MyApp extends State<MyApp> {
late AppUpdateInfo _updateInfo;
// late AppUpdateInfo _updateInfo;
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
checkForUpdate() {
// todo need to verify 'imp'
InAppUpdate.checkForUpdate().then((info) {
print("checkForUpdate!!!");
print(info.toString());
if (info.immediateUpdateAllowed) {
print("Immediate Allowed!!!");
InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
}
}).catchError((e) {
print(e.toString());
});
}
//0537503378
//1231755
// checkForUpdate() {
// // todo need to verify 'imp'
// InAppUpdate.checkForUpdate().then((info) {
// print("checkForUpdate!!!");
// print(info.toString());
// if (info.immediateUpdateAllowed) {
// print("Immediate Allowed!!!");
// InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
// }
// }).catchError((e) {
// print(e.toString());
// });
// }
@override
void initState() {
@ -79,7 +100,6 @@ class _MyApp extends State<MyApp> {
@override
Widget build(BuildContext context) {
PlatformBridge.init(context);
LocalNotification.init(onNotificationClick: (payload) {
LocalNotification.getInstance()?.showNow(title: "Payload", subtitle: payload, payload: payload);
});
@ -133,13 +153,16 @@ class _MyApp extends State<MyApp> {
],
child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp(
builder: (_, __) {
builder: (_, mchild) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaleFactor: 1.0,
), //set desired text scale factor here
child: child ?? SizedBox(),
child: mchild!
);
// Container(
// color: Colors.blue,
// ));
},
navigatorKey: locator<NavigationService>().navigatorKey,
showSemanticsDebugger: false,

@ -19,7 +19,7 @@ class CheckActivationCodeReq {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
bool? forRegisteration;

@ -19,7 +19,7 @@ class CheckActivationCodeRegisterReq {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
bool? forRegisteration;

@ -12,7 +12,7 @@ class CheckPatientAuthenticationReq {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
String? dob;

@ -1,48 +1,48 @@
class CheckUserStatusResponse {
Null date;
dynamic date;
int? languageID;
int? serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
dynamic time;
dynamic androidLink;
dynamic authenticationTokenID;
dynamic data;
bool? dataw;
int? dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
dynamic errorCode;
dynamic errorEndUserMessage;
dynamic errorEndUserMessageN;
dynamic errorMessage;
int? errorType;
int? foodCategory;
Null iOSLink;
dynamic iOSLink;
bool? isAuthenticated;
int? mealOrderStatus;
int? mealType;
int? messageStatus;
int? numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null accessTokenObject;
dynamic patientBlodType;
dynamic successMsg;
dynamic successMsgN;
dynamic accessTokenObject;
int? age;
Null clientIdentifierId;
dynamic clientIdentifierId;
int? createdBy;
String? dateOfBirth;
String? firstNameAr;
String? firstNameEn;
String? gender;
Null genderAr;
Null genderEn;
dynamic genderAr;
dynamic genderEn;
String? healthId;
String? idNumber;
String? idType;
bool? isHijri;
int? isInstertedOrUpdated;
int? isNull;
int? isdynamic;
int? isPatientExistNHIC;
String? lastNameAr;
String? lastNameEn;
Null listActiveAccessToken;
dynamic listActiveAccessToken;
String? maritalStatus;
String? maritalStatusCode;
String? nationality;
@ -50,31 +50,31 @@ class CheckUserStatusResponse {
String? occupation;
String? patientStatus;
String? placeofBirth;
Null practitionerStatusCode;
Null practitionerStatusDescAr;
Null practitionerStatusDescEn;
dynamic practitionerStatusCode;
dynamic practitionerStatusDescAr;
dynamic practitionerStatusDescEn;
String? secondNameAr;
String? secondNameEn;
String? thirdNameAr;
String? thirdNameEn;
Null accessToken;
dynamic accessToken;
int? categoryCode;
Null categoryNameAr;
Null categoryNameEn;
dynamic categoryNameAr;
dynamic categoryNameEn;
int? constraintCode;
Null constraintNameAr;
Null constraintNameEn;
Null content;
Null licenseExpiryDate;
Null licenseIssuedDate;
Null licenseStatusCode;
Null licenseStatusDescAr;
Null licenseStatusDescEn;
Null organizations;
Null registrationNumber;
dynamic constraintNameAr;
dynamic constraintNameEn;
dynamic content;
dynamic licenseExpiryDate;
dynamic licenseIssuedDate;
dynamic licenseStatusCode;
dynamic licenseStatusDescAr;
dynamic licenseStatusDescEn;
dynamic organizations;
dynamic registrationNumber;
int? specialtyCode;
Null specialtyNameAr;
Null specialtyNameEn;
dynamic specialtyNameAr;
dynamic specialtyNameEn;
CheckUserStatusResponse(
{this.date,
@ -116,7 +116,7 @@ class CheckUserStatusResponse {
this.idType,
this.isHijri,
this.isInstertedOrUpdated,
this.isNull,
this.isdynamic,
this.isPatientExistNHIC,
this.lastNameAr,
this.lastNameEn,
@ -194,7 +194,7 @@ class CheckUserStatusResponse {
idType = json['IdType'];
isHijri = json['IsHijri'];
isInstertedOrUpdated = json['IsInstertedOrUpdated'];
isNull = json['IsNull'];
isdynamic = json['Isdynamic'];
isPatientExistNHIC = json['IsPatientExistNHIC'];
lastNameAr = json['LastNameAr'];
lastNameEn = json['LastNameEn'];
@ -274,7 +274,7 @@ class CheckUserStatusResponse {
data['IdType'] = this.idType;
data['IsHijri'] = this.isHijri;
data['IsInstertedOrUpdated'] = this.isInstertedOrUpdated;
data['IsNull'] = this.isNull;
data['Isdynamic'] = this.isdynamic;
data['IsPatientExistNHIC'] = this.isPatientExistNHIC;
data['LastNameAr'] = this.lastNameAr;
data['LastNameEn'] = this.lastNameEn;

@ -8,7 +8,7 @@ class CheckUserStatusRequest {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;

@ -8,7 +8,7 @@ class CheckPatientForRegistration {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
String? tokenID;

@ -17,7 +17,7 @@ class GetMobileLoginInfoRequest {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;

@ -1,66 +1,66 @@
class GetMobileLoginInfoResponse {
Null date;
dynamic date;
int? languageID;
int? serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
dynamic time;
dynamic androidLink;
dynamic authenticationTokenID;
dynamic data;
bool? dataw;
int? dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
dynamic errorCode;
dynamic errorEndUserMessage;
dynamic errorEndUserMessageN;
dynamic errorMessage;
int? errorType;
int? foodCategory;
Null iOSLink;
dynamic iOSLink;
bool? isAuthenticated;
int? mealOrderStatus;
int? mealType;
int? messageStatus;
int? numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null doctorInformationList;
Null getAllPendingRecordsList;
Null getAllSharedRecordsByStatusList;
Null getResponseFileList;
dynamic patientBlodType;
dynamic successMsg;
dynamic successMsgN;
dynamic doctorInformationList;
dynamic getAllPendingRecordsList;
dynamic getAllSharedRecordsByStatusList;
dynamic getResponseFileList;
bool? isHMGPatient;
bool? isLoginSuccessfully;
bool? isNeedUpdateIdintificationNo;
bool? kioskSendSMS;
Null list;
Null listAskHabibMobileLoginInfo;
Null listAskHabibPatientFile;
Null listMergeFiles;
dynamic list;
dynamic listAskHabibMobileLoginInfo;
dynamic listAskHabibPatientFile;
dynamic listMergeFiles;
List<ListMobileLoginInfo>? listMobileLoginInfo;
Null listPatientCount;
dynamic listPatientCount;
String? logInTokenID;
Null mohemmPrivilegeList;
dynamic mohemmPrivilegeList;
int? pateintID;
Null patientBloodType;
dynamic patientBloodType;
bool? patientHasFile;
Null patientMergedIDs;
dynamic patientMergedIDs;
bool? patientOutSA;
int? patientShareRequestID;
int? patientType;
int? projectIDOut;
Null returnMessage;
dynamic returnMessage;
bool? sMSLoginRequired;
Null servicePrivilegeList;
Null sharePatientName;
Null verificationCode;
Null email;
Null errorList;
dynamic servicePrivilegeList;
dynamic sharePatientName;
dynamic verificationCode;
dynamic email;
dynamic errorList;
bool? hasFile;
bool? isActiveCode;
bool? isMerged;
bool? isNeedUserAgreement;
bool? isSMSSent;
Null memberList;
Null message;
dynamic memberList;
dynamic message;
int? statusCode;
GetMobileLoginInfoResponse(

@ -1,48 +1,48 @@
class RegisterInfoResponse {
Null date;
dynamic date;
int? languageID;
int? serviceName;
Null time;
Null androidLink;
Null authenticationTokenID;
Null data;
dynamic time;
dynamic androidLink;
dynamic authenticationTokenID;
dynamic data;
bool? dataw;
int? dietType;
Null errorCode;
Null errorEndUserMessage;
Null errorEndUserMessageN;
Null errorMessage;
dynamic errorCode;
dynamic errorEndUserMessage;
dynamic errorEndUserMessageN;
dynamic errorMessage;
int? errorType;
int? foodCategory;
Null iOSLink;
dynamic iOSLink;
bool? isAuthenticated;
int? mealOrderStatus;
int? mealType;
int? messageStatus;
int? numberOfResultRecords;
Null patientBlodType;
Null successMsg;
Null successMsgN;
Null accessTokenObject;
dynamic patientBlodType;
dynamic successMsg;
dynamic successMsgN;
dynamic accessTokenObject;
int? age;
Null clientIdentifierId;
dynamic clientIdentifierId;
int? createdBy;
String? dateOfBirth;
String? firstNameAr;
String? firstNameEn;
String? gender;
Null genderAr;
Null genderEn;
dynamic genderAr;
dynamic genderEn;
String? healthId;
String? idNumber;
String? idType;
bool? isHijri;
int? isInstertedOrUpdated;
int? isNull;
int? isdynamic;
int? isPatientExistNHIC;
String? lastNameAr;
String? lastNameEn;
Null listActiveAccessToken;
dynamic listActiveAccessToken;
String? maritalStatus;
String? maritalStatusCode;
String? nationality;
@ -50,31 +50,31 @@ class RegisterInfoResponse {
String? occupation;
String? patientStatus;
String? placeofBirth;
Null practitionerStatusCode;
Null practitionerStatusDescAr;
Null practitionerStatusDescEn;
dynamic practitionerStatusCode;
dynamic practitionerStatusDescAr;
dynamic practitionerStatusDescEn;
String? secondNameAr;
String? secondNameEn;
String? thirdNameAr;
String? thirdNameEn;
Null accessToken;
dynamic accessToken;
int? categoryCode;
Null categoryNameAr;
Null categoryNameEn;
dynamic categoryNameAr;
dynamic categoryNameEn;
int? constraintCode;
Null constraintNameAr;
Null constraintNameEn;
Null content;
Null licenseExpiryDate;
Null licenseIssuedDate;
Null licenseStatusCode;
Null licenseStatusDescAr;
Null licenseStatusDescEn;
Null organizations;
Null registrationNumber;
dynamic constraintNameAr;
dynamic constraintNameEn;
dynamic content;
dynamic licenseExpiryDate;
dynamic licenseIssuedDate;
dynamic licenseStatusCode;
dynamic licenseStatusDescAr;
dynamic licenseStatusDescEn;
dynamic organizations;
dynamic registrationNumber;
int? specialtyCode;
Null specialtyNameAr;
Null specialtyNameEn;
dynamic specialtyNameAr;
dynamic specialtyNameEn;
RegisterInfoResponse(
{this.date,
@ -116,7 +116,7 @@ class RegisterInfoResponse {
this.idType,
this.isHijri,
this.isInstertedOrUpdated,
this.isNull,
this.isdynamic,
this.isPatientExistNHIC,
this.lastNameAr,
this.lastNameEn,
@ -194,7 +194,7 @@ class RegisterInfoResponse {
idType = json['IdType'];
isHijri = json['IsHijri'];
isInstertedOrUpdated = json['IsInstertedOrUpdated'];
isNull = json['IsNull'];
isdynamic = json['Isdynamic'];
isPatientExistNHIC = json['IsPatientExistNHIC'];
lastNameAr = json['LastNameAr'];
lastNameEn = json['LastNameEn'];
@ -274,7 +274,7 @@ class RegisterInfoResponse {
data['IdType'] = this.idType;
data['IsHijri'] = this.isHijri;
data['IsInstertedOrUpdated'] = this.isInstertedOrUpdated;
data['IsNull'] = this.isNull;
data['Isdynamic'] = this.isdynamic;
data['IsPatientExistNHIC'] = this.isPatientExistNHIC;
data['LastNameAr'] = this.lastNameAr;
data['LastNameEn'] = this.lastNameEn;

@ -9,7 +9,7 @@ class RegisterUserRequest {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
String? dob;

@ -18,7 +18,7 @@ class SendActivationRequest {
String? iPAdress;
String? generalid;
int? patientOutSA;
Null sessionID;
dynamic sessionID;
bool? isDentalAllowedBackend;
int? deviceTypeID;
String? sMSSignature;

@ -52,7 +52,7 @@ class ListClinicCentralized {
class ListGetBookScheduleConfigsList {
int? iD;
String? description;
Null descriptionN;
dynamic descriptionN;
bool? value;
bool? isActive;

@ -24,11 +24,11 @@ class ClinicsServiceTimingsResponse {
class PatientERGetClinicsServiceTimingsList {
int? iD;
int? serviceID;
Null shiftID;
dynamic shiftID;
int? dayOfWeek;
String? dayOfWeekStr;
Null startTime;
Null endTime;
dynamic startTime;
dynamic endTime;
bool? isActive;
String? createdOn;
String? createdBy;

@ -8,7 +8,7 @@ class AncillaryOrdersListProcListModel {
String? companyName;
int? doctorID;
String? doctorName;
Null errCode;
dynamic errCode;
int? groupID;
String? insurancePolicyNo;
String? message;

@ -45,7 +45,7 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).bookAppo,
backgroundColor: Color(0xFFF7F7F7),
onTap: widget.onBackClick!(),
onTap: widget.onBackClick,
body: Column(
children: [
TabBar(
@ -79,7 +79,7 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
child: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [
SearchByClinic(clnicIds: widget.clnicIds!),
SearchByClinic(clnicIds: widget.clnicIds),
SearchByDoctor(),
],
controller: _tabController,

@ -30,7 +30,7 @@ import 'LaserClinic.dart';
import 'LiveCareBookAppointment.dart';
class SearchByClinic extends StatefulWidget {
final List clnicIds;
final List? clnicIds;
SearchByClinic({required this.clnicIds});
@ -40,10 +40,9 @@ class SearchByClinic extends StatefulWidget {
class _SearchByClinicState extends State<SearchByClinic> {
bool nearestAppo = false;
late String dropdownValue;
String dropdownValue = "";
String dropdownTitle = "";
late String projectDropdownValue;
String projectDropdownValue = "";
// var event = RobotProvider();
List<ListClinicCentralized> clinicsList = [];
@ -52,8 +51,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false;
bool isProjectLoaded = false;
late ListClinicCentralized selectedClinic;
late HospitalsModel selectedHospital;
ListClinicCentralized selectedClinic = ListClinicCentralized();
HospitalsModel selectedHospital = HospitalsModel();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
@ -63,7 +62,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
TextEditingController ageController = new TextEditingController();
late ProjectViewModel projectViewModel;
late String radioValue;
String radioValue = "";
late LocationUtils locationUtils;
@ -212,7 +211,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
],
),
),
widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true
widget.clnicIds != null && widget.clnicIds!.length > 1 && isLoaded == true
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: clinicsList.map<Widget>((result) {
@ -324,17 +323,22 @@ class _SearchByClinicState extends State<SearchByClinic> {
isExpanded: true,
style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
items: projectsList.map((item) {
return new DropdownMenuItem<HospitalsModel>(
return DropdownMenuItem<HospitalsModel>(
value: item,
child: new Text(item.name!),
child: Text(item.name!),
);
}).toList(),
onChanged: (newValue) async {
setState(() {
selectedHospital = newValue!;
selectedHospital = HospitalsModel.fromJson(newValue!.toJson());
projectDropdownValue = newValue.mainProjectID.toString();
if (dropdownValue.split("-")[0] == "253") {
Navigator.push(context, FadePage(page: LaserClinic(selectedHospital: selectedHospital)));
Navigator.push(
context,
FadePage(
page: LaserClinic(selectedHospital: selectedHospital),
),
);
} else {
getDoctorsList(context);
}
@ -686,8 +690,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() {
setState(() {
if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1).toList();
if (widget.clnicIds != null && widget.clnicIds!.length > 0) {
clinicsList = clinicsList.where((i) => widget.clnicIds!.indexOf(i.clinicID) > -1).toList();
isLoaded = true;
}
});

@ -27,7 +27,7 @@ class CovidDrivethruLocation extends StatefulWidget {
}
class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
late String projectDropdownValue;
String projectDropdownValue = '';
List<DriveThroughTestingCenterModel> projectsList = [];
List<CovidTestProceduresResponse> proceduresList = [];
bool isLocationSelected = false;
@ -37,7 +37,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectID = "";
List<ImagesInfo> imagesInfo = [];
late DriveThroughTestingCenterModel selectedProject;
DriveThroughTestingCenterModel selectedProject = DriveThroughTestingCenterModel();
final GlobalKey locationDropdownKey = GlobalKey();
late ProjectViewModel projectViewModel;

@ -48,16 +48,16 @@ class MyFamily extends StatefulWidget {
}
class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
List<ImagesInfo> imagesInfo =[];
List<ImagesInfo> imagesInfo = [];
final familyFileProvider = FamilyFilesProvider();
AppSharedPreferences sharedPref = new AppSharedPreferences();
AppSharedPreferences sharedPref = AppSharedPreferences();
var userID;
late TabController _tabController;
int _tabIndex = 0;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
late ProjectViewModel projectViewModel;
late AuthenticatedUser user;
AuthenticatedUser user = AuthenticatedUser();
VitalSignService _vitalSignService = locator<VitalSignService>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
late ToDoCountProviderModel toDoProvider;
@ -447,13 +447,11 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
refreshFamily(context);
GifLoaderDialogUtils.hideDialog(context);
});
}
refreshFamily(context) async {
await sharedPref.remove(FAMILY_FILE);
await checkUserData();
await sharedPref.remove(FAMILY_FILE);
await checkUserData();
}
switchUser(user, context) {
@ -528,9 +526,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.acceptRejectFamily(request).then((value) async{
await refreshFamily(context);
this.familyFileProvider.acceptRejectFamily(request).then((value) async {
await refreshFamily(context);
GifLoaderDialogUtils.hideDialog(context);
});
}
@ -541,11 +538,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// var data2 = AuthenticatedUser.fromJson(await this.sharedPref.getObject(MAIN_USER));
await getFamilyFiles();
this.user = data;
setState(() {
});
this.user = data;
setState(() {});
}
}
@ -562,19 +556,18 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context);
try {
if (familySharedRecords == null) {
familySharedRecords = await familyFileProvider.getSharedRecordByStatus();
}
sentRecordsList =[];
familySharedRecordsList =[];
sentRecordsList = [];
familySharedRecordsList = [];
familySharedRecords.getAllSharedRecordsByStatusList!.forEach((element) {
if (element.status == 3) {
familySharedRecordsList.add(element);
}
sentRecordsList.add(element);
});
approvedRecordsList =[];
pendingRecordsList =[];
approvedRecordsList = [];
pendingRecordsList = [];
GetAllSharedRecordsByStatusResponse pendingAndApprovedRecords = await getUserViewRequest();
pendingAndApprovedRecords.getAllSharedRecordsByStatusList!.forEach((element) {
@ -586,7 +579,6 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
});
} catch (ex) {
familySharedRecords = GetAllSharedRecordsByStatusResponse(getAllSharedRecordsByStatusList: []);
}
GifLoaderDialogUtils.hideDialog(context);

@ -62,7 +62,7 @@ class _DdServicesPageState extends State<DdServicesPage> {
EdOnlineQuestionsPage(
changePageViewIndex: _changePageViewIndex,
selectedQuestions: selectedQuestions,
selectedHospital: triageInformationRequest.selectedHospital!,
selectedHospital: triageInformationRequest.selectedHospital,
),
EdOnlineNotesPage(
changePageViewIndex: _changePageViewIndex,
@ -70,7 +70,7 @@ class _DdServicesPageState extends State<DdServicesPage> {
triageInformationRequest: triageInformationRequest,
),
EdPaymentInformationPage(
selectedHospital: triageInformationRequest.selectedHospital!,
selectedHospital: triageInformationRequest.selectedHospital,
)
],
),

@ -22,9 +22,9 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class EdPaymentInformationPage extends StatefulWidget {
final HospitalsModel selectedHospital;
final HospitalsModel? selectedHospital;
const EdPaymentInformationPage({Key? key, required this.selectedHospital}) : super(key: key);
const EdPaymentInformationPage({Key? key, this.selectedHospital}) : super(key: key);
@override
_EdPaymentInformationPageState createState() => _EdPaymentInformationPageState();
@ -138,8 +138,8 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
print(value);
if (value != null) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.selectedHospital.iD;
openPayment(value[0], projectViewModel.user!, model.erPatientShareModel.patientShareWithTax!, appo);
appo.projectID = widget.selectedHospital!.iD;
openPayment(value[0], projectViewModel.user, model.erPatientShareModel.patientShareWithTax!, appo);
}
},
);
@ -166,7 +166,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user!.patientID!);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital!.iD, projectViewModel.user!.patientID!);
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress!, paymentMethod, authenticatedUser.patientType,
authenticatedUser.firstName!, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context);
}

@ -32,6 +32,7 @@ class _NearestErState extends State<NearestEr> {
@override
void initState() {
isDataLoaded = false;
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) {
locationUtils.getCurrentLocation();

@ -177,7 +177,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_getConfirmedAppoActionsList();
}
} else {
print("isConfirmed Null");
print("isConfirmed dynamic");
}
if (isBooked()) {
if (widget.appo.isOnlineCheckedIN!) {
@ -186,7 +186,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_getBookedAppoActionsList();
}
} else {
print("isBooked Null");
print("isBooked dynamic");
}
if (isArrived()) {
if (widget.appo.clinicID == 17) {
@ -195,10 +195,10 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_getArrivedAppoActionsList();
}
} else {
print("isArrived Null");
print("isArrived dynamic");
}
} else {
print("Appo Null");
print("Appo dynamic");
}
}

@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:in_app_update/in_app_update.dart';
import 'package:url_launcher/url_launcher.dart';
class AppUpdatePage extends StatefulWidget {
@ -79,16 +78,16 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
openAppUpdateLink() {
if (Platform.isAndroid) {
// _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
InAppUpdate.checkForUpdate().then((info) {
print("checkForUpdate!!!");
print(info.toString());
if (info.immediateUpdateAllowed) {
print("Immediate Allowed!!!");
InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
}
}).catchError((e) {
print(e.toString());
});
// InAppUpdate.checkForUpdate().then((info) {
// print("checkForUpdate!!!");
// print(info.toString());
// if (info.immediateUpdateAllowed) {
// print("Immediate Allowed!!!");
// InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
// }
// }).catchError((e) {
// print(e.toString());
// });
}
if (Platform.isIOS) {
_launchURL("https://itunes.apple.com/app/id733503978");

@ -14,7 +14,7 @@ import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList? appointment;
final MessageType messageType;
const FeedbackHomePage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
const FeedbackHomePage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override
_FeedbackHomePageState createState() => _FeedbackHomePageState();
@ -72,7 +72,8 @@ class _FeedbackHomePageState extends State<FeedbackHomePage> with SingleTickerPr
controller: _tabController,
children: <Widget>[
SendFeedbackPage(
appointment: widget.appointment!,
appointment: widget.appointment,
messageType: widget.messageType,
),
StatusFeedbackPage()

@ -25,6 +25,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
// import 'package:speech_to_text/speech_recognition_error.dart';
// import 'package:speech_to_text/speech_to_text.dart' as stt;
@ -43,12 +44,13 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextEditingController messageController = TextEditingController();
List<String> images = [];
late String title;
late AppoitmentAllHistoryResultList appointHistory;
AppoitmentAllHistoryResultList appointHistory = AppoitmentAllHistoryResultList();
bool isShowListAppointHistory = true;
late String message;
String message = "";
final formKey = GlobalKey<FormState>();
MessageType messageType = MessageType.NON;
var _currentLocaleId;
// stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord;
int selectedStatusIndex = 5;
@ -91,7 +93,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
void initState() {
setState(() {
this.messageType = widget.messageType;
this.appointHistory = widget.appointment!;
this.appointHistory = widget.appointment ?? AppoitmentAllHistoryResultList();
});
// requestPermissions();
event.controller.stream.listen((p) {
@ -491,7 +493,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
if (res['MessageStatus'] == 1) {
if (res['AppoimentAllHistoryResultList'].length != 0) {
res['AppoimentAllHistoryResultList'].forEach((v) {
appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
appoList.add(AppoitmentAllHistoryResultList.fromJson(v));
});
setState(() {
appointHistory = AppoitmentAllHistoryResultList();
@ -522,11 +524,11 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
_currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
// bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
// if (available) {
// speech.listen(
// onResult: resultListener,
// listenMode: stt.ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// );
// speech.listen(
// onResult: resultListener,
// listenMode: stt.ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// );
// } else {
// print("The user has denied the use of speech recognition.");
// }
@ -535,7 +537,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
// void errorListener(SpeechRecognitionError error) {
// event.setValue({"searchText": 'null'});
// SpeechToText.closeAlertDialog(context);
// print(error);
// print(error);
// }
void statusListener(String status) {

@ -84,8 +84,13 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
},
child: LoggedSliderView(
projectViewModel,
new SliderData(TranslationBase.of(context).fileno + ": " + (projectViewModel.user?.patientID?.toString() ?? ""),
projectViewModel.user!.firstName! + ' ' + (projectViewModel.user?.lastName ?? ""), "", bannerColor[0].darkColor, bannerColor[0].lightColor),
new SliderData(
TranslationBase.of(context).fileno + ": " + (projectViewModel.user.patientID.toString()?? ""),
projectViewModel.user.firstName! + ' ' + (projectViewModel.user.lastName ?? ""),
"",
bannerColor[0].darkColor,
bannerColor[0].lightColor,
),
widget.model,
),
),
@ -97,7 +102,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
child: SliderView(
onLoginClick: () {
widget.onLoginClick!();
widget.onLoginClick;
projectViewModel.analytics.loginRegistration.login_register_initiate();
},
),

@ -645,7 +645,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
authService.getDashboard().then((value) => {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
notificationCount = value['List_PatientDashboard'].isNotEmpty?? value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(int.parse(notificationCount));

@ -122,7 +122,7 @@ class LoggedSliderView extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(left: 20, right: 20),
child: Text(
'${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user!.dateofBirthDataTime!)} ,${projectViewModel.user!.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${projectViewModel.user!.age.toString() + " " + TranslationBase.of(context).patientAge.toString()}',
'${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime!)} ,${projectViewModel.user!.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${projectViewModel.user!.age.toString() + " " + TranslationBase.of(context).patientAge.toString()}',
style: TextStyle(
color: Colors.white,
fontSize: 12,

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
@ -40,11 +41,11 @@ class _Login extends State<Login> {
final nationalIDorFile = TextEditingController();
final mobileNumberController = TextEditingController();
int loginType = LoginType.loginType;
late String mobileNo;
String? mobileNo;
String countryCode = '966';
bool isButtonDisabled = true;
final authService = new AuthProvider();
var sharedPref = new AppSharedPreferences();
final authService = AuthProvider();
var sharedPref = AppSharedPreferences();
bool isLoading = false;
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
@ -62,8 +63,8 @@ class _Login extends State<Login> {
super.initState();
// if (BASE_URL.contains("uat.")) {
// nationalIDorFile.text = "2001273";
// mobileNumberController.text = mobileNo = "0555416043";
// nationalIDorFile.text = "2344670985";
// mobileNumberController.text = mobileNo = "0537503378";
// }
getRegisterData();
/* else {
@ -106,7 +107,13 @@ class _Login extends State<Login> {
SizedBox(height: 50),
Text(
loginType == 1 ? TranslationBase.of(context).enterNationalId : TranslationBase.of(context).enterFile,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,
height: 23 / 16,
),
),
SizedBox(height: 20),
PhoneNumberSelectorWidget(
@ -116,8 +123,13 @@ class _Login extends State<Login> {
),
SizedBox(height: 12),
Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(loginType == 1 ? TranslationBase.of(context).nationalIdNumber : TranslationBase.of(context).medicalFileNumber, "Xxxxxxxxx", nationalIDorFile)),
textDirection: TextDirection.ltr,
child: inputWidget(
loginType == 1 ? TranslationBase.of(context).nationalIdNumber : TranslationBase.of(context).medicalFileNumber,
"Xxxxxxxxx",
nationalIDorFile,
),
),
],
),
),
@ -126,11 +138,10 @@ class _Login extends State<Login> {
),
DefaultButton(
TranslationBase.of(context).login,
isButtonDisabled
? null
: () {
this.startLogin();
},
() {
// if (!isButtonDisabled)
this.startLogin();
},
disabledColor: Color(0xff575757),
),
]),
@ -221,9 +232,9 @@ class _Login extends State<Login> {
}
startLogin() {
if (isButtonDisabled == false) {
//if (isButtonDisabled == false) {
checkUserAuthentication();
}
// }
}
void validateForm() {
@ -233,7 +244,7 @@ class _Login extends State<Login> {
});
} else {
setState(() {
isButtonDisabled = true;
isButtonDisabled = false;
});
}
}
@ -242,7 +253,7 @@ class _Login extends State<Login> {
// showLoader(true);
var request = CheckPatientAuthenticationReq();
request.isRegister = false;
request.patientMobileNumber = int.parse(mobileNo);
request.patientMobileNumber = int.parse(mobileNo!);
request.zipCode = countryCode;
request.searchType = this.loginType;
request.deviceTypeID = this.loginType;
@ -257,16 +268,16 @@ class _Login extends State<Login> {
GifLoaderDialogUtils.showMyDialog(context);
authService.checkPatientAuthentication(request).then((value) {
// if (value['UserAccountIsActivated']) {
if (value['isSMSSent']) {
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']);
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request);
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).push(FadePage(page: ConfirmLogin()));
} else {
if (value['IsAuthenticated']) {
this.checkActivationCode();
}
if (value['isSMSSent']) {
sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']);
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request);
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).push(FadePage(page: ConfirmLogin()));
} else {
if (value['IsAuthenticated']) {
this.checkActivationCode();
}
}
// } else {
// ConfirmDialog activationDialog = new ConfirmDialog(
// context: context,
@ -316,7 +327,7 @@ class _Login extends State<Login> {
checkActivationCode({code}) async {
Map<String, dynamic> request = {};
if (code == null) request['PatientMobileNumber'] = int.parse(mobileNo);
if (code == null) request['PatientMobileNumber'] = int.parse(mobileNo!);
request['ZipCode'] = countryCode;
request['SearchType'] = loginType;
request['LoginType'] = loginType;

@ -178,7 +178,7 @@ class _Register extends State<Register> {
);
}
Future<Null> _selectDate(BuildContext context) async {
Future<dynamic> _selectDate(BuildContext context) async {
DatePicker.showDatePicker(
context,
showTitleActions: true,

@ -38,16 +38,16 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
TextEditingController _fileTextController = TextEditingController();
TextEditingController _notesTextController = TextEditingController();
BeneficiaryType beneficiaryType = BeneficiaryType.NON;
late HospitalsModel _selectedHospital;
HospitalsModel _selectedHospital = HospitalsModel();
String amount = "";
late String email;
late PatientInfo _selectedPatientInfo;
late AuthenticatedUser authenticatedUser;
late GetAllSharedRecordsByStatusList selectedPatientFamily;
String email = "";
PatientInfo _selectedPatientInfo = PatientInfo();
AuthenticatedUser authenticatedUser = AuthenticatedUser();
GetAllSharedRecordsByStatusList selectedPatientFamily = GetAllSharedRecordsByStatusList();
AdvanceModel advanceModel = AdvanceModel();
AppSharedPreferences sharedPref = AppSharedPreferences();
late AuthenticatedUser authUser;
AuthenticatedUser authUser = AuthenticatedUser();
List<ImagesInfo> imagesInfo =[];
@ -263,7 +263,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
if (model.user != null)
NewTextFields(
hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user!.emailAddress!,
initialValue: model.user.emailAddress,
onChanged: (value) {
email = value;
},
@ -446,7 +446,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
}
String getHospitalName() {
if (_selectedHospital != null)
if (_selectedHospital != null && _selectedHospital.name != null)
return _selectedHospital.name!;
else
return TranslationBase.of(context).selectHospital;

@ -126,9 +126,9 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
child: IndexedStack(
index: _currentPage,
children: [
ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user!.emailAddress!),
ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user!.emailAddress!),
ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user!.emailAddress!),
ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress),
],
),
)

@ -42,7 +42,11 @@ class _MyVaccinesState extends State<MyVaccines> {
children: <Widget>[
AppExpandableNotifier(
isExpand: true,
title: model.state == ViewState.Idle ? DateUtil.convertStringToDate(model.vaccineList[0].vaccinationDate!).year.toString() : "",
title: model.state == ViewState.Idle
? model.vaccineList.isEmpty
? ""
: DateUtil.convertStringToDate(model.vaccineList[0].vaccinationDate!).year.toString()
: "",
bodyWidget: Container(
child: ListView.separated(
physics: ScrollPhysics(),
@ -69,29 +73,30 @@ class _MyVaccinesState extends State<MyVaccines> {
),
),
),
SizedBox(height: 40.0,)
SizedBox(
height: 40.0,
)
// SpaceBetweenTexts(space: 165.0),
],
),
),
bottomSheet: Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).sendEmail,
() {
showDialog(
context: context,
builder: (cxt) => ConfirmSendEmailDialog(
email: projectViewModel.user!.emailAddress!,
onTapSendEmail: () {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
);
},
)
),
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).sendEmail,
() {
showDialog(
context: context,
builder: (cxt) => ConfirmSendEmailDialog(
email: projectViewModel.user!.emailAddress!,
onTapSendEmail: () {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
);
},
)),
),
);
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/main.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart';
@ -68,7 +69,7 @@ class AuthProvider with ChangeNotifier {
}
void getUserAuthentication() async {
Map profile = await sharedPref.getObject(USER_PROFILE);
Map profile = await sharedPref.getObject(USER_PROFILE) ?? Map();
languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
if (profile != null) {
isLoading = false;
@ -153,16 +154,20 @@ class AuthProvider with ChangeNotifier {
Future<SelectDeviceIMEIRES> selectDeviceImei(imei) async {
try {
dynamic localRes;
print(imei);
Map<String, dynamic> request = {};
request['IMEI'] = imei;
await new BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
localRes = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
localRes = Map();
if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) {
localRes = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
}
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
return Future.value(null);
return Future.error(error);
}
}
@ -247,7 +252,7 @@ class AuthProvider with ChangeNotifier {
return Future.value(localRes);
}
Future<dynamic> checkActivationCode(request, [value]) async {
Future<dynamic> checkActivationCode(request, [value]) async {
var neRequest = CheckActivationCodeReq.fromJson(request);
neRequest.activationCode = value ?? "0000";
@ -376,16 +381,14 @@ class AuthProvider with ChangeNotifier {
requestN.patientOutSA = requestN.patientobject!.patientOutSA!;
final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
if(nhic !=null) {
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(
dateFormat.parse(nhic['DateOfBirth']));
if (nhic != null) {
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
requestN.healthId = requestN.patientobject!.eHealthIDField!;
}
requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966';
await sharedPref.remove(USER_PROFILE);
dynamic localRes;

@ -53,7 +53,7 @@ class FamilyFilesProvider with ChangeNotifier {
sharedPref.setObject(FAMILY_FILE, localRes);
return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(localRes));
} catch (error) {
print(error);
print("-------" + error.toString());
throw error;
}
}
@ -258,14 +258,22 @@ class FamilyFilesProvider with ChangeNotifier {
// request['LogInTokenID'] = '';
// request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['PatientOutSA'] = switchUser.familyRegionID != null ? switchUser.familyRegionID == 1 ? 0 : 1 : currentUser.outSA; //currentUser.outSA; //? 1 : 0;
request['PatientOutSA'] = switchUser.familyRegionID != null
? switchUser.familyRegionID == 1
? 0
: 1
: currentUser.outSA; //currentUser.outSA; //? 1 : 0;
request['PatientMobileNumber'] = switchUser.mobileNumber; //['MobileNumber'];
request['SearchType'] = 2;
request['SuperUser'] = switchUser.patientID; //currentUser.PatientID;
request['PatientIdentificationID'] = '';
request['IsSilentLogin'] = true;
request['PatientID'] = switchUser.responseID; //['PatientID'];
request['ZipCode'] = switchUser.familyRegionID != null ? switchUser.familyRegionID == 1 ? "966" : "971" : "966";
request['ZipCode'] = switchUser.familyRegionID != null
? switchUser.familyRegionID == 1
? "966"
: "971"
: "966";
// request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966";
request['activationCode'] = '0000';
request['isRegister'] = false;
@ -273,7 +281,7 @@ class FamilyFilesProvider with ChangeNotifier {
try {
dynamic localRes;
await new BaseAppClient().post(ACTIVATION_CODE_URL, onSuccess: (dynamic response, int statusCode) {
await BaseAppClient().post(ACTIVATION_CODE_URL, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
@ -34,6 +35,7 @@ class _SplashScreenState extends State<SplashScreen> {
Duration(seconds: 1, milliseconds: 500),
() {
loadPrivilege().then((value) {
print(value);
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (BuildContext context) => LandingPage(),
@ -44,7 +46,7 @@ class _SplashScreenState extends State<SplashScreen> {
);
AppSharedPreferences().getAll().then((value) {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
}
@ -59,7 +61,7 @@ class _SplashScreenState extends State<SplashScreen> {
AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en");
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
PushNotificationHandler(context).init(); // Asyncronously
if (Platform.isIOS) PushNotificationHandler.getInstance().init(context); // Asyncronously
}
@override

@ -115,8 +115,9 @@ _incomingCall(Map<String, dynamic> data) async {
}
class PushNotificationHandler {
final BuildContext context;
static late PushNotificationHandler _instance;
late BuildContext context;
static final PushNotificationHandler _instance = PushNotificationHandler._internal();
final voIPKit = FlutterIOSVoIPKit.instance;
late HmsApiAvailability hmsApiAvailability;
@ -143,9 +144,9 @@ class PushNotificationHandler {
"is_call": "true"
};
PushNotificationHandler(this.context) {
PushNotificationHandler._instance = this;
}
PushNotificationHandler._internal();
factory PushNotificationHandler() => _instance;
static PushNotificationHandler getInstance() => _instance;
@ -163,11 +164,15 @@ class PushNotificationHandler {
});
}
init() async {
init(BuildContext context) async {
this.context = context;
// VoIP Callbacks
voIPKit.getVoIPToken().then((value) {
print('🎈 example: getVoIPToken: $value');
AppSharedPreferences().setString(APNS_TOKEN, value!);
if (value != null) {
AppSharedPreferences().setString(APNS_TOKEN, value);
}
});
voIPKit.onDidUpdatePushToken = (
@ -263,12 +268,12 @@ class PushNotificationHandler {
try {
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage? message) async {
if (message! != null) {
if (message != null) {
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message! != null) newMessage(message!);
if (message != null) newMessage(message);
});
else if (message! != null) newMessage(message!);
else if (message != null) newMessage(message);
}
});
} catch (ex) {}

@ -6,7 +6,7 @@ import 'dart:typed_data';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:badges/badges.dart' as badge_import;
import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:crypto/crypto.dart' as crypto;
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
@ -75,7 +75,7 @@ class Utils {
/// Check The Internet Connection
static Future<bool> checkConnection({bool bypassConnectionCheck = false}) async {
if (bypassConnectionCheck) return true;
//return true;
ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) {
return true;
@ -101,9 +101,14 @@ class Utils {
static showPermissionConsentDialog(BuildContext context, String message, VoidCallback? onTap) {
showDialog(
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: TranslationBase.of(context).covidConsentHeader,
builder: (cxt) =>
CovidConsentDialog(
okTitle: TranslationBase
.of(context)
.acceptLbl,
title: TranslationBase
.of(context)
.covidConsentHeader,
message: message,
onTap: onTap!,
));
@ -156,19 +161,21 @@ class Utils {
}
static String getAdvancePaymentTransID(int projectID, int fileNumber) {
return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString();
return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime
.now()
.millisecondsSinceEpoch
.toString();
}
bool validateIDBox(String value, type) {
String pattern = loginIDPattern(type).toString(); //r'^\d+(?:\.\d+)?$';
RegExp regex = new RegExp(pattern);
bool validateIDBox(String value, int type) {
String pattern = loginIDPattern(type); // Get the pattern based on type
RegExp regex = RegExp(pattern);
return regex.hasMatch(value);
}
String loginIDPattern(loginType) {
String loginIDPattern(int loginType) {
var length = loginType == 1 ? 10 : 1;
return "([0-9]{" + length.toString() + "})";
return "([0-9]{$length})";
}
static showProgressDialog(context, [String message = "Loading..."]) async {
@ -226,74 +233,86 @@ class Utils {
onTap: () => projectViewModel!.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null,
child: isLogin!
? Stack(children: [
Container(
width: double.infinity,
height: double.infinity,
child: MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
),
projectViewModel.isArabic
? !projectViewModel.user!.isFamily
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.user!.isFamily
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
Container(
width: double.infinity,
height: double.infinity,
child: MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
isEnable: projectViewModel!.havePrivilege(5)),
),
projectViewModel.isArabic
? !projectViewModel.user!.isFamily
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.user!.isFamily
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
),
));
if (projectViewModel.havePrivilege(10)) {
medical.add(InkWell(
onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
title: TranslationBase
.of(context)
.lab,
imagePath: 'lab_result.svg',
subTitle: TranslationBase.of(context).labSubtitle,
subTitle: TranslationBase
.of(context)
.labSubtitle,
),
));
}
@ -301,9 +320,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
title: TranslationBase
.of(context)
.radiology,
imagePath: 'radiology.svg',
subTitle: TranslationBase.of(context).radiologySubtitle,
subTitle: TranslationBase
.of(context)
.radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7),
),
));
@ -311,24 +334,33 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
title: TranslationBase
.of(context)
.medicines,
imagePath: 'medicine_prescription.svg',
subTitle: TranslationBase.of(context).medicinesSubtitle,
subTitle: TranslationBase
.of(context)
.medicinesSubtitle,
isEnable: projectViewModel.havePrivilege(12),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(25)
onTap: () =>
projectViewModel.havePrivilege(25)
? Navigator.push(
context,
FadePage(page: VitalSignDetailsScreen()),
)
context,
FadePage(page: VitalSignDetailsScreen()),
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).vitalSigns,
title: TranslationBase
.of(context)
.vitalSigns,
imagePath: 'vital_signs.svg',
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
subTitle: TranslationBase
.of(context)
.vitalSignsSubtitle,
isEnable: projectViewModel.havePrivilege(25),
),
));
@ -338,32 +370,45 @@ class Utils {
if (projectViewModel.havePrivilege(48)) Navigator.push(context, FadePage(page: ActiveMedicationsPage()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical,
title: TranslationBase
.of(context)
.myMedical,
imagePath: 'active_medication.svg',
subTitle: TranslationBase.of(context).myMedicalSubtitle,
subTitle: TranslationBase
.of(context)
.myMedicalSubtitle,
isEnable: projectViewModel.havePrivilege(48),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
onTap: () =>
projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
MedicalProfileItem(title: TranslationBase
.of(context)
.myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase
.of(context)
.myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).invoicesList,
title: TranslationBase
.of(context)
.invoicesList,
imagePath: 'invoice_list.svg',
subTitle: TranslationBase.of(context).myInvoice,
subTitle: TranslationBase
.of(context)
.myInvoice,
isEnable: projectViewModel.havePrivilege(14),
),
));
@ -372,10 +417,14 @@ class Utils {
onTap: () => projectViewModel.havePrivilege(85) ? Navigator.push(context, FadePage(page: AnicllaryOrders())) : null,
// onTap: () => Navigator.push(context, FadePage(page: AnicllaryOrders())),
child: MedicalProfileItem(
title: TranslationBase.of(context).anicllaryOrders,
title: TranslationBase
.of(context)
.anicllaryOrders,
imagePath: 'ancillary.svg',
isPngImage: false,
subTitle: TranslationBase.of(context).myInvoice,
subTitle: TranslationBase
.of(context)
.myInvoice,
isEnable: projectViewModel.havePrivilege(85),
),
));
@ -383,19 +432,35 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
title: TranslationBase
.of(context)
.eye,
imagePath: 'eye_measurement.svg',
subTitle: TranslationBase.of(context).eyeSubtitle,
subTitle: TranslationBase
.of(context)
.eyeSubtitle,
isEnable: projectViewModel.havePrivilege(14),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(22) ? Navigator.push(context, FadePage(page: InsuranceCard(appointmentNo: 0,))) : null,
onTap: () =>
projectViewModel.havePrivilege(22)
? Navigator.push(
context,
FadePage(
page: InsuranceCard(
appointmentNo: 0,
)))
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insurance,
title: TranslationBase
.of(context)
.insurance,
imagePath: 'insurance_card.svg',
subTitle: TranslationBase.of(context).insuranceSubtitle,
subTitle: TranslationBase
.of(context)
.insuranceSubtitle,
isEnable: projectViewModel.havePrivilege(22),
),
));
@ -405,18 +470,34 @@ class Utils {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).updateInsurance,
title: TranslationBase
.of(context)
.updateInsurance,
imagePath: 'insurance_card.svg',
subTitle: TranslationBase.of(context).updateInsuranceSubtitle,
subTitle: TranslationBase
.of(context)
.updateInsuranceSubtitle,
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval(appointmentNo: 0,))) : null,
onTap: () =>
projectViewModel.havePrivilege(18)
? Navigator.push(
context,
FadePage(
page: InsuranceApproval(
appointmentNo: 0,
)))
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval,
title: TranslationBase
.of(context)
.insuranceApproval,
imagePath: 'insurance_approval.svg',
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
subTitle: TranslationBase
.of(context)
.insuranceApprovalSubtitle,
isEnable: projectViewModel.havePrivilege(18),
),
));
@ -424,9 +505,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).allergies,
title: TranslationBase
.of(context)
.allergies,
imagePath: 'allergies_diagnosed.svg',
subTitle: TranslationBase.of(context).allergiesSubtitle,
subTitle: TranslationBase
.of(context)
.allergiesSubtitle,
isEnable: projectViewModel.havePrivilege(23),
),
));
@ -434,9 +519,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myVaccines,
title: TranslationBase
.of(context)
.myVaccines,
imagePath: 'vaccine_list.svg',
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
subTitle: TranslationBase
.of(context)
.myVaccinesSubtitle,
isEnable: projectViewModel.havePrivilege(26),
),
));
@ -444,9 +533,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
title: TranslationBase
.of(context)
.medical,
imagePath: 'medical_report.svg',
subTitle: TranslationBase.of(context).medicalSubtitle,
subTitle: TranslationBase
.of(context)
.medicalSubtitle,
isEnable: projectViewModel.havePrivilege(20),
),
));
@ -454,9 +547,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).monthly,
title: TranslationBase
.of(context)
.monthly,
imagePath: 'monthly_report.svg',
subTitle: TranslationBase.of(context).monthlySubtitle,
subTitle: TranslationBase
.of(context)
.monthlySubtitle,
isEnable: projectViewModel.havePrivilege(19),
),
));
@ -464,9 +561,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
title: TranslationBase
.of(context)
.sick,
imagePath: 'sick_leave.svg',
subTitle: TranslationBase.of(context).sickSubtitle,
subTitle: TranslationBase
.of(context)
.sickSubtitle,
isEnable: projectViewModel.havePrivilege(16),
),
));
@ -474,9 +575,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myBalance,
title: TranslationBase
.of(context)
.myBalance,
imagePath: 'balance_credit.svg',
subTitle: TranslationBase.of(context).myBalanceSubtitle,
subTitle: TranslationBase
.of(context)
.myBalanceSubtitle,
isEnable: projectViewModel.havePrivilege(47),
),
));
@ -491,9 +596,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myTrackers,
title: TranslationBase
.of(context)
.myTrackers,
imagePath: 'tracker.svg',
subTitle: TranslationBase.of(context).myTrackersSubtitle,
subTitle: TranslationBase
.of(context)
.myTrackersSubtitle,
isEnable: projectViewModel.havePrivilege(24),
),
));
@ -501,9 +610,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatchesSubtitle,
title: TranslationBase
.of(context)
.smartWatchesSubtitle,
imagePath: 'smart_watch.svg',
subTitle: TranslationBase.of(context).smartWatches,
subTitle: TranslationBase
.of(context)
.smartWatches,
isEnable: projectViewModel.havePrivilege(30),
),
));
@ -511,14 +624,20 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYour, isEnable: projectViewModel.havePrivilege(28)),
title: TranslationBase
.of(context)
.askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase
.of(context)
.askYour, isEnable: projectViewModel.havePrivilege(28)),
));
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
if (Platform.isAndroid) {
showPermissionConsentDialog(context, TranslationBase.of(context).wifiPermission, () {
showPermissionConsentDialog(context, TranslationBase
.of(context)
.wifiPermission, () {
connectWifi(projectViewModel, context);
});
} else {
@ -526,9 +645,13 @@ class Utils {
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
title: TranslationBase
.of(context)
.internet,
imagePath: 'internet_connection.svg',
subTitle: TranslationBase.of(context).internetSubtitle,
subTitle: TranslationBase
.of(context)
.internetSubtitle,
),
));
}
@ -536,9 +659,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).chatbot,
title: TranslationBase
.of(context)
.chatbot,
imagePath: 'chatbot.svg',
subTitle: TranslationBase.of(context).chatbotSubtitle,
subTitle: TranslationBase
.of(context)
.chatbotSubtitle,
isEnable: projectViewModel.havePrivilege(40),
),
));
@ -607,69 +734,81 @@ class Utils {
onTap: () => projectViewModel!.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null,
child: isLogin!
? Stack(children: [
MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
projectViewModel.isArabic!
? !projectViewModel.isLoginChild
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.isLoginChild
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase.of(context!).myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase.of(context!).myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5)),
projectViewModel.isArabic!
? !projectViewModel.isLoginChild
? Positioned(
left: 8,
top: 4,
child: badge_import.Badge(
position: badge_import.BadgePosition.topEnd(),
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container()
: !projectViewModel.isLoginChild
? Positioned(
right: 8,
top: 4,
child: badge_import.Badge(
badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false),
badgeStyle: badge_import.BadgeStyle(
elevation: 0,
shape: badge_import.BadgeShape.circle,
badgeColor: secondaryColor!.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
),
position: badge_import.BadgePosition.topEnd(),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
])
: MedicalProfileItem(
title: TranslationBase
.of(context!)
.myAppointments,
imagePath: 'appointment_list.svg',
subTitle: TranslationBase
.of(context!)
.myAppointmentsList,
hasBadge: true,
isEnable: projectViewModel!.havePrivilege(5),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(10) ? Navigator.push(context, FadePage(page: LabsHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
title: TranslationBase
.of(context)
.lab,
imagePath: 'lab_result.svg',
subTitle: TranslationBase.of(context).labSubtitle,
subTitle: TranslationBase
.of(context)
.labSubtitle,
isEnable: projectViewModel.havePrivilege(10),
),
));
@ -677,9 +816,13 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
title: TranslationBase
.of(context)
.radiology,
imagePath: 'radiology.svg',
subTitle: TranslationBase.of(context).radiologySubtitle,
subTitle: TranslationBase
.of(context)
.radiologySubtitle,
isEnable: projectViewModel.havePrivilege(7),
),
));
@ -687,24 +830,33 @@ class Utils {
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
title: TranslationBase
.of(context)
.medicines,
imagePath: 'medicine_prescription.svg',
subTitle: TranslationBase.of(context).medicinesSubtitle,
subTitle: TranslationBase
.of(context)
.medicinesSubtitle,
isEnable: projectViewModel.havePrivilege(12),
),
));
medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(6)
onTap: () =>
projectViewModel.havePrivilege(6)
? Navigator.push(
context,
FadePage(
page: DoctorHomePage(),
),
)
context,
FadePage(
page: DoctorHomePage(),
),
)
: null,
child:
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
MedicalProfileItem(title: TranslationBase
.of(context)
.myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase
.of(context)
.myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
return medical;
@ -744,7 +896,11 @@ class Utils {
SizedBox(height: 6),
Text(
text,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
style: TextStyle(fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.48,
height: 18 / 12),
),
SizedBox(height: 5),
if (showDivider)
@ -765,10 +921,16 @@ class Utils {
children: [
SizedBox(height: 12),
Text(
isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
isCapitable && !projectViewModel.isArabic ? text
.toLowerCase()
.capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
style: TextStyle(fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.4,
height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
@ -783,7 +945,10 @@ class Utils {
static Future<bool> isGoogleServicesAvailable() async {
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
String status = availability.toString().split('.').last;
String status = availability
.toString()
.split('.')
.last;
if (status == "success") {
return true;
}
@ -798,10 +963,17 @@ class Utils {
children: [
SizedBox(height: 14),
AutoSizeText(
isCapitable ? text.toLowerCase().capitalizeFirstofEach : text,
isCapitable ? text
.toLowerCase()
.capitalizeFirstofEach : text,
maxLines: 1,
minFontSize: 6,
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
style: TextStyle(decoration: TextDecoration.underline,
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xffD02127),
letterSpacing: -0.48,
height: 18 / 12),
),
SizedBox(height: 10),
if (!isLast)

@ -31,16 +31,11 @@ Widget getPaymentMethods() {
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/images/new/payment/Mada.png",
width: 40, height: 40),
Image.asset("assets/images/new/payment/tamara_en.png",
width: 40, height: 40),
Image.asset("assets/images/new/payment/visa.png",
width: 40, height: 40),
Image.asset("assets/images/new/payment/Mastercard.png",
width: 50, height: 40),
Image.asset("assets/images/new/payment/Apple_Pay.png",
width: 40, height: 40),
Image.asset("assets/images/new/payment/Mada.png", width: 40, height: 40),
Image.asset("assets/images/new/payment/tamara_en.png", width: 40, height: 40),
Image.asset("assets/images/new/payment/visa.png", width: 40, height: 40),
Image.asset("assets/images/new/payment/Mastercard.png", width: 50, height: 40),
Image.asset("assets/images/new/payment/Apple_Pay.png", width: 40, height: 40),
],
),
);
@ -52,15 +47,8 @@ Widget getNoDataWidget(BuildContext context) {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset('assets/images/new/not_found.svg',
width: 110.0, height: 110.0),
Container(
margin: EdgeInsets.only(top: 15.0),
child: Text(TranslationBase.of(context).noResultFound,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xFFBABABA)))),
SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0),
Container(margin: EdgeInsets.only(top: 15.0), child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xFFBABABA)))),
],
),
),
@ -88,8 +76,7 @@ spacer() {
}
Future navigateTo(context, page) async {
return await Navigator.push(
context, MaterialPageRoute(builder: (context) => page));
return await Navigator.push(context, MaterialPageRoute(builder: (context) => page));
}
// Future navigateToReplace(context, page) async {
@ -148,10 +135,11 @@ Widget circularAviator(
width: s,
height: s,
decoration: containerColorRadiusBorderWidth(
bcColor! == null ? Colors.grey[200]! : bcColor,
2000,
brColor == null ? Colors.blueGrey[800]! : brColor,
borderWidth! == null ? 2 : borderWidth!),
bcColor == null ? Colors.grey[200]! : bcColor,
2000,
brColor == null ? Colors.blueGrey[800]! : brColor,
borderWidth == null ? 2 : borderWidth,
),
child: Icon(
icon == null ? Icons.person : icon,
size: s / 1.7,
@ -233,8 +221,7 @@ RoundedRectangleBorder buttonShape() {
);
}
Decoration containerRadiusWithGradient(double radius,
{Color? color1, Color? color2}) {
Decoration containerRadiusWithGradient(double radius, {Color? color1, Color? color2}) {
return BoxDecoration(
borderRadius: BorderRadius.circular(radius),
gradient: LinearGradient(
@ -248,8 +235,7 @@ Decoration containerRadiusWithGradient(double radius,
);
}
Decoration containerBottomRightRadiusWithGradient(double radius,
{Color? darkColor, Color? lightColor}) {
Decoration containerBottomRightRadiusWithGradient(double radius, {Color? darkColor, Color? lightColor}) {
return BoxDecoration(
borderRadius: BorderRadius.only(bottomRight: Radius.circular(radius)),
gradient: LinearGradient(
@ -263,8 +249,7 @@ Decoration containerBottomRightRadiusWithGradient(double radius,
);
}
Decoration containerBottomRightRadiusWithGradientForAr(double radius,
{Color? darkColor, Color? lightColor}) {
Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color? darkColor, Color? lightColor}) {
return BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius)),
gradient: LinearGradient(
@ -307,11 +292,7 @@ Decoration containerRadiusWithGradientServices(
);
}
Decoration containerBottomRightRadiusWithGradientBorder(double radius,
{Color? darkColor,
Color? lightColor,
Color borderColor = Colors.transparent,
double w = 0}) {
Decoration containerBottomRightRadiusWithGradientBorder(double radius, {Color? darkColor, Color? lightColor, Color borderColor = Colors.transparent, double w = 0}) {
return BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(radius)),
border: Border.all(
@ -340,8 +321,7 @@ Decoration containerRadius(Color background, double radius) {
);
}
Decoration containerColorRadiusBorder(
Color background, double radius, Color color) {
Decoration containerColorRadiusBorder(Color background, double radius, Color color) {
return BoxDecoration(
color: background,
border: Border.all(
@ -352,8 +332,7 @@ Decoration containerColorRadiusBorder(
);
}
Decoration containerColorRadiusBorderWidth(
Color background, double radius, Color color, double w) {
Decoration containerColorRadiusBorderWidth(Color background, double radius, Color color, double w) {
return BoxDecoration(
color: background,
border: Border.all(
@ -364,8 +343,7 @@ Decoration containerColorRadiusBorderWidth(
);
}
Decoration containerColorRadiusBorderWidthCircular(
Color background, double radius, Color color, double w) {
Decoration containerColorRadiusBorderWidthCircular(Color background, double radius, Color color, double w) {
return BoxDecoration(
color: background,
border: Border.all(
@ -380,36 +358,29 @@ Decoration containerColorRadiusBorderWidthCircular(
Decoration containerColorRadiusRight(Color background, double radius) {
return BoxDecoration(
color: background,
borderRadius: BorderRadius.only(
topRight: Radius.circular(radius),
bottomRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)),
);
}
Decoration containerColorRadiusLeft(Color background, double radius) {
return BoxDecoration(
color: background,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
);
}
Decoration containerColorRadiusRightBorder(
Color background, double radius, double w) {
Decoration containerColorRadiusRightBorder(Color background, double radius, double w) {
return BoxDecoration(
color: background,
border: Border.all(
width: w, //
color: Colors.white // <--- border width here
),
borderRadius: BorderRadius.only(
topRight: Radius.circular(radius),
bottomRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)),
);
}
Decoration containerColorRadiusRightBorderc(
Color background, double radius, double w, Color borderColor) {
Decoration containerColorRadiusRightBorderc(Color background, double radius, double w, Color borderColor) {
return BoxDecoration(
color: background,
border: Border.all(
@ -440,16 +411,14 @@ Decoration containerColorRadiusBottom(Color color, double radius) {
);
}
Decoration containerColorRadiusLeftBorder(
Color background, double radius, double w) {
Decoration containerColorRadiusLeftBorder(Color background, double radius, double w) {
return BoxDecoration(
color: background,
border: Border.all(
width: w, //
color: Colors.white // <--- border width here
),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
);
}
@ -481,23 +450,19 @@ OutlinedBorder cardRadiusNew(double radius) {
ShapeBorder cardRadiusTop(double radius) {
return RoundedRectangleBorder(
side: BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
);
}
ShapeBorder cardRadiusTop2(double radius) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
);
}
ShapeBorder cardRadiusBottom(double radius) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(radius),
bottomRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius), bottomRight: Radius.circular(radius)),
);
}
@ -620,8 +585,7 @@ FontStyle getFontStyle(String fontStyle) {
bool timeCalculator(int startHour, int startMint, int endHour, int endMint) {
DateTime now = DateTime.now();
DateTime startDate =
DateTime(now.year, now.month, now.day, startHour, startHour);
DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour);
DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint);
if (startDate.isBefore(now) && endDate.isAfter(now))
return true;

@ -1,7 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_gif/flutter_gif.dart';
class GifLoaderContainer extends StatefulWidget {
@override
_GifLoaderContainerState createState() => _GifLoaderContainerState();
@ -10,10 +9,9 @@ class GifLoaderContainer extends StatefulWidget {
class _GifLoaderContainerState extends State<GifLoaderContainer> with TickerProviderStateMixin {
late FlutterGifController controller;
@override
void initState() {
FlutterGifController controller= FlutterGifController(vsync: this);
controller = FlutterGifController(vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) {
try {

@ -227,37 +227,37 @@ class _AppScaffoldState extends State<AppScaffold> {
// ? widget.customAppBar != null
// ? widget.customAppBar
appBar: isUserNotLogin!
appBar: isUserNotLogin
? null
: widget.isShowPharmacyAppbar!
? PreferredSize(preferredSize: Size.fromHeight(70), child: pharmacyAppbar()!)
: (widget.showNewAppBar!
: widget.isShowPharmacyAppbar
? PreferredSize(preferredSize: Size.fromHeight(70), child: pharmacyAppbar())
: (widget.showNewAppBar
? PreferredSize(
preferredSize: Size.fromHeight(70),
child: NewAppBarWidget(
title: widget.appBarTitle!,
showTitle: widget.showNewAppBarTitle!,
showDropDown: widget.showDropDown!,
dropdownIndexValue: widget.dropdownIndexValue!,
dropDownList: widget.dropDownList! ?? [],
title: widget.appBarTitle,
showTitle: widget.showNewAppBarTitle,
showDropDown: widget.showDropDown,
dropdownIndexValue: widget.dropdownIndexValue,
dropDownList: widget.dropDownList ?? [],
dropDownIndexChange: widget.dropDownIndexChange,
appBarIcons: widget.appBarIcons!,
appBarIcons: widget.appBarIcons,
onTap: () {
widget.onTap;
},
))
: (widget.isShowAppBar!
: (widget.isShowAppBar
? widget.customAppBar != null
? PreferredSize(preferredSize: Size.fromHeight(70), child: widget.customAppBar!)
: appBar = AppBarWidget(
appBarTitle: widget.appBarTitle!,
appBarIcons: widget.appBarIcons!,
showHomeAppBarIcon: widget.showHomeAppBarIcon!,
isPharmacy: widget.isPharmacy!,
showPharmacyCart: widget.showPharmacyCart!,
isOfferPackages: widget.isOfferPackages!,
showOfferPackagesCart: widget.showOfferPackagesCart!,
isShowDecPage: widget.isShowDecPage!,
appBarTitle: widget.appBarTitle,
appBarIcons: widget.appBarIcons,
showHomeAppBarIcon: widget.showHomeAppBarIcon,
isPharmacy: widget.isPharmacy,
showPharmacyCart: widget.showPharmacyCart,
isOfferPackages: widget.isOfferPackages,
showOfferPackagesCart: widget.showOfferPackagesCart,
isShowDecPage: widget.isShowDecPage,
backButtonTab: () {
widget.backButtonTab;
},
@ -270,7 +270,7 @@ class _AppScaffoldState extends State<AppScaffold> {
child: isUserNotLogin
? NotAutPage(
title: widget.title ?? widget.appBarTitle,
description: widget.description!,
description: widget.description,
infoList: widget.infoList,
imagesInfo: widget.imagesInfo,
icon: widget.icon,
@ -300,7 +300,7 @@ class _AppScaffoldState extends State<AppScaffold> {
widget.changeCurrentTab!(value);
} else {
Navigator.pushAndRemoveUntil(
locator<NavigationService>().navigatorKey!.currentContext!, MaterialPageRoute(builder: (context) => LandingPagePharmacy(currentTab: value)), (Route<dynamic> r) => false);
locator<NavigationService>().navigatorKey.currentContext!, MaterialPageRoute(builder: (context) => LandingPagePharmacy(currentTab: value)), (Route<dynamic> r) => false);
}
}

@ -20,12 +20,12 @@ import '../../splashPage.dart';
class NotAutPage extends StatefulWidget {
final String title;
final String description;
final String? description;
final List<String>? infoList;
final List<ImagesInfo>? imagesInfo;
final String? icon;
NotAutPage({required this.title, required this.description, this.infoList, this.imagesInfo, this.icon});
NotAutPage({required this.title, this.description, this.infoList, this.imagesInfo, this.icon});
@override
_NotAutPageState createState() => _NotAutPageState();
@ -160,7 +160,7 @@ class _NotAutPageState extends State<NotAutPage> {
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24),
),
Text(
widget.description,
widget.description!,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14),
),
SizedBox(

@ -24,7 +24,7 @@ class SMSOTP {
int remainingTime = 120;
Future<Null>? timer;
Future<dynamic>? timer;
static BuildContext? _context;

@ -19,7 +19,8 @@ dependencies:
# http client
http: ^0.13.4
connectivity: ^3.0.6
#connectivity: ^3.0.6
connectivity_plus: ^5.0.1
async: ^2.8.1
audio_wave: ^0.1.4
@ -179,7 +180,7 @@ dependencies:
speech_to_text: ^6.1.1
# path: speech_to_text
in_app_update: ^4.2.2
#in_app_update: ^4.2.2
in_app_review: ^2.0.3
@ -212,6 +213,9 @@ dependencies:
# open_file: ^3.2.1
open_filex: ^4.3.2
path_provider: ^2.0.8
logger: ^2.0.2+1
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
@ -219,7 +223,7 @@ dependencies:
# crypto:
dependency_overrides:
provider: ^5.0.0
#provider: ^5.0.0
# permission_handler : ^10.2.0
#flutter_svg: ^1.1.6
# firebase_messaging_platform_interface: any
@ -232,6 +236,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.1.5
flutter:
uses-material-design: true

Loading…
Cancel
Save