parking service

merge-requests/34/head
Mohammad Aljammal 4 years ago
parent 4adc2916b4
commit 895c09efa4

@ -53,6 +53,8 @@ const INSERT_REQUEST_FOR_MEDICAL_REPORT = '/Doctors.svc/REST/InsertRequestForMed
const IS_LAST_APPOITMENT_RATED = '/Doctors.svc/REST/IsLastAppoitmentRated'; const IS_LAST_APPOITMENT_RATED = '/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO = '/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; const GET_APPOINTMENT_DETAILS_BY_NO = '/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
///Qr
const GET_QR_PARKING = '/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

@ -335,6 +335,16 @@ const Map<String, Map<String, String>> localizedValues = {
"ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'}, "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'},
"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":"الفرع"},
}; };

@ -10,3 +10,4 @@ const ONLY_SMS = 'only-sms';
const AUTH_DATA = 'auth-data'; 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 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;
}
}

@ -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);
}
}

@ -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);
}
}

@ -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());
} }

@ -66,6 +66,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(

@ -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,211 @@
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';
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: Image.asset(
'assets/images/timeline_bg.png',
height: 150,
fit: BoxFit.cover,
)),
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,6 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.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/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';
@ -51,7 +52,8 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: ()=>Navigator.push(context, FadePage(page: LiveCareHome())), onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container( child: Container(
height: 110, height: 110,
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -59,7 +61,12 @@ class _HomePageState extends State<HomePage> {
color: Colors.transparent color: Colors.transparent
.withOpacity(0.3), .withOpacity(0.3),
), ),
child: Center(child: Texts('Live care ',color: Colors.white,),), child: Center(
child: Texts(
'Live care ',
color: Colors.white,
),
),
), ),
), ),
), ),
@ -130,7 +137,9 @@ class _HomePageState extends State<HomePage> {
fontSize: 16, fontSize: 16,
), ),
Align( Align(
alignment: projectViewModel.isArabic? Alignment.bottomLeft: Alignment.bottomRight, alignment: projectViewModel.isArabic
? Alignment.bottomLeft
: Alignment.bottomRight,
child: InkWell( child: InkWell(
onTap: () {}, onTap: () {},
child: Container( child: Container(
@ -182,7 +191,8 @@ class _HomePageState extends State<HomePage> {
height: 15, height: 15,
), ),
Texts( Texts(
TranslationBase.of(context).homeHealthCareService, TranslationBase.of(context)
.homeHealthCareService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
@ -215,7 +225,6 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.white, color: Colors.white,
bold: true, bold: true,
) )
], ],
), ),
@ -280,7 +289,8 @@ class _HomePageState extends State<HomePage> {
height: 15, height: 15,
), ),
Texts( Texts(
TranslationBase.of(context).onlinePaymentService, TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -343,7 +353,8 @@ class _HomePageState extends State<HomePage> {
height: 15, height: 15,
), ),
Texts( Texts(
TranslationBase.of(context).comprehensiveMedicalCheckup, TranslationBase.of(context)
.comprehensiveMedicalCheckup,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -382,9 +393,9 @@ class _HomePageState extends State<HomePage> {
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
Texts( Texts(
TranslationBase.of(context).viewAllHabibMedicalService, TranslationBase.of(context)
.viewAllHabibMedicalService,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 10, fontSize: 10,
@ -392,9 +403,9 @@ class _HomePageState extends State<HomePage> {
Expanded( Expanded(
child: Container(), child: Container(),
), ),
Text( Texts(
TranslationBase.of(context).viewMore, TranslationBase.of(context).viewMore,
//color: Colors.white, color: Colors.white,
//fontWeight: FontWeight.normal, //fontWeight: FontWeight.normal,
) )
], ],
@ -405,6 +416,8 @@ class _HomePageState extends State<HomePage> {
opacity: 0.5, opacity: 0.5,
color: Colors.grey[700], color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
context, FadePage(page: AllHabibMedicalService())),
), ),
DashboardItem( DashboardItem(
child: Container( child: Container(
@ -418,7 +431,6 @@ class _HomePageState extends State<HomePage> {
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
Texts( Texts(
TranslationBase.of(context).viewAllWaysReachUs, TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white, color: Colors.white,

@ -420,6 +420,17 @@ class TranslationBase {
String get contactUs =>localizedValues['ContactUs'][locale.languageCode]; String get contactUs =>localizedValues['ContactUs'][locale.languageCode];
String get viewAllWaysReachUs =>localizedValues['ViewAllWaysReachUs'][locale.languageCode]; String get viewAllWaysReachUs =>localizedValues['ViewAllWaysReachUs'][locale.languageCode];
String get medicalProfile =>localizedValues['medicalProfile'][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 consultation => String get consultation =>

@ -1,8 +1,12 @@
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/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: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 '../progress_indicator/app_loader_widget.dart'; import '../progress_indicator/app_loader_widget.dart';
import 'arrow_back.dart'; import 'arrow_back.dart';
@ -50,9 +54,10 @@ class AppScaffold extends StatelessWidget {
IconButton( IconButton(
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () => Navigator.pushReplacement(
// TODO add navigator to home page context,
}, FadePage(page: LandingPage()),
),
), ),
], ],
) )
@ -72,6 +77,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