Merge branch 'Haroon' into 'development'

updates & fixes

See merge request Cloud_Solution/diplomatic-quarter!385
merge-update-with-lab-changes
haroon amjad 5 years ago
commit ab0e388cbe

@ -1300,9 +1300,9 @@ const Map localizedValues = {
}, },
"RRTDDetails": { "RRTDDetails": {
"en": "en":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home", "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home",
"ar": "ar":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home" "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home"
}, },
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
@ -2224,4 +2224,40 @@ const Map localizedValues = {
"en": "Total Appointment Time:", "en": "Total Appointment Time:",
"ar": "وقت المواعيد الكلي:" "ar": "وقت المواعيد الكلي:"
}, },
"info-eye": {
"en": "This service allows you to view all the eye measurements, lenses, and eyeglasses that have been made in the Habib Medical Group.",
"ar": " خدمة قياسات النظر: هذه الخدمة تمكنك من الاطلاع على جميع قياسات النظر والعدسات والنظارات التي تمت في مجموعة الحبيب الطبية."
},
"info-vaccines": {
"en": "This service allows you to view all the vaccinations that were taken in Al Habib Medical Group.",
"ar": "خدمة تطعيماتي: هذه الخدمة تمكنك من الاطلاع على جميع التطعيمات التي تمت في مجموعة الحبيب الطبية."
},
"info-trackers": {
"en": "This service allows you to record the readings of the measurement of sugar, pressure, and weight and then refer to them as a reference in addition to view the statistics charts.",
"ar": "متابعة قراءاتي: هذه الخدمة تمكنك من تسجيل قراءات قياس السكر والضغط والوزن بشكل دوري ومن ثم الاطلاع عليها كمرجع وكذلك الاطلاع على الرسوم البيانية لمتابعة تطور الحالة."
},
"info-health-data": {
"en": "This service is designed to allows you to synchronize the health data from your smart watches into your health record system in Habib Medical Group so that the doctors you are visiting can analyze your health & activity level.",
"ar": "تم تصميم هذه الخدمة للسماح لك بمزامنة البيانات الصحية من ساعاتك الذكية الى نظام السجلات الصحية الخاص بك في مجموعة حبيب الطبية حتى يتمكن الأطباء الذين تزورهم من تحليل مستوى صحتك ونشاطك."
},
"info-ask-doc": {
"en": "This service allows you to ask the doctor you have visited during the last 14 days. When you receive a response from the doctor, you will be notified via the system to view the doctor's reply.",
"ar": "اسال طبيبك: هذه الخدمة تمكنك من توجيه استفسارات الى الطبيب الذي قمت بزيارته خلال اخر 14 يوم وكذلك عند تلقى الرد من الطبيب سوف يتم ابلاغك عن طريق النظام للاطلاع على رد الطبيب."
},
"info-auto-wifi": {
"en": "This service allows you to connect to the Internet directly without the need for entering a user name or password.",
"ar": "الاتصال بالانترنت: هذه الخدمة تمكنك من الاتصال بالانترنت مباشرة دون الحاجة الى اسم مستخدم او كلمة مرور."
},
"auto-wifi": {
"en": "Connect To Internet",
"ar": "الإتصال بالإنترنت"
},
"child-vaccine-info": {
"en": "This service to remind you of the deadlines of the necessary vaccinations for your childs against diseases targeted by immunization according to the MOH vaccinations schedule by sending a reminding message and notifications of the vaccination date to the registered mobile phone.",
"ar": "هذه الخدمة تم تصميمها لتذكيرك بالمواعيد النهائية للتحصينات اللازمة لطفلك ضد الأمراض المستهدفة بالتحصين وفقًا لجدول تطعيمات وزارة الصحة عن طريق إرسال رسالة تذكير وإشعارات عن مواعيد التطعيم على الجوال المسجل."
},
"h2o-info": {
"en": "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
"ar": "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر."
},
}; };

@ -8,8 +8,6 @@ import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';

@ -43,9 +43,8 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
description: TranslationBase.of(context).infoCMC, description: TranslationBase.of(context).infoCMC,
imagesInfo: [ imagesInfo: [
ImagesInfo( ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'assets/images/wifi-EN.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
isAsset: true)
], ],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold( body: Scaffold(

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_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/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -46,9 +45,8 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
appBarTitle: TranslationBase.of(context).homeHealthCare, appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [ imagesInfo: [
ImagesInfo( ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png',
imageEn: 'assets/images/wifi-EN.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')
isAsset: true)
], ],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -15,6 +15,7 @@ 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/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/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -22,6 +23,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/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';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -56,8 +58,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
locator<PharmacyModuleViewModel>();
LocationUtils locationUtils; LocationUtils locationUtils;
var weather = '--'; var weather = '--';
WeatherService _weatherService = WeatherService(); WeatherService _weatherService = WeatherService();
@ -65,12 +66,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
locationUtils = locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
new LocationUtils(isShowConfirmDialog: true, context: context); WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
WidgetsBinding.instance.addPostFrameCallback((_) => {
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value))
});
}); });
super.initState(); super.initState();
} }
@ -109,14 +106,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).healthWeatherIndicators,
.healthWeatherIndicators,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
.healthTipsBasedOnCurrentWeather,
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: 14,
), ),
@ -144,11 +139,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
width: 60, width: 60,
height: 60, height: 60,
), ),
Directionality( Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white))
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
], ],
), ),
Texts( Texts(
@ -173,8 +164,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
), ),
); );
}, },
imageLocation: imageLocation: 'assets/images/new-design/my_file_bottom_bar.png',
'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile, title: TranslationBase.of(context).myMedicalFile,
), ),
ServicesContainer( ServicesContainer(
@ -196,8 +186,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
), ),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/booking_icon_active.png',
'assets/images/new-design/booking_icon_active.png',
title: TranslationBase.of(context).bookAppo, title: TranslationBase.of(context).bookAppo,
), ),
ServicesContainer( ServicesContainer(
@ -207,8 +196,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: PaymentService(), page: PaymentService(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService, title: TranslationBase.of(context).onlinePaymentService,
), ),
ServicesContainer( ServicesContainer(
@ -218,17 +206,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: AnicllaryOrders(), page: AnicllaryOrders(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png',
'assets/images/comprehensive_medical_checkup_logo.png',
title: TranslationBase.of(context).anicllaryOrders, title: TranslationBase.of(context).anicllaryOrders,
), ),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage(), FadePage(page: CovidDrivethruLocation()),
), ),
imageLocation: imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest, title: TranslationBase.of(context).covid19_driveThrueTest,
), ),
ServicesContainer( ServicesContainer(
@ -247,12 +233,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
), ),
ServicesContainer( ServicesContainer(
onTap: () => getPharmacyToken(), onTap: () => getPharmacyToken(),
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png', imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy), title: TranslationBase.of(context).pharmacy),
ServicesContainer( ServicesContainer(
@ -262,8 +242,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: InsuranceUpdate(), page: InsuranceUpdate(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/medical/insurance_card_icon.png',
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance, title: TranslationBase.of(context).updateInsurance,
), ),
ServicesContainer( ServicesContainer(
@ -281,8 +260,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(), page: MyFamily(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/family_menu_icon_red.png',
'assets/images/new-design/family_menu_icon_red.png',
title: TranslationBase.of(context).myFamily, title: TranslationBase.of(context).myFamily,
), ),
if (projectViewModel.havePrivilege(35)) if (projectViewModel.havePrivilege(35))
@ -291,8 +269,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context, context,
FadePage(page: ChildVaccinesPage()), FadePage(page: ChildVaccinesPage()),
), ),
imageLocation: imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
'assets/images/new-design/children_vaccines_icon.png',
title: TranslationBase.of(context).childVaccine, title: TranslationBase.of(context).childVaccine,
), ),
ServicesContainer( ServicesContainer(
@ -300,18 +277,17 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context); Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices(); LandingPage.shared.switchToDoFromHMGServices();
}, },
imageLocation: imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
if (projectViewModel.havePrivilege(42)) // if (projectViewModel.havePrivilege(42))
ServicesContainer( // ServicesContainer(
onTap: () => Navigator.push( // onTap: () => Navigator.push(
context, // context,
FadePage(page: SymptomInfo()), // FadePage(page: SymptomInfo()),
), // ),
imageLocation: 'assets/images/new-design/body_icon.png', // imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle), // title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36)) if (projectViewModel.havePrivilege(36))
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
@ -328,8 +304,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: (HealthCalculators()), page: (HealthCalculators()),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/health_calculator_icon.png',
'assets/images/new-design/health_calculator_icon.png',
title: TranslationBase.of(context).calculators, title: TranslationBase.of(context).calculators,
), ),
ServicesContainer( ServicesContainer(
@ -339,20 +314,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: HealthConverter(), page: HealthConverter(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/health_convertor_icon.png',
'assets/images/new-design/health_convertor_icon.png',
title: TranslationBase.of(context).converters, title: TranslationBase.of(context).converters,
), ),
if (projectViewModel.havePrivilege(38)) if (projectViewModel.havePrivilege(38))
ServicesContainer( ServicesContainer(
onTap: () => onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push(
// context,
// FadePage(
// page: H2OPageIndexPage(),
// ),
// ),
imageLocation: 'assets/images/new-design/water_icon.png', imageLocation: 'assets/images/new-design/water_icon.png',
title: TranslationBase.of(context).h2o, title: TranslationBase.of(context).h2o,
), ),
@ -360,10 +327,11 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage(), FadePage(
page: SmartWatchInstructions()
),
), ),
imageLocation: imageLocation: 'assets/images/new-design/smartwatch_icon.png',
'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,
), ),
ServicesContainer( ServicesContainer(
@ -373,15 +341,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ParkingPage(), page: ParkingPage(),
), ),
), ),
imageLocation: imageLocation: 'assets/images/new-design/parking_system_icon.png',
'assets/images/new-design/parking_system_icon.png',
title: TranslationBase.of(context).parking, title: TranslationBase.of(context).parking,
), ),
ServicesContainer( ServicesContainer(
onTap: () => launch( onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"),
"https://hmgwebservices.com/vt_mobile/html/index.html"), imageLocation: 'assets/images/new-design/virtual_tour_icon.png',
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
title: TranslationBase.of(context).vTour, title: TranslationBase.of(context).vTour,
), ),
ServicesContainer( ServicesContainer(
@ -389,12 +354,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView( builder: (BuildContext context) => MyWebView(
title: "HMG News", title: "HMG News",
selectedUrl: selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
))); )));
}, },
imageLocation: imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png',
'assets/images/new-design/twitter_dashboard_icon.png',
title: TranslationBase.of(context).latestNews, title: TranslationBase.of(context).latestNews,
), ),
ServicesContainer( ServicesContainer(
@ -436,8 +399,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
getAuthUser() async { getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
@ -451,8 +413,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
}); });
} else { } else {
setState(() { setState(() {
weather = weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
data != null ? data['Temperature'].toString() + '\u2103' : '--';
}); });
} }
} }

@ -1,12 +1,12 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -49,22 +49,29 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).waterTracker, appBarTitle: TranslationBase.of(context).waterTracker,
description: TranslationBase.of(context).h2oInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png')
],
showHomeAppBarIcon: false, showHomeAppBarIcon: false,
baseViewModel: model, baseViewModel: model,
isHelp: true, isHelp: true,
appBarIcons: [ appBarIcons: [
IconButton( model.isLogin
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"), ? IconButton(
color: Colors.white, icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
onPressed: () { color: Colors.white,
Navigator.push( onPressed: () {
context, Navigator.push(
FadePage( context,
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), FadePage(
), page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
); ),
}, );
), },
)
: Container(),
], ],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -56,28 +56,28 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
AuthenticatedUser authenticatedUser; AuthenticatedUser authenticatedUser;
GetAllSharedRecordsByStatusList selectedPatientFamily; GetAllSharedRecordsByStatusList selectedPatientFamily;
AdvanceModel advanceModel = AdvanceModel(); AdvanceModel advanceModel = AdvanceModel();
List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-");
List_BloodGroupDetailsModel(bloodGroup: "A-");
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser; AuthenticatedUser authUser;
var checkedValue = false; var checkedValue = false;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectProvider;
@override @override
void initState() { void initState() {
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectProvider.isLogin) getAuthUser();
});
super.initState(); super.initState();
getAuthUser();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add( projectProvider = Provider.of(context);
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
ProjectViewModel projectProvider = Provider.of(context);
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getCities(), //model.getHospitals(), onModelReady: (model) => model.getCities(), //model.getHospitals(),
@ -102,22 +102,16 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12, height: 12,
), ),
InkWell( InkWell(
onTap: () => onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),
confirmSelectHospitalDialog(model.CitiesModelList),
//model.hospitals //model.hospitals
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)],
Texts(getHospitalName(projectProvider, context)),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
), ),
@ -132,9 +126,7 @@ 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( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -156,9 +148,7 @@ 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( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -175,16 +165,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Row( Row(
children: [ children: [
Container( Container(
child: Text( child: Text(TranslationBase.of(context).viewTermsConditions),
TranslationBase.of(context).viewTermsConditions),
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.height * 0.10, width: MediaQuery.of(context).size.height * 0.10,
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context).push(FadePage(page: UserAgreementPage()));
.push(FadePage(page: UserAgreementPage()));
}, },
child: Container( child: Container(
child: Texts( child: Texts(
@ -220,12 +208,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
width: 10, width: 10,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).iAgreeToTheTermsAndConditions,
.iAgreeToTheTermsAndConditions, style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black),
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: checkedValue
? Color(0xFFc5272d)
: Colors.black),
), ),
], ],
), ),
@ -247,23 +231,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
builder: (_) => AssetGiffyDialog( builder: (_) => AssetGiffyDialog(
title: Text( title: Text(
"", "",
style: TextStyle( style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
fontSize: 22.0,
fontWeight: FontWeight.w600),
), ),
image: Image.asset( image: Image.asset('assets/images/BloodChrt_EN.png'),
'assets/images/BloodChrt_EN.png'), buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelText: Text(
TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey, buttonCancelColor: Colors.grey,
onlyCancelButton: true, onlyCancelButton: true,
)); ));
}, },
child: Container( child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')),
width: 250,
height: 200,
child: Image.asset(
'assets/images/BloodChrt_EN.png')),
), ),
), ),
), ),
@ -293,19 +269,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
label: TranslationBase.of(context).save, label: TranslationBase.of(context).save,
onTap: () async { onTap: () async {
if (_selectedHospital == null) { if (_selectedHospital == null) {
AppToast.showErrorToast( AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
message: TranslationBase.of(context).selectCity);
return; return;
} }
bloodDetails.city = projectProvider.isArabic bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
? _selectedHospital.descriptionN
: _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString(); bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2; bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails); await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) { if (model.state == ViewState.Idle) {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
message: model.updatedRegisterBloodMessage);
} else { } else {
AppToast.showErrorToast(message: model.error); AppToast.showErrorToast(message: model.error);
} }
@ -325,8 +297,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
setState(() { setState(() {
if (value == BeneficiaryType.MyAccount) { if (value == BeneficiaryType.MyAccount) {
_fileTextController.text = model.user.patientID.toString(); _fileTextController.text = model.user.patientID.toString();
advanceModel.depositorName = advanceModel.depositorName = model.user.firstName + " " + model.user.lastName;
model.user.firstName + " " + model.user.lastName;
} else } else
_fileTextController.text = ""; _fileTextController.text = "";
@ -453,8 +424,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
); );
} }
void confirmSelectFamilyDialog( void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
showDialog( showDialog(
context: context, context: context,
child: SelectPatientFamilyDialog( child: SelectPatientFamilyDialog(
@ -463,8 +433,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onValueSelected: (value) { onValueSelected: (value) {
setState(() { setState(() {
selectedPatientFamily = value; selectedPatientFamily = value;
_fileTextController.text = _fileTextController.text = selectedPatientFamily.patientID.toString();
selectedPatientFamily.patientID.toString();
advanceModel.depositorName = value.patientName; advanceModel.depositorName = value.patientName;
}); });
}, },
@ -538,12 +507,9 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary; return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary;
} }
String getHospitalName( String getHospitalName(ProjectViewModel projectProvider, BuildContext context) {
ProjectViewModel projectProvider, BuildContext context) {
if (_selectedHospital != null) if (_selectedHospital != null)
return projectProvider.isArabic return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
? _selectedHospital.descriptionN
: _selectedHospital.description;
else else
return TranslationBase.of(context).selectCity; return TranslationBase.of(context).selectCity;
// return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital; // return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital;
@ -558,8 +524,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
getAuthUser() async { getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });

@ -1,6 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget {
_ChildVaccinesPageState createState() => _ChildVaccinesPageState(); _ChildVaccinesPageState createState() => _ChildVaccinesPageState();
} }
class _ChildVaccinesPageState extends State<ChildVaccinesPage> class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController(); TextEditingController titleController = TextEditingController();
var checkedValue = false; var checkedValue = false;
String addEmail = ""; String addEmail = "";
@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onModelReady: (model) => model.getUserInformationRequestOrders(), onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, isShowDecPage: true,
description: TranslationBase.of(context).childVaccineInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'),
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png')
],
appBarTitle: TranslationBase.of(context).vaccination, appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Column( child: Column(
@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
fillColor: Colors.red, fillColor: Colors.red,
hintText: model.user.emailAddress, hintText: model.user != null ? model.user.emailAddress : "",
controller: titleController, controller: titleController,
fontSize: 20, fontSize: 20,
hintColor: Colors.black, hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
onChanged: (text) { onChanged: (text) {
addEmail = text; addEmail = text;
model.user.emailAddress == addEmail model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true;
? checkedValue = false
: checkedValue = true;
}, },
validator: (value) { validator: (value) {
if (value == null) { if (value == null) {
@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
// //
onTap: () { onTap: () {
model.user.emailAddress = addEmail.toString(); model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg);
message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString(); // bloodDetails.city=_selectedHospital.toString();
// bloodDetails. // bloodDetails.

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
@ -8,13 +8,12 @@ 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';
class RRTMainScreen extends StatefulWidget{ class RRTMainScreen extends StatefulWidget {
@override @override
State<StatefulWidget> createState() => RRTMainScreenState(); State<StatefulWidget> createState() => RRTMainScreenState();
} }
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin{ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin {
int currentIndex = 0; int currentIndex = 0;
TabController tabController; TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true); PageController pageController = PageController(initialPage: 0, keepPage: true);
@ -22,84 +21,85 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
RRTViewModel viewModel; RRTViewModel viewModel;
bool loadingData; bool loadingData;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png'));
tabController = TabController(length: 2, vsync: this); tabController = TabController(length: 2, vsync: this);
} }
TranslationBase localize; TranslationBase localize;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
localize = TranslationBase.of(context); localize = TranslationBase.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: localize.rapidResponseTeam, appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true, isShowAppBar: true,
body: BaseView<RRTViewModel>( description: TranslationBase.of(context).rrtDDetails,
onModelReady: (vm) async { imagesInfo: imagesInfo,
viewModel = vm; body: BaseView<RRTViewModel>(
loadingData = true; onModelReady: (vm) async {
await vm.loadRequiredData().then((value){ viewModel = vm;
}).whenComplete(() => setState(() => loadingData = false)); loadingData = true;
}, await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false));
builder: (ctx, vm, widget) => content(), },
) builder: (ctx, vm, widget) => content(),
); ));
} }
Widget content(){ Widget content() {
if(loadingData == true){ if (loadingData == true) {
return Center(child: CircularProgressIndicator()); return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error) // else if(viewModel.state == ViewState.Error)
}else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){ } else if (viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null) {
return Column( return Column(
children: [ children: [tabBar(), Expanded(child: contentPager())],
tabBar(),
Expanded(
child: contentPager()
)
],
); );
}else{ } else {
return Container( return Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,), child: Text(
localize.somethingWentWrongTryLater,
style: TextStyle(color: Colors.red),
maxLines: 5,
),
); );
} }
} }
Widget tabBar() => Container( Widget tabBar() => Container(
margin: EdgeInsets.all(15), margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar( child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
onTap: onPageChanged,
indicatorWeight: 3,
indicatorColor: Color(0xFFc5272d),
isScrollable: false,
controller: tabController,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab( Tab(
child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),), child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
), ),
Tab( Tab(
child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),), child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
), ),
] ]),
), );
);
Widget contentPager() => PageView( Widget contentPager() => PageView(
onPageChanged: onPageChanged, onPageChanged: onPageChanged,
controller: pageController, controller: pageController,
children: [ children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders), RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders), RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
], ],
); );
void onPageChanged(int index) { void onPageChanged(int index) {
pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut); pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);

@ -46,7 +46,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
infoList: TranslationBase.of(context).infoInsuranceCardsPoints, infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
appBarIcons: [ appBarIcons: [
IconButton( model.isLogin ? IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
icon: Container( icon: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -64,7 +64,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
onPressed: () { onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
}, },
), ) : Container(),
], ],
body: Container( body: Container(
margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04), margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04),

@ -1,11 +1,10 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@ -21,7 +20,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
@ -64,8 +62,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity, width: double.infinity,
height: 210, height: 210,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
), ),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
@ -84,8 +81,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
color: Colors.white.withOpacity(0.3), color: Colors.white.withOpacity(0.3),
@ -115,10 +111,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 15.0, top: 15.0,
), ),
child: SvgPicture.asset( child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0),
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
), ),
Container( Container(
margin: EdgeInsets.only(top: 5.0), margin: EdgeInsets.only(top: 5.0),
@ -140,12 +133,11 @@ class _HomePageState extends State<HomePage> {
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: onPressed: (model.user != null && model.user.outSA == 1)
(model.user != null && model.user.outSA == 1) ? () {}
? () {} : () {
: () { navigateToCovidDriveThru();
navigateToCovidDriveThru(); },
},
child: Center( child: Center(
child: Center( child: Center(
child: Center( child: Center(
@ -177,13 +169,9 @@ class _HomePageState extends State<HomePage> {
height: 125, height: 125,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
child: SvgPicture.asset( child: SvgPicture.asset(
projectViewModel.isArabic projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg',
? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg',
), ),
), ),
), ),
@ -200,10 +188,8 @@ class _HomePageState extends State<HomePage> {
), ),
Positioned( Positioned(
top: 155, top: 155,
left: MediaQuery.of(context).size.width * left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
child: (!model.isLogin) child: (!model.isLogin)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -213,8 +199,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage( image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
@ -235,8 +220,7 @@ class _HomePageState extends State<HomePage> {
fontSize: 16, fontSize: 16,
), ),
Align( Align(
alignment: alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.goToMyProfile(); widget.goToMyProfile();
@ -274,8 +258,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5), border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)), borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage( image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
), ),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
@ -302,8 +285,7 @@ class _HomePageState extends State<HomePage> {
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset( child: SvgPicture.asset("assets/images/new-design/verification_check.svg"),
"assets/images/new-design/verification_check.svg"),
), ),
], ],
) )
@ -318,8 +300,7 @@ class _HomePageState extends State<HomePage> {
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset( child: SvgPicture.asset("assets/images/new-design/pending.svg"),
"assets/images/new-design/pending.svg"),
), ),
], ],
) )
@ -407,8 +388,7 @@ class _HomePageState extends State<HomePage> {
width: 25, width: 25,
height: 40, height: 40,
), ),
Texts('${model.weightKg} ${TranslationBase.of(context).kg}', Texts('${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 17)
color: Colors.white, fontSize: 17)
], ],
), ),
), ),
@ -465,9 +445,7 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
if (projectViewModel.havePrivilege(64) || if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67))
projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67))
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Row( child: Row(
@ -487,9 +465,7 @@ class _HomePageState extends State<HomePage> {
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: (model.user != null && model.user.outSA == 1) padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -526,13 +502,10 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(65)) if (projectViewModel.havePrivilege(65))
DashboardItem( DashboardItem(
onTap: () => onTap: () => (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center( child: Center(
child: Padding( child: Padding(
padding: (model.user != null && model.user.outSA == 1) padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -587,9 +560,7 @@ class _HomePageState extends State<HomePage> {
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: (model.user != null && model.user.outSA == 1) padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1) child: (model.user != null && model.user.outSA == 1)
? Container( ? Container(
width: double.infinity, width: double.infinity,
@ -630,14 +601,14 @@ class _HomePageState extends State<HomePage> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
InkWell( Container(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())), margin: EdgeInsets.only(left: 15, right: 15),
child: Container( child: Row(
margin: EdgeInsets.only(left: 15, right: 15), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Row( children: <Widget>[
mainAxisAlignment: MainAxisAlignment.spaceBetween, InkWell(
children: <Widget>[ onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
Container( child: Container(
width: MediaQuery.of(context).size.width * 0.29, width: MediaQuery.of(context).size.width * 0.29,
child: Center( child: Center(
child: Padding( child: Padding(
@ -668,7 +639,12 @@ class _HomePageState extends State<HomePage> {
color: Colors.white, color: Colors.white,
), ),
), ),
Container( ),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: EReferralPage()));
},
child: Container(
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
@ -683,7 +659,7 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context).offersAndPackages, TranslationBase.of(context).ereferral,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -699,51 +675,52 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
)), )),
if (projectViewModel.havePrivilege(60)) ),
Container( if (projectViewModel.havePrivilege(60))
width: MediaQuery.of(context).size.width * 0.29, Container(
child: InkWell( width: MediaQuery.of(context).size.width * 0.29,
onTap: () => Navigator.push( child: InkWell(
context, onTap: () => Navigator.push(
FadePage( context,
page: ErOptions( FadePage(
isAppbar: true, page: ErOptions(
))), isAppbar: true,
child: Center( ))),
child: Padding( child: Center(
padding: const EdgeInsets.all(15.0), child: Padding(
child: Column( padding: const EdgeInsets.all(15.0),
children: <Widget>[ child: Column(
Image.asset( children: <Widget>[
'assets/images/Dr_Schedule_report.png', Image.asset(
width: 50, 'assets/images/Dr_Schedule_report.png',
height: 50, width: 50,
), height: 50,
SizedBox( ),
height: 10, SizedBox(
), height: 10,
Texts( ),
TranslationBase.of(context).emergencyServices, Texts(
textAlign: TextAlign.center, TranslationBase.of(context).emergencyServices,
color: Colors.black87, textAlign: TextAlign.center,
bold: false, color: Colors.black87,
fontSize: SizeConfig.textMultiplier * 1.7, bold: false,
) fontSize: SizeConfig.textMultiplier * 1.7,
], )
), ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
), ),
], height: MediaQuery.of(context).size.width * 0.4,
), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
), ),
), ),
// ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
@ -867,17 +844,7 @@ class _HomePageState extends State<HomePage> {
} }
class DashboardItem extends StatelessWidget { class DashboardItem extends StatelessWidget {
const DashboardItem( const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true})
{this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4,
this.hasColorFilter = true})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;
@ -907,15 +874,12 @@ class DashboardItem extends StatelessWidget {
: HexColor('#050705').withOpacity(opacity) : HexColor('#050705').withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent),
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null image: imageName != null
? DecorationImage( ? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
) )
: null, : null,
), ),

@ -105,7 +105,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (currentTab > 0 && tab == 2) if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0); pageController.jumpToPage(0);
else if (tab != 0) { else if (tab != 0) {
if (tab == 4 && model.count == 0) { if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
AppToast.showErrorToast( AppToast.showErrorToast(
message: TranslationBase.of(context).noBookedAppo); message: TranslationBase.of(context).noBookedAppo);
} else { } else {

@ -1,10 +1,6 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@ -19,8 +15,7 @@ class AskDoctorHomPage extends StatefulWidget {
_AskDoctorHomPageState createState() => _AskDoctorHomPageState(); _AskDoctorHomPageState createState() => _AskDoctorHomPageState();
} }
class _AskDoctorHomPageState extends State<AskDoctorHomPage> class _AskDoctorHomPageState extends State<AskDoctorHomPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
@override @override
@ -40,6 +35,12 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).askDoctor, appBarTitle: TranslationBase.of(context).askDoctor,
isShowDecPage: true,
description: TranslationBase.of(context).infoAskDoc,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/1.png')
],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: PreferredSize( appBar: PreferredSize(
@ -53,9 +54,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
child: BackdropFilter( child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container( child: Container(
color: Theme.of(context) color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8),
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0, height: 70.0,
), ),
), ),
@ -67,9 +66,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9),
color: Theme.of(context).dividerColor,
width: 0.9),
), ),
color: Colors.white), color: Colors.white),
child: Center( child: Center(
@ -80,22 +77,27 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Tab( Tab(
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.36, width: MediaQuery.of(context).size.width * 0.36,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).askDoctor), child: Texts(TranslationBase.of(context).askDoctor),
),
), ),
), ),
Tab(child: Container( ),
width: MediaQuery.of(context).size.width * 0.36, Tab(
child: Container(
width: MediaQuery.of(context).size.width * 0.36,
child: Center( child: Center(
child: Texts(TranslationBase.of(context).doctorResponses,textAlign: TextAlign.start,), child: Texts(
TranslationBase.of(context).doctorResponses,
textAlign: TextAlign.start,
),
), ),
),) ),
], )
],
), ),
), ),
), ),
@ -109,10 +111,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[AskDoctorPage(), DoctorResponse()],
AskDoctorPage(),
DoctorResponse()
],
), ),
) )
], ],

@ -72,6 +72,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
appBarTitle: TranslationBase.of(context).advancePayment, appBarTitle: TranslationBase.of(context).advancePayment,
description: TranslationBase.of(context).infoAdvancePayment, description: TranslationBase.of(context).infoAdvancePayment,
isBottomBar: model.isLogin ? true : false,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -24,6 +25,12 @@ class EyeMeasurementsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
description: TranslationBase.of(context).infoEye,
imagesInfo: [
ImagesInfo(
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png')
],
appBarTitle: TranslationBase.of(context).eyeMeasurements, appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(

@ -1,3 +1,4 @@
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/models/Appointments/DoctorListResponse.dart' import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'
as DoctorListResponse; as DoctorListResponse;
@ -24,21 +25,28 @@ class _MyInvoicesState extends State<MyInvoices> {
GetDentalAppointmentsResponse getDentalAppointmentsResponse; GetDentalAppointmentsResponse getDentalAppointmentsResponse;
DentalInvoiceDetailResponse dentalInvoiceDetailResponse; DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
ProjectViewModel projectViewModel;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
getDentalAppointments(); if(projectViewModel.isLogin)
getDentalAppointments();
}); });
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myInvoice, appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true, isShowDecPage: true,
imagesInfo: imagesInfo,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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';
@ -15,7 +16,11 @@ class MyTrackers extends StatelessWidget {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myTracker, appBarTitle: TranslationBase.of(context).myTracker,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: true,
description: TranslationBase.of(context).infoTrackers,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/ar/0.png')
],
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -33,8 +38,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -59,8 +63,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -90,8 +93,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
@ -24,6 +25,23 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
String email; String email;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png'));
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<ReportsMonthlyViewModel>(builder: (_, model, w) { return BaseView<ReportsMonthlyViewModel>(builder: (_, model, w) {
@ -39,6 +57,8 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports, appBarTitle: TranslationBase.of(context).monthlyReports,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMonthReport,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),

@ -1,9 +1,13 @@
import 'dart:io'; import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.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/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';
@ -19,10 +23,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false; bool hasAlreadySynced = false;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getLastPatientRecord(context); if(authenticatedUserObject.isLogin) getLastPatientRecord(context);
}); });
super.initState(); super.initState();
} }
@ -32,6 +39,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
return AppScaffold( return AppScaffold(
appBarTitle: "Sync Health Data", appBarTitle: "Sync Health Data",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true,
description: TranslationBase.of(context).infoHealthData,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png')
],
body: Container( body: Container(
child: Platform.isIOS child: Platform.isIOS
? _getAppleWatchInstructions() ? _getAppleWatchInstructions()

@ -1,19 +1,19 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; 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/vaccine_view_model.dart';
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/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:popup_box/popup_box.dart';
import '../base/base_view.dart';
import 'my_vaccines_item_screen.dart'; import 'my_vaccines_item_screen.dart';
//TODO fix by jammal we have a static data //TODO fix by jammal we have a static data
@ -28,192 +28,164 @@ class _MyVaccinesState extends State<MyVaccines> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<VaccineViewModel>( return BaseView<VaccineViewModel>(
onModelReady: (model) => model.getVaccine(), onModelReady: (model) => model.getVaccine(),
builder: (BuildContext context, VaccineViewModel model, Widget child) => builder: (BuildContext context, VaccineViewModel model, Widget child) => AppScaffold(
AppScaffold( isShowAppBar: true,
isShowAppBar: true, baseViewModel: model,
baseViewModel: model, appBarTitle: TranslationBase.of(context).myVaccines,
appBarTitle: TranslationBase.of(context).myVaccines, description: TranslationBase.of(context).infoVaccines,
body: Container( imagesInfo: [
margin: EdgeInsets.only( ImagesInfo(
left: SizeConfig.screenWidth * 0.004, imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png')
right: SizeConfig.screenWidth * 0.004, ],
top: SizeConfig.screenWidth * 0.04, body: Container(
), margin: EdgeInsets.only(
child: Column( left: SizeConfig.screenWidth * 0.004,
children: <Widget>[ right: SizeConfig.screenWidth * 0.004,
RoundedContainer( top: SizeConfig.screenWidth * 0.04,
backgroundColor: Colors.white, ),
child: ExpansionTile( child: Column(
title: Container( children: <Widget>[
height: 65.0, RoundedContainer(
child: Text('2018'), backgroundColor: Colors.white,
), child: ExpansionTile(
children: <Widget>[ title: Container(
Container( height: 65.0,
child: ListView.builder( child: Text('2018'),
scrollDirection: Axis.vertical, ),
shrinkWrap: true, children: <Widget>[
itemCount: model.vaccineList == null Container(
? 0 child: ListView.builder(
: model.vaccineList.length, scrollDirection: Axis.vertical,
itemBuilder: (BuildContext context, int index) { shrinkWrap: true,
return Column( itemCount: model.vaccineList == null ? 0 : model.vaccineList.length,
children: <Widget>[ itemBuilder: (BuildContext context, int index) {
RoundedContainer( return Column(
child: Column( children: <Widget>[
RoundedContainer(
child: Column(
children: <Widget>[
Row(
children: <Widget>[ children: <Widget>[
Row( Expanded(
children: <Widget>[ child: Column(
Expanded( children: <Widget>[
child: Column( Padding(
children: <Widget>[ padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 20.0),
Padding( child: Image.network(
padding: EdgeInsets model.vaccineList[index].doctorImageURL,
.symmetric( height: SizeConfig.imageSizeMultiplier * 23,
horizontal: width: SizeConfig.imageSizeMultiplier * 20,
20.0, fit: BoxFit.fill,
vertical: 20.0),
child: Image.network(
model
.vaccineList[
index]
.doctorImageURL,
height: SizeConfig
.imageSizeMultiplier *
23,
width: SizeConfig
.imageSizeMultiplier *
20,
fit: BoxFit.fill,
),
),
],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Text(
model
.vaccineList[
index]
.doctorTitle +
model
.vaccineList[
index]
.doctorName,
style: TextStyle(
fontWeight:
FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' +
convertDateFormat(model
.vaccineList[
index]
.invoiceDate),
style: TextStyle(
fontSize: 17.0),
),
],
), ),
), ),
flex: 5, ],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
model.vaccineList[index].doctorTitle + model.vaccineList[index].doctorName,
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' + convertDateFormat(model.vaccineList[index].invoiceDate),
style: TextStyle(fontSize: 17.0),
),
],
), ),
], ),
flex: 5,
), ),
], ],
), ),
), ],
], ),
); ),
}), ],
) );
], }),
), )
), ],
// SpaceBetweenTexts(space: 165.0), ),
],
), ),
), // SpaceBetweenTexts(space: 165.0),
bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0 ],
),
),
bottomSheet: model.state == ViewState.Busy
? Container(
height: 0,
)
: model.vaccineList.length > 0
? Container( ? Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25, height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
width: double.infinity, width: double.infinity,
// height: 80.0, child: Column(
child: Button( children: [
disabled: true, Divider(
label: TranslationBase.of(context) height: 2,
.checkVaccineAvailability, thickness: 1,
backgroundColor: Color(0xff9EA3A4), ),
onTap: () => Navigator.push( SizedBox(
context, FadePage(page: MyVaccinesItemPage())), height: 6,
),
Container(
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(context, FadePage(page: MyVaccinesItemPage())),
),
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
),
],
), ),
)
: Container(
height: 0,
), ),
if (projectViewModel.havePrivilege(27)) ),
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(
message: TranslationBase.of(context)
.emailSentSuccessfully);
},
),
),
],
),
)
: Container(height: 0,),
),
); );
} }
@ -224,13 +196,8 @@ class _MyVaccinesState extends State<MyVaccines> {
final startIndex = Date.indexOf(start); final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length); final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
int.parse(Date.substring(startIndex + start.length, endIndex))); String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString(); return newDate.toString();
} }

@ -1747,6 +1747,24 @@ class TranslationBase {
String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded => String get totalTimeNeeded =>
localizedValues["total-time-needed"][locale.languageCode]; localizedValues["total-time-needed"][locale.languageCode];
String get infoEye =>
localizedValues["info-eye"][locale.languageCode];
String get infoVaccines =>
localizedValues["info-vaccines"][locale.languageCode];
String get infoTrackers =>
localizedValues["info-trackers"][locale.languageCode];
String get infoHealthData =>
localizedValues["info-health-data"][locale.languageCode];
String get infoAskDoc =>
localizedValues["info-ask-doc"][locale.languageCode];
String get infoAutoWifi =>
localizedValues["info-auto-wifi"][locale.languageCode];
String get autoWifi =>
localizedValues["auto-wifi"][locale.languageCode];
String get childVaccineInfo =>
localizedValues["child-vaccine-info"][locale.languageCode];
String get h2oInfo =>
localizedValues["h2o-info"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -7,6 +7,7 @@ import 'package:badges/badges.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
@ -20,7 +21,6 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart'; import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart'; import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
@ -31,15 +31,15 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.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/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart'; import '../Constants.dart';
import 'app_shared_preferences.dart'; import 'app_shared_preferences.dart';
import 'app_toast.dart'; import 'app_toast.dart';
@ -240,8 +240,7 @@ class Utils {
} }
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).radiology, title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png', imagePath: 'radiology_icon.png',
@ -251,8 +250,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medicines, title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png', imagePath: 'prescription_icon.png',
@ -277,8 +275,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical, title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png', imagePath: 'active_medications.png',
@ -297,15 +294,11 @@ class Utils {
) )
: null, : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor, title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context).myDoctorSubtitle,
isEnable: projectViewModel.havePrivilege(6)),
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice, title: TranslationBase.of(context).myInvoice,
imagePath: 'Invoice.png', imagePath: 'Invoice.png',
@ -315,8 +308,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).eye, title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png', imagePath: 'eye_measurement_icon.png',
@ -347,8 +339,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval, title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png', imagePath: 'insurance_approvals_icon.png',
@ -378,8 +369,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).medical, title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png', imagePath: 'medical_reports_icon.png',
@ -389,8 +379,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).monthly, title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png', imagePath: 'monthly_reports_icon.png',
@ -400,8 +389,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).sick, title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png', imagePath: 'sick_leaves_icons.png',
@ -439,8 +427,7 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png', imagePath: 'smartwatch_icon.png',
@ -450,36 +437,34 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).askYour, title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
imagePath: 'ask_doctor_icon.png',
subTitle: TranslationBase.of(context).askYourSubtitle,
isEnable: projectViewModel.havePrivilege(28)),
)); ));
if (projectViewModel.havePrivilege(32) || true) { if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell( medical.add(InkWell(
onTap: () { onTap: () {
userData().then((userData_) { if (projectViewModel.isLogin) {
if (projectViewModel.isLogin && userData_ != null) { userData().then((userData_) {
String patientID = userData_.patientID.toString(); String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
projectViewModel projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
.platformBridge() });
.connectHMGInternetWifi(patientID) } else {
.then((value) => {GifLoaderDialogUtils.hideDialog(context)}); Navigator.push(
} else { context,
AlertDialogBox( FadePage(
context: context, page: NotAutPage(
confirmMessage: "Please login with your account first to use this feature", title: TranslationBase.of(context).autoWifi,
okText: "OK", description: TranslationBase.of(context).infoAutoWifi,
okFunction: () { infoList: [],
AlertDialogBox.closeAlertDialog(context); imagesInfo: [
}).showAlertDialog(context); ImagesInfo(
} imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
}); ],
)));
}
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).internet, title: TranslationBase.of(context).internet,
@ -517,21 +502,15 @@ class Utils {
}); });
} }
static bool route(Route route, {@required Type equalsTo}){ static bool route(Route route, {@required Type equalsTo}) {
if((route is FadePage)){ if ((route is FadePage)) {
return route.page.runtimeType == equalsTo; return route.page.runtimeType == equalsTo;
} }
return route.runtimeType == equalsTo; return route.runtimeType == equalsTo;
} }
} }
Widget applyShadow( Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {
{Color color = Colors.grey,
double shadowOpacity = 0.5,
double spreadRadius = 2,
double blurRadius = 7,
Offset offset = const Offset(2, 2),
@required Widget child}) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
@ -571,19 +550,18 @@ openAppStore({String androidPackageName, String iOSAppID}) async {
} }
} }
String labelFrom({@required String className}){ String labelFrom({@required String className}) {
RegExp exp = RegExp(r'(?<=[a-z])[A-Z]'); RegExp exp = RegExp(r'(?<=[a-z])[A-Z]');
String result = className.replaceAllMapped(exp, (m) { String result = className.replaceAllMapped(exp, (m) {
var str = m.group(0); var str = m.group(0);
if(str != null){ if (str != null) {
return ('_' + str); return ('_' + str);
} }
return ""; return "";
}); });
if(result.isEmpty) if (result.isEmpty) return className;
return className;
result = result.replaceAll("_", " "); result = result.replaceAll("_", " ");
return result; return result;

@ -15,8 +15,6 @@ import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart'; import '../../d_q_icons_icons.dart';
import 'bottom_navigation_item.dart'; import 'bottom_navigation_item.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class BottomNavBar extends StatefulWidget { class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;

@ -2,7 +2,6 @@ import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

Loading…
Cancel
Save