Merge branch 'sultan' into 'master'
Sultan See merge request Cloud_Solution/diplomatic-quarter!7merge-update-with-lab-changes
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Flutter",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,6 +1,11 @@
|
|||||||
package com.cloud.diplomaticquarterapp
|
package com.cloud.diplomaticquarterapp
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||||
|
import io.flutter.embedding.engine.FlutterEngine
|
||||||
|
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
class MainActivity: FlutterFragmentActivity() {
|
||||||
|
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||||
class MainActivity: FlutterActivity() {
|
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,282 @@
|
|||||||
|
class AuthenticatedUser {
|
||||||
|
String setupID;
|
||||||
|
int patientType;
|
||||||
|
int patientID;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String firstNameN;
|
||||||
|
String middleNameN;
|
||||||
|
String lastNameN;
|
||||||
|
int relationshipID;
|
||||||
|
int gender;
|
||||||
|
String dateofBirth;
|
||||||
|
Null dateofBirthN;
|
||||||
|
String nationalityID;
|
||||||
|
Null phoneResi;
|
||||||
|
Null phoneOffice;
|
||||||
|
String mobileNumber;
|
||||||
|
Null faxNumber;
|
||||||
|
String emailAddress;
|
||||||
|
Null bloodGroup;
|
||||||
|
Null rHFactor;
|
||||||
|
bool isEmailAlertRequired;
|
||||||
|
bool isSMSAlertRequired;
|
||||||
|
String preferredLanguage;
|
||||||
|
bool isPrivilegedMember;
|
||||||
|
Null memberID;
|
||||||
|
Null expiryDate;
|
||||||
|
Null isHmgEmployee;
|
||||||
|
Null employeeID;
|
||||||
|
Null emergencyContactName;
|
||||||
|
Null emergencyContactNo;
|
||||||
|
int patientPayType;
|
||||||
|
Null dHCCPatientRefID;
|
||||||
|
bool isPatientDummy;
|
||||||
|
int status;
|
||||||
|
Null isStatusCleared;
|
||||||
|
int patientIdentificationType;
|
||||||
|
String patientIdentificationNo;
|
||||||
|
int projectID;
|
||||||
|
int infoSourceID;
|
||||||
|
Null address;
|
||||||
|
int age;
|
||||||
|
String ageDesc;
|
||||||
|
int areaID;
|
||||||
|
int createdBy;
|
||||||
|
String genderDescription;
|
||||||
|
Null iR;
|
||||||
|
Null iSOCityID;
|
||||||
|
Null iSOCountryID;
|
||||||
|
List<ListPrivilege> listPrivilege;
|
||||||
|
Null marital;
|
||||||
|
int outSA;
|
||||||
|
Null pOBox;
|
||||||
|
bool receiveHealthSummaryReport;
|
||||||
|
int sourceType;
|
||||||
|
Null strDateofBirth;
|
||||||
|
Null tempAddress;
|
||||||
|
Null zipCode;
|
||||||
|
// Null patientPayType;
|
||||||
|
// Null patientType;
|
||||||
|
// Null status;
|
||||||
|
|
||||||
|
AuthenticatedUser({
|
||||||
|
this.setupID,
|
||||||
|
this.patientType,
|
||||||
|
this.patientID,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.firstNameN,
|
||||||
|
this.middleNameN,
|
||||||
|
this.lastNameN,
|
||||||
|
this.relationshipID,
|
||||||
|
this.gender,
|
||||||
|
this.dateofBirth,
|
||||||
|
this.dateofBirthN,
|
||||||
|
this.nationalityID,
|
||||||
|
this.phoneResi,
|
||||||
|
this.phoneOffice,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.faxNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.bloodGroup,
|
||||||
|
this.rHFactor,
|
||||||
|
this.isEmailAlertRequired,
|
||||||
|
this.isSMSAlertRequired,
|
||||||
|
this.preferredLanguage,
|
||||||
|
this.isPrivilegedMember,
|
||||||
|
this.memberID,
|
||||||
|
this.expiryDate,
|
||||||
|
this.isHmgEmployee,
|
||||||
|
this.employeeID,
|
||||||
|
this.emergencyContactName,
|
||||||
|
this.emergencyContactNo,
|
||||||
|
this.patientPayType,
|
||||||
|
this.dHCCPatientRefID,
|
||||||
|
this.isPatientDummy,
|
||||||
|
this.status,
|
||||||
|
this.isStatusCleared,
|
||||||
|
this.patientIdentificationType,
|
||||||
|
this.patientIdentificationNo,
|
||||||
|
this.projectID,
|
||||||
|
this.infoSourceID,
|
||||||
|
this.address,
|
||||||
|
this.age,
|
||||||
|
this.ageDesc,
|
||||||
|
this.areaID,
|
||||||
|
this.createdBy,
|
||||||
|
this.genderDescription,
|
||||||
|
this.iR,
|
||||||
|
this.iSOCityID,
|
||||||
|
this.iSOCountryID,
|
||||||
|
this.listPrivilege,
|
||||||
|
this.marital,
|
||||||
|
this.outSA,
|
||||||
|
this.pOBox,
|
||||||
|
this.receiveHealthSummaryReport,
|
||||||
|
this.sourceType,
|
||||||
|
this.strDateofBirth,
|
||||||
|
this.tempAddress,
|
||||||
|
this.zipCode,
|
||||||
|
});
|
||||||
|
|
||||||
|
AuthenticatedUser.fromJson(Map<String, dynamic> json) {
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
firstName = json['FirstName'];
|
||||||
|
middleName = json['MiddleName'];
|
||||||
|
lastName = json['LastName'];
|
||||||
|
firstNameN = json['FirstNameN'];
|
||||||
|
middleNameN = json['MiddleNameN'];
|
||||||
|
lastNameN = json['LastNameN'];
|
||||||
|
relationshipID = json['RelationshipID'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
dateofBirth = json['DateofBirth'];
|
||||||
|
dateofBirthN = json['DateofBirthN'];
|
||||||
|
nationalityID = json['NationalityID'];
|
||||||
|
phoneResi = json['PhoneResi'];
|
||||||
|
phoneOffice = json['PhoneOffice'];
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
faxNumber = json['FaxNumber'];
|
||||||
|
emailAddress = json['EmailAddress'];
|
||||||
|
bloodGroup = json['BloodGroup'];
|
||||||
|
rHFactor = json['RHFactor'];
|
||||||
|
isEmailAlertRequired = json['IsEmailAlertRequired'];
|
||||||
|
isSMSAlertRequired = json['IsSMSAlertRequired'];
|
||||||
|
preferredLanguage = json['PreferredLanguage'];
|
||||||
|
isPrivilegedMember = json['IsPrivilegedMember'];
|
||||||
|
memberID = json['MemberID'];
|
||||||
|
expiryDate = json['ExpiryDate'];
|
||||||
|
isHmgEmployee = json['IsHmgEmployee'];
|
||||||
|
employeeID = json['EmployeeID'];
|
||||||
|
emergencyContactName = json['EmergencyContactName'];
|
||||||
|
emergencyContactNo = json['EmergencyContactNo'];
|
||||||
|
patientPayType = json['PatientPayType'];
|
||||||
|
dHCCPatientRefID = json['DHCCPatientRefID'];
|
||||||
|
isPatientDummy = json['IsPatientDummy'];
|
||||||
|
status = json['Status'];
|
||||||
|
isStatusCleared = json['IsStatusCleared'];
|
||||||
|
patientIdentificationType = json['PatientIdentificationType'];
|
||||||
|
patientIdentificationNo = json['PatientIdentificationNo'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
infoSourceID = json['InfoSourceID'];
|
||||||
|
address = json['Address'];
|
||||||
|
age = json['Age'];
|
||||||
|
ageDesc = json['AgeDesc'];
|
||||||
|
areaID = json['AreaID'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
genderDescription = json['GenderDescription'];
|
||||||
|
iR = json['IR'];
|
||||||
|
iSOCityID = json['ISOCityID'];
|
||||||
|
iSOCountryID = json['ISOCountryID'];
|
||||||
|
if (json['ListPrivilege'] != null) {
|
||||||
|
listPrivilege = new List<ListPrivilege>();
|
||||||
|
json['ListPrivilege'].forEach((v) {
|
||||||
|
listPrivilege.add(new ListPrivilege.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
marital = json['Marital'];
|
||||||
|
outSA = json['OutSA'];
|
||||||
|
pOBox = json['POBox'];
|
||||||
|
receiveHealthSummaryReport = json['ReceiveHealthSummaryReport'];
|
||||||
|
sourceType = json['SourceType'];
|
||||||
|
strDateofBirth = json['StrDateofBirth'];
|
||||||
|
tempAddress = json['TempAddress'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['FirstName'] = this.firstName;
|
||||||
|
data['MiddleName'] = this.middleName;
|
||||||
|
data['LastName'] = this.lastName;
|
||||||
|
data['FirstNameN'] = this.firstNameN;
|
||||||
|
data['MiddleNameN'] = this.middleNameN;
|
||||||
|
data['LastNameN'] = this.lastNameN;
|
||||||
|
data['RelationshipID'] = this.relationshipID;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['DateofBirth'] = this.dateofBirth;
|
||||||
|
data['DateofBirthN'] = this.dateofBirthN;
|
||||||
|
data['NationalityID'] = this.nationalityID;
|
||||||
|
data['PhoneResi'] = this.phoneResi;
|
||||||
|
data['PhoneOffice'] = this.phoneOffice;
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['FaxNumber'] = this.faxNumber;
|
||||||
|
data['EmailAddress'] = this.emailAddress;
|
||||||
|
data['BloodGroup'] = this.bloodGroup;
|
||||||
|
data['RHFactor'] = this.rHFactor;
|
||||||
|
data['IsEmailAlertRequired'] = this.isEmailAlertRequired;
|
||||||
|
data['IsSMSAlertRequired'] = this.isSMSAlertRequired;
|
||||||
|
data['PreferredLanguage'] = this.preferredLanguage;
|
||||||
|
data['IsPrivilegedMember'] = this.isPrivilegedMember;
|
||||||
|
data['MemberID'] = this.memberID;
|
||||||
|
data['ExpiryDate'] = this.expiryDate;
|
||||||
|
data['IsHmgEmployee'] = this.isHmgEmployee;
|
||||||
|
data['EmployeeID'] = this.employeeID;
|
||||||
|
data['EmergencyContactName'] = this.emergencyContactName;
|
||||||
|
data['EmergencyContactNo'] = this.emergencyContactNo;
|
||||||
|
data['PatientPayType'] = this.patientPayType;
|
||||||
|
data['DHCCPatientRefID'] = this.dHCCPatientRefID;
|
||||||
|
data['IsPatientDummy'] = this.isPatientDummy;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['IsStatusCleared'] = this.isStatusCleared;
|
||||||
|
data['PatientIdentificationType'] = this.patientIdentificationType;
|
||||||
|
data['PatientIdentificationNo'] = this.patientIdentificationNo;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['InfoSourceID'] = this.infoSourceID;
|
||||||
|
data['Address'] = this.address;
|
||||||
|
data['Age'] = this.age;
|
||||||
|
data['AgeDesc'] = this.ageDesc;
|
||||||
|
data['AreaID'] = this.areaID;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['GenderDescription'] = this.genderDescription;
|
||||||
|
data['IR'] = this.iR;
|
||||||
|
data['ISOCityID'] = this.iSOCityID;
|
||||||
|
data['ISOCountryID'] = this.iSOCountryID;
|
||||||
|
if (this.listPrivilege != null) {
|
||||||
|
data['ListPrivilege'] =
|
||||||
|
this.listPrivilege.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['Marital'] = this.marital;
|
||||||
|
data['OutSA'] = this.outSA;
|
||||||
|
data['POBox'] = this.pOBox;
|
||||||
|
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport;
|
||||||
|
data['SourceType'] = this.sourceType;
|
||||||
|
data['StrDateofBirth'] = this.strDateofBirth;
|
||||||
|
data['TempAddress'] = this.tempAddress;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListPrivilege {
|
||||||
|
int iD;
|
||||||
|
String serviceName;
|
||||||
|
bool previlege;
|
||||||
|
Null region;
|
||||||
|
|
||||||
|
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region});
|
||||||
|
|
||||||
|
ListPrivilege.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
serviceName = json['ServiceName'];
|
||||||
|
previlege = json['Previlege'];
|
||||||
|
region = json['Region'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['ServiceName'] = this.serviceName;
|
||||||
|
data['Previlege'] = this.previlege;
|
||||||
|
data['Region'] = this.region;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
class CheckActivationCodeReq {
|
||||||
|
int patientMobileNumber;
|
||||||
|
String mobileNo;
|
||||||
|
String deviceToken;
|
||||||
|
int projectOutSA;
|
||||||
|
int loginType;
|
||||||
|
String zipCode;
|
||||||
|
bool isRegister;
|
||||||
|
String logInTokenID;
|
||||||
|
int searchType;
|
||||||
|
int patientID;
|
||||||
|
String nationalID;
|
||||||
|
String patientIdentificationID;
|
||||||
|
String activationCode;
|
||||||
|
bool isSilentLogin;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
Null sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
|
||||||
|
CheckActivationCodeReq(
|
||||||
|
{this.patientMobileNumber,
|
||||||
|
this.mobileNo,
|
||||||
|
this.deviceToken,
|
||||||
|
this.projectOutSA,
|
||||||
|
this.loginType,
|
||||||
|
this.zipCode,
|
||||||
|
this.isRegister,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.searchType,
|
||||||
|
this.patientID,
|
||||||
|
this.nationalID,
|
||||||
|
this.patientIdentificationID,
|
||||||
|
this.activationCode,
|
||||||
|
this.isSilentLogin,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID});
|
||||||
|
|
||||||
|
CheckActivationCodeReq.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMobileNumber = json['PatientMobileNumber'];
|
||||||
|
mobileNo = json['MobileNo'];
|
||||||
|
deviceToken = json['DeviceToken'];
|
||||||
|
projectOutSA = json['ProjectOutSA'];
|
||||||
|
loginType = json['LoginType'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
isRegister = json['isRegister'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
searchType = json['SearchType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
nationalID = json['NationalID'];
|
||||||
|
patientIdentificationID = json['PatientIdentificationID'];
|
||||||
|
activationCode = json['activationCode'];
|
||||||
|
isSilentLogin = json['IsSilentLogin'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||||
|
data['MobileNo'] = this.mobileNo;
|
||||||
|
data['DeviceToken'] = this.deviceToken;
|
||||||
|
data['ProjectOutSA'] = this.projectOutSA;
|
||||||
|
data['LoginType'] = this.loginType;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['isRegister'] = this.isRegister;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['SearchType'] = this.searchType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['NationalID'] = this.nationalID;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
data['activationCode'] = this.activationCode;
|
||||||
|
data['IsSilentLogin'] = this.isSilentLogin;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,547 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||||
|
|
||||||
|
class CheckActivationCode {
|
||||||
|
Null date;
|
||||||
|
int languageID;
|
||||||
|
int serviceName;
|
||||||
|
Null time;
|
||||||
|
Null androidLink;
|
||||||
|
String authenticationTokenID;
|
||||||
|
Null data;
|
||||||
|
bool dataw;
|
||||||
|
int dietType;
|
||||||
|
Null errorCode;
|
||||||
|
Null errorEndUserMessage;
|
||||||
|
Null errorEndUserMessageN;
|
||||||
|
Null errorMessage;
|
||||||
|
int errorType;
|
||||||
|
int foodCategory;
|
||||||
|
Null 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;
|
||||||
|
bool isHMGPatient;
|
||||||
|
bool isLoginSuccessfully;
|
||||||
|
bool isNeedUpdateIdintificationNo;
|
||||||
|
bool kioskSendSMS;
|
||||||
|
AuthenticatedUser list;
|
||||||
|
Null listAskHabibMobileLoginInfo;
|
||||||
|
Null listAskHabibPatientFile;
|
||||||
|
Null listMergeFiles;
|
||||||
|
Null listMobileLoginInfo;
|
||||||
|
Null listPatientCount;
|
||||||
|
Null logInTokenID;
|
||||||
|
Null mohemmPrivilegeList;
|
||||||
|
int pateintID;
|
||||||
|
Null patientBloodType;
|
||||||
|
bool patientHasFile;
|
||||||
|
Null patientMergedIDs;
|
||||||
|
bool patientOutSA;
|
||||||
|
int patientShareRequestID;
|
||||||
|
int patientType;
|
||||||
|
int projectIDOut;
|
||||||
|
Null returnMessage;
|
||||||
|
bool sMSLoginRequired;
|
||||||
|
Null servicePrivilegeList;
|
||||||
|
Null sharePatientName;
|
||||||
|
Null verificationCode;
|
||||||
|
Null email;
|
||||||
|
Null errorList;
|
||||||
|
bool hasFile;
|
||||||
|
bool isActiveCode;
|
||||||
|
bool isMerged;
|
||||||
|
bool isNeedUserAgreement;
|
||||||
|
bool isSMSSent;
|
||||||
|
Null memberList;
|
||||||
|
Null message;
|
||||||
|
int statusCode;
|
||||||
|
|
||||||
|
CheckActivationCode(
|
||||||
|
{this.date,
|
||||||
|
this.languageID,
|
||||||
|
this.serviceName,
|
||||||
|
this.time,
|
||||||
|
this.androidLink,
|
||||||
|
this.authenticationTokenID,
|
||||||
|
this.data,
|
||||||
|
this.dataw,
|
||||||
|
this.dietType,
|
||||||
|
this.errorCode,
|
||||||
|
this.errorEndUserMessage,
|
||||||
|
this.errorEndUserMessageN,
|
||||||
|
this.errorMessage,
|
||||||
|
this.errorType,
|
||||||
|
this.foodCategory,
|
||||||
|
this.iOSLink,
|
||||||
|
this.isAuthenticated,
|
||||||
|
this.mealOrderStatus,
|
||||||
|
this.mealType,
|
||||||
|
this.messageStatus,
|
||||||
|
this.numberOfResultRecords,
|
||||||
|
this.patientBlodType,
|
||||||
|
this.successMsg,
|
||||||
|
this.successMsgN,
|
||||||
|
this.doctorInformationList,
|
||||||
|
this.getAllPendingRecordsList,
|
||||||
|
this.getAllSharedRecordsByStatusList,
|
||||||
|
this.getResponseFileList,
|
||||||
|
this.isHMGPatient,
|
||||||
|
this.isLoginSuccessfully,
|
||||||
|
this.isNeedUpdateIdintificationNo,
|
||||||
|
this.kioskSendSMS,
|
||||||
|
this.list,
|
||||||
|
this.listAskHabibMobileLoginInfo,
|
||||||
|
this.listAskHabibPatientFile,
|
||||||
|
this.listMergeFiles,
|
||||||
|
this.listMobileLoginInfo,
|
||||||
|
this.listPatientCount,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.mohemmPrivilegeList,
|
||||||
|
this.pateintID,
|
||||||
|
this.patientBloodType,
|
||||||
|
this.patientHasFile,
|
||||||
|
this.patientMergedIDs,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.patientShareRequestID,
|
||||||
|
this.patientType,
|
||||||
|
this.projectIDOut,
|
||||||
|
this.returnMessage,
|
||||||
|
this.sMSLoginRequired,
|
||||||
|
this.servicePrivilegeList,
|
||||||
|
this.sharePatientName,
|
||||||
|
this.verificationCode,
|
||||||
|
this.email,
|
||||||
|
this.errorList,
|
||||||
|
this.hasFile,
|
||||||
|
this.isActiveCode,
|
||||||
|
this.isMerged,
|
||||||
|
this.isNeedUserAgreement,
|
||||||
|
this.isSMSSent,
|
||||||
|
this.memberList,
|
||||||
|
this.message,
|
||||||
|
this.statusCode});
|
||||||
|
|
||||||
|
CheckActivationCode.fromJson(Map<String, dynamic> json) {
|
||||||
|
date = json['Date'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
serviceName = json['ServiceName'];
|
||||||
|
time = json['Time'];
|
||||||
|
androidLink = json['AndroidLink'];
|
||||||
|
authenticationTokenID = json['AuthenticationTokenID'];
|
||||||
|
data = json['Data'];
|
||||||
|
dataw = json['Dataw'];
|
||||||
|
dietType = json['DietType'];
|
||||||
|
errorCode = json['ErrorCode'];
|
||||||
|
errorEndUserMessage = json['ErrorEndUserMessage'];
|
||||||
|
errorEndUserMessageN = json['ErrorEndUserMessageN'];
|
||||||
|
errorMessage = json['ErrorMessage'];
|
||||||
|
errorType = json['ErrorType'];
|
||||||
|
foodCategory = json['FoodCategory'];
|
||||||
|
iOSLink = json['IOSLink'];
|
||||||
|
isAuthenticated = json['IsAuthenticated'];
|
||||||
|
mealOrderStatus = json['MealOrderStatus'];
|
||||||
|
mealType = json['MealType'];
|
||||||
|
messageStatus = json['MessageStatus'];
|
||||||
|
numberOfResultRecords = json['NumberOfResultRecords'];
|
||||||
|
patientBlodType = json['PatientBlodType'];
|
||||||
|
successMsg = json['SuccessMsg'];
|
||||||
|
successMsgN = json['SuccessMsgN'];
|
||||||
|
doctorInformationList = json['DoctorInformation_List'];
|
||||||
|
getAllPendingRecordsList = json['GetAllPendingRecordsList'];
|
||||||
|
getAllSharedRecordsByStatusList = json['GetAllSharedRecordsByStatusList'];
|
||||||
|
getResponseFileList = json['GetResponseFileList'];
|
||||||
|
isHMGPatient = json['IsHMGPatient'];
|
||||||
|
isLoginSuccessfully = json['IsLoginSuccessfully'];
|
||||||
|
isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
|
||||||
|
kioskSendSMS = json['KioskSendSMS'];
|
||||||
|
if (json['List'] != null) {
|
||||||
|
list = new AuthenticatedUser.fromJson(json['List'][0]);
|
||||||
|
}
|
||||||
|
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
|
||||||
|
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
|
||||||
|
listMergeFiles = json['List_MergeFiles'];
|
||||||
|
listMobileLoginInfo = json['List_MobileLoginInfo'];
|
||||||
|
listPatientCount = json['List_PatientCount'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
mohemmPrivilegeList = json['MohemmPrivilege_List'];
|
||||||
|
pateintID = json['PateintID'];
|
||||||
|
patientBloodType = json['PatientBloodType'];
|
||||||
|
patientHasFile = json['PatientHasFile'];
|
||||||
|
patientMergedIDs = json['PatientMergedIDs'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientShareRequestID = json['PatientShareRequestID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
projectIDOut = json['ProjectIDOut'];
|
||||||
|
returnMessage = json['ReturnMessage'];
|
||||||
|
sMSLoginRequired = json['SMSLoginRequired'];
|
||||||
|
servicePrivilegeList = json['ServicePrivilege_List'];
|
||||||
|
sharePatientName = json['SharePatientName'];
|
||||||
|
verificationCode = json['VerificationCode'];
|
||||||
|
email = json['email'];
|
||||||
|
errorList = json['errorList'];
|
||||||
|
hasFile = json['hasFile'];
|
||||||
|
isActiveCode = json['isActiveCode'];
|
||||||
|
isMerged = json['isMerged'];
|
||||||
|
isNeedUserAgreement = json['isNeedUserAgreement'];
|
||||||
|
isSMSSent = json['isSMSSent'];
|
||||||
|
memberList = json['memberList'];
|
||||||
|
message = json['message'];
|
||||||
|
statusCode = json['statusCode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Date'] = this.date;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['ServiceName'] = this.serviceName;
|
||||||
|
data['Time'] = this.time;
|
||||||
|
data['AndroidLink'] = this.androidLink;
|
||||||
|
data['AuthenticationTokenID'] = this.authenticationTokenID;
|
||||||
|
data['Data'] = this.data;
|
||||||
|
data['Dataw'] = this.dataw;
|
||||||
|
data['DietType'] = this.dietType;
|
||||||
|
data['ErrorCode'] = this.errorCode;
|
||||||
|
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
|
||||||
|
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
|
||||||
|
data['ErrorMessage'] = this.errorMessage;
|
||||||
|
data['ErrorType'] = this.errorType;
|
||||||
|
data['FoodCategory'] = this.foodCategory;
|
||||||
|
data['IOSLink'] = this.iOSLink;
|
||||||
|
data['IsAuthenticated'] = this.isAuthenticated;
|
||||||
|
data['MealOrderStatus'] = this.mealOrderStatus;
|
||||||
|
data['MealType'] = this.mealType;
|
||||||
|
data['MessageStatus'] = this.messageStatus;
|
||||||
|
data['NumberOfResultRecords'] = this.numberOfResultRecords;
|
||||||
|
data['PatientBlodType'] = this.patientBlodType;
|
||||||
|
data['SuccessMsg'] = this.successMsg;
|
||||||
|
data['SuccessMsgN'] = this.successMsgN;
|
||||||
|
data['DoctorInformation_List'] = this.doctorInformationList;
|
||||||
|
data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList;
|
||||||
|
data['GetAllSharedRecordsByStatusList'] =
|
||||||
|
this.getAllSharedRecordsByStatusList;
|
||||||
|
data['GetResponseFileList'] = this.getResponseFileList;
|
||||||
|
data['IsHMGPatient'] = this.isHMGPatient;
|
||||||
|
data['IsLoginSuccessfully'] = this.isLoginSuccessfully;
|
||||||
|
data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo;
|
||||||
|
data['KioskSendSMS'] = this.kioskSendSMS;
|
||||||
|
if (this.list != null) {
|
||||||
|
data['List'] = this.list;
|
||||||
|
}
|
||||||
|
data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo;
|
||||||
|
data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile;
|
||||||
|
data['List_MergeFiles'] = this.listMergeFiles;
|
||||||
|
data['List_MobileLoginInfo'] = this.listMobileLoginInfo;
|
||||||
|
data['List_PatientCount'] = this.listPatientCount;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['MohemmPrivilege_List'] = this.mohemmPrivilegeList;
|
||||||
|
data['PateintID'] = this.pateintID;
|
||||||
|
data['PatientBloodType'] = this.patientBloodType;
|
||||||
|
data['PatientHasFile'] = this.patientHasFile;
|
||||||
|
data['PatientMergedIDs'] = this.patientMergedIDs;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientShareRequestID'] = this.patientShareRequestID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['ProjectIDOut'] = this.projectIDOut;
|
||||||
|
data['ReturnMessage'] = this.returnMessage;
|
||||||
|
data['SMSLoginRequired'] = this.sMSLoginRequired;
|
||||||
|
data['ServicePrivilege_List'] = this.servicePrivilegeList;
|
||||||
|
data['SharePatientName'] = this.sharePatientName;
|
||||||
|
data['VerificationCode'] = this.verificationCode;
|
||||||
|
data['email'] = this.email;
|
||||||
|
data['errorList'] = this.errorList;
|
||||||
|
data['hasFile'] = this.hasFile;
|
||||||
|
data['isActiveCode'] = this.isActiveCode;
|
||||||
|
data['isMerged'] = this.isMerged;
|
||||||
|
data['isNeedUserAgreement'] = this.isNeedUserAgreement;
|
||||||
|
data['isSMSSent'] = this.isSMSSent;
|
||||||
|
data['memberList'] = this.memberList;
|
||||||
|
data['message'] = this.message;
|
||||||
|
data['statusCode'] = this.statusCode;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class List {
|
||||||
|
String setupID;
|
||||||
|
int patientType;
|
||||||
|
int patientID;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String firstNameN;
|
||||||
|
String middleNameN;
|
||||||
|
String lastNameN;
|
||||||
|
int relationshipID;
|
||||||
|
int gender;
|
||||||
|
String dateofBirth;
|
||||||
|
Null dateofBirthN;
|
||||||
|
String nationalityID;
|
||||||
|
Null phoneResi;
|
||||||
|
Null phoneOffice;
|
||||||
|
String mobileNumber;
|
||||||
|
Null faxNumber;
|
||||||
|
String emailAddress;
|
||||||
|
Null bloodGroup;
|
||||||
|
Null rHFactor;
|
||||||
|
bool isEmailAlertRequired;
|
||||||
|
bool isSMSAlertRequired;
|
||||||
|
String preferredLanguage;
|
||||||
|
bool isPrivilegedMember;
|
||||||
|
Null memberID;
|
||||||
|
Null expiryDate;
|
||||||
|
Null isHmgEmployee;
|
||||||
|
Null employeeID;
|
||||||
|
Null emergencyContactName;
|
||||||
|
Null emergencyContactNo;
|
||||||
|
int patientPayType;
|
||||||
|
Null dHCCPatientRefID;
|
||||||
|
bool isPatientDummy;
|
||||||
|
int status;
|
||||||
|
Null isStatusCleared;
|
||||||
|
int patientIdentificationType;
|
||||||
|
String patientIdentificationNo;
|
||||||
|
int projectID;
|
||||||
|
int infoSourceID;
|
||||||
|
Null address;
|
||||||
|
int age;
|
||||||
|
String ageDesc;
|
||||||
|
int areaID;
|
||||||
|
int createdBy;
|
||||||
|
String genderDescription;
|
||||||
|
Null iR;
|
||||||
|
Null iSOCityID;
|
||||||
|
Null iSOCountryID;
|
||||||
|
ListPrivilege listPrivilege;
|
||||||
|
Null marital;
|
||||||
|
int outSA;
|
||||||
|
Null pOBox;
|
||||||
|
bool receiveHealthSummaryReport;
|
||||||
|
int sourceType;
|
||||||
|
Null strDateofBirth;
|
||||||
|
Null tempAddress;
|
||||||
|
Null zipCode;
|
||||||
|
|
||||||
|
List({
|
||||||
|
this.setupID,
|
||||||
|
this.patientType,
|
||||||
|
this.patientID,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.firstNameN,
|
||||||
|
this.middleNameN,
|
||||||
|
this.lastNameN,
|
||||||
|
this.relationshipID,
|
||||||
|
this.gender,
|
||||||
|
this.dateofBirth,
|
||||||
|
this.dateofBirthN,
|
||||||
|
this.nationalityID,
|
||||||
|
this.phoneResi,
|
||||||
|
this.phoneOffice,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.faxNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.bloodGroup,
|
||||||
|
this.rHFactor,
|
||||||
|
this.isEmailAlertRequired,
|
||||||
|
this.isSMSAlertRequired,
|
||||||
|
this.preferredLanguage,
|
||||||
|
this.isPrivilegedMember,
|
||||||
|
this.memberID,
|
||||||
|
this.expiryDate,
|
||||||
|
this.isHmgEmployee,
|
||||||
|
this.employeeID,
|
||||||
|
this.emergencyContactName,
|
||||||
|
this.emergencyContactNo,
|
||||||
|
this.patientPayType,
|
||||||
|
this.dHCCPatientRefID,
|
||||||
|
this.isPatientDummy,
|
||||||
|
this.status,
|
||||||
|
this.isStatusCleared,
|
||||||
|
this.patientIdentificationType,
|
||||||
|
this.patientIdentificationNo,
|
||||||
|
this.projectID,
|
||||||
|
this.infoSourceID,
|
||||||
|
this.address,
|
||||||
|
this.age,
|
||||||
|
this.ageDesc,
|
||||||
|
this.areaID,
|
||||||
|
this.createdBy,
|
||||||
|
this.genderDescription,
|
||||||
|
this.iR,
|
||||||
|
this.iSOCityID,
|
||||||
|
this.iSOCountryID,
|
||||||
|
this.listPrivilege,
|
||||||
|
this.marital,
|
||||||
|
this.outSA,
|
||||||
|
this.pOBox,
|
||||||
|
this.receiveHealthSummaryReport,
|
||||||
|
this.sourceType,
|
||||||
|
this.strDateofBirth,
|
||||||
|
this.tempAddress,
|
||||||
|
this.zipCode,
|
||||||
|
});
|
||||||
|
|
||||||
|
List.fromJson(Map<String, dynamic> json) {
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
firstName = json['FirstName'];
|
||||||
|
middleName = json['MiddleName'];
|
||||||
|
lastName = json['LastName'];
|
||||||
|
firstNameN = json['FirstNameN'];
|
||||||
|
middleNameN = json['MiddleNameN'];
|
||||||
|
lastNameN = json['LastNameN'];
|
||||||
|
relationshipID = json['RelationshipID'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
dateofBirth = json['DateofBirth'];
|
||||||
|
dateofBirthN = json['DateofBirthN'];
|
||||||
|
nationalityID = json['NationalityID'];
|
||||||
|
phoneResi = json['PhoneResi'];
|
||||||
|
phoneOffice = json['PhoneOffice'];
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
faxNumber = json['FaxNumber'];
|
||||||
|
emailAddress = json['EmailAddress'];
|
||||||
|
bloodGroup = json['BloodGroup'];
|
||||||
|
rHFactor = json['RHFactor'];
|
||||||
|
isEmailAlertRequired = json['IsEmailAlertRequired'];
|
||||||
|
isSMSAlertRequired = json['IsSMSAlertRequired'];
|
||||||
|
preferredLanguage = json['PreferredLanguage'];
|
||||||
|
isPrivilegedMember = json['IsPrivilegedMember'];
|
||||||
|
memberID = json['MemberID'];
|
||||||
|
expiryDate = json['ExpiryDate'];
|
||||||
|
isHmgEmployee = json['IsHmgEmployee'];
|
||||||
|
employeeID = json['EmployeeID'];
|
||||||
|
emergencyContactName = json['EmergencyContactName'];
|
||||||
|
emergencyContactNo = json['EmergencyContactNo'];
|
||||||
|
patientPayType = json['PatientPayType'];
|
||||||
|
dHCCPatientRefID = json['DHCCPatientRefID'];
|
||||||
|
isPatientDummy = json['IsPatientDummy'];
|
||||||
|
status = json['Status'];
|
||||||
|
isStatusCleared = json['IsStatusCleared'];
|
||||||
|
patientIdentificationType = json['PatientIdentificationType'];
|
||||||
|
patientIdentificationNo = json['PatientIdentificationNo'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
infoSourceID = json['InfoSourceID'];
|
||||||
|
address = json['Address'];
|
||||||
|
age = json['Age'];
|
||||||
|
ageDesc = json['AgeDesc'];
|
||||||
|
areaID = json['AreaID'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
genderDescription = json['GenderDescription'];
|
||||||
|
iR = json['IR'];
|
||||||
|
iSOCityID = json['ISOCityID'];
|
||||||
|
iSOCountryID = json['ISOCountryID'];
|
||||||
|
if (json['ListPrivilege'] != null) {
|
||||||
|
listPrivilege = ListPrivilege.fromJson(json['ListPrivilege']);
|
||||||
|
}
|
||||||
|
marital = json['Marital'];
|
||||||
|
outSA = json['OutSA'];
|
||||||
|
pOBox = json['POBox'];
|
||||||
|
receiveHealthSummaryReport = json['ReceiveHealthSummaryReport'];
|
||||||
|
sourceType = json['SourceType'];
|
||||||
|
strDateofBirth = json['StrDateofBirth'];
|
||||||
|
tempAddress = json['TempAddress'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['FirstName'] = this.firstName;
|
||||||
|
data['MiddleName'] = this.middleName;
|
||||||
|
data['LastName'] = this.lastName;
|
||||||
|
data['FirstNameN'] = this.firstNameN;
|
||||||
|
data['MiddleNameN'] = this.middleNameN;
|
||||||
|
data['LastNameN'] = this.lastNameN;
|
||||||
|
data['RelationshipID'] = this.relationshipID;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['DateofBirth'] = this.dateofBirth;
|
||||||
|
data['DateofBirthN'] = this.dateofBirthN;
|
||||||
|
data['NationalityID'] = this.nationalityID;
|
||||||
|
data['PhoneResi'] = this.phoneResi;
|
||||||
|
data['PhoneOffice'] = this.phoneOffice;
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['FaxNumber'] = this.faxNumber;
|
||||||
|
data['EmailAddress'] = this.emailAddress;
|
||||||
|
data['BloodGroup'] = this.bloodGroup;
|
||||||
|
data['RHFactor'] = this.rHFactor;
|
||||||
|
data['IsEmailAlertRequired'] = this.isEmailAlertRequired;
|
||||||
|
data['IsSMSAlertRequired'] = this.isSMSAlertRequired;
|
||||||
|
data['PreferredLanguage'] = this.preferredLanguage;
|
||||||
|
data['IsPrivilegedMember'] = this.isPrivilegedMember;
|
||||||
|
data['MemberID'] = this.memberID;
|
||||||
|
data['ExpiryDate'] = this.expiryDate;
|
||||||
|
data['IsHmgEmployee'] = this.isHmgEmployee;
|
||||||
|
data['EmployeeID'] = this.employeeID;
|
||||||
|
data['EmergencyContactName'] = this.emergencyContactName;
|
||||||
|
data['EmergencyContactNo'] = this.emergencyContactNo;
|
||||||
|
data['PatientPayType'] = this.patientPayType;
|
||||||
|
data['DHCCPatientRefID'] = this.dHCCPatientRefID;
|
||||||
|
data['IsPatientDummy'] = this.isPatientDummy;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['IsStatusCleared'] = this.isStatusCleared;
|
||||||
|
data['PatientIdentificationType'] = this.patientIdentificationType;
|
||||||
|
data['PatientIdentificationNo'] = this.patientIdentificationNo;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['InfoSourceID'] = this.infoSourceID;
|
||||||
|
data['Address'] = this.address;
|
||||||
|
data['Age'] = this.age;
|
||||||
|
data['AgeDesc'] = this.ageDesc;
|
||||||
|
data['AreaID'] = this.areaID;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['GenderDescription'] = this.genderDescription;
|
||||||
|
data['IR'] = this.iR;
|
||||||
|
data['ISOCityID'] = this.iSOCityID;
|
||||||
|
data['ISOCountryID'] = this.iSOCountryID;
|
||||||
|
if (this.listPrivilege != null) {
|
||||||
|
data['ListPrivilege'] = this.listPrivilege;
|
||||||
|
}
|
||||||
|
data['Marital'] = this.marital;
|
||||||
|
data['OutSA'] = this.outSA;
|
||||||
|
data['POBox'] = this.pOBox;
|
||||||
|
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport;
|
||||||
|
data['SourceType'] = this.sourceType;
|
||||||
|
data['StrDateofBirth'] = this.strDateofBirth;
|
||||||
|
data['TempAddress'] = this.tempAddress;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListPrivilege {
|
||||||
|
int iD;
|
||||||
|
String serviceName;
|
||||||
|
bool previlege;
|
||||||
|
Null region;
|
||||||
|
|
||||||
|
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region});
|
||||||
|
|
||||||
|
ListPrivilege.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
serviceName = json['ServiceName'];
|
||||||
|
previlege = json['Previlege'];
|
||||||
|
region = json['Region'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['ServiceName'] = this.serviceName;
|
||||||
|
data['Previlege'] = this.previlege;
|
||||||
|
data['Region'] = this.region;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
class GetMobileLoginInfoRequest {
|
||||||
|
int patientMobileNumber;
|
||||||
|
String mobileNo;
|
||||||
|
String deviceToken;
|
||||||
|
int projectOutSA;
|
||||||
|
int loginType;
|
||||||
|
String zipCode;
|
||||||
|
bool isRegister;
|
||||||
|
String logInTokenID;
|
||||||
|
int searchType;
|
||||||
|
int patientID;
|
||||||
|
String nationalID;
|
||||||
|
String patientIdentificationID;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
int languageID;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
Null sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
|
||||||
|
GetMobileLoginInfoRequest(
|
||||||
|
{this.patientMobileNumber,
|
||||||
|
this.mobileNo,
|
||||||
|
this.deviceToken,
|
||||||
|
this.projectOutSA,
|
||||||
|
this.loginType,
|
||||||
|
this.zipCode,
|
||||||
|
this.isRegister,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.searchType,
|
||||||
|
this.patientID,
|
||||||
|
this.nationalID,
|
||||||
|
this.patientIdentificationID,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.languageID,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID});
|
||||||
|
|
||||||
|
GetMobileLoginInfoRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMobileNumber = json['PatientMobileNumber'];
|
||||||
|
mobileNo = json['MobileNo'];
|
||||||
|
deviceToken = json['DeviceToken'];
|
||||||
|
projectOutSA = json['ProjectOutSA'];
|
||||||
|
loginType = json['LoginType'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
isRegister = json['isRegister'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
searchType = json['SearchType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
nationalID = json['NationalID'];
|
||||||
|
patientIdentificationID = json['PatientIdentificationID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||||
|
data['MobileNo'] = this.mobileNo;
|
||||||
|
data['DeviceToken'] = this.deviceToken;
|
||||||
|
data['ProjectOutSA'] = this.projectOutSA;
|
||||||
|
data['LoginType'] = this.loginType;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['isRegister'] = this.isRegister;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['SearchType'] = this.searchType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['NationalID'] = this.nationalID;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,292 @@
|
|||||||
|
class GetMobileLoginInfoResponse {
|
||||||
|
Null date;
|
||||||
|
int languageID;
|
||||||
|
int serviceName;
|
||||||
|
Null time;
|
||||||
|
Null androidLink;
|
||||||
|
Null authenticationTokenID;
|
||||||
|
Null data;
|
||||||
|
bool dataw;
|
||||||
|
int dietType;
|
||||||
|
Null errorCode;
|
||||||
|
Null errorEndUserMessage;
|
||||||
|
Null errorEndUserMessageN;
|
||||||
|
Null errorMessage;
|
||||||
|
int errorType;
|
||||||
|
int foodCategory;
|
||||||
|
Null 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;
|
||||||
|
bool isHMGPatient;
|
||||||
|
bool isLoginSuccessfully;
|
||||||
|
bool isNeedUpdateIdintificationNo;
|
||||||
|
bool kioskSendSMS;
|
||||||
|
Null list;
|
||||||
|
Null listAskHabibMobileLoginInfo;
|
||||||
|
Null listAskHabibPatientFile;
|
||||||
|
Null listMergeFiles;
|
||||||
|
List<ListMobileLoginInfo> listMobileLoginInfo;
|
||||||
|
Null listPatientCount;
|
||||||
|
String logInTokenID;
|
||||||
|
Null mohemmPrivilegeList;
|
||||||
|
int pateintID;
|
||||||
|
Null patientBloodType;
|
||||||
|
bool patientHasFile;
|
||||||
|
Null patientMergedIDs;
|
||||||
|
bool patientOutSA;
|
||||||
|
int patientShareRequestID;
|
||||||
|
int patientType;
|
||||||
|
int projectIDOut;
|
||||||
|
Null returnMessage;
|
||||||
|
bool sMSLoginRequired;
|
||||||
|
Null servicePrivilegeList;
|
||||||
|
Null sharePatientName;
|
||||||
|
Null verificationCode;
|
||||||
|
Null email;
|
||||||
|
Null errorList;
|
||||||
|
bool hasFile;
|
||||||
|
bool isActiveCode;
|
||||||
|
bool isMerged;
|
||||||
|
bool isNeedUserAgreement;
|
||||||
|
bool isSMSSent;
|
||||||
|
Null memberList;
|
||||||
|
Null message;
|
||||||
|
int statusCode;
|
||||||
|
|
||||||
|
GetMobileLoginInfoResponse(
|
||||||
|
{this.date,
|
||||||
|
this.languageID,
|
||||||
|
this.serviceName,
|
||||||
|
this.time,
|
||||||
|
this.androidLink,
|
||||||
|
this.authenticationTokenID,
|
||||||
|
this.data,
|
||||||
|
this.dataw,
|
||||||
|
this.dietType,
|
||||||
|
this.errorCode,
|
||||||
|
this.errorEndUserMessage,
|
||||||
|
this.errorEndUserMessageN,
|
||||||
|
this.errorMessage,
|
||||||
|
this.errorType,
|
||||||
|
this.foodCategory,
|
||||||
|
this.iOSLink,
|
||||||
|
this.isAuthenticated,
|
||||||
|
this.mealOrderStatus,
|
||||||
|
this.mealType,
|
||||||
|
this.messageStatus,
|
||||||
|
this.numberOfResultRecords,
|
||||||
|
this.patientBlodType,
|
||||||
|
this.successMsg,
|
||||||
|
this.successMsgN,
|
||||||
|
this.doctorInformationList,
|
||||||
|
this.getAllPendingRecordsList,
|
||||||
|
this.getAllSharedRecordsByStatusList,
|
||||||
|
this.getResponseFileList,
|
||||||
|
this.isHMGPatient,
|
||||||
|
this.isLoginSuccessfully,
|
||||||
|
this.isNeedUpdateIdintificationNo,
|
||||||
|
this.kioskSendSMS,
|
||||||
|
this.list,
|
||||||
|
this.listAskHabibMobileLoginInfo,
|
||||||
|
this.listAskHabibPatientFile,
|
||||||
|
this.listMergeFiles,
|
||||||
|
this.listMobileLoginInfo,
|
||||||
|
this.listPatientCount,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.mohemmPrivilegeList,
|
||||||
|
this.pateintID,
|
||||||
|
this.patientBloodType,
|
||||||
|
this.patientHasFile,
|
||||||
|
this.patientMergedIDs,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.patientShareRequestID,
|
||||||
|
this.patientType,
|
||||||
|
this.projectIDOut,
|
||||||
|
this.returnMessage,
|
||||||
|
this.sMSLoginRequired,
|
||||||
|
this.servicePrivilegeList,
|
||||||
|
this.sharePatientName,
|
||||||
|
this.verificationCode,
|
||||||
|
this.email,
|
||||||
|
this.errorList,
|
||||||
|
this.hasFile,
|
||||||
|
this.isActiveCode,
|
||||||
|
this.isMerged,
|
||||||
|
this.isNeedUserAgreement,
|
||||||
|
this.isSMSSent,
|
||||||
|
this.memberList,
|
||||||
|
this.message,
|
||||||
|
this.statusCode});
|
||||||
|
|
||||||
|
GetMobileLoginInfoResponse.fromJson(Map<String, dynamic> json) {
|
||||||
|
date = json['Date'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
serviceName = json['ServiceName'];
|
||||||
|
time = json['Time'];
|
||||||
|
androidLink = json['AndroidLink'];
|
||||||
|
authenticationTokenID = json['AuthenticationTokenID'];
|
||||||
|
data = json['Data'];
|
||||||
|
dataw = json['Dataw'];
|
||||||
|
dietType = json['DietType'];
|
||||||
|
errorCode = json['ErrorCode'];
|
||||||
|
errorEndUserMessage = json['ErrorEndUserMessage'];
|
||||||
|
errorEndUserMessageN = json['ErrorEndUserMessageN'];
|
||||||
|
errorMessage = json['ErrorMessage'];
|
||||||
|
errorType = json['ErrorType'];
|
||||||
|
foodCategory = json['FoodCategory'];
|
||||||
|
iOSLink = json['IOSLink'];
|
||||||
|
isAuthenticated = json['IsAuthenticated'];
|
||||||
|
mealOrderStatus = json['MealOrderStatus'];
|
||||||
|
mealType = json['MealType'];
|
||||||
|
messageStatus = json['MessageStatus'];
|
||||||
|
numberOfResultRecords = json['NumberOfResultRecords'];
|
||||||
|
patientBlodType = json['PatientBlodType'];
|
||||||
|
successMsg = json['SuccessMsg'];
|
||||||
|
successMsgN = json['SuccessMsgN'];
|
||||||
|
doctorInformationList = json['DoctorInformation_List'];
|
||||||
|
getAllPendingRecordsList = json['GetAllPendingRecordsList'];
|
||||||
|
getAllSharedRecordsByStatusList = json['GetAllSharedRecordsByStatusList'];
|
||||||
|
getResponseFileList = json['GetResponseFileList'];
|
||||||
|
isHMGPatient = json['IsHMGPatient'];
|
||||||
|
isLoginSuccessfully = json['IsLoginSuccessfully'];
|
||||||
|
isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo'];
|
||||||
|
kioskSendSMS = json['KioskSendSMS'];
|
||||||
|
list = json['List'];
|
||||||
|
listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo'];
|
||||||
|
listAskHabibPatientFile = json['List_AskHabibPatientFile'];
|
||||||
|
listMergeFiles = json['List_MergeFiles'];
|
||||||
|
if (json['List_MobileLoginInfo'] != null) {
|
||||||
|
listMobileLoginInfo = new List<ListMobileLoginInfo>();
|
||||||
|
json['List_MobileLoginInfo'].forEach((v) {
|
||||||
|
listMobileLoginInfo.add(new ListMobileLoginInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
listPatientCount = json['List_PatientCount'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
mohemmPrivilegeList = json['MohemmPrivilege_List'];
|
||||||
|
pateintID = json['PateintID'];
|
||||||
|
patientBloodType = json['PatientBloodType'];
|
||||||
|
patientHasFile = json['PatientHasFile'];
|
||||||
|
patientMergedIDs = json['PatientMergedIDs'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
patientShareRequestID = json['PatientShareRequestID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
projectIDOut = json['ProjectIDOut'];
|
||||||
|
returnMessage = json['ReturnMessage'];
|
||||||
|
sMSLoginRequired = json['SMSLoginRequired'];
|
||||||
|
servicePrivilegeList = json['ServicePrivilege_List'];
|
||||||
|
sharePatientName = json['SharePatientName'];
|
||||||
|
verificationCode = json['VerificationCode'];
|
||||||
|
email = json['email'];
|
||||||
|
errorList = json['errorList'];
|
||||||
|
hasFile = json['hasFile'];
|
||||||
|
isActiveCode = json['isActiveCode'];
|
||||||
|
isMerged = json['isMerged'];
|
||||||
|
isNeedUserAgreement = json['isNeedUserAgreement'];
|
||||||
|
isSMSSent = json['isSMSSent'];
|
||||||
|
memberList = json['memberList'];
|
||||||
|
message = json['message'];
|
||||||
|
statusCode = json['statusCode'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Date'] = this.date;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['ServiceName'] = this.serviceName;
|
||||||
|
data['Time'] = this.time;
|
||||||
|
data['AndroidLink'] = this.androidLink;
|
||||||
|
data['AuthenticationTokenID'] = this.authenticationTokenID;
|
||||||
|
data['Data'] = this.data;
|
||||||
|
data['Dataw'] = this.dataw;
|
||||||
|
data['DietType'] = this.dietType;
|
||||||
|
data['ErrorCode'] = this.errorCode;
|
||||||
|
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
|
||||||
|
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
|
||||||
|
data['ErrorMessage'] = this.errorMessage;
|
||||||
|
data['ErrorType'] = this.errorType;
|
||||||
|
data['FoodCategory'] = this.foodCategory;
|
||||||
|
data['IOSLink'] = this.iOSLink;
|
||||||
|
data['IsAuthenticated'] = this.isAuthenticated;
|
||||||
|
data['MealOrderStatus'] = this.mealOrderStatus;
|
||||||
|
data['MealType'] = this.mealType;
|
||||||
|
data['MessageStatus'] = this.messageStatus;
|
||||||
|
data['NumberOfResultRecords'] = this.numberOfResultRecords;
|
||||||
|
data['PatientBlodType'] = this.patientBlodType;
|
||||||
|
data['SuccessMsg'] = this.successMsg;
|
||||||
|
data['SuccessMsgN'] = this.successMsgN;
|
||||||
|
data['DoctorInformation_List'] = this.doctorInformationList;
|
||||||
|
data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList;
|
||||||
|
data['GetAllSharedRecordsByStatusList'] =
|
||||||
|
this.getAllSharedRecordsByStatusList;
|
||||||
|
data['GetResponseFileList'] = this.getResponseFileList;
|
||||||
|
data['IsHMGPatient'] = this.isHMGPatient;
|
||||||
|
data['IsLoginSuccessfully'] = this.isLoginSuccessfully;
|
||||||
|
data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo;
|
||||||
|
data['KioskSendSMS'] = this.kioskSendSMS;
|
||||||
|
data['List'] = this.list;
|
||||||
|
data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo;
|
||||||
|
data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile;
|
||||||
|
data['List_MergeFiles'] = this.listMergeFiles;
|
||||||
|
if (this.listMobileLoginInfo != null) {
|
||||||
|
data['List_MobileLoginInfo'] =
|
||||||
|
this.listMobileLoginInfo.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['List_PatientCount'] = this.listPatientCount;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['MohemmPrivilege_List'] = this.mohemmPrivilegeList;
|
||||||
|
data['PateintID'] = this.pateintID;
|
||||||
|
data['PatientBloodType'] = this.patientBloodType;
|
||||||
|
data['PatientHasFile'] = this.patientHasFile;
|
||||||
|
data['PatientMergedIDs'] = this.patientMergedIDs;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['PatientShareRequestID'] = this.patientShareRequestID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['ProjectIDOut'] = this.projectIDOut;
|
||||||
|
data['ReturnMessage'] = this.returnMessage;
|
||||||
|
data['SMSLoginRequired'] = this.sMSLoginRequired;
|
||||||
|
data['ServicePrivilege_List'] = this.servicePrivilegeList;
|
||||||
|
data['SharePatientName'] = this.sharePatientName;
|
||||||
|
data['VerificationCode'] = this.verificationCode;
|
||||||
|
data['email'] = this.email;
|
||||||
|
data['errorList'] = this.errorList;
|
||||||
|
data['hasFile'] = this.hasFile;
|
||||||
|
data['isActiveCode'] = this.isActiveCode;
|
||||||
|
data['isMerged'] = this.isMerged;
|
||||||
|
data['isNeedUserAgreement'] = this.isNeedUserAgreement;
|
||||||
|
data['isSMSSent'] = this.isSMSSent;
|
||||||
|
data['memberList'] = this.memberList;
|
||||||
|
data['message'] = this.message;
|
||||||
|
data['statusCode'] = this.statusCode;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListMobileLoginInfo {
|
||||||
|
int iD;
|
||||||
|
int loginType;
|
||||||
|
|
||||||
|
ListMobileLoginInfo({this.iD, this.loginType});
|
||||||
|
|
||||||
|
ListMobileLoginInfo.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
loginType = json['LoginType'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['LoginType'] = this.loginType;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,323 @@
|
|||||||
|
class INSERTDeviceIMEIRequest {
|
||||||
|
String setupID;
|
||||||
|
int patientType;
|
||||||
|
int patientID;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String firstNameN;
|
||||||
|
String middleNameN;
|
||||||
|
String lastNameN;
|
||||||
|
int relationshipID;
|
||||||
|
int gender;
|
||||||
|
String dateofBirth;
|
||||||
|
Null dateofBirthN;
|
||||||
|
String nationalityID;
|
||||||
|
Null phoneResi;
|
||||||
|
Null phoneOffice;
|
||||||
|
String mobileNumber;
|
||||||
|
Null faxNumber;
|
||||||
|
String emailAddress;
|
||||||
|
Null bloodGroup;
|
||||||
|
Null rHFactor;
|
||||||
|
bool isEmailAlertRequired;
|
||||||
|
bool isSMSAlertRequired;
|
||||||
|
int preferredLanguage;
|
||||||
|
bool isPrivilegedMember;
|
||||||
|
Null memberID;
|
||||||
|
Null expiryDate;
|
||||||
|
Null isHmgEmployee;
|
||||||
|
Null employeeID;
|
||||||
|
Null emergencyContactName;
|
||||||
|
Null emergencyContactNo;
|
||||||
|
int patientPayType;
|
||||||
|
Null dHCCPatientRefID;
|
||||||
|
bool isPatientDummy;
|
||||||
|
int status;
|
||||||
|
Null isStatusCleared;
|
||||||
|
int patientIdentificationType;
|
||||||
|
String patientIdentificationNo;
|
||||||
|
int projectID;
|
||||||
|
int infoSourceID;
|
||||||
|
Null address;
|
||||||
|
int age;
|
||||||
|
String ageDesc;
|
||||||
|
int areaID;
|
||||||
|
int createdBy;
|
||||||
|
String genderDescription;
|
||||||
|
Null iR;
|
||||||
|
Null iSOCityID;
|
||||||
|
Null iSOCountryID;
|
||||||
|
List<ListPrivilege> listPrivilege;
|
||||||
|
Null marital;
|
||||||
|
bool outSA;
|
||||||
|
Null pOBox;
|
||||||
|
bool receiveHealthSummaryReport;
|
||||||
|
int sourceType;
|
||||||
|
Null strDateofBirth;
|
||||||
|
Null tempAddress;
|
||||||
|
String zipCode;
|
||||||
|
|
||||||
|
String patientName;
|
||||||
|
String identificationNo;
|
||||||
|
Null email;
|
||||||
|
String mobileNo;
|
||||||
|
bool patientOutSA;
|
||||||
|
|
||||||
|
String tokenID;
|
||||||
|
Null patientBloodType;
|
||||||
|
String iMEI;
|
||||||
|
bool biometricEnabled;
|
||||||
|
int logInTypeID;
|
||||||
|
|
||||||
|
INSERTDeviceIMEIRequest(
|
||||||
|
{this.setupID,
|
||||||
|
this.patientType,
|
||||||
|
this.patientID,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.firstNameN,
|
||||||
|
this.middleNameN,
|
||||||
|
this.lastNameN,
|
||||||
|
this.relationshipID,
|
||||||
|
this.gender,
|
||||||
|
this.dateofBirth,
|
||||||
|
this.dateofBirthN,
|
||||||
|
this.nationalityID,
|
||||||
|
this.phoneResi,
|
||||||
|
this.phoneOffice,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.faxNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.bloodGroup,
|
||||||
|
this.rHFactor,
|
||||||
|
this.isEmailAlertRequired,
|
||||||
|
this.isSMSAlertRequired,
|
||||||
|
this.preferredLanguage,
|
||||||
|
this.isPrivilegedMember,
|
||||||
|
this.memberID,
|
||||||
|
this.expiryDate,
|
||||||
|
this.isHmgEmployee,
|
||||||
|
this.employeeID,
|
||||||
|
this.emergencyContactName,
|
||||||
|
this.emergencyContactNo,
|
||||||
|
this.patientPayType,
|
||||||
|
this.dHCCPatientRefID,
|
||||||
|
this.isPatientDummy,
|
||||||
|
this.status,
|
||||||
|
this.isStatusCleared,
|
||||||
|
this.patientIdentificationType,
|
||||||
|
this.patientIdentificationNo,
|
||||||
|
this.projectID,
|
||||||
|
this.infoSourceID,
|
||||||
|
this.address,
|
||||||
|
this.age,
|
||||||
|
this.ageDesc,
|
||||||
|
this.areaID,
|
||||||
|
this.createdBy,
|
||||||
|
this.genderDescription,
|
||||||
|
this.iR,
|
||||||
|
this.iSOCityID,
|
||||||
|
this.iSOCountryID,
|
||||||
|
this.listPrivilege,
|
||||||
|
this.marital,
|
||||||
|
this.outSA,
|
||||||
|
this.pOBox,
|
||||||
|
this.receiveHealthSummaryReport,
|
||||||
|
this.sourceType,
|
||||||
|
this.strDateofBirth,
|
||||||
|
this.tempAddress,
|
||||||
|
this.zipCode,
|
||||||
|
this.patientName,
|
||||||
|
this.identificationNo,
|
||||||
|
this.email,
|
||||||
|
this.mobileNo,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.tokenID,
|
||||||
|
this.patientBloodType,
|
||||||
|
this.iMEI,
|
||||||
|
this.biometricEnabled,
|
||||||
|
this.logInTypeID});
|
||||||
|
|
||||||
|
INSERTDeviceIMEIRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
patientType = json['PatientType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
firstName = json['FirstName'];
|
||||||
|
middleName = json['MiddleName'];
|
||||||
|
lastName = json['LastName'];
|
||||||
|
firstNameN = json['FirstNameN'];
|
||||||
|
middleNameN = json['MiddleNameN'];
|
||||||
|
lastNameN = json['LastNameN'];
|
||||||
|
relationshipID = json['RelationshipID'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
dateofBirth = json['DateofBirth'];
|
||||||
|
dateofBirthN = json['DateofBirthN'];
|
||||||
|
nationalityID = json['NationalityID'];
|
||||||
|
phoneResi = json['PhoneResi'];
|
||||||
|
phoneOffice = json['PhoneOffice'];
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
faxNumber = json['FaxNumber'];
|
||||||
|
emailAddress = json['EmailAddress'];
|
||||||
|
bloodGroup = json['BloodGroup'];
|
||||||
|
rHFactor = json['RHFactor'];
|
||||||
|
isEmailAlertRequired = json['IsEmailAlertRequired'];
|
||||||
|
isSMSAlertRequired = json['IsSMSAlertRequired'];
|
||||||
|
preferredLanguage = json['PreferredLanguage'];
|
||||||
|
isPrivilegedMember = json['IsPrivilegedMember'];
|
||||||
|
memberID = json['MemberID'];
|
||||||
|
expiryDate = json['ExpiryDate'];
|
||||||
|
isHmgEmployee = json['IsHmgEmployee'];
|
||||||
|
employeeID = json['EmployeeID'];
|
||||||
|
emergencyContactName = json['EmergencyContactName'];
|
||||||
|
emergencyContactNo = json['EmergencyContactNo'];
|
||||||
|
patientPayType = json['PatientPayType'];
|
||||||
|
dHCCPatientRefID = json['DHCCPatientRefID'];
|
||||||
|
isPatientDummy = json['IsPatientDummy'];
|
||||||
|
status = json['Status'];
|
||||||
|
isStatusCleared = json['IsStatusCleared'];
|
||||||
|
patientIdentificationType = json['PatientIdentificationType'];
|
||||||
|
patientIdentificationNo = json['PatientIdentificationNo'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
infoSourceID = json['InfoSourceID'];
|
||||||
|
address = json['Address'];
|
||||||
|
age = json['Age'];
|
||||||
|
ageDesc = json['AgeDesc'];
|
||||||
|
areaID = json['AreaID'];
|
||||||
|
createdBy = json['CreatedBy'];
|
||||||
|
genderDescription = json['GenderDescription'];
|
||||||
|
iR = json['IR'];
|
||||||
|
iSOCityID = json['ISOCityID'];
|
||||||
|
iSOCountryID = json['ISOCountryID'];
|
||||||
|
if (json['ListPrivilege'] != null) {
|
||||||
|
listPrivilege = new List<ListPrivilege>();
|
||||||
|
json['ListPrivilege'].forEach((v) {
|
||||||
|
listPrivilege.add(new ListPrivilege.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
marital = json['Marital'];
|
||||||
|
outSA = json['OutSA'];
|
||||||
|
pOBox = json['POBox'];
|
||||||
|
receiveHealthSummaryReport = json['ReceiveHealthSummaryReport'];
|
||||||
|
sourceType = json['SourceType'];
|
||||||
|
strDateofBirth = json['StrDateofBirth'];
|
||||||
|
tempAddress = json['TempAddress'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
|
||||||
|
patientName = json['PatientName'];
|
||||||
|
identificationNo = json['IdentificationNo'];
|
||||||
|
email = json['Email'];
|
||||||
|
mobileNo = json['MobileNo'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
patientBloodType = json['PatientBloodType'];
|
||||||
|
iMEI = json['IMEI'];
|
||||||
|
biometricEnabled = json['BiometricEnabled'];
|
||||||
|
logInTypeID = json['LogInTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['PatientType'] = this.patientType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['FirstName'] = this.firstName;
|
||||||
|
data['MiddleName'] = this.middleName;
|
||||||
|
data['LastName'] = this.lastName;
|
||||||
|
data['FirstNameN'] = this.firstNameN;
|
||||||
|
data['MiddleNameN'] = this.middleNameN;
|
||||||
|
data['LastNameN'] = this.lastNameN;
|
||||||
|
data['RelationshipID'] = this.relationshipID;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['DateofBirth'] = this.dateofBirth;
|
||||||
|
data['DateofBirthN'] = this.dateofBirthN;
|
||||||
|
data['NationalityID'] = this.nationalityID;
|
||||||
|
data['PhoneResi'] = this.phoneResi;
|
||||||
|
data['PhoneOffice'] = this.phoneOffice;
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['FaxNumber'] = this.faxNumber;
|
||||||
|
data['EmailAddress'] = this.emailAddress;
|
||||||
|
data['BloodGroup'] = this.bloodGroup;
|
||||||
|
data['RHFactor'] = this.rHFactor;
|
||||||
|
data['IsEmailAlertRequired'] = this.isEmailAlertRequired;
|
||||||
|
data['IsSMSAlertRequired'] = this.isSMSAlertRequired;
|
||||||
|
data['PreferredLanguage'] = this.preferredLanguage;
|
||||||
|
data['IsPrivilegedMember'] = this.isPrivilegedMember;
|
||||||
|
data['MemberID'] = this.memberID;
|
||||||
|
data['ExpiryDate'] = this.expiryDate;
|
||||||
|
data['IsHmgEmployee'] = this.isHmgEmployee;
|
||||||
|
data['EmployeeID'] = this.employeeID;
|
||||||
|
data['EmergencyContactName'] = this.emergencyContactName;
|
||||||
|
data['EmergencyContactNo'] = this.emergencyContactNo;
|
||||||
|
data['PatientPayType'] = this.patientPayType;
|
||||||
|
data['DHCCPatientRefID'] = this.dHCCPatientRefID;
|
||||||
|
data['IsPatientDummy'] = this.isPatientDummy;
|
||||||
|
data['Status'] = this.status;
|
||||||
|
data['IsStatusCleared'] = this.isStatusCleared;
|
||||||
|
data['PatientIdentificationType'] = this.patientIdentificationType;
|
||||||
|
data['PatientIdentificationNo'] = this.patientIdentificationNo;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['InfoSourceID'] = this.infoSourceID;
|
||||||
|
data['Address'] = this.address;
|
||||||
|
data['Age'] = this.age;
|
||||||
|
data['AgeDesc'] = this.ageDesc;
|
||||||
|
data['AreaID'] = this.areaID;
|
||||||
|
data['CreatedBy'] = this.createdBy;
|
||||||
|
data['GenderDescription'] = this.genderDescription;
|
||||||
|
data['IR'] = this.iR;
|
||||||
|
data['ISOCityID'] = this.iSOCityID;
|
||||||
|
data['ISOCountryID'] = this.iSOCountryID;
|
||||||
|
if (this.listPrivilege != null) {
|
||||||
|
data['ListPrivilege'] =
|
||||||
|
this.listPrivilege.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['Marital'] = this.marital;
|
||||||
|
data['OutSA'] = this.outSA;
|
||||||
|
data['POBox'] = this.pOBox;
|
||||||
|
data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport;
|
||||||
|
data['SourceType'] = this.sourceType;
|
||||||
|
data['StrDateofBirth'] = this.strDateofBirth;
|
||||||
|
data['TempAddress'] = this.tempAddress;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
|
||||||
|
data['PatientName'] = this.patientName;
|
||||||
|
data['IdentificationNo'] = this.identificationNo;
|
||||||
|
data['Email'] = this.email;
|
||||||
|
data['MobileNo'] = this.mobileNo;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['PatientBloodType'] = this.patientBloodType;
|
||||||
|
data['IMEI'] = this.iMEI;
|
||||||
|
data['BiometricEnabled'] = this.biometricEnabled;
|
||||||
|
data['LogInTypeID'] = this.logInTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ListPrivilege {
|
||||||
|
int iD;
|
||||||
|
String serviceName;
|
||||||
|
bool previlege;
|
||||||
|
Null region;
|
||||||
|
|
||||||
|
ListPrivilege({this.iD, this.serviceName, this.previlege, this.region});
|
||||||
|
|
||||||
|
ListPrivilege.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
serviceName = json['ServiceName'];
|
||||||
|
previlege = json['Previlege'];
|
||||||
|
region = json['Region'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['ServiceName'] = this.serviceName;
|
||||||
|
data['Previlege'] = this.previlege;
|
||||||
|
data['Region'] = this.region;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
class SendActivationRequest {
|
||||||
|
int patientMobileNumber;
|
||||||
|
String mobileNo;
|
||||||
|
String deviceToken;
|
||||||
|
int projectOutSA;
|
||||||
|
int loginType;
|
||||||
|
String zipCode;
|
||||||
|
bool isRegister;
|
||||||
|
String logInTokenID;
|
||||||
|
int searchType;
|
||||||
|
int patientID;
|
||||||
|
String nationalID;
|
||||||
|
String patientIdentificationID;
|
||||||
|
int oTPSendType;
|
||||||
|
int languageID;
|
||||||
|
double versionID;
|
||||||
|
int channel;
|
||||||
|
String iPAdress;
|
||||||
|
String generalid;
|
||||||
|
int patientOutSA;
|
||||||
|
Null sessionID;
|
||||||
|
bool isDentalAllowedBackend;
|
||||||
|
int deviceTypeID;
|
||||||
|
|
||||||
|
SendActivationRequest(
|
||||||
|
{this.patientMobileNumber,
|
||||||
|
this.mobileNo,
|
||||||
|
this.deviceToken,
|
||||||
|
this.projectOutSA,
|
||||||
|
this.loginType,
|
||||||
|
this.zipCode,
|
||||||
|
this.isRegister,
|
||||||
|
this.logInTokenID,
|
||||||
|
this.searchType,
|
||||||
|
this.patientID,
|
||||||
|
this.nationalID,
|
||||||
|
this.patientIdentificationID,
|
||||||
|
this.oTPSendType,
|
||||||
|
this.languageID,
|
||||||
|
this.versionID,
|
||||||
|
this.channel,
|
||||||
|
this.iPAdress,
|
||||||
|
this.generalid,
|
||||||
|
this.patientOutSA,
|
||||||
|
this.sessionID,
|
||||||
|
this.isDentalAllowedBackend,
|
||||||
|
this.deviceTypeID});
|
||||||
|
|
||||||
|
SendActivationRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientMobileNumber = json['PatientMobileNumber'];
|
||||||
|
mobileNo = json['MobileNo'];
|
||||||
|
deviceToken = json['DeviceToken'];
|
||||||
|
projectOutSA = json['ProjectOutSA'];
|
||||||
|
loginType = json['LoginType'];
|
||||||
|
zipCode = json['ZipCode'];
|
||||||
|
isRegister = json['isRegister'];
|
||||||
|
logInTokenID = json['LogInTokenID'];
|
||||||
|
searchType = json['SearchType'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
nationalID = json['NationalID'];
|
||||||
|
patientIdentificationID = json['PatientIdentificationID'];
|
||||||
|
oTPSendType = json['OTP_SendType'];
|
||||||
|
languageID = json['LanguageID'];
|
||||||
|
versionID = json['VersionID'];
|
||||||
|
channel = json['Channel'];
|
||||||
|
iPAdress = json['IPAdress'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
patientOutSA = json['PatientOutSA'];
|
||||||
|
sessionID = json['SessionID'];
|
||||||
|
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||||
|
deviceTypeID = json['DeviceTypeID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientMobileNumber'] = this.patientMobileNumber;
|
||||||
|
data['MobileNo'] = this.mobileNo;
|
||||||
|
data['DeviceToken'] = this.deviceToken;
|
||||||
|
data['ProjectOutSA'] = this.projectOutSA;
|
||||||
|
data['LoginType'] = this.loginType;
|
||||||
|
data['ZipCode'] = this.zipCode;
|
||||||
|
data['isRegister'] = this.isRegister;
|
||||||
|
data['LogInTokenID'] = this.logInTokenID;
|
||||||
|
data['SearchType'] = this.searchType;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['NationalID'] = this.nationalID;
|
||||||
|
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||||
|
data['OTP_SendType'] = this.oTPSendType;
|
||||||
|
data['LanguageID'] = this.languageID;
|
||||||
|
data['VersionID'] = this.versionID;
|
||||||
|
data['Channel'] = this.channel;
|
||||||
|
data['IPAdress'] = this.iPAdress;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['PatientOutSA'] = this.patientOutSA;
|
||||||
|
data['SessionID'] = this.sessionID;
|
||||||
|
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||||
|
data['DeviceTypeID'] = this.deviceTypeID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,573 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
|
||||||
|
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart';
|
||||||
|
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:diplomaticquarterapp/routes.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_flexible_toast/flutter_flexible_toast.dart';
|
||||||
|
import 'package:local_auth/local_auth.dart';
|
||||||
|
|
||||||
|
class ConfirmLogin extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_ConfirmLogin createState() => _ConfirmLogin();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ConfirmLogin extends State<ConfirmLogin> {
|
||||||
|
final LocalAuthentication auth = LocalAuthentication();
|
||||||
|
List _availableBiometrics;
|
||||||
|
var sharedPref = new AppSharedPreferences();
|
||||||
|
bool authenticated;
|
||||||
|
final authService = new AuthProvider();
|
||||||
|
int mobileNumber;
|
||||||
|
String errorMsg = '';
|
||||||
|
var user;
|
||||||
|
bool isLoading = false;
|
||||||
|
CheckPatientAuthenticationReq registerd_data;
|
||||||
|
|
||||||
|
var zipCode;
|
||||||
|
|
||||||
|
var patientOutSA;
|
||||||
|
|
||||||
|
var loginTokenID;
|
||||||
|
|
||||||
|
var loginType;
|
||||||
|
|
||||||
|
var deviceToken;
|
||||||
|
|
||||||
|
var lastLogin;
|
||||||
|
|
||||||
|
int selectedOption;
|
||||||
|
|
||||||
|
bool onlySMSBox = false;
|
||||||
|
var userData;
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_getAvailableBiometrics();
|
||||||
|
setDefault();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
appBarTitle: TranslationBase.of(context).confirm,
|
||||||
|
isShowAppBar: true,
|
||||||
|
body: isLoading == false
|
||||||
|
? SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(20),
|
||||||
|
height: SizeConfig.realScreenHeight * .9,
|
||||||
|
width: SizeConfig.realScreenWidth,
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 3,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceEvenly,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/habib-logo.png',
|
||||||
|
height: 80,
|
||||||
|
width: 80,
|
||||||
|
),
|
||||||
|
this.onlySMSBox == false
|
||||||
|
? AppText(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.verifyLoginWith,
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 3.5,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
)
|
||||||
|
: AppText(
|
||||||
|
TranslationBase.of(context)
|
||||||
|
.verifyFingerprint2,
|
||||||
|
fontSize:
|
||||||
|
SizeConfig.textMultiplier * 2.5,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
),
|
||||||
|
])),
|
||||||
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
onlySMSBox == false
|
||||||
|
? Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => {
|
||||||
|
authenticateUser(
|
||||||
|
3,
|
||||||
|
BiometricType
|
||||||
|
.face.index)
|
||||||
|
},
|
||||||
|
child: RoundedContainer(
|
||||||
|
backgroundColor:
|
||||||
|
BiometricType.face
|
||||||
|
.index ==
|
||||||
|
1
|
||||||
|
? Colors.white
|
||||||
|
: Colors.white
|
||||||
|
.withOpacity(
|
||||||
|
.7),
|
||||||
|
borderColor: Colors.grey,
|
||||||
|
showBorder: true,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.fromLTRB(
|
||||||
|
20, 10, 20, 10),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/login/101.png',
|
||||||
|
height: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
13,
|
||||||
|
width: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.verifyFaceID,
|
||||||
|
fontSize: SizeConfig
|
||||||
|
.textMultiplier *
|
||||||
|
2,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)))),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => {
|
||||||
|
authenticateUser(
|
||||||
|
2,
|
||||||
|
BiometricType
|
||||||
|
.fingerprint
|
||||||
|
.index)
|
||||||
|
},
|
||||||
|
child: RoundedContainer(
|
||||||
|
backgroundColor:
|
||||||
|
BiometricType
|
||||||
|
.fingerprint
|
||||||
|
.index ==
|
||||||
|
1
|
||||||
|
? Colors.white
|
||||||
|
: Colors.white
|
||||||
|
.withOpacity(
|
||||||
|
.7),
|
||||||
|
borderColor: Colors.grey,
|
||||||
|
showBorder: true,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.fromLTRB(
|
||||||
|
25, 10, 25, 10),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/login/102.png',
|
||||||
|
height: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
13,
|
||||||
|
width: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.verifyFingerprint,
|
||||||
|
fontSize: SizeConfig
|
||||||
|
.textMultiplier *
|
||||||
|
2,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))))
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: SizedBox(),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () =>
|
||||||
|
{authenticateUser(1, true)},
|
||||||
|
child: RoundedContainer(
|
||||||
|
borderColor: Colors.grey,
|
||||||
|
showBorder: true,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.fromLTRB(
|
||||||
|
20, 10, 20, 10),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.center,
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/login/103.png',
|
||||||
|
height: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
13,
|
||||||
|
width: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.verifySMS,
|
||||||
|
fontSize: SizeConfig
|
||||||
|
.textMultiplier *
|
||||||
|
2,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)))),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () =>
|
||||||
|
{authenticateUser(4, true)},
|
||||||
|
child: RoundedContainer(
|
||||||
|
borderColor: Colors.grey,
|
||||||
|
showBorder: true,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.fromLTRB(
|
||||||
|
25, 10, 25, 10),
|
||||||
|
child: Column(
|
||||||
|
children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/login/104.png',
|
||||||
|
height: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
13,
|
||||||
|
width: SizeConfig
|
||||||
|
.imageSizeMultiplier *
|
||||||
|
16,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
AppText(
|
||||||
|
TranslationBase.of(
|
||||||
|
context)
|
||||||
|
.verifyWhatsApp,
|
||||||
|
fontSize: SizeConfig
|
||||||
|
.textMultiplier *
|
||||||
|
2,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
// Row(
|
||||||
|
// children: <Widget>[
|
||||||
|
// Expanded(
|
||||||
|
// child: RaisedButton(
|
||||||
|
// color: Colors.grey,
|
||||||
|
// textColor: Colors.white,
|
||||||
|
// child:
|
||||||
|
// Text(TranslationBase.of(context).registerNow),
|
||||||
|
// onPressed: () => {
|
||||||
|
// Navigator.of(context).pushNamed(
|
||||||
|
// REGISTER,
|
||||||
|
// )
|
||||||
|
// },
|
||||||
|
// ))
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
)))
|
||||||
|
: AppCircularProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _getAvailableBiometrics() async {
|
||||||
|
var availableBiometrics;
|
||||||
|
try {
|
||||||
|
availableBiometrics = await auth.getAvailableBiometrics();
|
||||||
|
} on PlatformException catch (e) {
|
||||||
|
print(e);
|
||||||
|
}
|
||||||
|
if (!mounted) return;
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_availableBiometrics = availableBiometrics;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
authenticateUser(type, isActive) {
|
||||||
|
this.selectedOption =
|
||||||
|
type; //this.selectedOption && !this.onlySMSBox ? this.selectedOption : this.fingrePrintBefore ? this.fingrePrintBefore : el.value;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
this.loginWithSMS(type, isActive);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
this.loginWithFingurePrintFace(type, isActive);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
this.loginWithFingurePrintFace(type, isActive);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
this.loginWithSMS(type, isActive);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sharedPref.setInt(LAST_LOGIN,
|
||||||
|
type); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
loginWithSMS(type, isActive) {
|
||||||
|
//if (!el.disabled) {
|
||||||
|
if (this.user != null && this.registerd_data != null) {
|
||||||
|
this.checkUserAuthentication(type);
|
||||||
|
} else {
|
||||||
|
if (this.loginTokenID != null) {
|
||||||
|
this.sendActivationCode(type);
|
||||||
|
} else {
|
||||||
|
this.checkUserAuthentication(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkUserAuthentication(type) {}
|
||||||
|
|
||||||
|
sendActivationCode(type) {
|
||||||
|
var request = this.getCommonRequest();
|
||||||
|
loading(true);
|
||||||
|
this.authService.sendActivationCode(request).then((result) => {
|
||||||
|
if (result['isSMSSent'] == true)
|
||||||
|
{loading(false), this.startSMSService(type)}
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
startSMSService(type) {
|
||||||
|
new SMSOTP(
|
||||||
|
context,
|
||||||
|
type,
|
||||||
|
this.mobileNumber,
|
||||||
|
(value) => {this.checkActivationCode(value: value)},
|
||||||
|
() => {
|
||||||
|
print('Faild..'),
|
||||||
|
},
|
||||||
|
).displayDialog(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
loginWithFingurePrintFace(type, isActive) async {
|
||||||
|
if (isActive == 1) {
|
||||||
|
// this.startBiometricLoginIfAvailable();
|
||||||
|
authenticated = await auth.authenticateWithBiometrics(
|
||||||
|
localizedReason: 'Scan your fingerprint to authenticate',
|
||||||
|
useErrorDialogs: true,
|
||||||
|
stickyAuth: true);
|
||||||
|
print(authenticated);
|
||||||
|
if (authenticated == true) {
|
||||||
|
var request = this.getCommonRequest();
|
||||||
|
this.getMobileInfo(request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getMobileInfo(request) {
|
||||||
|
this.authService.getLoginInfo(request).then((result) => {
|
||||||
|
if (!result['SMSLoginRequired'])
|
||||||
|
{
|
||||||
|
this.loginTokenID = result.logInTokenID,
|
||||||
|
this.patientOutSA = result.patientOutSA,
|
||||||
|
// sms for register the biometric
|
||||||
|
if (result.isSMSSent)
|
||||||
|
{
|
||||||
|
this.onlySMSBox = false,
|
||||||
|
//this.button();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{checkActivationCode()}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (result['IsAuthenticated'])
|
||||||
|
{
|
||||||
|
setState(() {
|
||||||
|
this.onlySMSBox = true;
|
||||||
|
}),
|
||||||
|
|
||||||
|
//sharedPref.setBool(ONLY_SMS, true),
|
||||||
|
// this.cs.sharedService.setSharedData(true, AuthenticationService.ONLY_SMS);
|
||||||
|
//this.cs.sharedService.setSharedData(this.selectedOption, AuthenticationService.FINGUREPRINT_BEFORE);
|
||||||
|
// this.cs.confirmLogin();
|
||||||
|
//this.button();
|
||||||
|
}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// // this.cs.presentAlert(result.ErrorEndUserMessage);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setDefault() async {
|
||||||
|
// this.user = this.cs.sharedService.getSharedData(
|
||||||
|
// AuthenticationService.IMEI_USER_DATA,
|
||||||
|
// false
|
||||||
|
// );
|
||||||
|
this.registerd_data = CheckPatientAuthenticationReq.fromJson(
|
||||||
|
await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
|
||||||
|
|
||||||
|
this.mobileNumber = this.registerd_data != null
|
||||||
|
? this.registerd_data.patientMobileNumber
|
||||||
|
: int.parse(this.user.Mobile);
|
||||||
|
this.zipCode = this.registerd_data != null
|
||||||
|
? this.registerd_data.zipCode
|
||||||
|
: this.user.OutSA ? "971" : "966";
|
||||||
|
this.patientOutSA = this.registerd_data != null
|
||||||
|
? this.registerd_data.zipCode == "966" ? 0 : 1
|
||||||
|
: this.user.OutSA;
|
||||||
|
if (this.registerd_data != null) {
|
||||||
|
this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID);
|
||||||
|
this.loginType = this.registerd_data.searchType;
|
||||||
|
}
|
||||||
|
this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
|
||||||
|
this.lastLogin = await sharedPref.getInt(
|
||||||
|
LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
getCommonRequest() {
|
||||||
|
var request = SendActivationRequest();
|
||||||
|
request.patientMobileNumber = this.mobileNumber;
|
||||||
|
request.mobileNo = '0' + this.mobileNumber.toString();
|
||||||
|
request.deviceToken = this.deviceToken;
|
||||||
|
request.projectOutSA = this.patientOutSA;
|
||||||
|
request.loginType = this.selectedOption;
|
||||||
|
request.oTPSendType = this.selectedOption == 1 ? 1 : 2;
|
||||||
|
request.zipCode = this.zipCode;
|
||||||
|
request.isRegister = false;
|
||||||
|
request.logInTokenID = this.loginTokenID ?? "";
|
||||||
|
if (this.registerd_data != null) {
|
||||||
|
request.searchType = this.registerd_data.searchType == 1
|
||||||
|
? this.registerd_data.searchType
|
||||||
|
: 1;
|
||||||
|
request.patientID = this.registerd_data.patientID != 0
|
||||||
|
? this.registerd_data.patientID
|
||||||
|
: 0;
|
||||||
|
request.patientIdentificationID =
|
||||||
|
request.nationalID = this.registerd_data.patientIdentificationID;
|
||||||
|
} else {
|
||||||
|
request.searchType = request.searchType == 1 ? request.searchType : 2;
|
||||||
|
request.patientID = int.parse(this.user.PatientID);
|
||||||
|
request.patientID = request.nationalID =
|
||||||
|
request.nationalID != null ? request.nationalID : 0;
|
||||||
|
}
|
||||||
|
return request;
|
||||||
|
}
|
||||||
|
|
||||||
|
checkActivationCode({value}) {
|
||||||
|
loading(true);
|
||||||
|
var request = this.getCommonRequest().toJson();
|
||||||
|
this.authService.checkActivationCode(request, value).then((result) => {
|
||||||
|
this.userData =
|
||||||
|
result.list, //AuthenticatedUser.fromJson(result['List'][0]),
|
||||||
|
this.sharedPref.setObject(USER_PROFILE, result.list),
|
||||||
|
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
|
||||||
|
this.checkIfUserAgreedBefore(result),
|
||||||
|
loading(false)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
checkIfUserAgreedBefore(CheckActivationCode result) {
|
||||||
|
print(result);
|
||||||
|
if (result.isNeedUserAgreement) {
|
||||||
|
//move to agreement page.
|
||||||
|
} else {
|
||||||
|
goToHome();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
goToHome() {
|
||||||
|
authService.insertDeviceImei().then((value) => print(value));
|
||||||
|
// Navigator.of(context).pushNamed(HOME);
|
||||||
|
// const request = new LoginRequest();
|
||||||
|
// if (this.loginType === AuthenticationService.IDENTIFCIATION_LOGIN_TYPE) {
|
||||||
|
// request.PatientID = 0;
|
||||||
|
// } else {
|
||||||
|
// request.PatientID = Number(this.id);
|
||||||
|
// }
|
||||||
|
// this.newRating(request);
|
||||||
|
// }
|
||||||
|
// public newRating(request: any) {
|
||||||
|
// this.authService
|
||||||
|
// .checkIfRated(
|
||||||
|
// request,
|
||||||
|
// () => {
|
||||||
|
// this.gotoHome();
|
||||||
|
// },
|
||||||
|
// this.ts.trPK("general", "retry")
|
||||||
|
// )
|
||||||
|
// .subscribe((result: CheckUserRatingResponse) => {
|
||||||
|
// if (this.cs.validResponse(result)) {
|
||||||
|
// this.cs.sharedService.setSharedData(result, AuthenticationService.SURVEY_DATA);
|
||||||
|
// if (result.IsLastAppoitmentRatedList.length === 0) {
|
||||||
|
// this.cs.openHome();
|
||||||
|
// } else {
|
||||||
|
// this.ProjectID = result.IsLastAppoitmentRatedList[0].ProjectID;
|
||||||
|
// this.AppointmentNo = result.IsLastAppoitmentRatedList[0].AppointmentNo;
|
||||||
|
// this.cs.sharedService.setSharedData(true, "ratePage");
|
||||||
|
// this.showRateModal();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
loading(flag) {
|
||||||
|
setState(() {
|
||||||
|
isLoading = flag;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,124 +0,0 @@
|
|||||||
import 'package:diplomaticquarterapp/config/config.dart';
|
|
||||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
||||||
import 'package:diplomaticquarterapp/core/model/auth/check_paitent_authentication_req.dart';
|
|
||||||
import 'package:diplomaticquarterapp/core/model/auth/select_device_imei_res.dart';
|
|
||||||
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
||||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
// SharedPreferences sharedPref = new SharedPreferences();
|
|
||||||
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
|
|
||||||
AppSharedPreferences sharedPref = new AppSharedPreferences();
|
|
||||||
|
|
||||||
const String INSERT_DEVICE_IMEI = '/Patients.svc/REST/Patient_INSERTDeviceIMEI';
|
|
||||||
const String SELECT_DEVICE_IMEI =
|
|
||||||
'/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
|
|
||||||
const String CHECK_PATIENT_AUTH =
|
|
||||||
'/Authentication.svc/REST/CheckPatientAuthentication';
|
|
||||||
|
|
||||||
class AuthProvider with ChangeNotifier {
|
|
||||||
bool isLogin = false;
|
|
||||||
bool isLoading = true;
|
|
||||||
AuthProvider() {
|
|
||||||
getUserAuthentication();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getUserAuthentication() async {
|
|
||||||
Map profile = await sharedPref.getObject(USER_PROFILE);
|
|
||||||
if (profile != null) {
|
|
||||||
isLoading = false;
|
|
||||||
isLogin = true;
|
|
||||||
} else {
|
|
||||||
isLoading = false;
|
|
||||||
isLogin = false;
|
|
||||||
}
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
APP_STATUS get stutas {
|
|
||||||
if (isLoading) {
|
|
||||||
return APP_STATUS.LOADING;
|
|
||||||
} else {
|
|
||||||
if (this.isLogin) {
|
|
||||||
return APP_STATUS.AUTHENTICATED;
|
|
||||||
} else {
|
|
||||||
return APP_STATUS.UNAUTHENTICATED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Future<dynamic> login(UserModel userInfo) async {
|
|
||||||
// try {
|
|
||||||
// dynamic localRes;
|
|
||||||
|
|
||||||
// await BaseAppClient.post(LOGIN_URL,
|
|
||||||
// onSuccess: (dynamic response, int statusCode) {
|
|
||||||
// localRes = response;
|
|
||||||
// }, onFailure: (String error, int statusCode) {
|
|
||||||
// throw error;
|
|
||||||
// }, body: userInfo.toJson());
|
|
||||||
|
|
||||||
// return Future.value(localRes);
|
|
||||||
// } catch (error) {
|
|
||||||
// print(error);
|
|
||||||
// throw error;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
Future<dynamic> insertDeviceImei(imei) async {
|
|
||||||
try {
|
|
||||||
dynamic localRes;
|
|
||||||
|
|
||||||
await new BaseAppClient().post(INSERT_DEVICE_IMEI,
|
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
|
||||||
localRes = response;
|
|
||||||
}, onFailure: (String error, int statusCode) {
|
|
||||||
throw error;
|
|
||||||
}, body: imei);
|
|
||||||
return Future.value(localRes);
|
|
||||||
} catch (error) {
|
|
||||||
print(error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<SelectDeviceIMEIRES> selectDeviceImei(imei) async {
|
|
||||||
try {
|
|
||||||
dynamic localRes;
|
|
||||||
await new BaseAppClient().post(SELECT_DEVICE_IMEI,
|
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
|
||||||
localRes = response;
|
|
||||||
}, onFailure: (String error, int statusCode) {
|
|
||||||
throw error;
|
|
||||||
}, body: imei);
|
|
||||||
return Future.value(localRes);
|
|
||||||
} catch (error) {
|
|
||||||
print(error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<dynamic> checkPatientAuthentication(
|
|
||||||
CheckPatientAuthenticationReq request) async {
|
|
||||||
request.versionID = VERSION_ID;
|
|
||||||
request.channel = CHANNEL;
|
|
||||||
request.iPAdress = IP_ADDRESS;
|
|
||||||
request.generalid = GENERAL_ID;
|
|
||||||
request.languageID = 2;
|
|
||||||
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
|
|
||||||
try {
|
|
||||||
dynamic localRes;
|
|
||||||
await new BaseAppClient().post(CHECK_PATIENT_AUTH,
|
|
||||||
onSuccess: (dynamic response, int statusCode) {
|
|
||||||
localRes = response;
|
|
||||||
}, onFailure: (String error, int statusCode) {
|
|
||||||
throw error;
|
|
||||||
}, body: request.toJson());
|
|
||||||
return Future.value(localRes);
|
|
||||||
} catch (error) {
|
|
||||||
print(error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,239 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:diplomaticquarterapp/config/config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/get_mobile_info_request.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/get_mobile_info_response.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/insert_device_imei_request.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
|
||||||
|
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
|
||||||
|
import 'package:diplomaticquarterapp/models/Request.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
// SharedPreferences sharedPref = new SharedPreferences();
|
||||||
|
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
|
||||||
|
AppSharedPreferences sharedPref = new AppSharedPreferences();
|
||||||
|
|
||||||
|
const String INSERT_DEVICE_IMEI = '/Patients.svc/REST/Patient_INSERTDeviceIMEI';
|
||||||
|
const String SELECT_DEVICE_IMEI =
|
||||||
|
'/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
|
||||||
|
const String CHECK_PATIENT_AUTH =
|
||||||
|
'/Authentication.svc/REST/CheckPatientAuthentication';
|
||||||
|
const GET_MOBILE_INFO = '/Authentication.svc/REST/GetMobileLoginInfo';
|
||||||
|
const SEND_ACTIVATION_CODE =
|
||||||
|
'/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
|
||||||
|
const CHECK_ACTIVATION_CODE = '/Authentication.svc/REST/CheckActivationCode';
|
||||||
|
|
||||||
|
class AuthProvider with ChangeNotifier {
|
||||||
|
bool isLogin = false;
|
||||||
|
bool isLoading = true;
|
||||||
|
var authenticatedUser;
|
||||||
|
AuthProvider() {
|
||||||
|
getUserAuthentication();
|
||||||
|
}
|
||||||
|
|
||||||
|
void getUserAuthentication() async {
|
||||||
|
Map profile = await sharedPref.getObject(USER_PROFILE);
|
||||||
|
if (profile != null) {
|
||||||
|
isLoading = false;
|
||||||
|
isLogin = true;
|
||||||
|
} else {
|
||||||
|
isLoading = false;
|
||||||
|
isLogin = false;
|
||||||
|
}
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
APP_STATUS get stutas {
|
||||||
|
if (isLoading) {
|
||||||
|
return APP_STATUS.LOADING;
|
||||||
|
} else {
|
||||||
|
if (this.isLogin) {
|
||||||
|
return APP_STATUS.AUTHENTICATED;
|
||||||
|
} else {
|
||||||
|
return APP_STATUS.UNAUTHENTICATED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<dynamic> login(UserModel userInfo) async {
|
||||||
|
// try {
|
||||||
|
// dynamic localRes;
|
||||||
|
|
||||||
|
// await BaseAppClient.post(LOGIN_URL,
|
||||||
|
// onSuccess: (dynamic response, int statusCode) {
|
||||||
|
// localRes = response;
|
||||||
|
// }, onFailure: (String error, int statusCode) {
|
||||||
|
// throw error;
|
||||||
|
// }, body: userInfo.toJson());
|
||||||
|
|
||||||
|
// return Future.value(localRes);
|
||||||
|
// } catch (error) {
|
||||||
|
// print(error);
|
||||||
|
// throw error;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
Future<dynamic> insertDeviceImei() async {
|
||||||
|
try {
|
||||||
|
dynamic localRes;
|
||||||
|
var lastLogin = await sharedPref.getInt(
|
||||||
|
LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
|
||||||
|
|
||||||
|
var request =
|
||||||
|
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
|
||||||
|
var newRequest = INSERTDeviceIMEIRequest();
|
||||||
|
var imei = await sharedPref.getString(PUSH_TOKEN);
|
||||||
|
// if (!request.) {
|
||||||
|
newRequest.iMEI = imei;
|
||||||
|
newRequest.firstName = request.firstName + " " + request.lastName;
|
||||||
|
newRequest.firstNameN = request.firstNameN + " " + request.lastNameN;
|
||||||
|
newRequest.lastNameN = request.lastNameN ?? "";
|
||||||
|
newRequest.outSA = request.outSA == 1 ? true : false;
|
||||||
|
newRequest.biometricEnabled = false;
|
||||||
|
newRequest.preferredLanguage = int.parse(request.preferredLanguage) ?? 1;
|
||||||
|
newRequest.logInTypeID = lastLogin ?? 1;
|
||||||
|
// }
|
||||||
|
|
||||||
|
await new BaseAppClient().post(INSERT_DEVICE_IMEI,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
localRes = response;
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
throw error;
|
||||||
|
}, body: newRequest.toJson());
|
||||||
|
return Future.value(localRes);
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<SelectDeviceIMEIRES> selectDeviceImei(imei) async {
|
||||||
|
try {
|
||||||
|
dynamic localRes;
|
||||||
|
Map<String, dynamic> request = {};
|
||||||
|
request['IMEI'] = imei;
|
||||||
|
await new BaseAppClient().post(SELECT_DEVICE_IMEI,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
localRes = response;
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
throw error;
|
||||||
|
}, body: request);
|
||||||
|
return Future.value(localRes);
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> checkPatientAuthentication(
|
||||||
|
CheckPatientAuthenticationReq request) async {
|
||||||
|
request.versionID = VERSION_ID;
|
||||||
|
request.channel = CHANNEL;
|
||||||
|
request.iPAdress = IP_ADDRESS;
|
||||||
|
request.generalid = GENERAL_ID;
|
||||||
|
request.languageID = 2;
|
||||||
|
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
|
||||||
|
try {
|
||||||
|
dynamic localRes;
|
||||||
|
await new BaseAppClient().post(CHECK_PATIENT_AUTH,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
localRes = response;
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
throw error;
|
||||||
|
}, body: request.toJson());
|
||||||
|
return Future.value(localRes);
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> getLoginInfo(request) async {
|
||||||
|
request.versionID = VERSION_ID;
|
||||||
|
request.channel = CHANNEL;
|
||||||
|
request.iPAdress = IP_ADDRESS;
|
||||||
|
request.generalid = GENERAL_ID;
|
||||||
|
request.languageID = 2;
|
||||||
|
request.deviceTypeID = DeviceTypeID;
|
||||||
|
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
|
||||||
|
request.isDentalAllowedBackend = false;
|
||||||
|
try {
|
||||||
|
dynamic localRes;
|
||||||
|
await new BaseAppClient().post(GET_MOBILE_INFO,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
localRes = response;
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
throw error;
|
||||||
|
}, body: request.toJson());
|
||||||
|
return Future.value(localRes);
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> sendActivationCode(request) async {
|
||||||
|
request.versionID = VERSION_ID;
|
||||||
|
request.channel = CHANNEL;
|
||||||
|
request.iPAdress = IP_ADDRESS;
|
||||||
|
request.generalid = GENERAL_ID;
|
||||||
|
request.languageID = 2;
|
||||||
|
request.deviceTypeID = DeviceTypeID;
|
||||||
|
request.patientOutSA = request.zipCode == '966' ? 0 : 1;
|
||||||
|
request.isDentalAllowedBackend = false;
|
||||||
|
try {
|
||||||
|
var localRes;
|
||||||
|
await new BaseAppClient().post(SEND_ACTIVATION_CODE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
localRes = response;
|
||||||
|
authenticatedUser = localRes;
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
throw error;
|
||||||
|
}, body: request.toJson());
|
||||||
|
return Future.value(localRes);
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<CheckActivationCode> checkActivationCode(request, value) async {
|
||||||
|
var neRequest = CheckActivationCodeReq.fromJson(request);
|
||||||
|
neRequest.activationCode = value ?? "0000";
|
||||||
|
neRequest.isSilentLogin = value != null ? false : true;
|
||||||
|
neRequest.isRegister = false;
|
||||||
|
neRequest.versionID = VERSION_ID;
|
||||||
|
neRequest.channel = CHANNEL;
|
||||||
|
neRequest.iPAdress = IP_ADDRESS;
|
||||||
|
neRequest.generalid = GENERAL_ID;
|
||||||
|
neRequest.languageID = 2;
|
||||||
|
neRequest.deviceTypeID = DeviceTypeID;
|
||||||
|
neRequest.patientOutSA = neRequest.zipCode == '966' ? 0 : 1;
|
||||||
|
neRequest.isDentalAllowedBackend = false;
|
||||||
|
try {
|
||||||
|
dynamic localRes;
|
||||||
|
await new BaseAppClient().post(CHECK_ACTIVATION_CODE,
|
||||||
|
onSuccess: (dynamic response, int statusCode) {
|
||||||
|
localRes = CheckActivationCode.fromJson(response);
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
throw error;
|
||||||
|
}, body: neRequest.toJson());
|
||||||
|
return Future.value(localRes);
|
||||||
|
} catch (error) {
|
||||||
|
print(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AuthenticatedUser getAuthenticatedUser() {
|
||||||
|
this.isLogin = true;
|
||||||
|
return authenticatedUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DefaultButton extends StatelessWidget {
|
||||||
|
final String text;
|
||||||
|
final Function onPress;
|
||||||
|
final Color textColor;
|
||||||
|
final Color color;
|
||||||
|
DefaultButton(this.text, this.onPress, {this.color, this.textColor});
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
height: 60,
|
||||||
|
child: RaisedButton(
|
||||||
|
shape:
|
||||||
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
|
color: color != null ? color : Colors.grey[700],
|
||||||
|
textColor: color != null ? textColor : Colors.white,
|
||||||
|
child: Text(
|
||||||
|
this.text,
|
||||||
|
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
|
||||||
|
),
|
||||||
|
onPressed: () => this.onPress()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,280 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
class SMSOTP {
|
||||||
|
final type;
|
||||||
|
final mobileNo;
|
||||||
|
final Function onSuccess;
|
||||||
|
final Function onFailure;
|
||||||
|
final context;
|
||||||
|
|
||||||
|
int remainingTime = 600;
|
||||||
|
|
||||||
|
Future<Null> timer;
|
||||||
|
|
||||||
|
SMSOTP(
|
||||||
|
this.context,
|
||||||
|
this.type,
|
||||||
|
this.mobileNo,
|
||||||
|
this.onSuccess,
|
||||||
|
this.onFailure,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map verifyAccountFormValue = {
|
||||||
|
'digit1': null,
|
||||||
|
'digit2': null,
|
||||||
|
'digit3': null,
|
||||||
|
'digit4': null,
|
||||||
|
};
|
||||||
|
final focusD1 = FocusNode();
|
||||||
|
final focusD2 = FocusNode();
|
||||||
|
final focusD3 = FocusNode();
|
||||||
|
final focusD4 = FocusNode();
|
||||||
|
String errorMsg;
|
||||||
|
|
||||||
|
String displayTime = '';
|
||||||
|
displayDialog(BuildContext context) async {
|
||||||
|
return showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(Icons.close),
|
||||||
|
onPressed: () => {Navigator.pop(context), this.onSuccess()},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10.0))),
|
||||||
|
content: StatefulBuilder(builder: (context, setState) {
|
||||||
|
if (displayTime == '') {
|
||||||
|
startTimer(setState);
|
||||||
|
}
|
||||||
|
return Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: SizeConfig.realScreenHeight * 0.5,
|
||||||
|
width: SizeConfig.realScreenWidth * 0.8,
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
type == 1
|
||||||
|
? Image.asset('assets/images/login/103.png')
|
||||||
|
: Image.asset('assets/images/login/104.png'),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 20),
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).verificationMessage +
|
||||||
|
' XXXXXX' +
|
||||||
|
mobileNo
|
||||||
|
.toString()
|
||||||
|
.substring(mobileNo.toString().length - 3),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
)),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 20),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: SizeConfig.realScreenWidth * 0.15,
|
||||||
|
child: TextFormField(
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
style: buildTextStyle(),
|
||||||
|
autofocus: true,
|
||||||
|
maxLength: 1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
decoration: buildInputDecoration(context),
|
||||||
|
onSaved: (val) {},
|
||||||
|
validator: validateCodeDigit,
|
||||||
|
onFieldSubmitted: (_) {
|
||||||
|
FocusScope.of(context).requestFocus(focusD2);
|
||||||
|
},
|
||||||
|
onChanged: (val) {
|
||||||
|
if (val.length == 1) {
|
||||||
|
FocusScope.of(context).requestFocus(focusD2);
|
||||||
|
verifyAccountFormValue['digit1'] = val;
|
||||||
|
checkValue();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: SizeConfig.realScreenWidth * 0.15,
|
||||||
|
child: TextFormField(
|
||||||
|
focusNode: focusD2,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
maxLength: 1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: buildTextStyle(),
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
decoration: buildInputDecoration(context),
|
||||||
|
onSaved: (val) {},
|
||||||
|
onFieldSubmitted: (_) {
|
||||||
|
FocusScope.of(context).requestFocus(focusD3);
|
||||||
|
},
|
||||||
|
onChanged: (val) {
|
||||||
|
if (val.length == 1) {
|
||||||
|
FocusScope.of(context)
|
||||||
|
.requestFocus(focusD3);
|
||||||
|
verifyAccountFormValue['digit2'] = val;
|
||||||
|
checkValue();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validator: validateCodeDigit),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: SizeConfig.realScreenWidth * 0.15,
|
||||||
|
child: TextFormField(
|
||||||
|
focusNode: focusD3,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
maxLength: 1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: buildTextStyle(),
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
decoration: buildInputDecoration(context),
|
||||||
|
onSaved: (val) {},
|
||||||
|
onFieldSubmitted: (_) {
|
||||||
|
FocusScope.of(context)
|
||||||
|
.requestFocus(focusD4);
|
||||||
|
},
|
||||||
|
onChanged: (val) {
|
||||||
|
if (val.length == 1) {
|
||||||
|
FocusScope.of(context)
|
||||||
|
.requestFocus(focusD4);
|
||||||
|
verifyAccountFormValue['digit3'] = val;
|
||||||
|
checkValue();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validator: validateCodeDigit)),
|
||||||
|
Container(
|
||||||
|
width: SizeConfig.realScreenWidth * 0.15,
|
||||||
|
child: TextFormField(
|
||||||
|
focusNode: focusD4,
|
||||||
|
maxLength: 1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: buildTextStyle(),
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
decoration: buildInputDecoration(context),
|
||||||
|
onFieldSubmitted: (_) {
|
||||||
|
FocusScope.of(context)
|
||||||
|
.requestFocus(focusD4);
|
||||||
|
},
|
||||||
|
onChanged: (val) {
|
||||||
|
if (val.length == 1) {
|
||||||
|
verifyAccountFormValue['digit4'] = val;
|
||||||
|
checkValue();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validator: validateCodeDigit)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 10),
|
||||||
|
child: AppText(
|
||||||
|
TranslationBase.of(context).validationMessage +
|
||||||
|
' ' +
|
||||||
|
displayTime,
|
||||||
|
color: Colors.red,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
))
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
TextStyle buildTextStyle() {
|
||||||
|
return TextStyle(
|
||||||
|
fontSize: SizeConfig.textMultiplier * 3,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
InputDecoration buildInputDecoration(BuildContext context) {
|
||||||
|
return InputDecoration(
|
||||||
|
// ts/images/password_icon.png
|
||||||
|
contentPadding: EdgeInsets.only(top: 20, bottom: 20),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
|
borderSide: BorderSide(color: Colors.black),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(color: Theme.of(context).primaryColor),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(color: Theme.of(context).errorColor),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(10.0)),
|
||||||
|
borderSide: BorderSide(color: Theme.of(context).errorColor),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String validateCodeDigit(value) {
|
||||||
|
if (value.isEmpty) {
|
||||||
|
return 'Please enter your Password';
|
||||||
|
} else if (value.length == 3) {
|
||||||
|
print(value);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkValue() {
|
||||||
|
//print(verifyAccountFormValue);
|
||||||
|
if (verifyAccountFormValue['digit1'] != null &&
|
||||||
|
verifyAccountFormValue['digit2'] != null &&
|
||||||
|
verifyAccountFormValue['digit3'] != null &&
|
||||||
|
verifyAccountFormValue['digit4'] != null) {
|
||||||
|
onSuccess(verifyAccountFormValue['digit1'] +
|
||||||
|
verifyAccountFormValue['digit2'] +
|
||||||
|
verifyAccountFormValue['digit3'] +
|
||||||
|
verifyAccountFormValue['digit4']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getSecondsAsDigitalClock(int inputSeconds) {
|
||||||
|
var sec_num =
|
||||||
|
int.parse(inputSeconds.toString()); // don't forget the second param
|
||||||
|
var hours = (sec_num / 3600).floor();
|
||||||
|
var minutes = ((sec_num - hours * 3600) / 60).floor();
|
||||||
|
var seconds = sec_num - hours * 3600 - minutes * 60;
|
||||||
|
var minutesString = "";
|
||||||
|
var secondsString = "";
|
||||||
|
minutesString =
|
||||||
|
minutes < 10 ? "0" + minutes.toString() : minutes.toString();
|
||||||
|
secondsString =
|
||||||
|
seconds < 10 ? "0" + seconds.toString() : seconds.toString();
|
||||||
|
return minutesString + ":" + secondsString;
|
||||||
|
}
|
||||||
|
|
||||||
|
startTimer(setState) {
|
||||||
|
this.remainingTime--;
|
||||||
|
setState(() {
|
||||||
|
displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
|
||||||
|
});
|
||||||
|
|
||||||
|
timer = Future.delayed(Duration(seconds: 1), () {
|
||||||
|
if (this.remainingTime > 0) {
|
||||||
|
startTimer(setState);
|
||||||
|
} else {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||