updates & fixes

merge-update-with-lab-changes
haroon amjad 5 years ago
parent f33272f8d9
commit f795ba24c5

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -1335,9 +1335,9 @@ const Map localizedValues = {
"تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات  التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة"
}, },
"MRN": {"en": "MRN", "ar": "ایم آر این"}, "MRN": {"en": "MRN", "ar": "ایم آر این"},
"appointment-date": {"en": "Appointment Date", "ar": "تقرری کی تاریخ"}, "appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"},
"appointment-no": {"en": "Appointment No", "ar": "تقرری نمبر"}, "appointment-no": {"en": "Appointment No", "ar": "رقم الموعد"},
"insurance-id": {"en": "Insurance ID", "ar": "انشورنس ID"}, "insurance-id": {"en": "Insurance ID", "ar": "رقم العضويه"},
"chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"}, "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"},
"errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"}, "errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"},
"errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"}, "errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"},
@ -1467,4 +1467,10 @@ const Map localizedValues = {
"online-clinics": {"en": "Online Clinics: ", "ar": "​العيادات المفتوحة: "}, "online-clinics": {"en": "Online Clinics: ", "ar": "​العيادات المفتوحة: "},
"offline-clinics": {"en": "Offline Clinics: ", "ar": "العيادات المغلقة: "}, "offline-clinics": {"en": "Offline Clinics: ", "ar": "العيادات المغلقة: "},
"clinic-schedule": {"en": "Clinic Schedule", "ar": "جدول العيادة"}, "clinic-schedule": {"en": "Clinic Schedule", "ar": "جدول العيادة"},
"discount": { "en": "Discount:", "ar": "الخصم:" },
"total-VAT": { "en": "VAT", "ar": "القيمة المضافة" },
"paid": { "en": "Paid", "ar": "المدفوع" },
"dental-insurance": { "en": "Insurance", "ar": "التأمين" },
"drivethru-appo": { "en": "Drive Thru Appointment", "ar": "موعد من داخل السيارة" },
"upcoming-QR-NFC": { "en": "Use the NFC or QR Code to Check-In", "ar": "استخدم NFC أو رمزQR لتسجيل الوصول" },
}; };

@ -68,11 +68,11 @@ class InsuranceCardService extends BaseService {
Future getInsuranceApproval({int appointmentNo}) async { Future getInsuranceApproval({int appointmentNo}) async {
hasError = false; hasError = false;
if (appointmentNo != null) { if (appointmentNo != null) {
_requestInsuranceApprovalModel.appointmentNo = appointmentNo; _requestInsuranceApprovalModel.appointmentNo = appointmentNo;
_requestInsuranceApprovalModel.eXuldAPPNO = 0; _requestInsuranceApprovalModel.eXuldAPPNO = 0;
_requestInsuranceApprovalModel.projectID = 0; _requestInsuranceApprovalModel.projectID = 0;
} else { } else {
_requestInsuranceApprovalModel.appointmentNo = 0; _requestInsuranceApprovalModel.appointmentNo = 0;
_requestInsuranceApprovalModel.eXuldAPPNO = 0; _requestInsuranceApprovalModel.eXuldAPPNO = 0;
_requestInsuranceApprovalModel.projectID = 0; _requestInsuranceApprovalModel.projectID = 0;
} }
@ -99,21 +99,25 @@ class InsuranceCardService extends BaseService {
} }
Future getSharedRecordByStatus() async { Future getSharedRecordByStatus() async {
try { if (await sharedPref.getObject(FAMILY_FILE) != null) {
dynamic localRes; return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(await sharedPref.getObject(FAMILY_FILE)));
var request = GetAllSharedRecordsByStatusReq(); } else {
request.status = 0; try {
await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) { dynamic localRes;
localRes = response; var request = GetAllSharedRecordsByStatusReq();
}, onFailure: (String error, int statusCode) { request.status = 0;
AppToast.showErrorToast(message: error); await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request.toJson());
sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
throw error; throw error;
}, body: request.toJson()); }
sharedPref.setObject(FAMILY_FILE, localRes);
getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes);
} catch (error) {
print(error);
throw error;
} }
} }

@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dar
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
@ -24,6 +25,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
@ -176,7 +178,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: MedicalProfilePage(), page: MedicalProfilePageNew(),
), ),
); );
}, },
@ -197,9 +199,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: BookingOptions( page: Search(),
isAppbar: true,
),
), ),
), ),
imageLocation: 'assets/images/new-design/booking_icon_active.png', imageLocation: 'assets/images/new-design/booking_icon_active.png',
@ -230,7 +230,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context, context,
FadePage(page: CovidDrivethruLocation()), FadePage(page: CovidDrivethruLocation()),
), ),
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', imageLocation: 'assets/images/covid-car.png',
title: TranslationBase.of(context).covid19_driveThrueTest, title: TranslationBase.of(context).covid19_driveThrueTest,
), ),
ServicesContainer( ServicesContainer(
@ -276,7 +276,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(), page: MyFamily(),
), ),
), ),
imageLocation: 'assets/images/new-design/family_menu_icon_red.png', imageLocation: 'assets/images/new-design/family_icon_bottom_bar.png',
title: TranslationBase.of(context).myFamily, title: TranslationBase.of(context).myFamily,
), ),
if (projectViewModel.havePrivilege(35)) if (projectViewModel.havePrivilege(35))
@ -296,14 +296,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png', imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
// if (projectViewModel.havePrivilege(42))
// ServicesContainer(
// onTap: () => Navigator.push(
// context,
// FadePage(page: SymptomInfo()),
// ),
// imageLocation: 'assets/images/new-design/body_icon.png',
// title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36)) if (projectViewModel.havePrivilege(36))
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -16,9 +16,13 @@ class HealthConverter extends StatefulWidget {
class _HealthConverterState extends State<HealthConverter> { class _HealthConverterState extends State<HealthConverter> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<Widget> myMedicalList = myOptionsList(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).converters, appBarTitle: TranslationBase.of(context).converters,
body: Column( body: Column(
children: [ children: [
@ -26,72 +30,66 @@ class _HealthConverterState extends State<HealthConverter> {
width: double.infinity, width: double.infinity,
height: 30, height: 30,
), ),
Row( Padding(
children: [ padding: EdgeInsets.only(left: 12, right: 12),
Expanded( child: GridView.builder(
flex: 1, shrinkWrap: true,
child: InkWell( primary: false,
onTap: () { physics: NeverScrollableScrollPhysics(),
Navigator.push( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
context, padding: EdgeInsets.zero,
FadePage(page: BloodSugar()), itemCount: myMedicalList.length,
); itemBuilder: (BuildContext context, int index) {
}, return myMedicalList[index];
child: MedicalProfileItem( },
title: TranslationBase.of(context).bloodSugar, ),
imagePath: 'blood_sugar_icon.png',
subTitle: TranslationBase.of(context).sugar,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BloodCholesterol(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodCholesterol,
imagePath: 'blood_cholesterol_icon.png',
subTitle: TranslationBase.of(context).cholesterol,
),
),
),
],
), ),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: Triglycerides(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).triglycerides,
imagePath: 'triglycerides_blood_icon.png',
subTitle: TranslationBase.of(context).fatInBlood,
),
),
),
Expanded(
flex: 1,
child: Container(),
),
],
)
], ],
), ),
); );
} }
List<Widget> myOptionsList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BloodSugar()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodSugar,
imagePath: 'assets/images/new-design/blood_sugar_icon.png',
subTitle: TranslationBase.of(context).sugar,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BloodCholesterol()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bloodCholesterol,
imagePath: 'assets/images/new-design/blood_cholesterol_icon.png',
subTitle: TranslationBase.of(context).cholesterol,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: Triglycerides()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).triglycerides,
imagePath: 'assets/images/new-design/triglycerides_blood_icon.png',
subTitle: TranslationBase.of(context).fatInBlood,
isPngImage: true,
),
));
return medical;
}
} }

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
const activeCardColor = Color(0xff70777A); const activeCardColor = Color(0xffD02127);
const inactiveCardColor = Color(0xffFAFAFd); const inactiveCardColor = Color(0xffFAFAFd);
class BloodCholesterol extends StatefulWidget { class BloodCholesterol extends StatefulWidget {
@ -65,6 +65,8 @@ class _BloodCholesterolState extends State<BloodCholesterol> {
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).bloodCholesterol, appBarTitle: TranslationBase.of(context).bloodCholesterol,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( child: SingleChildScrollView(

@ -1,13 +1,12 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
const activeCardColor = Color(0xff515a5d); const activeCardColor = Color(0xffD02127);
const activeTextColor = Color(0xffFAFAFA); const activeTextColor = Color(0xffFAFAFA);
const inactiveCardColor = Color(0xffFAFAFA); const inactiveCardColor = Color(0xffFAFAFA);
const inactiveTextColor = Color(0xff60686B); const inactiveTextColor = Color(0xff60686B);
@ -81,6 +80,8 @@ class _BloodSugarState extends State<BloodSugar> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).bloodSugarConversion, appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Container( body: Container(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
@ -89,13 +90,11 @@ class _BloodSugarState extends State<BloodSugar> {
Expanded( Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
//crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 8), margin: EdgeInsets.symmetric(horizontal: 8),
child: Text( child: Text(
TranslationBase.of(context).convertBloodSugarStatement, TranslationBase.of(context).convertBloodSugarStatement,
//textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0), style: TextStyle(fontSize: 20.0),
), ),
), ),
@ -105,13 +104,11 @@ class _BloodSugarState extends State<BloodSugar> {
Container( Container(
color: Colors.white, color: Colors.white,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8),
vertical: 16.0, horizontal: 8),
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: padding: const EdgeInsets.symmetric(horizontal: 16.0),
const EdgeInsets.symmetric(horizontal: 16.0),
child: Row( child: Row(
children: [ children: [
Texts( Texts(
@ -144,19 +141,16 @@ class _BloodSugarState extends State<BloodSugar> {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 1,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, offset: Offset(0, 3), // changes position of shadow
3), // changes position of shadow
), ),
], ],
color: cardMGColor, color: cardMGColor,
borderRadius: borderRadius: BorderRadius.circular(3.0),
BorderRadius.circular(3.0),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0),
vertical: 0.0, horizontal: 18.0),
child: Texts( child: Texts(
'MG/DLt TO \nMMOL/L', 'MG/DLt TO \nMMOL/L',
color: textMGColor, color: textMGColor,
@ -180,21 +174,18 @@ class _BloodSugarState extends State<BloodSugar> {
height: 65.0, height: 65.0,
decoration: BoxDecoration( decoration: BoxDecoration(
color: cardMMOLColor, color: cardMMOLColor,
borderRadius: borderRadius: BorderRadius.circular(3.0),
BorderRadius.circular(3.0),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, offset: Offset(0, 3), // changes position of shadow
3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(horizontal: 16.0),
horizontal: 16.0),
child: Texts( child: Texts(
'MMOL/L TO MG/DLt ', 'MMOL/L TO MG/DLt ',
color: textMMOLColor, color: textMMOLColor,
@ -229,8 +220,7 @@ class _BloodSugarState extends State<BloodSugar> {
], ],
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
decoration: InputDecoration( decoration: InputDecoration(
labelText: labelText: TranslationBase.of(context).enterReadingValue,
TranslationBase.of(context).enterReadingValue,
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white), borderSide: BorderSide(color: Colors.white),
), ),
@ -240,8 +230,7 @@ class _BloodSugarState extends State<BloodSugar> {
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white), borderSide: BorderSide(color: Colors.white),
), ),
border: UnderlineInputBorder( border: UnderlineInputBorder(borderSide: BorderSide(color: Colors.white)),
borderSide: BorderSide(color: Colors.white)),
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black87, color: Colors.black87,
), ),
@ -275,8 +264,7 @@ class _BloodSugarState extends State<BloodSugar> {
style: TextStyle(fontSize: 35.0), style: TextStyle(fontSize: 35.0),
), ),
Padding( Padding(
padding: padding: EdgeInsets.only(left: 4.0, top: 10.0),
EdgeInsets.only(left: 4.0, top: 10.0),
child: Text( child: Text(
unit.toString(), unit.toString(),
style: TextStyle( style: TextStyle(
@ -299,18 +287,12 @@ class _BloodSugarState extends State<BloodSugar> {
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16), margin: EdgeInsets.symmetric(horizontal: 16),
child: SecondaryButton( child: DefaultButton(TranslationBase.of(context).calculate, () {
label: TranslationBase.of(context).calculate, setState(() {
color: Color(0XFF515A5D), _visible == false ? _visible = !_visible : _visible = _visible;
onTap: () { calculateBloodSugar();
setState(() { });
_visible == false }),
? _visible = !_visible
: _visible = _visible;
calculateBloodSugar();
});
},
),
), ),
], ],
), ),

@ -67,6 +67,8 @@ class _TriglyceridesState extends State<Triglycerides> {
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).triglycerides, appBarTitle: TranslationBase.of(context).triglycerides,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( child: SingleChildScrollView(

@ -1,16 +1,16 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart'; import '../../d_q_icons_icons.dart';
class ParkingPage extends StatelessWidget { class ParkingPage extends StatelessWidget {
@ -21,11 +21,11 @@ class ParkingPage extends StatelessWidget {
onModelReady: (model) => model.getIsSaveParking(), onModelReady: (model) => model.getIsSaveParking(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).parking, appBarTitle: TranslationBase.of(context).parking,
description: TranslationBase.of(context).parkingDescription, description: TranslationBase.of(context).parkingDescription,
imagesInfo: [ imagesInfo: [ImagesInfo(imageAr: 'assets/images/bc_parking.png', imageEn: 'assets/images/bc_parking.png', isAsset: true)],
ImagesInfo(imageAr: 'assets/images/bc_parking.png', imageEn: 'assets/images/bc_parking.png', isAsset: true)
],
body: SingleChildScrollView( body: SingleChildScrollView(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: !model.isSavePark child: !model.isSavePark
@ -61,10 +61,7 @@ class ParkingPage extends StatelessWidget {
child: Container( child: Container(
height: 150, height: 150,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -86,16 +83,13 @@ class ParkingPage extends StatelessWidget {
Container( Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
height: 70, height: 70,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).showMyPark), Texts(TranslationBase.of(context).showMyPark),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.floorDescriptionN : model.qrParkingModel.floorDescription),
? model.qrParkingModel.floorDescriptionN
: model.qrParkingModel.floorDescription),
], ],
), ),
), ),
@ -103,8 +97,7 @@ class ParkingPage extends StatelessWidget {
height: 15, height: 15,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
height: 70, height: 70,
@ -112,9 +105,7 @@ class ParkingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).gate), Texts(TranslationBase.of(context).gate),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.gateDescriptionN : model.qrParkingModel.gateDescription),
? model.qrParkingModel.gateDescriptionN
: model.qrParkingModel.gateDescription),
], ],
), ),
), ),
@ -122,8 +113,7 @@ class ParkingPage extends StatelessWidget {
height: 15, height: 15,
), ),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
height: 70, height: 70,
@ -131,9 +121,7 @@ class ParkingPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).building), Texts(TranslationBase.of(context).building),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.buildingDescriptionN : model.qrParkingModel.buildingDescription),
? model.qrParkingModel.buildingDescriptionN
: model.qrParkingModel.buildingDescription),
], ],
), ),
), ),
@ -142,17 +130,14 @@ class ParkingPage extends StatelessWidget {
), ),
Container( Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle),
width: double.infinity, width: double.infinity,
height: 70, height: 70,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(TranslationBase.of(context).branch), Texts(TranslationBase.of(context).branch),
Texts(projectViewModel.isArabic Texts(projectViewModel.isArabic ? model.qrParkingModel.branchDescriptionN : model.qrParkingModel.branchDescription),
? model.qrParkingModel.branchDescriptionN
: model.qrParkingModel.branchDescription),
], ],
), ),
), ),
@ -170,13 +155,7 @@ class ParkingPage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: DefaultButton(TranslationBase.of(context).readBarcode, () => {model.readQr()}),
onTap: () async {
model.readQr();
},
label: TranslationBase.of(context).readBarcode,
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
), ),
], ],
), ),
@ -189,16 +168,14 @@ class ParkingPage extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: DefaultButton(
onTap: () async { TranslationBase.of(context).showMyPark,
MapsLauncher.launchCoordinates( () => {
model.qrParkingModel.latitude, MapsLauncher.launchCoordinates(
model.qrParkingModel.longitude, model.qrParkingModel.latitude,
); model.qrParkingModel.longitude,
}, ),
disabled: model.qrParkingModel.longitude == 0, }),
label: TranslationBase.of(context).showMyPark,
textColor: Theme.of(context).backgroundColor),
), ),
SizedBox( SizedBox(
height: 12, height: 12,

@ -1,17 +1,17 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.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:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:provider/provider.dart';
import 'health_calculator/bmi_calculator/bmi_calculator.dart'; import 'health_calculator/bmi_calculator/bmi_calculator.dart';
import 'health_calculator/bmr_calculator/bmr_calculator.dart'; import 'health_calculator/bmr_calculator/bmr_calculator.dart';
import 'health_calculator/calorie_calculator/calorie_calculator.dart';
import 'health_calculator/delivery_due/delivery_due.dart'; import 'health_calculator/delivery_due/delivery_due.dart';
import 'health_calculator/ideal_body/ideal_body.dart'; import 'health_calculator/ideal_body/ideal_body.dart';
@ -22,6 +22,7 @@ class HealthCalculators extends StatefulWidget {
class _HealthCalculatorsState extends State<HealthCalculators> with SingleTickerProviderStateMixin { class _HealthCalculatorsState extends State<HealthCalculators> with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
@ -34,249 +35,427 @@ class _HealthCalculatorsState extends State<HealthCalculators> with SingleTicker
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
List<Widget> generalHealthList = getGeneralHealthList(context);
List<Widget> womenHealthList = getWomenHealthList(context);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).calculators, appBarTitle: TranslationBase.of(context).calculators,
body: Scaffold( body: Column(
extendBodyBehindAppBar: true, children: [
appBar: PreferredSize( TabBar(
preferredSize: Size.fromHeight(70.0), controller: _tabController,
child: Stack( isScrollable: true,
children: [ indicatorWeight: 4.0,
Center( indicatorColor: Colors.red,
child: Container( labelColor: Theme.of(context).buttonColor,
height: 60.0, labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
margin: EdgeInsets.only(top: 10.0), unselectedLabelColor: Colors.grey,
width: MediaQuery.of(context).size.width * 1.9, labelStyle: TextStyle(
decoration: BoxDecoration( fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
border: Border( fontSize: 16,
bottom: BorderSide( fontWeight: FontWeight.w600,
color: Theme.of(context).dividerColor, letterSpacing: -0.48,
width: 5.7, ),
), tabs: <Widget>[
), Container(
color: Colors.white, width: MediaQuery.of(context).size.width * 0.35,
), child: Center(
child: Center( child: Text(TranslationBase.of(context).generalHealth),
child: TabBar(
controller: _tabController,
isScrollable: true,
indicatorWeight: 4.0,
indicatorColor: Colors.red,
labelColor: Theme.of(context).buttonColor,
labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
unselectedLabelColor: Colors.grey,
tabs: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts(TranslationBase.of(context).generalHealth),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts(TranslationBase.of(context).womanHealth),
),
),
],
),
),
), ),
) ),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Text(TranslationBase.of(context).womanHealth),
),
),
], ],
), ),
), Expanded(
body: Column( child: TabBarView(
children: [ physics: NeverScrollableScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: [
physics: BouncingScrollPhysics(), Container(
controller: _tabController, margin: EdgeInsets.all(20.0),
children: [ child: Column(
Container( children: [
child: Column( Padding(
children: [ padding: EdgeInsets.only(left: 12, right: 12),
Container( child: GridView.builder(
width: double.infinity, shrinkWrap: true,
height: 80, primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: generalHealthList.length,
itemBuilder: (BuildContext context, int index) {
return generalHealthList[index];
},
), ),
Row( ),
children: [ ],
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(page: BMICalculator()),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bmi,
imagePath: 'bmi_health_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: CalorieCalculator(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).calories,
imagePath: 'calories-calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
],
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BmrCalculator(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bmr,
imagePath: 'BMR_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: IdealBody(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).idealBody,
imagePath: 'body_weight.png',
subTitle: TranslationBase.of(context).weight,
),
),
),
],
),
Row(
children: [
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: BodyFat(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).bodyWord,
imagePath: 'body_fat.png',
subTitle: TranslationBase.of(context).fat,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: Carbs(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).carbohydrate,
imagePath: 'carb_protein.png',
subTitle: TranslationBase.of(context).proteinFat,
),
),
),
],
),
],
),
), ),
Container( ),
child: Column( Container(
children: [ margin: EdgeInsets.all(20.0),
Container( child: Column(
width: double.infinity, children: [
height: 80, Padding(
), padding: EdgeInsets.only(left: 12, right: 12),
Row( child: GridView.builder(
children: [ shrinkWrap: true,
Expanded( primary: false,
flex: 1, physics: NeverScrollableScrollPhysics(),
child: InkWell( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
onTap: () { padding: EdgeInsets.zero,
Navigator.push( itemCount: womenHealthList.length,
context, itemBuilder: (BuildContext context, int index) {
FadePage(page: OvulationPeriod()), return womenHealthList[index];
); },
},
child: MedicalProfileItem(
title: TranslationBase.of(context).ovulation,
imagePath: 'ovulation_period_icon.png',
subTitle: TranslationBase.of(context).period,
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DeliveryDue(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context).delivery,
imagePath: 'delivery_date_icon.png',
subTitle: TranslationBase.of(context).dueDate,
),
),
),
],
), ),
], ),
), ],
), ),
], ),
), ],
) ),
], ),
), ],
), ),
// Scaffold(
// extendBodyBehindAppBar: true,
// appBar: PreferredSize(
// preferredSize: Size.fromHeight(70.0),
// child: Column(
// children: [
// Center(
// child: Container(
// height: 60.0,
// margin: EdgeInsets.only(top: 10.0),
// width: MediaQuery.of(context).size.width * 1.9,
// decoration: BoxDecoration(
// border: Border(
// bottom: BorderSide(
// color: Theme.of(context).dividerColor,
// width: 5.7,
// ),
// ),
// color: Colors.white,
// ),
// child: Center(
// child: TabBar(
// controller: _tabController,
// isScrollable: true,
// indicatorWeight: 4.0,
// indicatorColor: Colors.red,
// labelColor: Theme.of(context).buttonColor,
// labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0),
// unselectedLabelColor: Colors.grey,
// tabs: <Widget>[
// Container(
// width: MediaQuery.of(context).size.width * 0.35,
// child: Center(
// child: Texts(TranslationBase.of(context).generalHealth),
// ),
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.35,
// child: Center(
// child: Texts(TranslationBase.of(context).womanHealth),
// ),
// ),
// ],
// ),
// ),
// ),
// )
// ],
// ),
// ),
// body: Column(
// children: [
// Expanded(
// child: TabBarView(
// physics: BouncingScrollPhysics(),
// controller: _tabController,
// children: [
// Container(
// child: Column(
// children: [
// Container(
// width: double.infinity,
// height: 80,
// ),
// Row(
// children: [
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(page: BMICalculator()),
// );
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).bmi,
// imagePath: 'bmi_health_calculator.png',
// subTitle: TranslationBase.of(context).calcHealth,
// ),
// ),
// ),
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: CalorieCalculator(),
// ),
// );
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).calories,
// imagePath: 'calories-calculator.png',
// subTitle: TranslationBase.of(context).calcHealth,
// ),
// ),
// ),
// ],
// ),
// Row(
// children: [
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: BmrCalculator(),
// ),
// );
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).bmr,
// imagePath: 'BMR_calculator.png',
// subTitle: TranslationBase.of(context).calcHealth,
// ),
// ),
// ),
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: IdealBody(),
// ),
// );
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).idealBody,
// imagePath: 'body_weight.png',
// subTitle: TranslationBase.of(context).weight,
// ),
// ),
// ),
// ],
// ),
// Row(
// children: [
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: BodyFat(),
// ),
// );
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).bodyWord,
// imagePath: 'body_fat.png',
// subTitle: TranslationBase.of(context).fat,
// ),
// ),
// ),
// Expanded(
// flex: 1,
// child: InkWell(
// onTap: () {
// Navigator.push(
// context,
// FadePage(
// page: Carbs(),
// ),
// );
// },
// child: MedicalProfileItem(
// title: TranslationBase.of(context).carbohydrate,
// imagePath: 'carb_protein.png',
// subTitle: TranslationBase.of(context).proteinFat,
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// Container(
// child: Column(
// children: [
// Padding(
// padding: EdgeInsets.only(left: 12, right: 12),
// child: GridView.builder(
// shrinkWrap: true,
// primary: false,
// physics: NeverScrollableScrollPhysics(),
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
// padding: EdgeInsets.zero,
// itemCount: womenHealthList.length,
// itemBuilder: (BuildContext context, int index) {
// return womenHealthList[index];
// },
// ),
// ),
// ],
// ),
// ),
// ],
// ),
// )
// ],
// ),
); );
} }
List<Widget> getGeneralHealthList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BMICalculator()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bmi,
imagePath: 'assets/images/new-design/bmi_health_calculator.png',
subTitle: TranslationBase.of(context).calcHealth,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: CalorieCalculator()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).calories,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).calcHealth,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BmrCalculator()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bmr,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).calcHealth,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: IdealBody()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).idealBody,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).weight,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: BodyFat()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).bodyWord,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).fat,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: Carbs()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).carbohydrate,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).proteinFat,
isPngImage: true,
),
));
return medical;
}
List<Widget> getWomenHealthList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: OvulationPeriod()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).ovulation,
imagePath: 'assets/images/new-design/ovulation_period_icon.png',
subTitle: TranslationBase.of(context).period,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: DeliveryDue()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).delivery,
imagePath: 'assets/images/new-design/delivery_date_icon.png',
subTitle: TranslationBase.of(context).dueDate,
isPngImage: true,
),
));
return medical;
}
} }

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectCiteisD
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -83,6 +83,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onModelReady: (model) => model.getCities(), //model.getHospitals(), onModelReady: (model) => model.getCities(), //model.getHospitals(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model, baseViewModel: model,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
description: TranslationBase.of(context).bloodDonationInfo, description: TranslationBase.of(context).bloodDonationInfo,
@ -108,10 +110,10 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)], children: [Texts(getHospitalName(projectProvider, context), color: Colors.black), Icon(Icons.arrow_drop_down)],
), ),
), ),
), ),
@ -121,17 +123,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
InkWell( InkWell(
//======Gender======== //======Gender========
onTap: () => confirmSelectGenderDialog(), onTap: () => confirmSelectGenderDialog(),
//confirmSelectBeneficiaryDialog(model),
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
//Texts(getBeneficiaryType()), Texts(getGender(context), color: Colors.black),
Texts(getGender(context)),
Icon(Icons.arrow_drop_down) Icon(Icons.arrow_drop_down)
], ],
), ),
@ -143,19 +143,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
InkWell( InkWell(
//======Gender======== //======Gender========
onTap: () => confirmSelectBloodDialog(), onTap: () => confirmSelectBloodDialog(),
//confirmSelectBeneficiaryDialog(model),
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor), decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(getBlood(), color: Colors.black), Icon(Icons.arrow_drop_down)],
//Texts(getBeneficiaryType()),
Texts(getBlood()),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
), ),
@ -163,12 +158,13 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12, height: 12,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Container(
child: Text(TranslationBase.of(context).viewTermsConditions), child: Text(
), TranslationBase.of(context).viewTermsConditions + ":",
SizedBox( style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold),
width: MediaQuery.of(context).size.height * 0.10, ),
), ),
InkWell( InkWell(
onTap: () { onTap: () {
@ -178,6 +174,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
child: Texts( child: Texts(
TranslationBase.of(context).clickHere, TranslationBase.of(context).clickHere,
color: Colors.blue, color: Colors.blue,
fontSize: 14.0,
), ),
), ),
) )
@ -194,22 +191,12 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
checkedValue = value; checkedValue = value;
}); });
}, },
// tristate: checkedValue==true,//i == 1,
value: checkedValue, value: checkedValue,
activeColor: Color(0xFFc5272d), //Color(0xFF6200EE), activeColor: Color(0xFFc5272d),
),
SizedBox(
height: 10,
),
Row(
children: [],
),
SizedBox(
width: 10,
), ),
Text( Text(
TranslationBase.of(context).iAgreeToTheTermsAndConditions, TranslationBase.of(context).iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black), style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold),
), ),
], ],
), ),
@ -239,7 +226,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onlyCancelButton: true, onlyCancelButton: true,
)); ));
}, },
child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')), child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white),
), ),
), ),
), ),
@ -253,41 +240,27 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: DefaultButton(TranslationBase.of(context).save, () async {
textColor: Colors.white, if (_selectedHospital == null) {
color: checkedValue == false AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
? Color(0xFFa0a4a6) return;
: Color.fromRGBO( }
63, bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
72, bloodDetails.cityCode = _selectedHospital.iD.toString();
74, bloodDetails.gender = gender == Gender.Male ? 1 : 2;
1, await model.updateBloodGroup(bloodDetails);
), if (model.state == ViewState.Idle) {
label: TranslationBase.of(context).save, AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
onTap: () async { } else {
if (_selectedHospital == null) { AppToast.showErrorToast(message: model.error);
AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); }
return; }),
}
bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) {
AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
} else {
AppToast.showErrorToast(message: model.error);
}
},
),
)), )),
); );
} }
//==============
void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) { void confirmSelectBeneficiaryDialog(MyBalanceViewModel model) {
showDialog( showDialog(
context: context, context: context,

@ -12,6 +12,8 @@ class UserAgreementPage extends StatelessWidget {
onModelReady: (model) => model.getUserTermsAndConditions(), onModelReady: (model) => model.getUserTermsAndConditions(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).userAgreement, appBarTitle: TranslationBase.of(context).userAgreement,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Html( child: Html(

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -43,7 +44,6 @@ class _QRCodeState extends State<QRCode> {
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
NFC.isNDEFSupported.then((supported) { NFC.isNDEFSupported.then((supported) {
setState(() { setState(() {
print("nfc supprted");
_supportsNFC = true; _supportsNFC = true;
}); });
}); });
@ -56,6 +56,8 @@ class _QRCodeState extends State<QRCode> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode, appBarTitle: TranslationBase.of(context).attendRegisterCode,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
@ -146,7 +148,7 @@ class _QRCodeState extends State<QRCode> {
child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(left: 20.0, bottom: 20.0), margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
color: Colors.grey[200], color: Colors.grey[200],
@ -161,10 +163,11 @@ class _QRCodeState extends State<QRCode> {
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
), ),
Container( if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n")
margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0), Container(
child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0),
), child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container( Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0), margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
@ -177,57 +180,12 @@ class _QRCodeState extends State<QRCode> {
), ),
), ),
Container( Container(
margin: EdgeInsets.zero, margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0),
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
ButtonTheme( DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()})
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
// navigateToQR(context);
// getAppoQR(context);
sendEmail();
},
child: Text(TranslationBase.of(context).sendEmail.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
),
],
),
),
Container(
alignment: Alignment.bottomCenter,
height: MediaQuery.of(context).size.height * 0.1,
margin: EdgeInsets.only(bottom: 20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToHome(context);
},
child: Text(TranslationBase.of(context).close.toUpperCase(), style: TextStyle(fontSize: 18.0)),
),
),
], ],
), ),
), ),

@ -1,10 +1,12 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'components/SearchByClinic.dart'; import 'components/SearchByClinic.dart';
@ -31,6 +33,7 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
isShowDecPage: false, isShowDecPage: false,
@ -46,11 +49,13 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
unselectedLabelColor: Color(0xff575757), unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle( labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,

@ -53,11 +53,10 @@ class DoctorView extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (doctor.doctorTitle != null) Text(
Text( doctor.name,
doctor.doctorTitle + " " + doctor.name, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), ),
),
if (doctor.doctorTitle != null) SizedBox(height: 6), if (doctor.doctorTitle != null) SizedBox(height: 6),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -26,6 +26,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
@ -114,12 +115,13 @@ class _ToDoState extends State<ToDo> {
children: <Widget>[ children: <Widget>[
Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0), Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0),
Container( Container(
width: MediaQuery.of(context).size.width * 0.4,
margin: EdgeInsets.only(left: 10.0, right: 10.0), margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Text( child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted( DateUtil.getWeekDayMonthDayYearDateFormatted(
DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") + DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") +
" " + " " +
widget.appoList[index].startTime.substring(0, 5), widget.appoList[index].startTime.substring(0, 5), overflow: TextOverflow.clip,
style: TextStyle(fontSize: 10.0)), style: TextStyle(fontSize: 10.0)),
), ),
!widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(), !widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(),
@ -161,11 +163,12 @@ class _ToDoState extends State<ToDo> {
children: <Widget>[ children: <Widget>[
Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj, Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: 1.0)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: 1.0)),
Container( if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n")
margin: EdgeInsets.only(top: 3.0, bottom: 3.0), Container(
child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)), child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(),
), style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
@ -189,7 +192,7 @@ class _ToDoState extends State<ToDo> {
widgetBuilder: (_, CurrentRemainingTime time) { widgetBuilder: (_, CurrentRemainingTime time) {
return time != null return time != null
? Text( ? Text(
'${time.days != null ? time.days : "0"}:${time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours}:${time.min}:${time.sec} ' + '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
TranslationBase.of(context).upcomingTimeLeft, TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12.0, color: Color(0xff40ACC9))) style: TextStyle(fontSize: 12.0, color: Color(0xff40ACC9)))
: Container(); : Container();
@ -229,7 +232,7 @@ class _ToDoState extends State<ToDo> {
Expanded( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 12.0, color: Colors.grey[700])), child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 11.0, color: Colors.grey[700])),
), ),
), ),
Expanded( Expanded(
@ -240,7 +243,7 @@ class _ToDoState extends State<ToDo> {
}, },
child: Container( child: Container(
child: Text(TranslationBase.of(context).upcomingDetails, child: Text(TranslationBase.of(context).upcomingDetails,
textAlign: TextAlign.end, style: TextStyle(fontSize: 12.0, color: new Color(0xFF40ACC9), decoration: TextDecoration.underline)), textAlign: TextAlign.end, style: TextStyle(fontSize: 11.0, color: new Color(0xFF40ACC9), decoration: TextDecoration.underline)),
), ),
), ),
) )
@ -264,10 +267,23 @@ class _ToDoState extends State<ToDo> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/video.png") : Image.asset("assets/images/new-design/walkin.png"), widget.appoList[index].clinicID == 265
widget.appoList[index].isLiveCareAppointment ? Container(
? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0)) margin: EdgeInsets.only(left: 5.0, right: 5.0),
: Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0)) child: SvgPicture.asset(
"assets/images/new/car_icon.svg",
height: 15,
width: 15,
),
)
: widget.appoList[index].isLiveCareAppointment
? Image.asset("assets/images/new-design/video.png")
: Image.asset("assets/images/new-design/walkin.png"),
widget.appoList[index].clinicID == 265
? Text(TranslationBase.of(context).drivethruAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
: widget.appoList[index].isLiveCareAppointment
? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
: Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
], ],
), ),
), ),
@ -304,7 +320,7 @@ class _ToDoState extends State<ToDo> {
break; break;
case 30: case 30:
return "assets/images/new-design/qr_code_button.png"; return "assets/images/new-design/NFCIcon_option2.png";
break; break;
case 40: case 40:
@ -320,7 +336,7 @@ class _ToDoState extends State<ToDo> {
break; break;
case 90: case 90:
return "assets/images/new-design/check-in.png"; return "assets/images/new-design/NFCIcon_option2.png";
break; break;
default: default:
@ -410,7 +426,11 @@ class _ToDoState extends State<ToDo> {
break; break;
case 30: case 30:
return TranslationBase.of(context).upcomingQR; return TranslationBase.of(context).upcomingQRNFC;
break;
case 90:
return TranslationBase.of(context).upcomingQRNFC;
break; break;
case 40: case 40:
@ -549,7 +569,6 @@ class _ToDoState extends State<ToDo> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.generateAppointmentQR(patientShareResponse, context).then((res) { service.generateAppointmentQR(patientShareResponse, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res);
navigateToQR(context, res['AppointmentQR'], patientShareResponse); navigateToQR(context, res['AppointmentQR'], patientShareResponse);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
@ -22,9 +21,7 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
@ -33,6 +30,7 @@ import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.da
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -41,7 +39,7 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../routes.dart'; import '../../routes.dart';
@ -252,10 +250,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.getToken().then((String token) { _firebaseMessaging.getToken().then((String token) {
print("Firebase Token: " + token); print("Firebase Token: " + token);
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && DEVICE_TOKEN == "") { if (token != null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
if (projectViewModel.isLogin) this.getNotificationCount(DEVICE_TOKEN); // if (projectViewModel.isLogin) this.getNotificationCount(DEVICE_TOKEN);
} }
}); });
if (results[Permission.location].isGranted) {} if (results[Permission.location].isGranted) {}
@ -491,16 +489,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (await sharedPref.getObject(USER_PROFILE) != null) { if (await sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
// authService
// .registeredAuthenticatedUser(data, token, 0, 0)
// .then((res) => {print(res)});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
if (value != null) if (value != null)
{ {
setState(() { setState(() {
notificationCount = notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}) })
} }
@ -665,18 +659,19 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value)); authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
if (projectViewModel.isLoading == true) { if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) { if (data != null) {
authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {}); authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
authService.getDashboard().then((value) => { authService.getDashboard().then((value) => {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
} }
}) }),
}); });
} }
} } else {}
} }
} }

@ -572,6 +572,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) { authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) {
print(err); print(err);
}); });
// authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {});
} }
getToDoCount() { getToDoCount() {

@ -54,10 +54,10 @@ class InvoiceDetail extends StatelessWidget {
child: Table( child: Table(
children: [ children: [
TableRow(children: [ TableRow(children: [
Text("Description", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), Text(TranslationBase.of(context).description, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
Text("Quantity", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), Text(TranslationBase.of(context).quantity, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
Text("Price", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), Text(TranslationBase.of(context).price, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
Text("Total", textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), Text(TranslationBase.of(context).total, textAlign: TextAlign.center, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
]), ]),
], ],
), ),
@ -82,7 +82,7 @@ class InvoiceDetail extends StatelessWidget {
), ),
Container( Container(
child: AppExpandableNotifier( child: AppExpandableNotifier(
title: "Total Price: " + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].grandTotal.toString() + " SAR", title: TranslationBase.of(context).patientShareTotal.toString() + " " + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].grandTotal.toString() + " SAR",
isExpand: true, isExpand: true,
bodyWidget: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ bodyWidget: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Table( Table(
@ -90,45 +90,45 @@ class InvoiceDetail extends StatelessWidget {
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Discount: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).discount, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].discountAmount.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].discountAmount.toString() + " " + TranslationBase.of(context).sar,
textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("VAT (" + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].vATPercentage.toString() + "%)", child: Text(TranslationBase.of(context).totalVAT.toString() + " (" + dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].vATPercentage.toString() + "%): ",
textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].patientVATAmount.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].patientVATAmount.toString() + " " + TranslationBase.of(context).sar,
textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Total: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).total.toString() + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " " + TranslationBase.of(context).sar,
textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
]), ]),
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Paid: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).paid.toString() + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " SAR", child: Text(dentalInvoiceDetailResponse.listEInvoiceForDental[0].listConsultation[0].totalPatientShare.toString() + " " + TranslationBase.of(context).sar,
textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
]), ]),
@ -152,7 +152,7 @@ class InvoiceDetail extends StatelessWidget {
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).dentalInsurance + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 5.0), margin: EdgeInsets.only(top: 10.0, bottom: 5.0),
@ -162,7 +162,7 @@ class InvoiceDetail extends StatelessWidget {
TableRow(children: [ TableRow(children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Insurance ID: ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).insuranceID + ": ", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), margin: EdgeInsets.only(top: 10.0, bottom: 10.0),
@ -221,11 +221,11 @@ class InvoiceDetail extends StatelessWidget {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.price.toString() + " SAR", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)), child: Text(lab.price.toString() + " " + TranslationBase.of(context).sar, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(lab.total.toString() + " SAR", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)), child: Text(lab.total.toString() + " " + TranslationBase.of(context).sar, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w400)),
), ),
]), ]),
); );

@ -96,7 +96,7 @@ class _MyInvoicesState extends State<MyInvoices> {
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Appointment No: ", child: Text(TranslationBase.of(context).appointmentNo + ": ",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -104,7 +104,7 @@ class _MyInvoicesState extends State<MyInvoices> {
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("Appointment Date: ", child: Text(TranslationBase.of(context).appointmentDate + ": ",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -113,7 +113,7 @@ class _MyInvoicesState extends State<MyInvoices> {
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 10.0, bottom: 10.0), top: 10.0, bottom: 10.0),
child: Text("Clinic: ", child: Text(TranslationBase.of(context).clinic + ": ",
style: TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: 14.0,
color: Colors.black, color: Colors.black,
@ -203,14 +203,13 @@ class _MyInvoicesState extends State<MyInvoices> {
DoctorListResponse.DoctorList doctor = new DoctorListResponse.DoctorList(); DoctorListResponse.DoctorList doctor = new DoctorListResponse.DoctorList();
doctor.name = listDentalAppointments.doctorName; doctor.name = projectViewModel.isArabic ? listDentalAppointments.doctorNameN : listDentalAppointments.doctorName;
doctor.projectName = listDentalAppointments.projectName; doctor.projectName = listDentalAppointments.projectName;
doctor.date = listDentalAppointments.appointmentDate; doctor.date = listDentalAppointments.appointmentDate;
doctor.actualDoctorRate = 0; doctor.actualDoctorRate = 0;
doctor.doctorImageURL = listDentalAppointments.doctorImageURL; doctor.doctorImageURL = listDentalAppointments.doctorImageURL;
doctor.projectID = listDentalAppointments.projectID; doctor.projectID = listDentalAppointments.projectID;
doctor.dayName = listDentalAppointments.invoiceNo; doctor.dayName = listDentalAppointments.invoiceNo;
doctor.doctorTitle = "Dr.";
doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString(); doctor.clinicName = "InvoiceNo: " + listDentalAppointments.invoiceNo.toString();
myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) { myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID, listDentalAppointments.appointmentNo, context).then((res) {

@ -138,7 +138,7 @@ class ProductDetailService extends BaseService {
Future getWishlistItems() async { Future getWishlistItems() async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(GET_WISHLIST+customerId+"?shopping_cart_type=2", await baseAppClient.getPharmacy(GET_WISHLIST.toString()+customerId.toString()+"?shopping_cart_type=2",
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear(); _wishListProducts.clear();
response['shopping_carts'].forEach((item) { response['shopping_carts'].forEach((item) {

@ -2203,6 +2203,18 @@ class TranslationBase {
String get offlineClinics => localizedValues["offline-clinics"][locale.languageCode]; String get offlineClinics => localizedValues["offline-clinics"][locale.languageCode];
String get clinicSchedule => localizedValues["clinic-schedule"][locale.languageCode]; String get clinicSchedule => localizedValues["clinic-schedule"][locale.languageCode];
String get discount => localizedValues["discount"][locale.languageCode];
String get totalVAT => localizedValues["total-VAT"][locale.languageCode];
String get paid => localizedValues["paid"][locale.languageCode];
String get dentalInsurance => localizedValues["dental-insurance"][locale.languageCode];
String get drivethruAppo => localizedValues["drivethru-appo"][locale.languageCode];
String get upcomingQRNFC => localizedValues["upcoming-QR-NFC"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -163,7 +163,7 @@ class _AppDrawerState extends State<AppDrawer> {
} else { } else {
projectProvider.changeLanguage('ar'); projectProvider.changeLanguage('ar');
} }
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: true); var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
}, },
), ),

Loading…
Cancel
Save