er_location
Sultan Khan 6 years ago
commit badb4e52df

@ -117,6 +117,20 @@
"search": [ "search": [
"weight-scale" "weight-scale"
] ]
},
{
"uid": "363eebd3ff1ac281c38b4ddbc6a2e9d3",
"css": "parking_icon",
"code": 59400,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M592.8 33.4C552.3 32.7 518.9 60.5 518.3 95.2S550.2 158.9 590.7 159.6 664.6 132.5 665.2 97.7 633.3 34.1 592.8 33.4ZM590.9 145C559.8 144.5 534.8 122.3 535.2 95.5S561.4 47.4 592.6 48 648.7 70.7 648.3 97.5 622.1 145.6 590.9 145ZM593.4 1.7C535.4 0.8 487.5 41.5 486.7 92.5 486.3 115.8 502.6 147.6 535.2 187.2A605.7 605.7 0 0 0 583.6 239.1L589.2 244.4 595.1 239.3A605.6 605.6 0 0 0 645.2 189.1C679.1 150.6 696.5 119.4 696.9 96.1 697.8 45.1 651.3 2.7 593.4 1.7ZM632.5 180.2A610.9 610.9 0 0 1 589.6 223.9 610.5 610.5 0 0 1 548.2 178.9C518.2 142.4 502.4 112.6 502.8 92.8 503.5 49.6 544 15.1 593.1 15.9S681.5 52.6 680.8 95.8C680.4 115.6 663.8 144.8 632.5 180.2ZM599.7 63.9L574.1 63.5 573.1 125.8 587.6 126 587.9 107.2 599 107.4A21.7 21.7 0 0 0 599.7 63.9ZM599.2 92.8L588.2 92.7 588.4 78.3 599.5 78.5A7.2 7.2 0 0 1 599.2 92.8ZM187.7 292.7H128.8A129 129 0 0 0 0 421.5V907.3A55.3 55.3 0 0 0 55.2 962.5H261.3A55.3 55.3 0 0 0 316.5 907.3V421.5A129 129 0 0 0 187.7 292.7ZM116.7 315.4A109.8 109.8 0 0 1 22.8 409.4 106.9 106.9 0 0 1 116.7 315.4ZM22.1 604A135.3 135.3 0 0 1 34.3 547.5L63.4 588.9A32.9 32.9 0 0 0 58.9 605.5V767.4A33 33 0 0 0 62 781.5L28.3 829.5A32.9 32.9 0 0 1 22.1 810.1ZM92 800.5H224.5A32.9 32.9 0 0 0 238.6 797.4L270 842A33 33 0 0 1 261.3 843.2H55.2A33 33 0 0 1 46.5 842L77.9 797.4A32.9 32.9 0 0 0 92 800.5ZM81 767.4V605.5A11.1 11.1 0 0 1 92 594.4H224.5A11.1 11.1 0 0 1 235.5 605.5V767.4A11.1 11.1 0 0 1 224.5 778.4H92A11.1 11.1 0 0 1 81 767.4ZM236.2 574.5A33 33 0 0 0 224.5 572.4H92A33 33 0 0 0 80.3 574.5L46.5 526.4A136 136 0 0 1 270.1 526.4ZM294.4 907.3A33.2 33.2 0 0 1 261.3 940.4H55.2A33.2 33.2 0 0 1 22.1 907.3V854.2A54.9 54.9 0 0 0 55.2 865.3H261.3A54.9 54.9 0 0 0 294.4 854.2ZM294.4 810.1A32.9 32.9 0 0 1 288.2 829.4L254.5 781.5A33 33 0 0 0 257.6 767.4V605.5A32.9 32.9 0 0 0 253.1 588.9L282.2 547.5A135.3 135.3 0 0 1 294.4 604ZM294.4 523.5A158.2 158.2 0 0 0 22.1 523.5V431.7A131.9 131.9 0 0 0 139.1 314.7H181.9A131.9 131.9 0 0 0 294.4 431.2ZM204.3 316A106.9 106.9 0 0 1 293.6 408.7 110.9 110.9 0 0 1 204.3 316ZM204.3 316M624.9 292.7H566A129 129 0 0 0 437.2 421.5V907.3A55.3 55.3 0 0 0 492.4 962.5H698.5A55.3 55.3 0 0 0 753.7 907.3V421.5A129 129 0 0 0 624.9 292.7ZM730.8 408.7A110.9 110.9 0 0 1 641.5 316 106.9 106.9 0 0 1 730.8 408.7ZM554 315.4A109.8 109.8 0 0 1 460 409.4 106.9 106.9 0 0 1 554 315.4ZM459.3 604A135.3 135.3 0 0 1 471.6 547.5L500.6 588.9A32.9 32.9 0 0 0 496.1 605.5V767.4A33 33 0 0 0 499.3 781.5L465.6 829.5A32.9 32.9 0 0 1 459.3 810.1ZM529.2 800.5H661.7A32.9 32.9 0 0 0 675.8 797.4L707.2 842A33 33 0 0 1 698.5 843.2H492.4A33 33 0 0 1 483.7 842L515.1 797.4A32.9 32.9 0 0 0 529.2 800.5ZM518.2 767.4V605.5A11.1 11.1 0 0 1 529.2 594.4H661.7A11.1 11.1 0 0 1 672.8 605.5V767.4A11.1 11.1 0 0 1 661.7 778.4H529.2A11.1 11.1 0 0 1 518.2 767.4ZM673.4 574.5A33 33 0 0 0 661.7 572.4H529.2A33 33 0 0 0 517.5 574.5L483.7 526.4A136 136 0 0 1 707.3 526.4ZM731.6 907.3A33.2 33.2 0 0 1 698.5 940.4H492.4A33.2 33.2 0 0 1 459.3 907.3V854.2A54.9 54.9 0 0 0 492.4 865.3H698.5A54.9 54.9 0 0 0 731.6 854.2ZM731.6 810.1A32.9 32.9 0 0 1 725.4 829.4L691.7 781.5A33 33 0 0 0 694.8 767.4V605.5A32.9 32.9 0 0 0 690.3 588.9L719.4 547.5A135.3 135.3 0 0 1 731.6 604ZM731.6 523.5A158.2 158.2 0 0 0 459.3 523.5V431.7A131.9 131.9 0 0 0 576.3 314.7H619.1A131.9 131.9 0 0 0 731.6 431.2ZM731.6 523.5M366.6 977.9H388.6V1000H366.6ZM366.6 977.9M366.6 290.4H388.6V955.8H366.6ZM366.6 290.4M366.6 246.3H388.6V268.4H366.6ZM366.6 246.3M43.4 896.2H65.5V918.3H43.4ZM43.4 896.2M251 896.2H273.1V918.3H251ZM251 896.2M483.6 896.2H505.7V918.3H483.6ZM483.6 896.2M691.2 896.2H713.2V918.3H691.2ZM691.2 896.2",
"width": 754
},
"search": [
"parking_icon"
]
} }
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

@ -60,6 +60,8 @@ const IS_LAST_APPOITMENT_RATED =
const GET_APPOINTMENT_DETAILS_BY_NO = const GET_APPOINTMENT_DETAILS_BY_NO =
'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const GET_QR_PARKING = '/Services/SWP.svc/REST/GetQRParkingByID';
//const BASE_URL = 'https://hmgwebservices.com/'; // Production Environment //const BASE_URL = 'https://hmgwebservices.com/'; // Production Environment
//const BASE_URL = 'https://hmgwebservices.com/Services'; // Production Environment //const BASE_URL = 'https://hmgwebservices.com/Services'; // Production Environment
//const BASE_URL = 'https://uat.hmgwebservices.com/Services'; // UAT Environment //const BASE_URL = 'https://uat.hmgwebservices.com/Services'; // UAT Environment

@ -343,7 +343,7 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Online Payment Service", "en": "Online Payment Service",
'ar': 'خدمة الدفع عبر الإلكتدوني' 'ar': 'خدمة الدفع عبر الإلكتدوني'
}, },
"OffersAndPackages": {"en": "Offers and Packages", 'ar': 'العروض والباقات'}, "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'},
"ComprehensiveMedicalCheckup": { "ComprehensiveMedicalCheckup": {
"en": "Comprehensive Medical Check up", "en": "Comprehensive Medical Check up",
'ar': 'فحص طبي شامل' 'ar': 'فحص طبي شامل'
@ -362,5 +362,16 @@ const Map<String, Map<String, String>> localizedValues = {
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'}, "medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "ar": "استشارة"}, "consultation": {"en": "Consultation", "ar": "استشارة"},
"logs": {"en": "Logs", "ar": "السجلات"}, "logs": {"en": "Logs", "ar": "السجلات"},
"parking":{"en":"Parking","ar":"مواقف"},
"alhabiServices":{"en":"HMG Service","ar":"خدمات الحبيب"},
"parkingTitle":{"en":"Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the cars location in Google Maps. 3- Read another position by pressing the Clear Position Data button.","ar":" خدمة المواقف، تتيح هذه الخدمة للمستخدم معلومات عن موقف السيارة ليسهل عليه العودة لها لاحقاً ، 1- بالضغط على زر(قراءة الكود) تستطيع حفظ البيانات الخاصة بالموقف. 2-بالضغط على زر(عرض موقف سيارتي) يعرض لك موقع السيارة في خرائط قوقل. 3- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف). "},
"readBarcode":{"en":"Read Barcode","ar":"قراءة الكود"},
"showMyPark":{"en":"Show My Park","ar":"عرض بارك"},
"clearMyData":{"en":"clear My Data","ar":"امسح البيانات"},
"floor":{"en":"Floor:","ar":"الطابق"},
"gate":{"en":"Gate:","ar":"بوابة"},
"building":{"en":"Building:","ar":"المبنى"},
"branch":{"en":"Branch:","ar":"الفرع"},
"emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"},
"textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"} "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}
}; };

@ -11,3 +11,4 @@ const AUTH_DATA = 'auth-data';
const IMEI_USER_DATA = 'imei-user-data'; const IMEI_USER_DATA = 'imei-user-data';
const NHIC_DATA = 'nhic-data'; const NHIC_DATA = 'nhic-data';
const FAMILY_FILE = 'family-file'; const FAMILY_FILE = 'family-file';
const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING';

@ -0,0 +1,172 @@
class QRParkingModel {
Null totalRecords;
Null nRowID;
int qRParkingID;
String description;
String descriptionN;
Null qRCompare;
Null qRValue;
String imagePath;
bool isActive;
int parkingID;
int branchID;
int companyID;
int buildingID;
int rowID;
int gateID;
int floorID;
Null imagePath1;
int createdBy;
String createdOn;
Null editedBy;
Null editedOn;
String parkingDescription;
String parkingDescriptionN;
String gateDescription;
String gateDescriptionN;
String branchDescription;
String branchDescriptionN;
String companyDescription;
String companyDescriptionN;
String rowDescription;
String rowDescriptionN;
String floorDescription;
String floorDescriptionN;
String buildingDescription;
String buildingDescriptionN;
String qRParkingCode;
String parkingCode;
double latitude;
double longitude;
String qRImageStr;
QRParkingModel(
{this.totalRecords,
this.nRowID,
this.qRParkingID,
this.description,
this.descriptionN,
this.qRCompare,
this.qRValue,
this.imagePath,
this.isActive,
this.parkingID,
this.branchID,
this.companyID,
this.buildingID,
this.rowID,
this.gateID,
this.floorID,
this.imagePath1,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.parkingDescription,
this.parkingDescriptionN,
this.gateDescription,
this.gateDescriptionN,
this.branchDescription,
this.branchDescriptionN,
this.companyDescription,
this.companyDescriptionN,
this.rowDescription,
this.rowDescriptionN,
this.floorDescription,
this.floorDescriptionN,
this.buildingDescription,
this.buildingDescriptionN,
this.qRParkingCode,
this.parkingCode,
this.latitude,
this.longitude,
this.qRImageStr});
QRParkingModel.fromJson(Map<String, dynamic> json) {
totalRecords = json['TotalRecords'];
nRowID = json['nRowID'];
qRParkingID = json['QRParkingID'];
description = json['Description'];
descriptionN = json['DescriptionN'];
qRCompare = json['QRCompare'];
qRValue = json['QRValue'];
imagePath = json['ImagePath'];
isActive = json['IsActive'];
parkingID = json['ParkingID'];
branchID = json['BranchID'];
companyID = json['CompanyID'];
buildingID = json['BuildingID'];
rowID = json['RowID'];
gateID = json['GateID'];
floorID = json['FloorID'];
imagePath1 = json['ImagePath1'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
parkingDescription = json['ParkingDescription'];
parkingDescriptionN = json['ParkingDescriptionN'];
gateDescription = json['GateDescription'];
gateDescriptionN = json['GateDescriptionN'];
branchDescription = json['BranchDescription'];
branchDescriptionN = json['BranchDescriptionN'];
companyDescription = json['CompanyDescription'];
companyDescriptionN = json['CompanyDescriptionN'];
rowDescription = json['RowDescription'];
rowDescriptionN = json['RowDescriptionN'];
floorDescription = json['FloorDescription'];
floorDescriptionN = json['FloorDescriptionN'];
buildingDescription = json['BuildingDescription'];
buildingDescriptionN = json['BuildingDescriptionN'];
qRParkingCode = json['QRParkingCode'];
parkingCode = json['ParkingCode'];
latitude = json['Latitude'];
longitude = json['Longitude'];
qRImageStr = json['QRImageStr'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['TotalRecords'] = this.totalRecords;
data['nRowID'] = this.nRowID;
data['QRParkingID'] = this.qRParkingID;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
data['QRCompare'] = this.qRCompare;
data['QRValue'] = this.qRValue;
data['ImagePath'] = this.imagePath;
data['IsActive'] = this.isActive;
data['ParkingID'] = this.parkingID;
data['BranchID'] = this.branchID;
data['CompanyID'] = this.companyID;
data['BuildingID'] = this.buildingID;
data['RowID'] = this.rowID;
data['GateID'] = this.gateID;
data['FloorID'] = this.floorID;
data['ImagePath1'] = this.imagePath1;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['ParkingDescription'] = this.parkingDescription;
data['ParkingDescriptionN'] = this.parkingDescriptionN;
data['GateDescription'] = this.gateDescription;
data['GateDescriptionN'] = this.gateDescriptionN;
data['BranchDescription'] = this.branchDescription;
data['BranchDescriptionN'] = this.branchDescriptionN;
data['CompanyDescription'] = this.companyDescription;
data['CompanyDescriptionN'] = this.companyDescriptionN;
data['RowDescription'] = this.rowDescription;
data['RowDescriptionN'] = this.rowDescriptionN;
data['FloorDescription'] = this.floorDescription;
data['FloorDescriptionN'] = this.floorDescriptionN;
data['BuildingDescription'] = this.buildingDescription;
data['BuildingDescriptionN'] = this.buildingDescriptionN;
data['QRParkingCode'] = this.qRParkingCode;
data['ParkingCode'] = this.parkingCode;
data['Latitude'] = this.latitude;
data['Longitude'] = this.longitude;
data['QRImageStr'] = this.qRImageStr;
return data;
}
}

@ -6,6 +6,9 @@ import '../base_service.dart';
class VitalSignService extends BaseService { class VitalSignService extends BaseService {
List<VitalSignResModel> vitalSignResModelList = List(); List<VitalSignResModel> vitalSignResModelList = List();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
String weightKg = "";
String heightCm = "";
String bloadType = "";
Future getPatientRadOrders({int appointmentNo, int projectID}) async { Future getPatientRadOrders({int appointmentNo, int projectID}) async {
hasError = false; hasError = false;
@ -21,6 +24,10 @@ class VitalSignService extends BaseService {
response['List_DoctorPatientVitalSign'].forEach((vital) { response['List_DoctorPatientVitalSign'].forEach((vital) {
vitalSignResModelList.add(VitalSignResModel.fromJson(vital)); vitalSignResModelList.add(VitalSignResModel.fromJson(vital));
}); });
vitalSignResModelList.forEach((element) {
weightKg = '${element.weightKg}';
heightCm = '${element.heightCm}';
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -70,8 +70,8 @@ class PharmacyService extends BaseService {
_medicineItem.add(PharmaciesModel.fromJson(item)); _medicineItem.add(PharmaciesModel.fromJson(item));
}); });
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: _requestGetPharmaciesModel.toJson()); }, body: _requestGetPharmaciesModel.toJson());
} catch (error) { } catch (error) {
throw error; throw error;

@ -0,0 +1,21 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
class QrService extends BaseService {
List<QRParkingModel> qRParkingList = List();
Future getQRParkingByID(int qRParkingID) async {
Map<String, dynamic> body = Map();
body['QRParkingID'] = qRParkingID;
await baseAppClient.post(GET_QR_PARKING,
onSuccess: (dynamic response, int statusCode) {
response['List_SWP_QRParkingModel'].forEach((item) {
qRParkingList.add(QRParkingModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
class BaseViewModel extends ChangeNotifier { class BaseViewModel extends ChangeNotifier {
ViewState _state = ViewState.Idle; ViewState _state = ViewState.Idle;
bool isInternetConnection = true; bool isInternetConnection = true;
bool isLogin = false;
ViewState get state => _state; ViewState get state => _state;
@ -27,6 +28,10 @@ class BaseViewModel extends ChangeNotifier {
_getUser() async { _getUser() async {
var userData = await sharedPref.getObject(USER_PROFILE); var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData); if (userData != null) user = AuthenticatedUser.fromJson(userData);
var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
this.isLogin = isLogin != null;
notifyListeners(); notifyListeners();
} }
} }

@ -1,8 +1,23 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/dashboard_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart'; import '../../locator.dart';
class DashboardViewModel extends BaseViewModel { class DashboardViewModel extends BaseViewModel {
VitalSignService _vitalSignService = locator<VitalSignService>();
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
String bloadType = "";
getPatientRadOrders() async {
if (!isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy);
await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
}
} }

@ -2,10 +2,11 @@ import 'dart:async';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
class ProjectViewModel with ChangeNotifier { class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale; Locale _appLocale;
String currentLanguage = 'en'; String currentLanguage = 'en';

@ -0,0 +1,55 @@
import 'dart:convert';
import 'package:barcode_scan/platform_wrapper.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart';
import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart';
class QrViewModel extends BaseViewModel {
QrService _qrService = locator<QrService>();
bool isSavePark = false;
QRParkingModel qrParkingModel;
readQr() async {
var result = await BarcodeScanner.scan();
var data = json.decode(result.rawContent);
var qRParkingID = data['QRParkingID'];
setState(ViewState.BusyLocal);
await _qrService.getQRParkingByID(qRParkingID);
if (_qrService.hasError) {
error = _qrService.error;
setState(ViewState.ErrorLocal);
} else {
if (_qrService.qRParkingList.length > 0) {
qrParkingModel = _qrService.qRParkingList[0];
await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel);
isSavePark = true;
setState(ViewState.Idle);
} else {
error = "Invalid Qr Code";
setState(ViewState.ErrorLocal);
}
}
}
getIsSaveParking() async {
setState(ViewState.Busy);
var parking = await sharedPref.getObject(IS_GO_TO_PARKING);
if (parking != null) {
isSavePark = true;
qrParkingModel = QRParkingModel.fromJson(parking);
}
setState(ViewState.Busy);
}
clearParking() async {
setState(ViewState.Busy);
await sharedPref.setObject(IS_GO_TO_PARKING, null);
isSavePark = false;
qrParkingModel = null;
setState(ViewState.Idle);
}
}

@ -29,4 +29,5 @@ class DQIcons {
static const IconData outline = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData outline = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg);
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/service/qr_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
@ -27,6 +28,7 @@ import 'core/viewModels/pharmacies_view_model.dart';
import 'core/service/pharmacies_service.dart'; import 'core/service/pharmacies_service.dart';
import 'core/service/insurance_service.dart'; import 'core/service/insurance_service.dart';
import 'core/viewModels/insurance_card_View_model.dart'; import 'core/viewModels/insurance_card_View_model.dart';
import 'core/viewModels/qr_view_model.dart';
GetIt locator = GetIt.instance; GetIt locator = GetIt.instance;
@ -47,6 +49,7 @@ void setupLocator() {
locator.registerLazySingleton(() => ReportsService()); locator.registerLazySingleton(() => ReportsService());
locator.registerLazySingleton(() => DashboardService()); locator.registerLazySingleton(() => DashboardService());
locator.registerLazySingleton(() => AppointmentRateService()); locator.registerLazySingleton(() => AppointmentRateService());
locator.registerLazySingleton(() => QrService());
/// View Model /// View Model
locator.registerFactory(() => HospitalViewModel()); locator.registerFactory(() => HospitalViewModel());
@ -62,5 +65,6 @@ void setupLocator() {
locator.registerFactory(() => MedicalViewModel()); locator.registerFactory(() => MedicalViewModel());
locator.registerFactory(() => DashboardViewModel()); locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => AppointmentRateViewModel()); locator.registerFactory(() => AppointmentRateViewModel());
locator.registerFactory(() => QrViewModel());
} }

@ -77,6 +77,9 @@ class MyApp extends StatelessWidget {
highlightColor: Colors.grey[100].withOpacity(0.4), highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent, splashColor: Colors.transparent,
primaryColor: Colors.grey, primaryColor: Colors.grey,
bottomSheetTheme:BottomSheetThemeData(
backgroundColor: Hexcolor('#E0E0E0')
) ,
cursorColor: Color.fromRGBO(78, 62, 253, 1.0), cursorColor: Color.fromRGBO(78, 62, 253, 1.0),
iconTheme: IconThemeData(), iconTheme: IconThemeData(),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class AuthenticatedUser { class AuthenticatedUser {
String setupID; String setupID;
int patientType; int patientType;
@ -11,6 +13,7 @@ class AuthenticatedUser {
int relationshipID; int relationshipID;
int gender; int gender;
String dateofBirth; String dateofBirth;
DateTime dateofBirthDataTime;
dynamic dateofBirthN; dynamic dateofBirthN;
String nationalityID; String nationalityID;
dynamic phoneResi; dynamic phoneResi;
@ -135,6 +138,7 @@ class AuthenticatedUser {
relationshipID = json['RelationshipID']; relationshipID = json['RelationshipID'];
gender = json['Gender']; gender = json['Gender'];
dateofBirth = json['DateofBirth']; dateofBirth = json['DateofBirth'];
dateofBirthDataTime = DateUtil.convertStringToDate(json['DateofBirth']);
dateofBirthN = json['DateofBirthN']; dateofBirthN = json['DateofBirthN'];
nationalityID = json['NationalityID']; nationalityID = json['NationalityID'];
phoneResi = json['PhoneResi']; phoneResi = json['PhoneResi'];

@ -0,0 +1,51 @@
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
class AllHabibMedicalService extends StatefulWidget {
@override
_AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState();
}
class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).alhabiServices,
body: ListView(
children: <Widget>[
InkWell(
onTap: ()=> Navigator.push(context, FadePage(page: ParkingPage())),
child: Container(
height: 50,
margin: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Texts(
TranslationBase.of(context).parking,
fontSize: 16,
)
],
),
),
),
),
],
),
);
}
}

@ -0,0 +1,210 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import '../../d_q_icons_icons.dart';
class ParkingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BaseView<QrViewModel>(
onModelReady: (model) => model.getIsSaveParking(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).parking,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: !model.isSavePark
? Column(
children: <Widget>[
Texts(
TranslationBase.of(context).parkingTitle,
fontWeight: FontWeight.normal,
fontSize: 15,
),
SizedBox(
height: 12,
),
Image.asset(
'assets/images/timeline_bg.png',
width: double.infinity,
)
],
)
: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Container(child: Icon(/*Icons.landscape*/DQIcons.parking_icon,size: 130),),
),
SizedBox(
width: 15,
),
Expanded(
child: Container(
height: 150,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Texts(model.qrParkingModel.parkingDescriptionN),
Divider(
height: 3,
),
Texts(model.qrParkingModel.rowDescriptionN)
],
),
),
),
],
),
SizedBox(
height: 15,
),
Container(
padding: EdgeInsets.all(8),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
height: 70,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(TranslationBase.of(context).showMyPark),
Texts(model.qrParkingModel.floorDescriptionN),
],
),
),
SizedBox(
height: 15,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
padding: EdgeInsets.all(8),
width: double.infinity,
height: 70,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(TranslationBase.of(context).gate),
Texts(model.qrParkingModel.gateDescriptionN),
],
),
),
SizedBox(
height: 15,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
padding: EdgeInsets.all(8),
width: double.infinity,
height: 70,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(TranslationBase.of(context).building),
Texts(model.qrParkingModel.buildingDescriptionN),
],
),
),
SizedBox(
height: 15,
),
Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
width: double.infinity,
height: 70,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(TranslationBase.of(context).branch),
Texts(model.qrParkingModel.branchDescriptionN),
],
),
),
SizedBox(
height: 15,
),
],
),
),
bottomSheet: !model.isSavePark
? 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: () async {
model.readQr();
},
label: TranslationBase.of(context).readBarcode,
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
),
],
),
)
: Container(
height: MediaQuery.of(context).size.height * 0.15,
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () async {
MapsLauncher.launchCoordinates(
model.qrParkingModel.latitude,
model.qrParkingModel.longitude,
);
},
disabled: model.qrParkingModel.longitude == 0,
label: TranslationBase.of(context).showMyPark,
textColor: Theme.of(context).backgroundColor),
),
SizedBox(
height: 12,
),
InkWell(
onTap: () => model.clearParking(),
child: Texts(
TranslationBase.of(context).clearMyData,
color: Colors.red,
decoration: TextDecoration.underline,
))
],
),
),
),
);
}
}

@ -1,5 +1,9 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -11,6 +15,10 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
final Function goToMyProfile;
HomePage({Key key, this.goToMyProfile});
@override @override
_HomePageState createState() => _HomePageState(); _HomePageState createState() => _HomePageState();
} }
@ -19,291 +27,498 @@ class _HomePageState extends State<HomePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return BaseView<DashboardViewModel>(
body: Container( onModelReady: (model) => model.getPatientRadOrders(),
width: double.infinity, builder: (_, model, wi) => AppScaffold(
child: SingleChildScrollView( body: Container(
child: Column( width: double.infinity,
crossAxisAlignment: CrossAxisAlignment.start, child: SingleChildScrollView(
children: <Widget>[ child: Column(
Stack( crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Column( Stack(
children: <Widget>[ children: <Widget>[
Container( Column(
width: double.infinity, children: <Widget>[
height: 210, Container(
decoration: BoxDecoration( width: double.infinity,
image: DecorationImage( height: 210,
image: ExactAssetImage( decoration: BoxDecoration(
'assets/images/timeline_bg.png'), image: DecorationImage(
fit: BoxFit.cover), image: ExactAssetImage(
'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
Positioned(
top: 30,
left: 15,
right: 15,
child: Container(
width:
MediaQuery.of(context).size.width * 0.8,
child: Row(
children: <Widget>[
Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container(
height: 110,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.white
.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Image.asset(
'assets/images/livecare_white_logo.png',
),
),
),
),
Expanded(
child: Container(
height: 110,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
// child: Image.asset('assets/images/livecare_white_logo.png',),
),
),
],
),
),
)
],
),
), ),
child: Stack( Container(width: double.infinity, height: 80)
children: <Widget>[ ],
Positioned( ),
top: 30, Positioned(
left: 15, top: 155,
right: 15, left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin && projectViewModel.user == null)
? Container(
width: double.infinity,
height: 125,
decoration: BoxDecoration(
color: Hexcolor('#A59E9E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.8, margin: EdgeInsets.all(5),
child: Row( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Expanded( SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).myMedicalFile,
color: Colors.black87,
bold: true,
fontSize: 23,
),
SizedBox(
height: 5,
),
Texts(
TranslationBase.of(context)
.myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
child: InkWell( child: InkWell(
onTap: ()=>Navigator.push(context, FadePage(page: LiveCareHome())), onTap: () {
widget.goToMyProfile();
},
child: Container( child: Container(
height: 110, margin: EdgeInsets.all(2),
margin: EdgeInsets.all(5), width: 90,
height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent color: Hexcolor('#D81A2E'),
.withOpacity(0.3), shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(9)),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
color: Colors.white,
fontSize: 12,
),
), ),
child: Center(child: Texts('Live care ',color: Colors.white,),),
), ),
), ),
), )
Expanded(
child: Container(
height: 110,
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.transparent
.withOpacity(0.3),
)),
),
], ],
), ),
), ),
) )
], : Container(
), width: double.infinity,
), height: 130,
Container(width: double.infinity, height: 80) decoration: BoxDecoration(
], color: Hexcolor('#A59E9E'),
), shape: BoxShape.rectangle,
Positioned( border: Border.all(
top: 155, color: Colors.transparent, width: 0.5),
left: MediaQuery.of(context).size.width * borderRadius:
(MediaQuery.of(context).orientation == BorderRadius.all(Radius.circular(9)),
Orientation.landscape image: DecorationImage(
? 0.02 image: ExactAssetImage(
: 0.03), 'assets/images/bg_graphic.png'),
right: MediaQuery.of(context).size.width * fit: BoxFit.cover),
(MediaQuery.of(context).orientation == ),
Orientation.landscape child: Container(
? 0.02 margin: EdgeInsets.all(5),
: 0.03), child: Column(
child: Container( children: <Widget>[
width: double.infinity, Row(
height: 125, children: <Widget>[
decoration: BoxDecoration( if (model.user != null)
color: Hexcolor('#A59E9E'), Expanded(
shape: BoxShape.rectangle, child: Column(
border: crossAxisAlignment:
Border.all(color: Colors.transparent, width: 0.5), CrossAxisAlignment.start,
borderRadius: BorderRadius.all(Radius.circular(9)), children: <Widget>[
image: DecorationImage( SizedBox(
image: ExactAssetImage( height: 8,
'assets/images/bg_graphic.png'), ),
fit: BoxFit.cover)), Texts(
child: Container( model.user.firstName +
margin: EdgeInsets.all(5), " " +
child: Column( model.user.lastName,
crossAxisAlignment: CrossAxisAlignment.start, color: Colors.grey[100],
children: <Widget>[ bold: true,
SizedBox( fontSize: 15,
height: 8, ),
), Texts(
Texts( '${model.user.patientID}',
TranslationBase.of(context).myMedicalFile, color: Colors.white,
color: Colors.black87, fontSize: 14,
bold: true, ),
fontSize: 23, SizedBox(
), height: 5,
SizedBox( ),
height: 5, Texts(
), '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
Texts( color: Colors.grey[100],
TranslationBase.of(context).myMedicalFileSubTitle, fontWeight: FontWeight.normal,
color: Colors.black, fontSize: 14,
fontSize: 16, ),
), ],
Align( ),
alignment: projectViewModel.isArabic? Alignment.bottomLeft: Alignment.bottomRight, ),
child: InkWell( InkWell(
onTap: () {}, onTap: () {
child: Container( widget.goToMyProfile();
margin: EdgeInsets.all(2), },
width: 90, child: Container(
height: 30, margin: EdgeInsets.all(2),
decoration: BoxDecoration( width: 90,
color: Hexcolor('#D81A2E'), height: 30,
shape: BoxShape.rectangle, decoration: BoxDecoration(
border: Border.all( color: Hexcolor('#D81A2E'),
color: Colors.transparent, width: 0.5), shape: BoxShape.rectangle,
borderRadius: border: Border.all(
BorderRadius.all(Radius.circular(9)), color: Colors.transparent,
), width: 0.5),
child: Center( borderRadius: BorderRadius.all(
child: Texts( Radius.circular(5),
TranslationBase.of(context).viewMore, ),
color: Colors.white, ),
fontSize: 12, child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
color: Colors.white,
fontSize: 12,
),
),
),
)
],
), ),
), Row(
//crossAxisAlignment: CrossAxisAlignment.center,
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/height_icon.png',
width: 35,
height: 40,
),
Texts(
"${model.heightCm}",
color: Colors.white,
)
],
),
),
SizedBox(
width: 3,
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/weight_icon.png',
width: 25,
height: 40,
),
Texts(
'${model.weightKg}',
color: Colors.white,
)
],
),
),
SizedBox(
width: 3,
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/blood_icon.png',
width: 35,
height: 40,
),
Texts(
'${model.bloadType}',
color: Colors.white,
)
],
),
),
],
)
],
), ),
), ),
) ),
],
),
),
), ),
), ],
], ),
), Container(
Container( margin: EdgeInsets.only(left: 15, right: 15),
margin: EdgeInsets.only(left: 15, right: 15), child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
children: <Widget>[ DashboardItem(
DashboardItem( child: Center(
child: Center( child: Padding(
child: Padding( padding: const EdgeInsets.all(15.0),
padding: const EdgeInsets.all(15.0), child: Column(
child: Column( children: <Widget>[
children: <Widget>[ Image.asset(
Image.asset( 'assets/images/Dr_Schedule_report.png',
'assets/images/Dr_Schedule_report.png', width: 50,
width: 50, height: 50,
height: 50, ),
), SizedBox(
SizedBox( height: 15,
height: 15, ),
), Texts(
Texts( TranslationBase.of(context)
TranslationBase.of(context).homeHealthCareService, .homeHealthCareService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
fontSize: 14, fontSize: SizeConfig.textMultiplier * 2.0,
) )
], ],
),
), ),
), ),
height: MediaQuery.of(context).size.width*0.4,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
), ),
height: 150, DashboardItem(
imageName: 'home_healthcare_service_bg.png', child: Center(
opacity: 0.5, child: Padding(
), padding: const EdgeInsets.all(15.0),
DashboardItem( child: Column(
child: Center( children: <Widget>[
child: Padding( Image.asset(
padding: const EdgeInsets.all(15.0), 'assets/images/pharmacy_logo.png',
child: Column( width: 40,
children: <Widget>[ height: 40,
Image.asset( ),
'assets/images/new-design/pharmacy_icon.png', SizedBox(
width: 40, height: 20,
height: 40, ),
), Texts(
SizedBox( TranslationBase.of(context).onlinePharmacy,
height: 15, textAlign: TextAlign.center,
), color: Colors.white,
Texts( bold: true,
TranslationBase.of(context).onlinePharmacy, fontSize: SizeConfig.textMultiplier * 2.0,
textAlign: TextAlign.center, )
color: Colors.white, ],
bold: true, ),
)
],
), ),
), ),
height: MediaQuery.of(context).size.width*0.4,
imageName: 'al-habib_onlne_pharmacy_bg.png',
), ),
height: 150, DashboardItem(
imageName: 'al-habib_onlne_pharmacy_bg.png', child: Center(
), child: Padding(
DashboardItem( padding: const EdgeInsets.all(15.0),
child: Center( child: Column(
child: Padding( children: <Widget>[
padding: const EdgeInsets.all(15.0), Image.asset(
child: Column( 'assets/images/comprehensive_medical_checkup_logo.png',
children: <Widget>[ width: 50,
Image.asset( height: 50,
'assets/images/Dr_Schedule_report.png', ),
width: 50, SizedBox(
height: 50, height: 15,
), ),
SizedBox( Texts(
height: 15, TranslationBase.of(context).emergencyService,
), textAlign: TextAlign.center,
Texts( color: Colors.white,
TranslationBase.of(context).emergencyService, bold: true,
textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 2.0,
color: Colors.white, )
bold: true, ],
fontSize: 14, ),
)
],
), ),
), ),
height: MediaQuery.of(context).size.width*0.4,
color: Hexcolor("#747C80"),
imageName: 'emergency_service_image.png',
), ),
height: 150, ],
color: Hexcolor("#747C80"), ),
imageName: 'emergency_service_image.png',
),
],
), ),
), SizedBox(
SizedBox( height: 8,
height: 8, ),
), Container(
Container( margin: EdgeInsets.only(left: 15, right: 15),
margin: EdgeInsets.only(left: 15, right: 15), child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[
children: <Widget>[ Container(
Container( width: MediaQuery.of(context).size.width * 0.29,
width: MediaQuery.of(context).size.width * 0.29, child: Center(
child: Center( child: Padding(
child: Padding( padding: const EdgeInsets.all(15.0),
padding: const EdgeInsets.all(15.0), child: Column(
child: Column( children: <Widget>[
children: <Widget>[ Image.asset(
Image.asset( 'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/new-design/online_payment_icon.png', height: 55,
width: 80, ),
height: 50, SizedBox(
), height: 15,
SizedBox( ),
height: 15, Texts(
), TranslationBase.of(context)
Texts( .onlinePaymentService,
TranslationBase.of(context).onlinePaymentService, textAlign: TextAlign.center,
textAlign: TextAlign.center, color: Colors.black87,
color: Colors.black87, bold: false,
bold: false, fontSize: SizeConfig.textMultiplier * 2,
fontSize: SizeConfig.textMultiplier * 2, )
) ],
], ),
), ),
), ),
height: MediaQuery.of(context).size.width*0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
), ),
height: 150, Container(
decoration: BoxDecoration( child: Center(
borderRadius: BorderRadius.circular(6.0), child: Padding(
color: Colors.white, padding: const EdgeInsets.all(15.0),
), child: Column(
), children: <Widget>[
Container( Image.asset(
'assets/images/ereferral_service_icon.png',
width: 50,
height: 55,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.offersAndPackages,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
width: MediaQuery.of(context).size.width * 0.29,
height: MediaQuery.of(context).size.width*0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/offer_icon.png', 'assets/images/Dr_Schedule_report.png',
width: 50, width: 50,
height: 50, height: 50,
), ),
@ -311,144 +526,114 @@ class _HomePageState extends State<HomePage> {
height: 15, height: 15,
), ),
Texts( Texts(
TranslationBase.of(context).offersAndPackages, TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
fontSize: SizeConfig.textMultiplier * 2, fontSize: SizeConfig.textMultiplier * 2.0,
) )
], ],
), ),
), ),
), ),
width: MediaQuery.of(context).size.width * 0.29, height: MediaQuery.of(context).size.width*0.4,
height: 150,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
)), ),
Container( ),
width: MediaQuery.of(context).size.width * 0.29, ],
child: Center( ),
child: Padding( ),
padding: const EdgeInsets.all(15.0), SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Image.asset( Texts(
'assets/images/Dr_Schedule_report.png', TranslationBase.of(context).hMGService,
width: 50, color: Colors.white,
height: 50, fontWeight: FontWeight.normal,
), ),
SizedBox( Texts(
height: 15, TranslationBase.of(context)
.viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
), ),
Texts( Texts(
TranslationBase.of(context).comprehensiveMedicalCheckup, TranslationBase.of(context).viewMore,
textAlign: TextAlign.center, color: Colors.white,
color: Colors.black87, //fontWeight: FontWeight.normal,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.60,
) )
], ],
), ),
), ),
height: 100,
imageName: 'hmg_services_bg .png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
), ),
height: 150, DashboardItem(
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.circular(6.0), width: double.infinity,
color: Colors.white, padding: EdgeInsets.all(10),
), child: Column(
), crossAxisAlignment: CrossAxisAlignment.start,
], children: <Widget>[
), Texts(
), TranslationBase.of(context).contactUs,
SizedBox( color: Colors.white,
height: 8, fontWeight: FontWeight.normal,
), ),
Container( Texts(
margin: EdgeInsets.only(left: 15, right: 15), TranslationBase.of(context).viewAllWaysReachUs,
child: Row( color: Colors.white,
mainAxisAlignment: MainAxisAlignment.spaceBetween, fontWeight: FontWeight.normal,
children: <Widget>[ fontSize: 10,
DashboardItem( ),
child: Container( Expanded(
width: double.infinity, child: Container(),
padding: EdgeInsets.all(10), ),
child: Column( Texts(
crossAxisAlignment: CrossAxisAlignment.start, TranslationBase.of(context).viewMore,
children: <Widget>[ color: Colors.white,
Texts( fontWeight: FontWeight.normal,
TranslationBase.of(context).hMGService, )
color: Colors.white, ],
fontWeight: FontWeight.normal, ),
),
Texts(
TranslationBase.of(context).viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Text(
TranslationBase.of(context).viewMore,
//color: Colors.white,
//fontWeight: FontWeight.normal,
)
],
),
),
height: 100,
imageName: 'hmg_services_bg .png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
),
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).contactUs,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.normal,
)
],
), ),
height: 100,
imageName: 'contact_us_bg.png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
), ),
height: 100, ],
imageName: 'contact_us_bg.png', ),
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
),
],
), ),
), SizedBox(
SizedBox( height: 80,
height: 80, )
) ],
], ),
), ),
), ),
), ),

@ -235,14 +235,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,
children: [ children: [
HomePage(), HomePage(goToMyProfile: (){
_changeCurrentTab(1);
},),
MedicalProfilePage(), MedicalProfilePage(),
MyAdmissionsPage(), MyAdmissionsPage(),
ToDo(), ToDo(),
BookingOptions() BookingOptions()
], // Please do not remove the BookingOptions from this array ], // Please do not remove the BookingOptions from this array
), ),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab), bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab,index: currentTab,),
); );
} }

@ -144,7 +144,7 @@ class AuthProvider with ChangeNotifier {
return Future.value(localRes); return Future.value(localRes);
} catch (error) { } catch (error) {
print(error); print(error);
throw error; //throw error;
} }
} }

@ -417,32 +417,33 @@ class TranslationBase {
String get removeFamilyMember => String get removeFamilyMember =>
localizedValues['remove-family-member'][locale.languageCode]; localizedValues['remove-family-member'][locale.languageCode];
String get myMedicalFile => String get myMedicalFile =>localizedValues['MyMedicalFile'][locale.languageCode];
localizedValues['MyMedicalFile'][locale.languageCode]; String get myMedicalFileSubTitle =>localizedValues['myMedicalFileSubTitle'][locale.languageCode];
String get myMedicalFileSubTitle => String get viewMore =>localizedValues['viewMore'][locale.languageCode];
localizedValues['myMedicalFileSubTitle'][locale.languageCode]; String get homeHealthCareService =>localizedValues['homeHealthCareService'][locale.languageCode];
String get viewMore => localizedValues['viewMore'][locale.languageCode]; String get onlinePharmacy =>localizedValues['OnlinePharmacy'][locale.languageCode];
String get homeHealthCareService => String get emergencyService =>localizedValues['EmergencyService'][locale.languageCode];
localizedValues['homeHealthCareService'][locale.languageCode]; String get onlinePaymentService =>localizedValues['OnlinePaymentService'][locale.languageCode];
String get onlinePharmacy => String get offersAndPackages =>localizedValues['OffersAndPackages'][locale.languageCode];
localizedValues['OnlinePharmacy'][locale.languageCode]; String get comprehensiveMedicalCheckup =>localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode];
String get emergencyService => String get hMGService =>localizedValues['HMGService'][locale.languageCode];
localizedValues['EmergencyService'][locale.languageCode]; String get viewAllHabibMedicalService =>localizedValues['ViewAllHabibMedicalService'][locale.languageCode];
String get onlinePaymentService => String get viewAll =>localizedValues['viewAll'][locale.languageCode];
localizedValues['OnlinePaymentService'][locale.languageCode]; String get contactUs =>localizedValues['ContactUs'][locale.languageCode];
String get offersAndPackages => String get viewAllWaysReachUs =>localizedValues['ViewAllWaysReachUs'][locale.languageCode];
localizedValues['OffersAndPackages'][locale.languageCode]; String get medicalProfile =>localizedValues['medicalProfile'][locale.languageCode];
String get comprehensiveMedicalCheckup => String get parking =>localizedValues['parking'][locale.languageCode];
localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; String get alhabiServices =>localizedValues['alhabiServices'][locale.languageCode];
String get hMGService => localizedValues['HMGService'][locale.languageCode]; String get parkingTitle =>localizedValues['parkingTitle'][locale.languageCode];
String get viewAllHabibMedicalService => String get readBarcode =>localizedValues['readBarcode'][locale.languageCode];
localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; String get showMyPark =>localizedValues['showMyPark'][locale.languageCode];
String get viewAll => localizedValues['viewAll'][locale.languageCode]; String get clearMyData =>localizedValues['clearMyData'][locale.languageCode];
String get contactUs => localizedValues['ContactUs'][locale.languageCode]; String get floor =>localizedValues['floor'][locale.languageCode];
String get viewAllWaysReachUs => String get gate =>localizedValues['gate'][locale.languageCode];
localizedValues['ViewAllWaysReachUs'][locale.languageCode]; String get building =>localizedValues['building'][locale.languageCode];
String get medicalProfile => String get branch =>localizedValues['branch'][locale.languageCode];
localizedValues['medicalProfile'][locale.languageCode]; String get emergencyServices =>localizedValues['emergencyServices'][locale.languageCode];
String get consultation => String get consultation =>
localizedValues['consultation'][locale.languageCode]; localizedValues['consultation'][locale.languageCode];

@ -9,8 +9,8 @@ import 'bottom_navigation_item.dart';
class BottomNavBar extends StatefulWidget { class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;
final int index ;
BottomNavBar({Key key, this.changeIndex}) : super(key: key); BottomNavBar({Key key, this.changeIndex,this.index}) : super(key: key);
@override @override
_BottomNavBarState createState() => _BottomNavBarState(); _BottomNavBarState createState() => _BottomNavBarState();
@ -21,15 +21,6 @@ class _BottomNavBarState extends State<BottomNavBar> {
_changeIndex(int index) { _changeIndex(int index) {
widget.changeIndex(index); widget.changeIndex(index);
setState(() {
_index = index;
// Navigate to Appointment Booking Flow
// if (_index == 4) navigateToBookingOptions(context);
// Navigate to upcoming list
//if (_index == 3) navigateToToDoList(context);
});
} }
@override @override
@ -48,7 +39,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.home, icon: EvaIcons.home,
activeIcon: EvaIcons.home, activeIcon: EvaIcons.home,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: widget.index,
currentIndex: 0, currentIndex: 0,
name: TranslationBase.of(context).home, name: TranslationBase.of(context).home,
), ),
@ -56,7 +47,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.list, icon: EvaIcons.list,
activeIcon: EvaIcons.list, activeIcon: EvaIcons.list,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: widget.index,
currentIndex: 1, currentIndex: 1,
name: TranslationBase.of(context).medicalProfile, name: TranslationBase.of(context).medicalProfile,
), ),
@ -87,7 +78,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.person, icon: EvaIcons.person,
activeIcon: EvaIcons.person, activeIcon: EvaIcons.person,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: widget.index,
currentIndex: 2, currentIndex: 2,
name: TranslationBase.of(context).mySchedule, name: TranslationBase.of(context).mySchedule,
), ),
@ -95,7 +86,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
icon: EvaIcons.calendar, icon: EvaIcons.calendar,
activeIcon: EvaIcons.calendar, activeIcon: EvaIcons.calendar,
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: widget.index,
currentIndex: 3, currentIndex: 3,
name: TranslationBase.of(context).todoList, name: TranslationBase.of(context).todoList,
) )

@ -1,12 +1,17 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; import 'package:diplomaticquarterapp/widgets/robo-search/search.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'floating_button_search.dart'; import 'floating_button_search.dart';
import '../progress_indicator/app_loader_widget.dart'; import '../progress_indicator/app_loader_widget.dart';
import 'arrow_back.dart'; import 'arrow_back.dart';
@ -79,6 +84,6 @@ class AppScaffold extends StatelessWidget {
} }
buildBodyWidget() { buildBodyWidget() {
return Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]); return body ;//Stack(children: <Widget>[body, buildAppLoaderWidget(isLoading)]);
} }
} }

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ArrowBack extends StatelessWidget { class ArrowBack extends StatelessWidget {
final Function onTap; final Function onTap;
@ -8,12 +10,17 @@ class ArrowBack extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() { onTap: Feedback.wrapForTap(() {
onTap != null ? onTap() : Navigator.pop(context); onTap != null ? onTap() : Navigator.pop(context);
}, context), }, context),
child: Icon(EvaIcons.arrowBack, color: Theme.of(context).primaryColor), child: Icon(
projectViewModel.isArabic
? Icons.arrow_back_ios
: Icons.arrow_forward_ios,
color: Theme.of(context).primaryColor),
); );
} }
} }

Loading…
Cancel
Save