Merge branch 'dashboard' into 'master'

Dashboard

See merge request Cloud_Solution/diplomatic-quarter!34
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 897326fcf1

@ -117,6 +117,20 @@
"search": [
"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 =
'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/Services'; // Production 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",
'ar': 'خدمة الدفع عبر الإلكتدوني'
},
"OffersAndPackages": {"en": "Offers and Packages", 'ar': 'العروض والباقات'},
"OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'},
"ComprehensiveMedicalCheckup": {
"en": "Comprehensive Medical Check up",
'ar': 'فحص طبي شامل'
@ -362,5 +362,16 @@ const Map<String, Map<String, String>> localizedValues = {
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "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": "كيف يمكنني مساعدتك؟"}
};

@ -11,3 +11,4 @@ const AUTH_DATA = 'auth-data';
const IMEI_USER_DATA = 'imei-user-data';
const NHIC_DATA = 'nhic-data';
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 {
List<VitalSignResModel> vitalSignResModelList = List();
Map<String, dynamic> body = Map();
String weightKg = "";
String heightCm = "";
String bloadType = "";
Future getPatientRadOrders({int appointmentNo, int projectID}) async {
hasError = false;
@ -21,6 +24,10 @@ class VitalSignService extends BaseService {
response['List_DoctorPatientVitalSign'].forEach((vital) {
vitalSignResModelList.add(VitalSignResModel.fromJson(vital));
});
vitalSignResModelList.forEach((element) {
weightKg = '${element.weightKg}';
heightCm = '${element.heightCm}';
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -70,8 +70,8 @@ class PharmacyService extends BaseService {
_medicineItem.add(PharmaciesModel.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
hasError = true;
super.error = error;
}, body: _requestGetPharmaciesModel.toJson());
} catch (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 {
ViewState _state = ViewState.Idle;
bool isInternetConnection = true;
bool isLogin = false;
ViewState get state => _state;
@ -27,6 +28,10 @@ class BaseViewModel extends ChangeNotifier {
_getUser() async {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
this.isLogin = isLogin != null;
notifyListeners();
}
}

@ -1,8 +1,23 @@
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 '../../locator.dart';
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: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:flutter/cupertino.dart';
class ProjectViewModel with ChangeNotifier {
class ProjectViewModel extends BaseViewModel {
AppSharedPreferences sharedPref = AppSharedPreferences();
Locale _appLocale;
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 thermometer = IconData(0xe806, 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/uitl/navigation_service.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/insurance_service.dart';
import 'core/viewModels/insurance_card_View_model.dart';
import 'core/viewModels/qr_view_model.dart';
GetIt locator = GetIt.instance;
@ -47,6 +49,7 @@ void setupLocator() {
locator.registerLazySingleton(() => ReportsService());
locator.registerLazySingleton(() => DashboardService());
locator.registerLazySingleton(() => AppointmentRateService());
locator.registerLazySingleton(() => QrService());
/// View Model
locator.registerFactory(() => HospitalViewModel());
@ -62,5 +65,6 @@ void setupLocator() {
locator.registerFactory(() => MedicalViewModel());
locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => AppointmentRateViewModel());
locator.registerFactory(() => QrViewModel());
}

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

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class AuthenticatedUser {
String setupID;
int patientType;
@ -11,6 +13,7 @@ class AuthenticatedUser {
int relationshipID;
int gender;
String dateofBirth;
DateTime dateofBirthDataTime;
dynamic dateofBirthN;
String nationalityID;
dynamic phoneResi;
@ -135,6 +138,7 @@ class AuthenticatedUser {
relationshipID = json['RelationshipID'];
gender = json['Gender'];
dateofBirth = json['DateofBirth'];
dateofBirthDataTime = DateUtil.convertStringToDate(json['DateofBirth']);
dateofBirthN = json['DateofBirthN'];
nationalityID = json['NationalityID'];
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/core/viewModels/dashboard_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/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -11,6 +15,10 @@ import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class HomePage extends StatefulWidget {
final Function goToMyProfile;
HomePage({Key key, this.goToMyProfile});
@override
_HomePageState createState() => _HomePageState();
}
@ -19,291 +27,498 @@ class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/timeline_bg.png'),
fit: BoxFit.cover),
return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => AppScaffold(
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Stack(
children: <Widget>[
Column(
children: <Widget>[
Container(
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
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(
children: <Widget>[
Positioned(
top: 30,
left: 15,
right: 15,
Container(width: double.infinity, height: 80)
],
),
Positioned(
top: 155,
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(
width: MediaQuery.of(context).size.width * 0.8,
child: Row(
margin: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
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(
onTap: ()=>Navigator.push(context, FadePage(page: LiveCareHome())),
onTap: () {
widget.goToMyProfile();
},
child: Container(
height: 110,
margin: EdgeInsets.all(5),
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Colors.transparent
.withOpacity(0.3),
color: Hexcolor('#D81A2E'),
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: 80)
],
),
Positioned(
top: 155,
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: 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(
margin: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
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(
onTap: () {},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Hexcolor('#D81A2E'),
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,
: Container(
width: double.infinity,
height: 130,
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(
margin: EdgeInsets.all(5),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
if (model.user != null)
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
Texts(
model.user.firstName +
" " +
model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Texts(
'${model.user.patientID}',
color: Colors.white,
fontSize: 14,
),
SizedBox(
height: 5,
),
Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
color: Colors.grey[100],
fontWeight: FontWeight.normal,
fontSize: 14,
),
],
),
),
InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Hexcolor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
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(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).homeHealthCareService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
],
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.homeHealthCareService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
),
),
),
height: MediaQuery.of(context).size.width*0.4,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
height: 150,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/new-design/pharmacy_icon.png',
width: 40,
height: 40,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
)
],
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/pharmacy_logo.png',
width: 40,
height: 40,
),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
),
),
),
height: MediaQuery.of(context).size.width*0.4,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
height: 150,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/comprehensive_medical_checkup_logo.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
),
),
),
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(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/new-design/online_payment_icon.png',
width: 80,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
height: MediaQuery.of(context).size.width*0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
Container(
Container(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
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: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/offer_icon.png',
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
@ -311,144 +526,114 @@ class _HomePageState extends State<HomePage> {
height: 15,
),
Texts(
TranslationBase.of(context).offersAndPackages,
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
),
),
),
width: MediaQuery.of(context).size.width * 0.29,
height: 150,
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: 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(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
Texts(
TranslationBase.of(context).hMGService,
color: Colors.white,
fontWeight: FontWeight.normal,
),
SizedBox(
height: 15,
Texts(
TranslationBase.of(context)
.viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).comprehensiveMedicalCheckup,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.60,
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,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
),
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(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
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,
)
],
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(
height: 80,
)
],
SizedBox(
height: 80,
)
],
),
),
),
),

@ -235,14 +235,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [
HomePage(),
HomePage(goToMyProfile: (){
_changeCurrentTab(1);
},),
MedicalProfilePage(),
MyAdmissionsPage(),
ToDo(),
BookingOptions()
], // 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);
} catch (error) {
print(error);
throw error;
//throw error;
}
}

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

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

@ -1,12 +1,17 @@
import 'package:diplomaticquarterapp/config/config.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/widgets/others/bottom_bar.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/search.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'floating_button_search.dart';
import '../progress_indicator/app_loader_widget.dart';
import 'arrow_back.dart';
@ -79,6 +84,6 @@ class AppScaffold extends StatelessWidget {
}
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:flutter/material.dart';
import 'package:provider/provider.dart';
class ArrowBack extends StatelessWidget {
final Function onTap;
@ -8,12 +10,17 @@ class ArrowBack extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() {
onTap != null ? onTap() : Navigator.pop(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