Merge branch 'master' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into privileges
Conflicts: lib/locator.dart lib/pages/DrawerPages/family/my-family.dart lib/pages/login/confirm-login.dart lib/pages/medical/medical_profile_page.dart lib/pages/medical/reports/report_home_page.dart lib/widgets/bottom_navigation/bottom_nav_bar.dart lib/widgets/drawer/app_drawer_widget.dartmerge-requests/224/merge
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 11 KiB |
@ -1,6 +1,6 @@
|
||||
#Thu Sep 03 16:26:30 EEST 2020
|
||||
#Wed Nov 25 14:25:50 AST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
|
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>864393916058</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.cloud.diplomaticquarterapp</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>diplomaticquarter-d2385</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>diplomaticquarter-d2385.appspot.com</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:864393916058:ios:13f787bbfe6051f8b97923</string>
|
||||
<key>DATABASE_URL</key>
|
||||
<string>https://diplomaticquarter-d2385.firebaseio.com</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,122 +1 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]}
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
@ -1,5 +0,0 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>864393916058</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.cloud.diplomaticquarterapp</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>diplomaticquarter-d2385</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>diplomaticquarter-d2385.appspot.com</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:864393916058:ios:13f787bbfe6051f8b97923</string>
|
||||
<key>DATABASE_URL</key>
|
||||
<string>https://diplomaticquarter-d2385.firebaseio.com</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,4 +1,4 @@
|
||||
storePassword=HmGsa123
|
||||
keyPassword=HmGsa123
|
||||
keyAlias=DQKey
|
||||
keyAlias=key
|
||||
storeFile=DQKey.jks
|
@ -0,0 +1,76 @@
|
||||
class GetAllProjectsResponseModel {
|
||||
String desciption;
|
||||
Null desciptionN;
|
||||
int iD;
|
||||
String legalName;
|
||||
String legalNameN;
|
||||
String name;
|
||||
Null nameN;
|
||||
String phoneNumber;
|
||||
String setupID;
|
||||
int distanceInKilometers;
|
||||
bool isActive;
|
||||
String latitude;
|
||||
String longitude;
|
||||
int mainProjectID;
|
||||
Null projectOutSA;
|
||||
bool usingInDoctorApp;
|
||||
|
||||
GetAllProjectsResponseModel(
|
||||
{this.desciption,
|
||||
this.desciptionN,
|
||||
this.iD,
|
||||
this.legalName,
|
||||
this.legalNameN,
|
||||
this.name,
|
||||
this.nameN,
|
||||
this.phoneNumber,
|
||||
this.setupID,
|
||||
this.distanceInKilometers,
|
||||
this.isActive,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.mainProjectID,
|
||||
this.projectOutSA,
|
||||
this.usingInDoctorApp});
|
||||
|
||||
GetAllProjectsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
desciption = json['Desciption'];
|
||||
desciptionN = json['DesciptionN'];
|
||||
iD = json['ID'];
|
||||
legalName = json['LegalName'];
|
||||
legalNameN = json['LegalNameN'];
|
||||
name = json['Name'];
|
||||
nameN = json['NameN'];
|
||||
phoneNumber = json['PhoneNumber'];
|
||||
setupID = json['SetupID'];
|
||||
distanceInKilometers = json['DistanceInKilometers'];
|
||||
isActive = json['IsActive'];
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
mainProjectID = json['MainProjectID'];
|
||||
projectOutSA = json['ProjectOutSA'];
|
||||
usingInDoctorApp = json['UsingInDoctorApp'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Desciption'] = this.desciption;
|
||||
data['DesciptionN'] = this.desciptionN;
|
||||
data['ID'] = this.iD;
|
||||
data['LegalName'] = this.legalName;
|
||||
data['LegalNameN'] = this.legalNameN;
|
||||
data['Name'] = this.name;
|
||||
data['NameN'] = this.nameN;
|
||||
data['PhoneNumber'] = this.phoneNumber;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['DistanceInKilometers'] = this.distanceInKilometers;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['MainProjectID'] = this.mainProjectID;
|
||||
data['ProjectOutSA'] = this.projectOutSA;
|
||||
data['UsingInDoctorApp'] = this.usingInDoctorApp;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
class GetEReferralResponseModel {
|
||||
dynamic acceptedBrachCode;
|
||||
dynamic acceptedBranchName;
|
||||
dynamic acceptedBranchNameAr;
|
||||
Channel channel;
|
||||
dynamic identityCardAttachment;
|
||||
String identityNumber;
|
||||
dynamic insuranceCardAttachment;
|
||||
bool isInsuredPatient;
|
||||
String otherRelationship;
|
||||
String patientContactNo;
|
||||
int patientId;
|
||||
String patientName;
|
||||
int preferredBranchCode;
|
||||
String preferredBranchName;
|
||||
String referralDate;
|
||||
int referralNumber;
|
||||
Channel relationshipType;
|
||||
String requesterContactNo;
|
||||
String requesterName;
|
||||
String status;
|
||||
String statusAr;
|
||||
|
||||
GetEReferralResponseModel(
|
||||
{this.acceptedBrachCode,
|
||||
this.acceptedBranchName,
|
||||
this.acceptedBranchNameAr,
|
||||
this.channel,
|
||||
this.identityCardAttachment,
|
||||
this.identityNumber,
|
||||
this.insuranceCardAttachment,
|
||||
this.isInsuredPatient,
|
||||
this.otherRelationship,
|
||||
this.patientContactNo,
|
||||
this.patientId,
|
||||
this.patientName,
|
||||
this.preferredBranchCode,
|
||||
this.preferredBranchName,
|
||||
this.referralDate,
|
||||
this.referralNumber,
|
||||
this.relationshipType,
|
||||
this.requesterContactNo,
|
||||
this.requesterName,
|
||||
this.status,
|
||||
this.statusAr});
|
||||
|
||||
GetEReferralResponseModel.fromJson(Map<String, dynamic> json) {
|
||||
acceptedBrachCode = json['AcceptedBrachCode'];
|
||||
acceptedBranchName = json['AcceptedBranchName'];
|
||||
acceptedBranchNameAr = json['AcceptedBranchNameAr'];
|
||||
channel =
|
||||
json['Channel'] != null ? new Channel.fromJson(json['Channel']) : null;
|
||||
identityCardAttachment = json['IdentityCardAttachment'];
|
||||
identityNumber = json['IdentityNumber'];
|
||||
insuranceCardAttachment = json['InsuranceCardAttachment'];
|
||||
isInsuredPatient = json['IsInsuredPatient'];
|
||||
otherRelationship = json['OtherRelationship'];
|
||||
patientContactNo = json['PatientContactNo'];
|
||||
patientId = json['PatientId'];
|
||||
patientName = json['PatientName'];
|
||||
preferredBranchCode = json['PreferredBranchCode'];
|
||||
preferredBranchName = json['PreferredBranchName'];
|
||||
referralDate = json['ReferralDate'];
|
||||
referralNumber = json['ReferralNumber'];
|
||||
relationshipType = json['RelationshipType'] != null
|
||||
? new Channel.fromJson(json['RelationshipType'])
|
||||
: null;
|
||||
requesterContactNo = json['RequesterContactNo'];
|
||||
requesterName = json['RequesterName'];
|
||||
status = json['Status'];
|
||||
statusAr = json['StatusAr'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AcceptedBrachCode'] = this.acceptedBrachCode;
|
||||
data['AcceptedBranchName'] = this.acceptedBranchName;
|
||||
data['AcceptedBranchNameAr'] = this.acceptedBranchNameAr;
|
||||
if (this.channel != null) {
|
||||
data['Channel'] = this.channel.toJson();
|
||||
}
|
||||
data['IdentityCardAttachment'] = this.identityCardAttachment;
|
||||
data['IdentityNumber'] = this.identityNumber;
|
||||
data['InsuranceCardAttachment'] = this.insuranceCardAttachment;
|
||||
data['IsInsuredPatient'] = this.isInsuredPatient;
|
||||
data['OtherRelationship'] = this.otherRelationship;
|
||||
data['PatientContactNo'] = this.patientContactNo;
|
||||
data['PatientId'] = this.patientId;
|
||||
data['PatientName'] = this.patientName;
|
||||
data['PreferredBranchCode'] = this.preferredBranchCode;
|
||||
data['PreferredBranchName'] = this.preferredBranchName;
|
||||
data['ReferralDate'] = this.referralDate;
|
||||
data['ReferralNumber'] = this.referralNumber;
|
||||
if (this.relationshipType != null) {
|
||||
data['RelationshipType'] = this.relationshipType.toJson();
|
||||
}
|
||||
data['RequesterContactNo'] = this.requesterContactNo;
|
||||
data['RequesterName'] = this.requesterName;
|
||||
data['Status'] = this.status;
|
||||
data['StatusAr'] = this.statusAr;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Channel {
|
||||
int iD;
|
||||
String text;
|
||||
String textAr;
|
||||
String textEn;
|
||||
|
||||
Channel({this.iD, this.text, this.textAr, this.textEn});
|
||||
|
||||
Channel.fromJson(Map<String, dynamic> json) {
|
||||
iD = json['ID'];
|
||||
text = json['Text'];
|
||||
textAr = json['Text_Ar'];
|
||||
textEn = json['Text_En'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ID'] = this.iD;
|
||||
data['Text'] = this.text;
|
||||
data['Text_Ar'] = this.textAr;
|
||||
data['Text_En'] = this.textEn;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
class ImagesInfo {
|
||||
final String imageAr;
|
||||
final String imageEn;
|
||||
|
||||
ImagesInfo({this.imageAr, this.imageEn});
|
||||
}
|
@ -0,0 +1,266 @@
|
||||
class WeatherIndicatorModel {
|
||||
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 citiesList;
|
||||
Null cityName;
|
||||
Null get5DaysWeatherForecastList;
|
||||
List<GetCityInfoList> getCityInfoList;
|
||||
Null getTodayWeatherForecastList;
|
||||
Null iniciesList;
|
||||
|
||||
WeatherIndicatorModel(
|
||||
{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.citiesList,
|
||||
this.cityName,
|
||||
this.get5DaysWeatherForecastList,
|
||||
this.getCityInfoList,
|
||||
this.getTodayWeatherForecastList,
|
||||
this.iniciesList});
|
||||
|
||||
WeatherIndicatorModel.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'];
|
||||
citiesList = json['CitiesList'];
|
||||
cityName = json['CityName'];
|
||||
get5DaysWeatherForecastList = json['Get5DaysWeatherForecastList'];
|
||||
if (json['GetCityInfo_List'] != null) {
|
||||
getCityInfoList = new List<GetCityInfoList>();
|
||||
json['GetCityInfo_List'].forEach((v) {
|
||||
getCityInfoList.add(new GetCityInfoList.fromJson(v));
|
||||
});
|
||||
}
|
||||
getTodayWeatherForecastList = json['GetTodayWeatherForecastList'];
|
||||
iniciesList = json['IniciesList'];
|
||||
}
|
||||
|
||||
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['CitiesList'] = this.citiesList;
|
||||
data['CityName'] = this.cityName;
|
||||
data['Get5DaysWeatherForecastList'] = this.get5DaysWeatherForecastList;
|
||||
if (this.getCityInfoList != null) {
|
||||
data['GetCityInfo_List'] =
|
||||
this.getCityInfoList.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['GetTodayWeatherForecastList'] = this.getTodayWeatherForecastList;
|
||||
data['IniciesList'] = this.iniciesList;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GetCityInfoList {
|
||||
CategoriesNames categoriesNames;
|
||||
String category;
|
||||
String categoryValue;
|
||||
int cityID;
|
||||
String cityName;
|
||||
String cityNameN;
|
||||
String colorName;
|
||||
String createdOn;
|
||||
String iD;
|
||||
int iniceID;
|
||||
bool isOrderEmpty;
|
||||
bool isValuesReversed;
|
||||
bool language;
|
||||
double latitude;
|
||||
double longitude;
|
||||
String name;
|
||||
int orderNum;
|
||||
double temperature;
|
||||
String value;
|
||||
|
||||
GetCityInfoList(
|
||||
{this.categoriesNames,
|
||||
this.category,
|
||||
this.categoryValue,
|
||||
this.cityID,
|
||||
this.cityName,
|
||||
this.cityNameN,
|
||||
this.colorName,
|
||||
this.createdOn,
|
||||
this.iD,
|
||||
this.iniceID,
|
||||
this.isOrderEmpty,
|
||||
this.isValuesReversed,
|
||||
this.language,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.name,
|
||||
this.orderNum,
|
||||
this.temperature,
|
||||
this.value});
|
||||
|
||||
GetCityInfoList.fromJson(Map<String, dynamic> json) {
|
||||
categoriesNames = json['CategoriesNames'] != null
|
||||
? new CategoriesNames.fromJson(json['CategoriesNames'])
|
||||
: null;
|
||||
category = json['Category'];
|
||||
categoryValue = json['CategoryValue'];
|
||||
cityID = json['CityID'];
|
||||
cityName = json['CityName'];
|
||||
cityNameN = json['CityNameN'];
|
||||
colorName = json['ColorName'];
|
||||
createdOn = json['CreatedOn'];
|
||||
iD = json['ID'];
|
||||
iniceID = json['IniceID'];
|
||||
isOrderEmpty = json['IsOrderEmpty'];
|
||||
isValuesReversed = json['IsValuesReversed'];
|
||||
language = json['Language'];
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
name = json['Name'];
|
||||
orderNum = json['OrderNum'];
|
||||
temperature = json['Temperature'];
|
||||
value = json['Value'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.categoriesNames != null) {
|
||||
data['CategoriesNames'] = this.categoriesNames.toJson();
|
||||
}
|
||||
data['Category'] = this.category;
|
||||
data['CategoryValue'] = this.categoryValue;
|
||||
data['CityID'] = this.cityID;
|
||||
data['CityName'] = this.cityName;
|
||||
data['CityNameN'] = this.cityNameN;
|
||||
data['ColorName'] = this.colorName;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['ID'] = this.iD;
|
||||
data['IniceID'] = this.iniceID;
|
||||
data['IsOrderEmpty'] = this.isOrderEmpty;
|
||||
data['IsValuesReversed'] = this.isValuesReversed;
|
||||
data['Language'] = this.language;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['Name'] = this.name;
|
||||
data['OrderNum'] = this.orderNum;
|
||||
data['Temperature'] = this.temperature;
|
||||
data['Value'] = this.value;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CategoriesNames {
|
||||
String category1;
|
||||
String category2;
|
||||
String category3;
|
||||
String category4;
|
||||
String category5;
|
||||
|
||||
CategoriesNames(
|
||||
{this.category1,
|
||||
this.category2,
|
||||
this.category3,
|
||||
this.category4,
|
||||
this.category5});
|
||||
|
||||
CategoriesNames.fromJson(Map<String, dynamic> json) {
|
||||
category1 = json['Category1'];
|
||||
category2 = json['Category2'];
|
||||
category3 = json['Category3'];
|
||||
category4 = json['Category4'];
|
||||
category5 = json['Category5'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Category1'] = this.category1;
|
||||
data['Category2'] = this.category2;
|
||||
data['Category3'] = this.category3;
|
||||
data['Category4'] = this.category4;
|
||||
data['Category5'] = this.category5;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,211 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../base_service.dart';
|
||||
|
||||
class CustomerAddressesService extends BaseService {
|
||||
|
||||
List<AddressInfo> addressesList = List();
|
||||
CustomerInfo customerInfo;
|
||||
|
||||
Future addAddressInfo({ AddNewAddressRequestModel
|
||||
addNewAddressRequestModel }) async {
|
||||
|
||||
addNewAddressRequestModel.customer.email = customerInfo.email;
|
||||
addNewAddressRequestModel.customer.id = customerInfo.customerId;
|
||||
addNewAddressRequestModel.customer.roleIds = [3];
|
||||
addNewAddressRequestModel.customer.addresses[0].email = customerInfo.email;
|
||||
addNewAddressRequestModel.customer.addresses[0].phoneNumber = customerInfo.mobileNumber;
|
||||
addNewAddressRequestModel.customer.addresses[0].firstName = user.firstName;
|
||||
addNewAddressRequestModel.customer.addresses[0].lastName = user.lastName;
|
||||
addNewAddressRequestModel.customer.addresses[0].countryId = 69;
|
||||
|
||||
var f = DateFormat('E, d MMM yyyy HH:mm:ss');
|
||||
var date = f.format(DateTime.now().toUtc()) + " GMT";
|
||||
addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date;
|
||||
hasError = false;
|
||||
await baseAppClient.post(ADD_ADDRESS_INFO,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
addressesList.clear();
|
||||
response["customers"][0]["addresses"].forEach((data) {
|
||||
addressesList
|
||||
.add(AddressInfo.fromJson(data));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true);
|
||||
}
|
||||
|
||||
Future getCustomerAddresses() async {
|
||||
Map<String, String> queryParams = {
|
||||
'fields':'addresses'
|
||||
};
|
||||
hasError = false;
|
||||
await baseAppClient.get("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}",
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
addressesList.clear();
|
||||
response["customers"][0]["addresses"].forEach((data) {
|
||||
addressesList
|
||||
.add(AddressInfo.fromJson(data));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, queryParams: queryParams, isExternal: true);
|
||||
}
|
||||
|
||||
|
||||
Future getCustomerInfo() async {
|
||||
Map<String, String> queryParams = {
|
||||
'FileNumber':'${user.patientID}'
|
||||
};
|
||||
|
||||
hasError = false;
|
||||
await baseAppClient.get(GET_CUSTOMER_INFO,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
customerInfo= CustomerInfo.fromJson(response);
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, queryParams: queryParams, isExternal: true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CustomerInfo {
|
||||
bool isRegistered;
|
||||
String userName;
|
||||
Null password;
|
||||
String email;
|
||||
Null errorMessage;
|
||||
String mobileNumber;
|
||||
int customerId;
|
||||
|
||||
CustomerInfo(
|
||||
{this.isRegistered,
|
||||
this.userName,
|
||||
this.password,
|
||||
this.email,
|
||||
this.errorMessage,
|
||||
this.mobileNumber,
|
||||
this.customerId});
|
||||
|
||||
CustomerInfo.fromJson(Map<String, dynamic> json) {
|
||||
isRegistered = json['IsRegistered'];
|
||||
userName = json['UserName'];
|
||||
password = json['Password'];
|
||||
email = json['Email'];
|
||||
errorMessage = json['ErrorMessage'];
|
||||
mobileNumber = json['MobileNumber'];
|
||||
customerId = json['CustomerId'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['IsRegistered'] = this.isRegistered;
|
||||
data['UserName'] = this.userName;
|
||||
data['Password'] = this.password;
|
||||
data['Email'] = this.email;
|
||||
data['ErrorMessage'] = this.errorMessage;
|
||||
data['MobileNumber'] = this.mobileNumber;
|
||||
data['CustomerId'] = this.customerId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AddressInfo {
|
||||
String id;
|
||||
String firstName;
|
||||
String lastName;
|
||||
String email;
|
||||
Null company;
|
||||
int countryId;
|
||||
String country;
|
||||
Null stateProvinceId;
|
||||
String city;
|
||||
String address1;
|
||||
String address2;
|
||||
String zipPostalCode;
|
||||
String phoneNumber;
|
||||
Null faxNumber;
|
||||
String customerAttributes;
|
||||
String createdOnUtc;
|
||||
Null province;
|
||||
String latLong;
|
||||
|
||||
AddressInfo(
|
||||
{this.id,
|
||||
this.firstName,
|
||||
this.lastName,
|
||||
this.email,
|
||||
this.company,
|
||||
this.countryId,
|
||||
this.country,
|
||||
this.stateProvinceId,
|
||||
this.city,
|
||||
this.address1,
|
||||
this.address2,
|
||||
this.zipPostalCode,
|
||||
this.phoneNumber,
|
||||
this.faxNumber,
|
||||
this.customerAttributes,
|
||||
this.createdOnUtc,
|
||||
this.province,
|
||||
this.latLong});
|
||||
|
||||
AddressInfo.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
firstName = json['first_name'];
|
||||
lastName = json['last_name'];
|
||||
email = json['email'];
|
||||
company = json['company'];
|
||||
countryId = json['country_id'];
|
||||
country = json['country'];
|
||||
stateProvinceId = json['state_province_id'];
|
||||
city = json['city'];
|
||||
address1 = json['address1'];
|
||||
address2 = json['address2'];
|
||||
zipPostalCode = json['zip_postal_code'];
|
||||
phoneNumber = json['phone_number'];
|
||||
faxNumber = json['fax_number'];
|
||||
customerAttributes = json['customer_attributes'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
province = json['province'];
|
||||
latLong = json['lat_long'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['first_name'] = this.firstName;
|
||||
data['last_name'] = this.lastName;
|
||||
data['email'] = this.email;
|
||||
data['company'] = this.company;
|
||||
data['country_id'] = this.countryId;
|
||||
data['country'] = this.country;
|
||||
data['state_province_id'] = this.stateProvinceId;
|
||||
data['city'] = this.city;
|
||||
data['address1'] = this.address1;
|
||||
data['address2'] = this.address2;
|
||||
data['zip_postal_code'] = this.zipPostalCode;
|
||||
data['phone_number'] = this.phoneNumber;
|
||||
data['fax_number'] = this.faxNumber;
|
||||
data['customer_attributes'] = this.customerAttributes;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['province'] = this.province;
|
||||
data['lat_long'] = this.latLong;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
|
||||
class WeatherService extends BaseService {
|
||||
List<GetCityInfoList> weatherIndicatorData = List();
|
||||
|
||||
Map<String, dynamic> body = Map();
|
||||
String Latitude = "";
|
||||
String Longitude = "";
|
||||
String PhoneNumber = "";
|
||||
|
||||
Future getWeatherData() async {
|
||||
hasError = false;
|
||||
|
||||
var lat = await sharedPref.getDouble(USER_LAT);
|
||||
var long = await sharedPref.getDouble(USER_LONG);
|
||||
body['Latitude'] = lat ?? 0;
|
||||
body['Longitude'] = long ?? 0;
|
||||
|
||||
await baseAppClient.post(WEATHER_INDICATOR,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
|
||||
|
||||
response['GetCityInfo_List'].forEach((data) {
|
||||
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
|
||||
});
|
||||
print(weatherIndicatorData);
|
||||
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
await this.sharedPref.setObject(WEATHER,weatherIndicatorData[0]);
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
class AddNewAddressRequestModel {
|
||||
Customer customer;
|
||||
|
||||
AddNewAddressRequestModel({this.customer});
|
||||
|
||||
AddNewAddressRequestModel.fromJson(Map<String, dynamic> json) {
|
||||
customer = json['customer'] != null
|
||||
? new Customer.fromJson(json['customer'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.customer != null) {
|
||||
data['customer'] = this.customer.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Customer {
|
||||
List<Addresses> addresses;
|
||||
int id;
|
||||
String email;
|
||||
List<int> roleIds;
|
||||
|
||||
Customer({this.addresses, this.id, this.email, this.roleIds});
|
||||
|
||||
Customer.fromJson(Map<String, dynamic> json) {
|
||||
if (json['addresses'] != null) {
|
||||
addresses = new List<Addresses>();
|
||||
json['addresses'].forEach((v) {
|
||||
addresses.add(new Addresses.fromJson(v));
|
||||
});
|
||||
}
|
||||
id = json['id'];
|
||||
email = json['email'];
|
||||
roleIds = json['role_ids'].cast<int>();
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.addresses != null) {
|
||||
data['addresses'] = this.addresses.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['id'] = this.id;
|
||||
data['email'] = this.email;
|
||||
data['role_ids'] = this.roleIds;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Addresses {
|
||||
int id;
|
||||
String firstName;
|
||||
String lastName;
|
||||
String email;
|
||||
Null company;
|
||||
int countryId;
|
||||
String country;
|
||||
Null stateProvinceId;
|
||||
String city;
|
||||
String address1;
|
||||
String address2;
|
||||
String zipPostalCode;
|
||||
String phoneNumber;
|
||||
Null faxNumber;
|
||||
String customerAttributes;
|
||||
String createdOnUtc;
|
||||
Null province;
|
||||
String latLong;
|
||||
|
||||
Addresses(
|
||||
{this.id,
|
||||
this.firstName,
|
||||
this.lastName,
|
||||
this.email,
|
||||
this.company,
|
||||
this.countryId,
|
||||
this.country,
|
||||
this.stateProvinceId,
|
||||
this.city,
|
||||
this.address1,
|
||||
this.address2,
|
||||
this.zipPostalCode,
|
||||
this.phoneNumber,
|
||||
this.faxNumber,
|
||||
this.customerAttributes,
|
||||
this.createdOnUtc,
|
||||
this.province,
|
||||
this.latLong});
|
||||
|
||||
Addresses.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
firstName = json['first_name'];
|
||||
lastName = json['last_name'];
|
||||
email = json['email'];
|
||||
company = json['company'];
|
||||
countryId = json['country_id'];
|
||||
country = json['country'];
|
||||
stateProvinceId = json['state_province_id'];
|
||||
city = json['city'];
|
||||
address1 = json['address1'];
|
||||
address2 = json['address2'];
|
||||
zipPostalCode = json['zip_postal_code'];
|
||||
phoneNumber = json['phone_number'];
|
||||
faxNumber = json['fax_number'];
|
||||
customerAttributes = json['customer_attributes'];
|
||||
createdOnUtc = json['created_on_utc'];
|
||||
province = json['province'];
|
||||
latLong = json['lat_long'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['first_name'] = this.firstName;
|
||||
data['last_name'] = this.lastName;
|
||||
data['email'] = this.email;
|
||||
data['company'] = this.company;
|
||||
data['country_id'] = this.countryId;
|
||||
data['country'] = this.country;
|
||||
data['state_province_id'] = this.stateProvinceId;
|
||||
data['city'] = this.city;
|
||||
data['address1'] = this.address1;
|
||||
data['address2'] = this.address2;
|
||||
data['zip_postal_code'] = this.zipPostalCode;
|
||||
data['phone_number'] = this.phoneNumber;
|
||||
data['fax_number'] = this.faxNumber;
|
||||
data['customer_attributes'] = this.customerAttributes;
|
||||
data['created_on_utc'] = this.createdOnUtc;
|
||||
data['province'] = this.province;
|
||||
data['lat_long'] = this.latLong;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart';
|
||||
|
||||
import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/weather_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
|
||||
|
||||
import '../../../locator.dart';
|
||||
|
||||
class WeatherViewModel extends BaseViewModel {
|
||||
WeatherService _weatherService = locator<WeatherService>();
|
||||
List<GetCityInfoList> get weatherIndicatorData =>
|
||||
_weatherService.weatherIndicatorData;
|
||||
getWeatherData() async {
|
||||
setState(ViewState.Busy);
|
||||
|
||||
// if (id != null && projectID != null) {
|
||||
// await _erService.getProjectAvgERWaitingTimeOrders(
|
||||
// id: id, projectID: projectID);
|
||||
// } else {
|
||||
await _weatherService.getWeatherData();
|
||||
// }
|
||||
if (_weatherService.hasError) {
|
||||
error = _weatherService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
class DoctorRateDetails {
|
||||
dynamic doctorID;
|
||||
dynamic projectID;
|
||||
dynamic clinicID;
|
||||
dynamic rate;
|
||||
dynamic patientNumber;
|
||||
|
||||
DoctorRateDetails(
|
||||
{this.doctorID,
|
||||
this.projectID,
|
||||
this.clinicID,
|
||||
this.rate,
|
||||
this.patientNumber});
|
||||
|
||||
DoctorRateDetails.fromJson(Map<String, dynamic> json) {
|
||||
doctorID = json['DoctorID'];
|
||||
projectID = json['ProjectID'];
|
||||
clinicID = json['ClinicID'];
|
||||
rate = json['Rate'];
|
||||
patientNumber = json['PatientNumber'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['Rate'] = this.rate;
|
||||
data['PatientNumber'] = this.patientNumber;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,148 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class CMCLocationPage extends StatefulWidget {
|
||||
final Function(PickResult) onPick;
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
final dynamic model;
|
||||
|
||||
const CMCLocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_CMCLocationPageState createState() =>
|
||||
_CMCLocationPageState();
|
||||
}
|
||||
|
||||
class _CMCLocationPageState
|
||||
extends State<CMCLocationPage> {
|
||||
double latitude = 0;
|
||||
double longitude = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
||||
latitude = widget.latitude;
|
||||
longitude = widget.longitude;
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return BaseView<CMCViewModel>(
|
||||
onModelReady: (model) {},
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowDecPage: false,
|
||||
isShowAppBar: true,
|
||||
baseViewModel: model,
|
||||
body: PlacePicker(
|
||||
apiKey: GOOGLE_API_KEY,
|
||||
enableMyLocationButton: true,
|
||||
automaticallyImplyAppBarLeading: false,
|
||||
autocompleteOnTrailingWhitespace: true,
|
||||
selectInitialPosition: true,
|
||||
autocompleteLanguage: projectViewModel.currentLanguage,
|
||||
enableMapTypeButton: true,
|
||||
searchForInitialValue: false,
|
||||
onPlacePicked: (PickResult result) {
|
||||
print(result.adrAddress);
|
||||
|
||||
},
|
||||
selectedPlaceWidgetBuilder:
|
||||
(_, selectedPlace, state, isSearchBarFocused) {
|
||||
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
|
||||
return isSearchBarFocused
|
||||
? Container()
|
||||
: FloatingCard(
|
||||
bottomPosition: 0.0,
|
||||
leftPosition: 0.0,
|
||||
rightPosition: 0.0,
|
||||
width: 500,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
child: state == SearchingState.Searching
|
||||
? Center(child: CircularProgressIndicator())
|
||||
: Container(
|
||||
margin: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
SecondaryButton(
|
||||
color: Colors.grey[800],
|
||||
textColor: Colors.white,
|
||||
onTap: () async {
|
||||
print(selectedPlace);
|
||||
AddNewAddressRequestModel
|
||||
addNewAddressRequestModel =
|
||||
new AddNewAddressRequestModel(
|
||||
customer: Customer(addresses: [
|
||||
Addresses(
|
||||
address1:
|
||||
selectedPlace.formattedAddress,
|
||||
address2: selectedPlace
|
||||
.formattedAddress,
|
||||
customerAttributes: "",
|
||||
city: "",
|
||||
createdOnUtc: "",
|
||||
id: 0,
|
||||
latLong: "$latitude,$longitude",
|
||||
email: "")
|
||||
]),
|
||||
);
|
||||
|
||||
selectedPlace.addressComponents.forEach((e) {
|
||||
if (e.types.contains("country")) {
|
||||
addNewAddressRequestModel.customer
|
||||
.addresses[0].country = e.longName;
|
||||
}
|
||||
if (e.types.contains("postal_code")) {
|
||||
addNewAddressRequestModel.customer
|
||||
.addresses[0].zipPostalCode =
|
||||
e.longName;
|
||||
}
|
||||
if (e.types.contains("locality")) {
|
||||
addNewAddressRequestModel.customer
|
||||
.addresses[0].city =
|
||||
e.longName;
|
||||
}
|
||||
});
|
||||
|
||||
await model.addAddressInfo(
|
||||
addNewAddressRequestModel: addNewAddressRequestModel);
|
||||
if (model.state == ViewState.ErrorLocal) {
|
||||
Utils.showErrorToast(model.error);
|
||||
} else {
|
||||
AppToast.showSuccessToast(
|
||||
message: "Address Added Successfully");
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
label: TranslationBase.of(context).addNewAddress,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
initialPosition: LatLng(latitude, longitude),
|
||||
useCurrentLocation: false,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'cmc_page.dart';
|
||||
|
||||
class CMCIndexPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).serviceInformation,
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Texts(
|
||||
"CMC",
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 25,
|
||||
color: Color(0xff60686b),
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
Texts(
|
||||
"This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 17,
|
||||
),
|
||||
SizedBox(
|
||||
height: 22,
|
||||
),
|
||||
Center(
|
||||
child: Image.asset(
|
||||
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
|
||||
SizedBox(
|
||||
height: 77,
|
||||
),
|
||||
],
|
||||
)),
|
||||
bottomSheet: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.10,
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
child: SecondaryButton(
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
FadePage(
|
||||
page: CMCPage(),
|
||||
),
|
||||
),
|
||||
label: "CMC",
|
||||
textColor: Theme.of(context).backgroundColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SelectHospitalDialog extends StatefulWidget {
|
||||
|
||||
final List<GetAllProjectsResponseModel> hospitals;
|
||||
final Function(GetAllProjectsResponseModel) onValueSelected;
|
||||
GetAllProjectsResponseModel selectedHospital;
|
||||
|
||||
SelectHospitalDialog(
|
||||
{Key key, this.hospitals, this.onValueSelected, this.selectedHospital});
|
||||
|
||||
@override
|
||||
_SelectHospitalDialogState createState() => _SelectHospitalDialogState();
|
||||
}
|
||||
|
||||
class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Divider(),
|
||||
...List.generate(
|
||||
widget.hospitals.length,
|
||||
(index) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.selectedHospital = widget.hospitals[index];
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(widget.hospitals[index].desciption),
|
||||
leading: Radio(
|
||||
value: widget.hospitals[index],
|
||||
groupValue: widget.selectedHospital,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.selectedHospital = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(widget.selectedHospital);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).ok,
|
||||
fontWeight: FontWeight.w400,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ReferralDetails extends StatefulWidget {
|
||||
GetEReferralResponseModel getEReferralResponseModel;
|
||||
|
||||
ReferralDetails({@required this.getEReferralResponseModel});
|
||||
|
||||
@override
|
||||
_ReferralDetailsState createState() => _ReferralDetailsState();
|
||||
}
|
||||
|
||||
class _ReferralDetailsState extends State<ReferralDetails> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowDecPage: false,
|
||||
isShowAppBar: true,
|
||||
appBarTitle: "Referral Details",
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
|
||||
child: Table(
|
||||
border: TableBorder.all(color: Colors.grey[600]),
|
||||
children: [
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).referralStatus)),
|
||||
TableCell(
|
||||
child:
|
||||
_getNormalText(widget.getEReferralResponseModel.status)),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child:
|
||||
_getNormalText(TranslationBase.of(context).patientName)),
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
widget.getEReferralResponseModel.patientName)),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).referralNumber)),
|
||||
TableCell(
|
||||
child: _getNormalText(widget
|
||||
.getEReferralResponseModel.referralNumber
|
||||
.toString())),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).referralDate)),
|
||||
TableCell(
|
||||
child: _getNormalText(DateUtil.getMonthDayYearDateFormatted(
|
||||
DateUtil.convertStringToDateNoTimeZone(
|
||||
widget.getEReferralResponseModel.referralDate)))),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(TranslationBase.of(context).hospital)),
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
widget.getEReferralResponseModel.preferredBranchName)),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getNormalText(text) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.only(top: 12.0, bottom: 12.0),
|
||||
child: Text(text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontFamily: 'Open-Sans',
|
||||
letterSpacing: 0.5,
|
||||
color: Colors.grey[800])),
|
||||
);
|
||||
}
|
||||
|
||||
_getHeadingText(text) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(bottom: 10.0),
|
||||
child: Text(text,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 26.0,
|
||||
fontFamily: 'Open-Sans',
|
||||
letterSpacing: 0.5,
|
||||
color: Colors.white)));
|
||||
}
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LocationPage extends StatefulWidget {
|
||||
final Function(PickResult) onPick;
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
final dynamic model;
|
||||
|
||||
const LocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_LocationPageState createState() =>
|
||||
_LocationPageState();
|
||||
}
|
||||
|
||||
class _LocationPageState
|
||||
extends State<LocationPage> {
|
||||
double latitude = 0;
|
||||
double longitude = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
||||
latitude = widget.latitude;
|
||||
longitude = widget.longitude;
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return BaseView<HomeHealthCareViewModel>(
|
||||
onModelReady: (model) {},
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowDecPage: false,
|
||||
isShowAppBar: true,
|
||||
baseViewModel: model,
|
||||
body: PlacePicker(
|
||||
apiKey: GOOGLE_API_KEY,
|
||||
enableMyLocationButton: true,
|
||||
automaticallyImplyAppBarLeading: false,
|
||||
autocompleteOnTrailingWhitespace: true,
|
||||
selectInitialPosition: true,
|
||||
autocompleteLanguage: projectViewModel.currentLanguage,
|
||||
enableMapTypeButton: true,
|
||||
searchForInitialValue: false,
|
||||
onPlacePicked: (PickResult result) {
|
||||
print(result.adrAddress);
|
||||
|
||||
},
|
||||
selectedPlaceWidgetBuilder:
|
||||
(_, selectedPlace, state, isSearchBarFocused) {
|
||||
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
|
||||
return isSearchBarFocused
|
||||
? Container()
|
||||
: FloatingCard(
|
||||
bottomPosition: 0.0,
|
||||
leftPosition: 0.0,
|
||||
rightPosition: 0.0,
|
||||
width: 500,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
child: state == SearchingState.Searching
|
||||
? Center(child: CircularProgressIndicator())
|
||||
: Container(
|
||||
margin: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
SecondaryButton(
|
||||
color: Colors.grey[800],
|
||||
textColor: Colors.white,
|
||||
onTap: () async {
|
||||
AddNewAddressRequestModel
|
||||
addNewAddressRequestModel =
|
||||
new AddNewAddressRequestModel(
|
||||
customer: Customer(addresses: [
|
||||
Addresses(
|
||||
address1:
|
||||
selectedPlace.formattedAddress,
|
||||
address2: selectedPlace
|
||||
.formattedAddress,
|
||||
customerAttributes: "",
|
||||
city: "",
|
||||
createdOnUtc: "",
|
||||
id: 0,
|
||||
latLong: "$latitude,$longitude",
|
||||
email: "")
|
||||
]),
|
||||
);
|
||||
|
||||
selectedPlace.addressComponents.forEach((e) {
|
||||
if (e.types.contains("country")) {
|
||||
addNewAddressRequestModel.customer
|
||||
.addresses[0].country = e.longName;
|
||||
}
|
||||
if (e.types.contains("postal_code")) {
|
||||
addNewAddressRequestModel.customer
|
||||
.addresses[0].zipPostalCode =
|
||||
e.longName;
|
||||
}
|
||||
if (e.types.contains("locality")) {
|
||||
addNewAddressRequestModel.customer
|
||||
.addresses[0].city =
|
||||
e.longName;
|
||||
}
|
||||
});
|
||||
|
||||
await model.addAddressInfo(
|
||||
addNewAddressRequestModel: addNewAddressRequestModel);
|
||||
if (model.state == ViewState.ErrorLocal) {
|
||||
Utils.showErrorToast(model.error);
|
||||
} else {
|
||||
AppToast.showSuccessToast(
|
||||
message: "Address Added Successfully");
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
label: TranslationBase.of(context).addNewAddress,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
initialPosition: LatLng(latitude, longitude),
|
||||
useCurrentLocation: false,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
import 'home_health_care_page.dart';
|
||||
|
||||
class HomeHealthCareIndexPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).serviceInformation,
|
||||
body: SingleChildScrollView(
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Texts(
|
||||
TranslationBase.of(context).homeHealthCare,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 25,
|
||||
color: Color(0xff60686b),
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
Texts(
|
||||
TranslationBase.of(context).homeHealthCareText,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 17,
|
||||
),
|
||||
SizedBox(
|
||||
height: 22,
|
||||
),
|
||||
Center(
|
||||
child: Image.asset(
|
||||
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
|
||||
SizedBox(
|
||||
height: 77,
|
||||
),
|
||||
],
|
||||
)),
|
||||
bottomSheet: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.10,
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
child: SecondaryButton(
|
||||
onTap: () => Navigator.push(
|
||||
context,
|
||||
FadePage(
|
||||
page: HomeHealthCarePage(),
|
||||
),
|
||||
),
|
||||
label: TranslationBase.of(context).loginRegister,
|
||||
textColor: Theme.of(context).backgroundColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/location_util.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
|
||||
|
||||
class HealthWeatherIndicator extends StatefulWidget {
|
||||
@override
|
||||
_HospitalsPageState createState() => _HospitalsPageState();
|
||||
}
|
||||
|
||||
class _HospitalsPageState extends State<HealthWeatherIndicator> {
|
||||
var data;
|
||||
LocationUtils locationUtils;
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
var weather = '--';
|
||||
@override
|
||||
void initState() {
|
||||
locationUtils =
|
||||
new LocationUtils(isShowConfirmDialog: true, context: context);
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
|
||||
getWeather();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return BaseView<WeatherViewModel>(
|
||||
onModelReady: (model) => model.getWeatherData(),
|
||||
allowAny: true,
|
||||
builder: (_, mode, widget) => AppScaffold(
|
||||
isShowDecPage: false,
|
||||
appBarTitle: TranslationBase.of(context).healthWeatherIndicators,
|
||||
isShowAppBar: true,
|
||||
body: mode.weatherIndicatorData.length > 0
|
||||
? SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
width: double.infinity,
|
||||
height: 150,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image:
|
||||
ExactAssetImage('assets/images/Weather_img.png'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8.0)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context)
|
||||
.healthWeatherIndicators,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
AppText(
|
||||
TranslationBase.of(context)
|
||||
.healthTipsBasedOnCurrentWeather,
|
||||
color: Colors.white,
|
||||
fontSize: 14,
|
||||
),
|
||||
],
|
||||
)),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/Weather_ico.png',
|
||||
width: 60,
|
||||
height: 60,
|
||||
),
|
||||
AppText(weather,
|
||||
fontSize: 22, color: Colors.white)
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: AppText(
|
||||
projectViewModel.isArabic
|
||||
? mode.weatherIndicatorData[0].cityNameN
|
||||
: mode.weatherIndicatorData[0].cityName,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
)),
|
||||
Padding(
|
||||
padding: EdgeInsets.all(15),
|
||||
child: Column(
|
||||
children: mode.weatherIndicatorData.map((data) {
|
||||
return WeatherSlider(data);
|
||||
}).toList()))
|
||||
]))
|
||||
: Center(child: AppCircularProgressIndicator())),
|
||||
);
|
||||
}
|
||||
|
||||
getWeather() async {
|
||||
var data = await this.sharedPref.getObject(WEATHER);
|
||||
setState(() {
|
||||
weather = data['Temperature'].toString() + '\u2103' ?? '--';
|
||||
});
|
||||
}
|
||||
}
|