diff --git a/assets/images/new/Comprehensive checkup.svg b/assets/images/new/Comprehensive checkup.svg
new file mode 100644
index 00000000..b3f2feb1
--- /dev/null
+++ b/assets/images/new/Comprehensive checkup.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/new/Live Care.svg b/assets/images/new/Live Care.svg
new file mode 100644
index 00000000..b5a367d7
--- /dev/null
+++ b/assets/images/new/Live Care.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/images/new/blood donation.svg b/assets/images/new/blood donation.svg
new file mode 100644
index 00000000..95d0904f
--- /dev/null
+++ b/assets/images/new/blood donation.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/new/book appointment.svg b/assets/images/new/book appointment.svg
new file mode 100644
index 00000000..590ea8de
--- /dev/null
+++ b/assets/images/new/book appointment.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/new/child vaccines.svg b/assets/images/new/child vaccines.svg
new file mode 100644
index 00000000..d3f38a5e
--- /dev/null
+++ b/assets/images/new/child vaccines.svg
@@ -0,0 +1,89 @@
+
diff --git a/assets/images/new/covid drive thru.svg b/assets/images/new/covid drive thru.svg
new file mode 100644
index 00000000..563de151
--- /dev/null
+++ b/assets/images/new/covid drive thru.svg
@@ -0,0 +1,20 @@
+
diff --git a/assets/images/new/health calculator.svg b/assets/images/new/health calculator.svg
new file mode 100644
index 00000000..ac73e868
--- /dev/null
+++ b/assets/images/new/health calculator.svg
@@ -0,0 +1,15 @@
+
diff --git a/assets/images/new/health converter.svg b/assets/images/new/health converter.svg
new file mode 100644
index 00000000..961adc51
--- /dev/null
+++ b/assets/images/new/health converter.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/new/latest news.svg b/assets/images/new/latest news.svg
new file mode 100644
index 00000000..5b9cd805
--- /dev/null
+++ b/assets/images/new/latest news.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/new/medical file.svg b/assets/images/new/medical file.svg
new file mode 100644
index 00000000..0849b7a0
--- /dev/null
+++ b/assets/images/new/medical file.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/new/my family.svg b/assets/images/new/my family.svg
new file mode 100644
index 00000000..41d0b8a9
--- /dev/null
+++ b/assets/images/new/my family.svg
@@ -0,0 +1,47 @@
+
diff --git a/assets/images/new/parking details.svg b/assets/images/new/parking details.svg
new file mode 100644
index 00000000..dc25eb0e
--- /dev/null
+++ b/assets/images/new/parking details.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/images/new/reach us.svg b/assets/images/new/reach us.svg
new file mode 100644
index 00000000..b4634170
--- /dev/null
+++ b/assets/images/new/reach us.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/new/referral.svg b/assets/images/new/referral.svg
new file mode 100644
index 00000000..fb6b8591
--- /dev/null
+++ b/assets/images/new/referral.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/images/new/smart watch.svg b/assets/images/new/smart watch.svg
new file mode 100644
index 00000000..0667e31d
--- /dev/null
+++ b/assets/images/new/smart watch.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/images/new/todo.svg b/assets/images/new/todo.svg
new file mode 100644
index 00000000..be869c1d
--- /dev/null
+++ b/assets/images/new/todo.svg
@@ -0,0 +1,19 @@
+
diff --git a/assets/images/new/update insurance card.svg b/assets/images/new/update insurance card.svg
new file mode 100644
index 00000000..0139e27d
--- /dev/null
+++ b/assets/images/new/update insurance card.svg
@@ -0,0 +1,21 @@
+
diff --git a/assets/images/new/virtual tour.svg b/assets/images/new/virtual tour.svg
new file mode 100644
index 00000000..733f433e
--- /dev/null
+++ b/assets/images/new/virtual tour.svg
@@ -0,0 +1,9 @@
+
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index ad206724..535f69e0 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -107,10 +107,8 @@ const Map localizedValues = {
'location': {'en': 'Locations', 'ar': 'مواقعنا'},
'online': {'en': 'Online', 'ar': 'الالكتروني'},
'payment': {'en': 'Payment', 'ar': 'الدفع'},
-
'onlinePayment': {'en': 'Online', 'ar': 'الدفع'},
'onlinePaymentSubtitle': {'en': 'Payment', 'ar': 'الالكتروني'},
-
'cancel-nocaps': {'en': 'Cancel', 'ar': 'الغاء'},
'set-reminder': {'en': 'Set Reminder', 'ar': 'إضافة تذكير'},
"national-id-number": {"en": "National ID Number", "ar": "رقم الهوية الوطنية / الاقامة"},
@@ -313,7 +311,8 @@ const Map localizedValues = {
"branch": {"en": "Branch:", "ar": "الفرع"},
"emergencyServices": {"en": "Emergency Services", "ar": "خدمات الطوارئ"},
"nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
- "locationa": {"en": "location", "ar": "الموقع"},
+ "locationa": {"en": "Location", "ar": "الموقع"},
+ "call_now": {"en": "Call now", "ar": "اتصل الان"},
"ambulancerequest": {"en": "Ambulance", "ar": "طلب نقل "},
"requestA": {"en": "Request", "ar": "اسعاف"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
@@ -410,6 +409,8 @@ const Map localizedValues = {
"SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"},
"SelectHospital": {"en": "Select Hospital", "ar": "اختر المستشفى"},
"selectCity": {"en": "Select City", "ar": "اختر المدينة"},
+ "city": {"en": "City", "ar": "مدينة"},
+ "distance": {"en": "Distance", "ar": "مسافه"},
"MyAccount": {"en": "My Account", "ar": "حسابي"},
"OtherAccount": {"en": "Other Account", "ar": "حساب آخر"},
"SelectBeneficiary": {"en": "Select Beneficiary", "ar": "حدد المستفيد"},
@@ -420,6 +421,7 @@ const Map localizedValues = {
"country": {"en": "Country", "ar": "دولة"},
"Ok": {"en": "Ok", "ar": "موافق"},
"averageWaitingTime": {"en": "Average Waiting Time:", "ar": "متوسط وقت الانتظار:"},
+ "waitingTime": {"en": "Waiting Time:", "ar": "وقت الانتظار:"},
"WaterConsumedInWeek": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"},
"WaterConsumedInMonth": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"},
"TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires in", "ar": "تنتهي صلاحية رمز التحقق في"},
@@ -1516,11 +1518,11 @@ const Map localizedValues = {
"modesBelow": {"en": "Please select the modes below:", "ar": ":الرجاء تحديد الأوضاع أدناه"},
"prefferedMode": {"en": "Please select the preferred mode below:", "ar": ":الرجاء تحديد الوضع المفضل أدناه"},
"permissionsBellow": {"en": "Please allow the permissions below:", "ar": ":الرجاء السماح الأذونات أدناه"},
- "appointmentReminder": { "en": "Would you like to set a reminder for this appointment in your calendar?", "ar": "هل ترغب في اضافة تذكير لهذا الموعد في التقويم؟" },
- "cancelAppointment": { "en": "Cancel Appt.", "ar": "الغاء الموعد" },
+ "appointmentReminder": {"en": "Would you like to set a reminder for this appointment in your calendar?", "ar": "هل ترغب في اضافة تذكير لهذا الموعد في التقويم؟"},
+ "cancelAppointment": {"en": "Cancel Appt.", "ar": "الغاء الموعد"},
"updateInsurCards": {"en": "Update Insurance Cards", "ar": "تحديث بطاقات التأمين"},
"patientAge": {"en": "y", "ar": "سنة"},
- "searchCriteria": { "en": "Select Search Criteria", "ar": "حدد معايير البحث" },
+ "searchCriteria": {"en": "Select Search Criteria", "ar": "حدد معايير البحث"},
"RequesterInfo": {"en": "Requester Info", "ar": "معلومات مقدم الطلب"},
"PatientInfo": {"en": "Patient Info", "ar": "معلومات المريض"},
"OtherInfo": {"en": "Other Info", "ar": "معلومات اخرى"},
@@ -1533,4 +1535,24 @@ const Map localizedValues = {
"ereferralTitle": {"en": "E-Referral", "ar": "خدمة"},
"ereferralSubtitle": {"en": "Service", "ar": "الإحالة الإلكترونية"},
"medicalFileTitle": {"en": "Medical File", 'ar': 'الملف الطبي'},
+ "My_File_Details": {"en": "My File Details", "ar": "تفاصيل ملفي"},
+ "Ecommerce": {"en": "Ecommerce", "ar": "التجارة الإلكترونية"},
+ "Family_Files": {"en": "Family Files", "ar": "ملفات العائلة"},
+ "My_Child": {"en": "My Child", "ar": "طفلي"},
+ "Vaccines": {"en": "Vaccines", "ar": "اللقاحات"},
+ "Todo": {"en": "Todo", "ar": "لكى يفعل"},
+ "List": {"en": "List", "ar": "قائمة"},
+ "Blood": {"en": "Blood", "ar": "دم"},
+ "Donation": {"en": "Donation", "ar": "هبة"},
+ "Health": {"en": "Health", "ar": "الصحة"},
+ "Calculator": {"en": "Calculator", "ar": "آلة حاسبة"},
+ "Converter": {"en": "Converter", "ar": "محول"},
+ "Smart": {"en": "Smart", "ar": "ذكي"},
+ "Watches": {"en": "Watches", "ar": "ساعات"},
+ "Parking": {"en": "Parking", "ar": "موقف سيارات"},
+ "Details": {"en": "Details", "ar": "تفاصيل"},
+ "Virtual": {"en": "Virtual", "ar": "افتراضية"},
+ "News": {"en": "News", "ar": "أخبار"},
+ "Latest": {"en": "Latest", "ar": "أحدث"},
+ "Tour": {"en": "Tour", "ar": "رحلة"},
};
diff --git a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart
index 78b5455d..c7a4ccb6 100644
--- a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart
+++ b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart
@@ -12,6 +12,8 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
@@ -217,9 +219,9 @@ class _SearchForReferralsPageState extends State {
style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)),
Container(
margin: EdgeInsets.only(top: 5.0),
- child: myRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName, projectViewModel.isArabic)),
- myRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName, projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).referralDate + ": ",
+ child: MyRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName, projectViewModel.isArabic)),
+ MyRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName, projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).referralDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate)), projectViewModel.isArabic),
],
),
diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart
new file mode 100644
index 00000000..8feef0f5
--- /dev/null
+++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart
@@ -0,0 +1,251 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/service/weather_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
+import 'package:diplomaticquarterapp/models/hmg_services.dart';
+import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart';
+import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
+import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
+import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:flutter/material.dart';
+import 'package:geolocator/geolocator.dart';
+import 'package:provider/provider.dart';
+
+import 'health-weather/health-weather-indicator.dart';
+
+class AllHabibMedicalSevicePage2 extends StatefulWidget {
+ @override
+ _AllHabibMedicalSevicePage2State createState() => _AllHabibMedicalSevicePage2State();
+}
+
+class _AllHabibMedicalSevicePage2State extends State {
+ List hmgServices = [];
+ LocationUtils locationUtils;
+ var weather = '--';
+ AppSharedPreferences sharedPref = AppSharedPreferences();
+ AuthenticatedUser authUser = new AuthenticatedUser();
+ AuthProvider authProvider = new AuthProvider();
+ WeatherService _weatherService = WeatherService();
+ double weatherNum = 30;
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
+ locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
+ WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
+ });
+ // getPatientAppointmentHistory1();
+ // getFamilyFiles();
+ }
+
+ initialiseHmgServices(bool isLogin) {
+ hmgServices.clear();
+
+ hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
+ hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
+ hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
+ hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
+ hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
+ hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services2, "assets/images/new/emergency.svg", isLogin));
+ hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin));
+ hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
+ hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin));
+
+ hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFile, TranslationBase.of(context).My_File_Details, "assets/images/new/medical file.svg", isLogin));
+ hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointment, "assets/images/new/book appointment.svg", isLogin));
+ hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacy, TranslationBase.of(context).Ecommerce, "assets/images/new/Pharmacy.svg", isLogin));
+ hmgServices.add(new HmgServices(12, TranslationBase.of(context).update, TranslationBase.of(context).insuranceCards, "assets/images/new/update insurance card.svg", isLogin));
+ hmgServices.add(new HmgServices(13, TranslationBase.of(context).myFamily, TranslationBase.of(context).Family_Files, "assets/images/new/my family.svg", isLogin));
+ hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin));
+ hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin));
+ hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin));
+ hmgServices.add(new HmgServices(17, TranslationBase.of(context).Health, TranslationBase.of(context).Calculator, "assets/images/new/health calculator.svg", isLogin));
+ hmgServices.add(new HmgServices(18, TranslationBase.of(context).Health, TranslationBase.of(context).Converter, "assets/images/new/health converter.svg", isLogin));
+ hmgServices.add(new HmgServices(19, TranslationBase.of(context).Smart, TranslationBase.of(context).Watches, "assets/images/new/smart watch.svg", isLogin));
+ hmgServices.add(new HmgServices(20, TranslationBase.of(context).Parking, TranslationBase.of(context).Details, "assets/images/new/parking details.svg", isLogin));
+ hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin));
+ hmgServices.add(new HmgServices(22, TranslationBase.of(context).News, TranslationBase.of(context).Latest, "assets/images/new/latest news.svg", isLogin));
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
+ initialiseHmgServices(false);
+ return AppScaffold(
+ isShowAppBar: true,
+ isShowDecPage: false,
+ showNewAppBar: true,
+ showNewAppBarTitle: true,
+ appBarTitle: TranslationBase.of(context).alhabiServices,
+ body: Container(
+ width: double.infinity,
+ height: double.infinity,
+ child: SingleChildScrollView(
+ child: Column(
+ children: [
+ AspectRatio(
+ aspectRatio: 1.8,
+ child: Container(
+ width: double.infinity,
+ height: double.infinity,
+ decoration: containerRadiusWithGradient(0,
+ color1: timeCalculator(6, 0, 10, 59)
+ ? Color(0xFFB3E3FE)
+ : timeCalculator(11, 0, 15, 59)
+ ? Color(0xFFFF9E7E)
+ : Color(0xFF2E6686),
+ color2: timeCalculator(6, 0, 10, 59)
+ ? Color(0xFF9AC7FF)
+ : timeCalculator(11, 0, 15, 59)
+ ? Color(0xFFFECB50)
+ : Color(0xFF122F48)),
+ child: Padding(
+ padding: const EdgeInsets.all(30.0),
+ child: Stack(
+ alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight,
+ children: [
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ weather,
+ style: TextStyle(
+ fontSize: 30,
+ letterSpacing: -0.83,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),
+ ),
+ Text(
+ DateUtil.formatDateToDate(new DateTime.now(), false),
+ style: TextStyle(
+ fontSize: 10,
+ letterSpacing: -0.60,
+ fontWeight: FontWeight.w600,
+ color: Colors.white,
+ ),
+ ),
+ mFlex(1),
+ Text(
+ TranslationBase.of(context).healthWeatherIndicators,
+ style: TextStyle(
+ fontSize: 16,
+ letterSpacing: -0.96,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),
+ ),
+ Text(
+ TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
+ style: TextStyle(
+ fontSize: 12,
+ letterSpacing: -0.72,
+ fontWeight: FontWeight.w600,
+ color: Colors.white,
+ ),
+ ),
+ InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: HealthWeatherIndicator(),
+ ),
+ );
+ },
+ child: Padding(
+ padding: const EdgeInsets.only(top: 8, bottom: 8),
+ child: Text(
+ TranslationBase.of(context).moreDetails,
+ style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline),
+ ),
+ ),
+ )
+ ],
+ ),
+ Image.asset(
+ "assets/images/Weather_ico.png",
+ color: Colors.white.withOpacity(0.5),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ mHeight(16),
+ Padding(
+ padding: const EdgeInsets.only(
+ left: 16,
+ right: 16,
+ top: 0,
+ ),
+ child: GridView.builder(
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
+ physics: NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ itemCount: hmgServices.length,
+ padding: EdgeInsets.zero,
+ itemBuilder: (BuildContext context, int index) {
+ return ServicesView(hmgServices[index], index);
+ },
+ ),
+ ),
+ mHeight(16),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+ bool timeCalculator(int startHour, int startMint, int endHour, int endMint) {
+ DateTime now = DateTime.now();
+ DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour);
+ DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint);
+ print(startDate.toString());
+ print(endDate.toString());
+ print(now);
+ print("------------");
+ if (startDate.isBefore(now) && endDate.isAfter(now))
+ return true;
+ else
+ return false;
+ }
+
+ void setLocation(Position position) {
+ this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0);
+ this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0);
+ getAuthUser();
+ }
+
+ getAuthUser() async {
+ if (await this.sharedPref.getObject(USER_PROFILE) != null) {
+ var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
+ setState(() {
+ authUser = data;
+ });
+ }
+ var data = await this.sharedPref.getObject(WEATHER);
+ if (data == null) {
+ var d = await _weatherService.getWeatherData();
+
+ print(d);
+ weatherNum = d.temperature;
+ setState(() {
+ weather = d != null ? d.temperature.toString() + '\u2103' : '--';
+ });
+ } else {
+ setState(() {
+ weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
+ });
+ }
+ }
+}
diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart
index a73759b1..794ece31 100644
--- a/lib/pages/BookAppointment/widgets/DoctorView.dart
+++ b/lib/pages/BookAppointment/widgets/DoctorView.dart
@@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -73,8 +74,8 @@ class DoctorView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
- if (doctor.clinicName != null) myRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName, projectViewModel.isArabic),
- if (doctor.projectName != null) myRichText(TranslationBase.of(context).branch, doctor.projectName, projectViewModel.isArabic),
+ if (doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName, projectViewModel.isArabic),
+ if (doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, doctor.projectName, projectViewModel.isArabic),
if (doctor.speciality != null)
Text(
getDoctorSpeciality(this.doctor.speciality).trim(),
@@ -99,11 +100,12 @@ class DoctorView extends StatelessWidget {
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
- if (isShowFlag) Icon(
- Icons.arrow_forward,
- color: Theme.of(context).primaryColor,
- ),
- // if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0)
+ if (isShowFlag)
+ Icon(
+ Icons.arrow_forward,
+ color: Theme.of(context).primaryColor,
+ ),
+ // if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0)
],
),
],
diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart
index 280c958b..87516e52 100644
--- a/lib/pages/ContactUs/findus/hospitrals_page.dart
+++ b/lib/pages/ContactUs/findus/hospitrals_page.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/hospital_location.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
@@ -28,102 +29,7 @@ class _HospitalsPageState extends State {
shrinkWrap: true,
padding: EdgeInsets.zero,
separatorBuilder: (context, index) => SizedBox(height: 14),
- itemBuilder: (context, index) {
- GetHMGLocationsModel _location = widget.findusHospitalModelList[index];
- return Container(
- padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- boxShadow: [
- BoxShadow(
- color: Color(0xff000000).withOpacity(.05),
- //spreadRadius: 5,
- blurRadius: 27,
- offset: Offset(0, -3),
- ),
- ],
- color: Colors.white),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- InkWell(
- onTap: () {
- showDialog(
- context: context,
- builder: (_) => AssetGiffyDialog(
- title: Text(
- _location.locationName,
- style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
- ),
- image: Image.network(
- _location.projectImageURL.toString(),
- fit: BoxFit.cover,
- ),
- buttonCancelText: Text(TranslationBase.of(context).cancel),
- buttonCancelColor: Colors.grey,
- onlyCancelButton: true,
- ),
- );
- },
- child: ClipRRect(
- borderRadius: BorderRadius.circular(12),
- child: Image.network(
- _location.projectImageURL.toString(),
- width: 48,
- height: 48,
- fit: BoxFit.cover,
- ),
- ),
- ),
- Expanded(
- child: Padding(
- padding: EdgeInsets.only(left: 12, right: 12),
- child: Text(
- _location.locationName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.56,
- ),
- ),
- ),
- ), //model.cOCItemList[index].cOCTitl
- IconButton(
- icon: Icon(
- Icons.location_on,
- color: Color(0xff2B353E),
- ),
- constraints: BoxConstraints(),
- padding: EdgeInsets.all(8),
- tooltip: '',
- onPressed: () {
- setState(() {
- MapsLauncher.launchCoordinates(double.parse(_location.latitude), double.parse(_location.longitude), _location.locationName);
- });
- },
- ),
- IconButton(
- icon: Icon(
- Icons.phone,
- color: Color(0xff2B353E),
- ),
- constraints: BoxConstraints(),
- padding: EdgeInsets.all(8),
- tooltip: '',
- onPressed: () {
- setState(() {
- launch("tel://" + _location.phoneNumber);
- });
- },
- ),
- ],
- ),
- );
- },
+ itemBuilder: (context, index) => HospitalLocation(widget.findusHospitalModelList[index]),
itemCount: widget.findusHospitalModelList.length,
),
Container(
diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart
index 8bc8053d..72b2316c 100644
--- a/lib/pages/ContactUs/findus/pharmacies_page.dart
+++ b/lib/pages/ContactUs/findus/pharmacies_page.dart
@@ -1,9 +1,7 @@
import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
-import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/hospital_location.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:giffy_dialog/giffy_dialog.dart';
-import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
class PharmaciesPage extends StatefulWidget {
@@ -28,128 +26,7 @@ class _PharmaciesPageState extends State {
shrinkWrap: true,
padding: EdgeInsets.zero,
separatorBuilder: (context, index) => SizedBox(height: 14),
- itemBuilder: (context, index) {
- GetHMGLocationsModel _location = widget.findusPharmaciesModelList[index];
- return Container(
- padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- boxShadow: [
- BoxShadow(
- color: Color(0xff000000).withOpacity(.05),
- //spreadRadius: 5,
- blurRadius: 27,
- offset: Offset(0, -3),
- ),
- ],
- color: Colors.white),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- InkWell(
- onTap: () {
- showDialog(
- context: context,
- builder: (_) => AssetGiffyDialog(
- title: Text(
- _location.locationName,
- style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
- ),
- image: _location.projectImageURL != null
- ? Image.network(
- _location.projectImageURL,
- fit: BoxFit.cover,
- )
- : Image.network(
- 'https://hmgwebservices.com/Images/Hospitals/15.jpg',
- fit: BoxFit.cover,
- ),
- buttonCancelText: Text(TranslationBase.of(context).cancel),
- // buttonCancelText:Text(model.user.projectID) ,
- buttonCancelColor: Colors.grey,
- onlyCancelButton: true,
- ),
- );
- },
- child: ClipRRect(
- borderRadius: BorderRadius.circular(12),
- child: Image.network(
- _location?.projectImageURL?.toString() ?? 'https://hmgwebservices.com/Images/Hospitals/15.jpg',
- width: 48,
- height: 48,
- fit: BoxFit.cover,
- ),
- ),
- ),
- Expanded(
- child: Padding(
- padding: EdgeInsets.only(left: 12, right: 12),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- _location.locationName?.trim() ?? "",
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.56,
- ),
- ),
- SizedBox(
- height: 2,
- ),
- Text(
- _location.cityName?.trim().toString() + "\n" + _location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.56,
- ),
- ),
- SizedBox(
- height: 2,
- ),
- ],
- ),
- ),
- ),
- IconButton(
- icon: Icon(
- Icons.location_on,
- color: Color(0xff2B353E),
- ),
- constraints: BoxConstraints(),
- padding: EdgeInsets.all(8),
- tooltip: '',
- onPressed: () {
- setState(() {
- MapsLauncher.launchCoordinates(double.parse(_location.latitude), double.parse(_location.longitude), _location.locationName);
- });
- },
- ),
- IconButton(
- icon: Icon(
- Icons.phone,
- color: Color(0xff2B353E),
- ),
- constraints: BoxConstraints(),
- padding: EdgeInsets.all(8),
- tooltip: '',
- onPressed: () {
- setState(() {
- launch("tel://" + _location.phoneNumber);
- });
- },
- ),
- ],
- ),
- );
- },
+ itemBuilder: (context, index) => HospitalLocation(widget.findusPharmaciesModelList[index], showCity: true),
itemCount: widget.findusPharmaciesModelList.length,
),
Container(
diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart
index 46a545a6..6a4eb87e 100644
--- a/lib/pages/feedback/status_feedback_page.dart
+++ b/lib/pages/feedback/status_feedback_page.dart
@@ -5,13 +5,12 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
-import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@@ -217,7 +216,7 @@ class _StatusFeedbackPageState extends State {
margin: EdgeInsets.only(top: 5.0),
child: Text(cOCItemList[index].formType.toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))),
- myRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic),
+ MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic),
Text(cOCItemList[index].cOCTitle,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)),
],
diff --git a/lib/pages/insurance/insurance_approval_detail_screen.dart b/lib/pages/insurance/insurance_approval_detail_screen.dart
index a1be5cf8..fa6d0f5a 100644
--- a/lib/pages/insurance/insurance_approval_detail_screen.dart
+++ b/lib/pages/insurance/insurance_approval_detail_screen.dart
@@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -12,6 +12,7 @@ import 'package:provider/provider.dart';
class InsuranceApprovalDetail extends StatelessWidget {
final InsuranceApprovalModel insuranceApprovalModel;
+
InsuranceApprovalDetail({Key key, this.insuranceApprovalModel}) : super(key: key);
@override
@@ -71,15 +72,15 @@ class InsuranceApprovalDetail extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- myRichText(TranslationBase.of(context).clinic + ":", insuranceApprovalModel?.clinicName ?? "", projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).approvalNo, insuranceApprovalModel?.approvalNo.toString() ?? "", projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).clinic + ":", insuranceApprovalModel?.clinicName ?? "", projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).approvalNo, insuranceApprovalModel?.approvalNo.toString() ?? "", projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic),
SizedBox(height: 6),
- myRichText(TranslationBase.of(context).receiptOn,
- DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateTime(insuranceApprovalModel.receiptOn)) ?? "", projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).expiryOn,
- DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateTime(insuranceApprovalModel.expiryDate)) ?? "", projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).receiptOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateTime(insuranceApprovalModel.receiptOn)) ?? "",
+ projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).expiryOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateTime(insuranceApprovalModel.expiryDate)) ?? "",
+ projectViewModel.isArabic),
],
),
),
diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart
index 51422bcd..52ce35c8 100644
--- a/lib/pages/insurance/insurance_approval_screen.dart
+++ b/lib/pages/insurance/insurance_approval_screen.dart
@@ -2,12 +2,11 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
-import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@@ -47,126 +46,128 @@ class _InsuranceApprovalState extends State {
description: TranslationBase.of(context).infoApprovals,
infoList: TranslationBase.of(context).infoApprovalPoints,
imagesInfo: imagesInfo,
- body: model.insuranceApproval.length > 0 ? ListView.separated(
- padding: EdgeInsets.all(21),
- physics: BouncingScrollPhysics(),
- itemBuilder: (_, index) {
- Color _patientStatusColor;
- String _patientStatusString;
+ body: model.insuranceApproval.length > 0
+ ? ListView.separated(
+ padding: EdgeInsets.all(21),
+ physics: BouncingScrollPhysics(),
+ itemBuilder: (_, index) {
+ Color _patientStatusColor;
+ String _patientStatusString;
- if (model.insuranceApproval[index].isLiveCareAppointment) {
- _patientStatusColor = Color(0xff2E303A);
- _patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach;
- } else if (!model.insuranceApproval[index].isInOutPatient) {
- _patientStatusColor = Color(0xffD02127);
- _patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach;
- } else {
- _patientStatusString = TranslationBase.of(context).outpatient.capitalizeFirstofEach;
- _patientStatusColor = Color(0xffa9a089);
- }
- return InkWell(
- onTap: () {
- Navigator.push(context, FadePage(page: InsuranceApprovalDetail(insuranceApprovalModel: model.insuranceApproval[index])));
- },
- child: Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- boxShadow: [
- BoxShadow(
- color: Color(0xff000000).withOpacity(.05),
- //spreadRadius: 5,
- blurRadius: 27,
- offset: Offset(0, -3),
- ),
- ],
- color: _patientStatusColor),
- child: Row(
- children: [
- SizedBox(
- width: 16,
- child: RotatedBox(
- quarterTurns: 3,
- child: Text(
- _patientStatusString,
- style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.white, letterSpacing: -0.2, height: 16 / 10),
+ if (model.insuranceApproval[index].isLiveCareAppointment) {
+ _patientStatusColor = Color(0xff2E303A);
+ _patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach;
+ } else if (!model.insuranceApproval[index].isInOutPatient) {
+ _patientStatusColor = Color(0xffD02127);
+ _patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach;
+ } else {
+ _patientStatusString = TranslationBase.of(context).outpatient.capitalizeFirstofEach;
+ _patientStatusColor = Color(0xffa9a089);
+ }
+ return InkWell(
+ onTap: () {
+ Navigator.push(context, FadePage(page: InsuranceApprovalDetail(insuranceApprovalModel: model.insuranceApproval[index])));
+ },
+ child: Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.all(
+ Radius.circular(10.0),
),
- ),
- ),
- Expanded(
- child: Container(
- padding: EdgeInsets.fromLTRB(12, 10, 12, 10),
- decoration: BoxDecoration(
- border: Border.all(color: Colors.white, width: 1),
- borderRadius: BorderRadius.only(
- bottomRight: Radius.circular(10.0),
- topRight: Radius.circular(10.0),
+ boxShadow: [
+ BoxShadow(
+ color: Color(0xff000000).withOpacity(.05),
+ //spreadRadius: 5,
+ blurRadius: 27,
+ offset: Offset(0, -3),
+ ),
+ ],
+ color: _patientStatusColor),
+ child: Row(
+ children: [
+ SizedBox(
+ width: 16,
+ child: RotatedBox(
+ quarterTurns: 3,
+ child: Text(
+ _patientStatusString,
+ style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.white, letterSpacing: -0.2, height: 16 / 10),
),
- color: Colors.white),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- model.insuranceApproval[index].approvalStatusDescption,
- style: TextStyle(
- fontSize: 12,
- fontWeight: FontWeight.w600,
- color: model.insuranceApproval[index].status == 9 ? Color(0xff359846) : Color(0xffD02127),
- letterSpacing: -0.4,
- height: 18 / 10),
- ),
- Text(
- model.insuranceApproval[index].doctorName,
- style: TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.64,
- ),
- ),
- SizedBox(height: 6),
- Row(
- children: [
- LargeAvatar(
- name: model.insuranceApproval[index].doctorName,
- url: model.insuranceApproval[index].doctorImageURL,
- width: 48,
- height: 48,
+ ),
+ ),
+ Expanded(
+ child: Container(
+ padding: EdgeInsets.fromLTRB(12, 10, 12, 10),
+ decoration: BoxDecoration(
+ border: Border.all(color: Colors.white, width: 1),
+ borderRadius: BorderRadius.only(
+ bottomRight: Radius.circular(10.0),
+ topRight: Radius.circular(10.0),
),
- SizedBox(width: 12),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- myRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index]?.clinicName.toLowerCase().capitalizeFirstofEach ?? "",
- projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index]?.approvalNo.toString() ?? "", projectViewModel.isArabic),
- ],
- ),
+ color: Colors.white),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ model.insuranceApproval[index].approvalStatusDescption,
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ color: model.insuranceApproval[index].status == 9 ? Color(0xff359846) : Color(0xffD02127),
+ letterSpacing: -0.4,
+ height: 18 / 10),
),
- Container(
- height: 48,
- alignment: Alignment.bottomRight,
- child: Icon(
- Icons.arrow_forward,
+ Text(
+ model.insuranceApproval[index].doctorName,
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
+ letterSpacing: -0.64,
),
+ ),
+ SizedBox(height: 6),
+ Row(
+ children: [
+ LargeAvatar(
+ name: model.insuranceApproval[index].doctorName,
+ url: model.insuranceApproval[index].doctorImageURL,
+ width: 48,
+ height: 48,
+ ),
+ SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ MyRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index]?.clinicName.toLowerCase().capitalizeFirstofEach ?? "",
+ projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index]?.approvalNo.toString() ?? "", projectViewModel.isArabic),
+ ],
+ ),
+ ),
+ Container(
+ height: 48,
+ alignment: Alignment.bottomRight,
+ child: Icon(
+ Icons.arrow_forward,
+ color: Color(0xff2E303A),
+ ),
+ )
+ ],
)
],
- )
- ],
+ ),
+ ),
),
- ),
+ ],
),
- ],
- ),
- ),
- );
- },
- separatorBuilder: (context, index) => SizedBox(height: 12),
- itemCount: model.insuranceApproval.length) : getNoDataWidget(context)),
+ ),
+ );
+ },
+ separatorBuilder: (context, index) => SizedBox(height: 12),
+ itemCount: model.insuranceApproval.length)
+ : getNoDataWidget(context)),
);
}
diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart
index 88b77f70..0d9019b7 100644
--- a/lib/pages/landing/fragments/home_page_fragment2.dart
+++ b/lib/pages/landing/fragments/home_page_fragment2.dart
@@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/models/gradient_color.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/models/slider_data.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart';
import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart';
@@ -235,7 +236,7 @@ class _HomePageFragment2State extends State {
),
FlatButton(
onPressed: () {
- Navigator.push(context, FadePage(page: AllHabibMedicalService()));
+ Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2()));
},
child: Text(
TranslationBase.of(context).viewAllServices,
diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart
index e083448c..f6be4937 100644
--- a/lib/pages/landing/widgets/services_view.dart
+++ b/lib/pages/landing/widgets/services_view.dart
@@ -1,24 +1,47 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
+import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
+import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.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/h2o/h2o_page.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart';
+import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
+import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
+import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
+import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_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/ErService/ErOptions.dart';
+import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
+import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
+import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
+import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import '../../../locator.dart';
+import '../landing_page.dart';
+import '../landing_page_pharmcy.dart';
class ServicesView extends StatelessWidget {
HmgServices hmgServices;
int index;
+ AuthenticatedUser authUser = new AuthenticatedUser();
+ AuthProvider authProvider = new AuthProvider();
+ PharmacyModuleViewModel pharmacyModuleViewModel = locator();
ServicesView(this.hmgServices, this.index);
@@ -46,6 +69,83 @@ class ServicesView extends StatelessWidget {
Navigator.push(context, FadePage(page: H2OPage()));
} else if (index == 8) {
Navigator.push(context, FadePage(page: ContactUsPage()));
+ } else if (index == 9) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: MedicalProfilePageNew(),
+ ),
+ );
+ } else if (index == 10) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: Search(),
+ ),
+ );
+ } else if (index == 11) {
+ getPharmacyToken(context);
+ } else if (index == 12) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: InsuranceUpdate(),
+ ),
+ );
+ } else if (index == 13) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: MyFamily(),
+ ),
+ );
+ } else if (index == 14) {
+ Navigator.push(
+ context,
+ FadePage(page: ChildVaccinesPage()),
+ );
+ } else if (index == 15) {
+ Navigator.pop(context);
+ LandingPage.shared.switchToDoFromHMGServices();
+ } else if (index == 16) {
+ Navigator.push(
+ context,
+ FadePage(page: BloodDonationPage()),
+ );
+ } else if (index == 17) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: (HealthCalculators()),
+ ),
+ );
+ } else if (index == 18) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: HealthConverter(),
+ ),
+ );
+ } else if (index == 19) {
+ Navigator.push(
+ context,
+ FadePage(page: SmartWatchInstructions()),
+ );
+ } else if (index == 20) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: ParkingPage(),
+ ),
+ );
+ } else if (index == 21) {
+ launch("https://hmgwebservices.com/vt_mobile/html/index.html");
+ } else if (index == 22) {
+ Navigator.of(context).push(MaterialPageRoute(
+ builder: (BuildContext context) => MyWebView(
+ title: "HMG News",
+ selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
+ ),),);
}
},
child: Container(
@@ -147,4 +247,23 @@ class ServicesView extends StatelessWidget {
),
);
}
+
+ getPharmacyToken(BuildContext context) async {
+ if (!authProvider.isLogin) {
+ Navigator.push(context, FadePage(page: LandingPagePharmacy()));
+ } else {
+ GifLoaderDialogUtils.showMyDialog(context);
+ await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
+ if (pharmacyModuleViewModel.error.isNotEmpty) {
+ await pharmacyModuleViewModel.createUser().then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ Navigator.push(context, FadePage(page: LandingPagePharmacy()));
+ });
+ } else {
+ GifLoaderDialogUtils.hideDialog(context);
+ Navigator.push(context, FadePage(page: LandingPagePharmacy()));
+ }
+ });
+ }
+ }
}
diff --git a/lib/pages/medical/my_invoices/invoice_detail_page.dart b/lib/pages/medical/my_invoices/invoice_detail_page.dart
index 9a6a9b03..f51d02e6 100644
--- a/lib/pages/medical/my_invoices/invoice_detail_page.dart
+++ b/lib/pages/medical/my_invoices/invoice_detail_page.dart
@@ -10,7 +10,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@@ -113,13 +113,13 @@ class _InvoiceDetailState extends State {
margin: EdgeInsets.only(bottom: 10.0),
child: Text(TranslationBase.of(context).cardDetail, style: TextStyle(color: Colors.black, letterSpacing: -0.64, fontSize: 18.0, fontWeight: FontWeight.bold)),
),
- myRichText(
+ MyRichText(
TranslationBase.of(context).insuranceCompany + ": ",
projectViewModel.isArabic
? widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].groupNameN
: widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].companyName,
projectViewModel.isArabic),
- myRichText(
+ MyRichText(
TranslationBase.of(context).insuranceID + ": ",
widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID != null ? widget.dentalInvoiceDetailResponse.listEInvoiceForDental[0].insuranceID : "N/A",
projectViewModel.isArabic),
diff --git a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart
index c88283be..b12cc386 100644
--- a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart
+++ b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart
@@ -1,14 +1,13 @@
+import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/hospital_location.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:giffy_dialog/giffy_dialog.dart';
-import 'package:maps_launcher/maps_launcher.dart';
-import 'package:url_launcher/url_launcher.dart';
class PharmacyForPrescriptionsPage extends StatelessWidget {
final itemID;
@@ -28,211 +27,63 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
baseViewModel: model,
body: Column(
children: [
- Container(
- width: double.infinity,
- margin: EdgeInsets.only(top: 10, left: 10, right: 10),
- padding: EdgeInsets.all(8.0),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- border: Border.all(color: Colors.grey[200], width: 0.5),
- ),
- child: Row(
- children: [
- ClipRRect(
- borderRadius: BorderRadius.all(Radius.circular(5)),
- child: Image.network(
- prescriptionReport.imageSRCUrl,
- fit: BoxFit.cover,
- width: 60,
- height: 70,
+ Padding(
+ padding: const EdgeInsets.fromLTRB(21, 21, 21, 0),
+ child: Container(
+ width: double.infinity,
+ padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.all(
+ Radius.circular(10.0),
),
- ),
- Expanded(
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Center(
- child: Texts(prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? ''),
+ boxShadow: [
+ BoxShadow(
+ color: Color(0xff000000).withOpacity(.05),
+ //spreadRadius: 5,
+ blurRadius: 27,
+ offset: Offset(0, -3),
+ ),
+ ],
+ color: Colors.white),
+ child: Row(
+ children: [
+ ClipRRect(
+ borderRadius: BorderRadius.all(Radius.circular(5)),
+ child: Image.network(
+ prescriptionReport.imageSRCUrl,
+ fit: BoxFit.cover,
+ width: 60,
+ height: 70,
),
),
- )
- ],
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Center(
+ child: Texts(prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? ''),
+ ),
+ ),
+ )
+ ],
+ ),
),
),
model.pharmacyPrescriptionsList.isNotEmpty == true
? Expanded(
child: ListView.builder(
scrollDirection: Axis.vertical,
+ padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
- itemBuilder: (context, index) => Container(
- margin: EdgeInsets.all(12.0),
- padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- boxShadow: [
- BoxShadow(
- color: Color(0xff000000).withOpacity(.05),
- //spreadRadius: 5,
- blurRadius: 27,
- offset: Offset(0, -3),
- ),
- ],
- color: Colors.white),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- InkWell(
- onTap: () {
- showDialog(
- context: context,
- builder: (_) => AssetGiffyDialog(
- title: Text(
- model.pharmacyPrescriptionsList[index].locationDescription,
- style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
- ),
- image: Image.network(
- model.pharmacyPrescriptionsList[index].projectImageURL.toString(),
- fit: BoxFit.cover,
- ),
- buttonCancelText: Text(TranslationBase.of(context).cancel),
- buttonCancelColor: Colors.grey,
- onlyCancelButton: true,
- ),
- );
- },
- child: ClipRRect(
- borderRadius: BorderRadius.circular(12),
- child: Image.network(
- model.pharmacyPrescriptionsList[index].projectImageURL.toString(),
- width: 48,
- height: 48,
- fit: BoxFit.cover,
- ),
- ),
- ),
- Expanded(
- child: Padding(
- padding: EdgeInsets.only(left: 12, right: 12),
- child: Text(
- model.pharmacyPrescriptionsList[index].locationDescription?.trim().toString() +
- "\n" +
- model.pharmacyPrescriptionsList[index].cityName.trim().toString() +
- "\n" +
- model.pharmacyPrescriptionsList[index].distanceInKilometers.toString() +
- " " +
- TranslationBase.of(context).km_ ??
- "",
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.56,
- ),
- ),
- ),
- ), //model.cOCItemList[index].cOCTitl
- IconButton(
- icon: Icon(
- Icons.location_on,
- color: Color(0xff2B353E),
- ),
- constraints: BoxConstraints(),
- padding: EdgeInsets.all(8),
- tooltip: '',
- onPressed: () {
- // setState(() {
- MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude),
- model.pharmacyPrescriptionsList[index].locationDescription);
- // });
- },
- ),
- IconButton(
- icon: Icon(
- Icons.phone,
- color: Color(0xff2B353E),
- ),
- constraints: BoxConstraints(),
- padding: EdgeInsets.all(8),
- tooltip: '',
- onPressed: () {
- // setState(() {
- launch("tel://" + model.pharmacyPrescriptionsList[index].phoneNumber);
- // });
- },
- ),
- ],
- ),
- ),
- // Container(
- // width: double.infinity,
- // margin: EdgeInsets.only(top: 10, left: 10, right: 10),
- // padding: EdgeInsets.all(8.0),
- // decoration: BoxDecoration(
- // color: Colors.white,
- // borderRadius: BorderRadius.all(
- // Radius.circular(10.0),
- // ),
- // border: Border.all(color: Colors.grey[200], width: 0.5),
- // ),
- // child: Row(
- // children: [
- // ClipRRect(
- // borderRadius: BorderRadius.all(Radius.circular(5)),
- // child: Image.network(
- // model.pharmacyPrescriptionsList[index].projectImageURL,
- // fit: BoxFit.cover,
- // width: 60,
- // height: 70,
- // ),
- // ),
- // Expanded(
- // child: Padding(
- // padding: const EdgeInsets.all(8.0),
- // child: Column(
- // crossAxisAlignment: CrossAxisAlignment.start,
- // children: [
- // Texts(model.pharmacyPrescriptionsList[index].locationDescription),
- // SizedBox(
- // height: 5,
- // ),
- // Texts(model.pharmacyPrescriptionsList[index].cityName),
- // ],
- // ),
- // ),
- // ),
- // InkWell(
- // onTap: () {
- // MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude));
- // },
- // child: Icon(
- // Icons.pin_drop,
- // size: 18,
- // color: Colors.red[900],
- // ),
- // ),
- // SizedBox(
- // width: 15,
- // ),
- // InkWell(
- // onTap: Feedback.wrapForTap(() {
- // launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
- // }, context),
- // child: Container(
- // child: Icon(
- // Icons.call,
- // size: 18,
- // color: Colors.red[900],
- // ),
- // ),
- // )
- // ],
- // ),
- // ),
+ itemBuilder: (context, index) {
+ GetHMGLocationsModel location = GetHMGLocationsModel();
+ location.locationName = model.pharmacyPrescriptionsList[index].locationDescription;
+ location.cityName = model.pharmacyPrescriptionsList[index].cityName;
+ location.phoneNumber = model.pharmacyPrescriptionsList[index].phoneNumber;
+ location.latitude = model.pharmacyPrescriptionsList[index].latitude;
+ location.longitude = model.pharmacyPrescriptionsList[index].longitude;
+ location.distanceInKilometers = model.pharmacyPrescriptionsList[index].distanceInKilometers;
+ return HospitalLocation(location, showCity: true);
+ },
itemCount: model.pharmacyPrescriptionsList.length,
),
)
diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart
index 7fbb5745..8765ebe4 100644
--- a/lib/pages/medical/prescriptions/prescription_items_page.dart
+++ b/lib/pages/medical/prescriptions/prescription_items_page.dart
@@ -11,14 +11,14 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
-import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
+
import '../../../widgets/dialogs/confirm_send_email_dialog.dart';
import 'PrescriptionIDeliveryAddressPage.dart';
@@ -285,8 +285,8 @@ class PrescriptionItemsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- myRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
- myRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
+ MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
projectViewModel.isArabic),
mHeight(9),
Text(
diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart
index f565594e..8d72216a 100644
--- a/lib/pages/medical/reports/report_list_widget.dart
+++ b/lib/pages/medical/reports/report_list_widget.dart
@@ -9,8 +9,8 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -27,93 +27,95 @@ class ReportListWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
- return reportList.length > 0 ? ListView.separated(
- physics: BouncingScrollPhysics(),
- padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
- separatorBuilder: (context, index) => SizedBox(height: 14),
- itemBuilder: (context, index) {
- Reports report = reportList[index];
- return Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
- Radius.circular(10.0),
- ),
- boxShadow: [
- BoxShadow(
- color: Color(0xff000000).withOpacity(.05),
- //spreadRadius: 5,
- blurRadius: 27,
- offset: Offset(0, -3),
- ),
- ],
- color: Colors.white),
- child: Padding(
- padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- if (report.doctorName != null)
- Text(
- report.doctorName,
- style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
- ),
- if (report.doctorName != null) SizedBox(height: 6),
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- LargeAvatar(
- name: report.doctorName,
- url: report.doctorImageURL,
- width: 48,
- height: 48,
+ return reportList.length > 0
+ ? ListView.separated(
+ physics: BouncingScrollPhysics(),
+ padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
+ separatorBuilder: (context, index) => SizedBox(height: 14),
+ itemBuilder: (context, index) {
+ Reports report = reportList[index];
+ return Container(
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.all(
+ Radius.circular(10.0),
),
- SizedBox(width: 11),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ boxShadow: [
+ BoxShadow(
+ color: Color(0xff000000).withOpacity(.05),
+ //spreadRadius: 5,
+ blurRadius: 27,
+ offset: Offset(0, -3),
+ ),
+ ],
+ color: Colors.white),
+ child: Padding(
+ padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if (report.doctorName != null)
+ Text(
+ report.doctorName,
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
+ ),
+ if (report.doctorName != null) SizedBox(height: 6),
+ Row(
mainAxisSize: MainAxisSize.min,
children: [
- if (report.projectName != null) myRichText(TranslationBase.of(context).clinic + ":", report.projectName, projectViewModel.isArabic),
- if (report.clinicDescription != null) myRichText(TranslationBase.of(context).hospital + ":", report.clinicDescription, projectViewModel.isArabic),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- mainAxisSize: MainAxisSize.max,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- RatingBar.readOnly(
- initialRating: report.actualDoctorRate.toDouble(),
- size: 16.0,
- filledColor: Color(0XFFD02127),
- emptyColor: Color(0XFFD02127),
- isHalfAllowed: true,
- halfFilledIcon: Icons.star_half,
- filledIcon: Icons.star,
- emptyIcon: Icons.star_border,
- ),
- if (reportList[index].status == 2)
- IconButton(
- icon: Icon(Icons.email),
- color: Color(0xff28323A),
- constraints: BoxConstraints(),
- padding: EdgeInsets.zero,
- onPressed: () {
- showConfirmMessage(reportList[index]);
- })
- ],
+ LargeAvatar(
+ name: report.doctorName,
+ url: report.doctorImageURL,
+ width: 48,
+ height: 48,
+ ),
+ SizedBox(width: 11),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (report.projectName != null) MyRichText(TranslationBase.of(context).clinic + ":", report.projectName, projectViewModel.isArabic),
+ if (report.clinicDescription != null) MyRichText(TranslationBase.of(context).hospital + ":", report.clinicDescription, projectViewModel.isArabic),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ mainAxisSize: MainAxisSize.max,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ RatingBar.readOnly(
+ initialRating: report.actualDoctorRate.toDouble(),
+ size: 16.0,
+ filledColor: Color(0XFFD02127),
+ emptyColor: Color(0XFFD02127),
+ isHalfAllowed: true,
+ halfFilledIcon: Icons.star_half,
+ filledIcon: Icons.star,
+ emptyIcon: Icons.star_border,
+ ),
+ if (reportList[index].status == 2)
+ IconButton(
+ icon: Icon(Icons.email),
+ color: Color(0xff28323A),
+ constraints: BoxConstraints(),
+ padding: EdgeInsets.zero,
+ onPressed: () {
+ showConfirmMessage(reportList[index]);
+ })
+ ],
+ ),
+ ],
+ ),
),
],
),
- ),
- ],
+ ],
+ ),
),
- ],
- ),
- ),
- );
- },
- itemCount: reportList.length,
- ) : getNoDataWidget(context) ;
+ );
+ },
+ itemCount: reportList.length,
+ )
+ : getNoDataWidget(context);
}
void showConfirmMessage(Reports report) {
diff --git a/lib/pages/medical/reports/reports_page.dart b/lib/pages/medical/reports/reports_page.dart
index b5535982..85d35d84 100644
--- a/lib/pages/medical/reports/reports_page.dart
+++ b/lib/pages/medical/reports/reports_page.dart
@@ -6,9 +6,8 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -100,8 +99,8 @@ class MedicalReports extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
- if (_appointmenHistory.projectName != null) myRichText(TranslationBase.of(context).clinic + ":", _appointmenHistory.projectName, projectViewModel.isArabic),
- if (_appointmenHistory.clinicName != null) myRichText(TranslationBase.of(context).hospital + ":", _appointmenHistory.clinicName, projectViewModel.isArabic),
+ if (_appointmenHistory.projectName != null) MyRichText(TranslationBase.of(context).clinic + ":", _appointmenHistory.projectName, projectViewModel.isArabic),
+ if (_appointmenHistory.clinicName != null) MyRichText(TranslationBase.of(context).hospital + ":", _appointmenHistory.clinicName, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
@@ -135,4 +134,4 @@ class MedicalReports extends StatelessWidget {
),
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart
index e90e3b3c..4c1517b2 100644
--- a/lib/pages/rateAppointment/rate_appointment_clinic.dart
+++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart
@@ -1,26 +1,20 @@
-import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
-import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
-import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
-import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
-import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class RateAppointmentClinic extends StatefulWidget {
@@ -28,8 +22,7 @@ class RateAppointmentClinic extends StatefulWidget {
final String doctorNote;
final int doctorRate;
- RateAppointmentClinic(
- {this.appointmentDetails, this.doctorRate, this.doctorNote});
+ RateAppointmentClinic({this.appointmentDetails, this.doctorRate, this.doctorNote});
@override
_RateAppointmentClinicState createState() => _RateAppointmentClinicState();
@@ -61,12 +54,7 @@ class _RateAppointmentClinicState extends State {
),
Text(
TranslationBase.of(context).lastAppointment,
- style: TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w600,
- color: Color(0xff2B353E),
- letterSpacing: -0.64,
- height: 23 / 16),
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(
height: 25,
@@ -75,8 +63,7 @@ class _RateAppointmentClinicState extends State {
elevation: 0,
shape: cardRadius(10),
child: Padding(
- padding: const EdgeInsets.only(
- left: 12, right: 12, top: 12, bottom: 12),
+ padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -88,21 +75,11 @@ class _RateAppointmentClinicState extends State {
children: [
Text(
model.appointmentDetails.projectName,
- style: TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.64,
- height: 25 / 16),
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Text(
model.appointmentDetails.startTime.toString().substring(0, 5),
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.w600,
- color: Color(0xff2E303A),
- letterSpacing: -0.64,
- height: 25 / 16),
+ style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
],
),
@@ -111,11 +88,7 @@ class _RateAppointmentClinicState extends State {
mainAxisSize: MainAxisSize.min,
children: [
LargeAvatar(
- url:
- 'https://hmgwebservices.com/Images/Hospitals/' +
- model.appointmentDetails.projectID
- .toString() +
- '.jpg',
+ url: 'https://hmgwebservices.com/Images/Hospitals/' + model.appointmentDetails.projectID.toString() + '.jpg',
width: 48,
height: 48,
),
@@ -125,16 +98,8 @@ class _RateAppointmentClinicState extends State {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
- myRichText(
- TranslationBase.of(context).clinic + ":",
- model.appointmentDetails.projectName,
- projectViewModel.isArabic),
- myRichText(
- TranslationBase.of(context).date + ":",
- DateUtil.getDayMonthYearDateFormatted(
- DateUtil.convertStringToDate(model
- .appointmentDetails
- .appointmentDate)),
+ MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName, projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).date + ":", DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)),
projectViewModel.isArabic),
],
),
@@ -160,12 +125,7 @@ class _RateAppointmentClinicState extends State {
children: [
Text(
TranslationBase.of(context).rateClinic,
- style: TextStyle(
- fontSize: 16,
- fontWeight: FontWeight.w600,
- color: Color(0xff2B353E),
- letterSpacing: -0.64,
- height: 23 / 16),
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(
height: 12,
@@ -179,21 +139,13 @@ class _RateAppointmentClinicState extends State {
duration: Duration(milliseconds: 300),
switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn,
- transitionBuilder: (Widget child,
- Animation animation) {
- return ScaleTransition(
- child: child, scale: animation);
+ transitionBuilder: (Widget child, Animation animation) {
+ return ScaleTransition(child: child, scale: animation);
},
child: rating == (index + 1)
? Container(
- margin: EdgeInsets.only(
- left: 3.0, right: 3.0),
- decoration: BoxDecoration(
- borderRadius:
- BorderRadius.circular(100),
- border: Border.all(
- width: 3,
- color: CustomColors.green)),
+ margin: EdgeInsets.only(left: 3.0, right: 3.0),
+ decoration: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.green)),
key: ValueKey(rating),
child: IconButton(
onPressed: () {
@@ -202,10 +154,7 @@ class _RateAppointmentClinicState extends State {
});
},
iconSize: 35,
- icon: SvgPicture.asset(
- 'assets/images/new/appointment-rating/' +
- (index + 1).toString() +
- '.svg'),
+ icon: SvgPicture.asset('assets/images/new/appointment-rating/' + (index + 1).toString() + '.svg'),
),
)
: Container(
@@ -217,10 +166,7 @@ class _RateAppointmentClinicState extends State {
});
},
iconSize: 35,
- icon: SvgPicture.asset(
- 'assets/images/new/appointment-rating/' +
- (index + 1).toString() +
- '.svg'),
+ icon: SvgPicture.asset('assets/images/new/appointment-rating/' + (index + 1).toString() + '.svg'),
),
),
),
@@ -270,25 +216,18 @@ class _RateAppointmentClinicState extends State {
: () {
model
.sendAppointmentRate(
- rating,
- widget.appointmentDetails.appointmentNo,
- widget.appointmentDetails.projectID,
- widget.appointmentDetails.doctorID,
- widget.appointmentDetails.clinicID,
- note)
+ rating, widget.appointmentDetails.appointmentNo, widget.appointmentDetails.projectID, widget.appointmentDetails.doctorID, widget.appointmentDetails.clinicID, note)
.then(
(value) => {
model
.sendDoctorRate(
widget.doctorRate,
- widget
- .appointmentDetails.appointmentNo,
+ widget.appointmentDetails.appointmentNo,
widget.appointmentDetails.projectID,
widget.appointmentDetails.doctorID,
widget.appointmentDetails.clinicID,
note,
- widget.appointmentDetails
- .appointmentDate,
+ widget.appointmentDetails.appointmentDate,
widget.appointmentDetails.doctorName,
widget.appointmentDetails.projectName,
widget.appointmentDetails.clinicName)
diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart
index 35c3921e..3566e95b 100644
--- a/lib/uitl/translations_delegate_base.dart
+++ b/lib/uitl/translations_delegate_base.dart
@@ -127,6 +127,8 @@ class TranslationBase {
String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode];
+ String get waitingTime => localizedValues['waitingTime'][locale.languageCode];
+
String get confirmLater => localizedValues['confirmLater'][locale.languageCode];
String get todoList => localizedValues['todoList'][locale.languageCode];
@@ -615,6 +617,8 @@ class TranslationBase {
String get locationa => localizedValues['locationa'][locale.languageCode];
+ String get callNow => localizedValues['call_now'][locale.languageCode];
+
String get ambulancerequest => localizedValues['ambulancerequest'][locale.languageCode];
String get requestA => localizedValues['requestA'][locale.languageCode];
@@ -825,6 +829,10 @@ class TranslationBase {
String get selectCity => localizedValues['selectCity'][locale.languageCode];
+ String get city => localizedValues['city'][locale.languageCode];
+
+ String get distance => localizedValues['distance'][locale.languageCode];
+
String get myAccount => localizedValues['MyAccount'][locale.languageCode];
String get otherAccount => localizedValues['OtherAccount'][locale.languageCode];
@@ -2424,6 +2432,46 @@ class TranslationBase {
String get ereferralSubtitle => localizedValues["ereferralSubtitle"][locale.languageCode];
String get medicalFileTitle => localizedValues["medicalFileTitle"][locale.languageCode];
+
+ String get My_File_Details => localizedValues["My_File_Details"][locale.languageCode];
+
+ String get Ecommerce => localizedValues["Ecommerce"][locale.languageCode];
+
+ String get Family_Files => localizedValues["Family_Files"][locale.languageCode];
+
+ String get My_Child => localizedValues["My_Child"][locale.languageCode];
+
+ String get Vaccines => localizedValues["Vaccines"][locale.languageCode];
+
+ String get Todo => localizedValues["Todo"][locale.languageCode];
+
+ String get list => localizedValues["List"][locale.languageCode];
+
+ String get Blood => localizedValues["Blood"][locale.languageCode];
+
+ String get Donation => localizedValues["Donation"][locale.languageCode];
+
+ String get Health => localizedValues["Health"][locale.languageCode];
+
+ String get Calculator => localizedValues["Calculator"][locale.languageCode];
+
+ String get Converter => localizedValues["Converter"][locale.languageCode];
+
+ String get Smart => localizedValues["Smart"][locale.languageCode];
+
+ String get Watches => localizedValues["Watches"][locale.languageCode];
+
+ String get Parking => localizedValues["Parking"][locale.languageCode];
+
+ String get Details => localizedValues["Details"][locale.languageCode];
+
+ String get Virtual => localizedValues["Virtual"][locale.languageCode];
+
+ String get News => localizedValues["News"][locale.languageCode];
+
+ String get Latest => localizedValues["Latest"][locale.languageCode];
+
+ String get Tour => localizedValues["Tour"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate {
diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart
index e9d70a1f..242f47ad 100644
--- a/lib/uitl/utils_new.dart
+++ b/lib/uitl/utils_new.dart
@@ -219,13 +219,13 @@ RoundedRectangleBorder buttonShape() {
);
}
-Decoration containerRadiusWithGradient(double radius) {
+Decoration containerRadiusWithGradient(double radius,{Color color1,Color color2}) {
return BoxDecoration(
borderRadius: BorderRadius.circular(radius),
gradient: LinearGradient(
colors: [
- Color(0xFFF71787E),
- Color(0xFFF2B353E),
+ color1?? Color(0xFFF71787E),
+ color2?? Color(0xFFF2B353E),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
diff --git a/lib/widgets/data_display/medical/doctor_card.dart b/lib/widgets/data_display/medical/doctor_card.dart
index 47c74182..7f67a253 100644
--- a/lib/widgets/data_display/medical/doctor_card.dart
+++ b/lib/widgets/data_display/medical/doctor_card.dart
@@ -11,6 +11,8 @@ import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
+import '../../my_rich_text.dart';
+
class DoctorCard extends StatelessWidget {
final String name;
final String subName;
@@ -164,12 +166,12 @@ class DoctorCard extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
- myRichText(isSortByClinic ? TranslationBase.of(context).branch : TranslationBase.of(context).clinic + ":", subName, projectViewModel.isArabic),
+ MyRichText(isSortByClinic ? TranslationBase.of(context).branch : TranslationBase.of(context).clinic + ":", subName, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- if (rating == null && billNo != "") myRichText(TranslationBase.of(context).invoiceNo, billNo ?? "", projectViewModel.isArabic),
- if (vaccineName != "") myRichText("", vaccineName ?? "", projectViewModel.isArabic),
+ if (rating == null && billNo != "") MyRichText(TranslationBase.of(context).invoiceNo, billNo ?? "", projectViewModel.isArabic),
+ if (vaccineName != "") MyRichText("", vaccineName ?? "", projectViewModel.isArabic),
if (rating != null)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -216,10 +218,12 @@ class DoctorCard extends StatelessWidget {
color: Theme.of(context).primaryColor,
),
)
- : onTap != null ? Icon(
- Icons.arrow_forward,
- color: Theme.of(context).primaryColor,
- ) : SizedBox(),
+ : onTap != null
+ ? Icon(
+ Icons.arrow_forward,
+ color: Theme.of(context).primaryColor,
+ )
+ : SizedBox(),
),
),
],
@@ -234,19 +238,3 @@ class DoctorCard extends StatelessWidget {
);
}
}
-
-// todo 'sikander' move this widget to separate file
-Widget myRichText(String title, String value, bool isArabic) {
- return RichText(
- maxLines: 1,
- text: TextSpan(
- text: title,
- style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
- children: [
- TextSpan(
- text: " $value",
- style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
- )
- ]),
- );
-}
diff --git a/lib/widgets/hospital_location.dart b/lib/widgets/hospital_location.dart
new file mode 100644
index 00000000..dd70d06f
--- /dev/null
+++ b/lib/widgets/hospital_location.dart
@@ -0,0 +1,108 @@
+import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:flutter/material.dart';
+import 'package:maps_launcher/maps_launcher.dart';
+import 'package:provider/provider.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import 'my_rich_text.dart';
+
+class HospitalLocation extends StatelessWidget {
+ final GetHMGLocationsModel location;
+ final bool showCity;
+
+ HospitalLocation(this.location, {Key key, this.showCity = false}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
+ return Container(
+ padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.all(
+ Radius.circular(10.0),
+ ),
+ boxShadow: [
+ BoxShadow(
+ color: Color(0xff000000).withOpacity(.05),
+ //spreadRadius: 5,
+ blurRadius: 27,
+ offset: Offset(0, -3),
+ ),
+ ],
+ color: Colors.white),
+ child: Row(
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ location.locationName.trim(),
+ style: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600, color: Color(0xff2E303A)),
+ ),
+ SizedBox(height: 10),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ ClipRRect(
+ borderRadius: BorderRadius.circular(30),
+ child: Image.network(
+ location?.projectImageURL?.toString() ?? 'https://hmgwebservices.com/Images/Hospitals/15.jpg',
+ width: 48,
+ height: 48,
+ fit: BoxFit.cover,
+ ),
+ ),
+ SizedBox(width: 10),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if (showCity) MyRichText(TranslationBase.of(context).city + ":", location.cityName?.trim().toString(), projectViewModel.isArabic),
+ MyRichText(TranslationBase.of(context).distance + ":", location.distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "", projectViewModel.isArabic),
+ ],
+ ),
+ )
+ ],
+ ),
+ ],
+ ),
+ ),
+ Column(
+ children: [
+ contactButton(Icons.location_on, TranslationBase.of(context).locationa, () {
+ MapsLauncher.launchCoordinates(double.parse(location.latitude), double.parse(location.longitude), location.locationName);
+ }),
+ SizedBox(height: 10),
+ contactButton(Icons.call, TranslationBase.of(context).callNow, () {
+ launch("tel://" + location.phoneNumber);
+ }),
+ ],
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget contactButton(IconData _iconData, String title, VoidCallback callback) {
+ return SizedBox(
+ height: 32,
+ child: FlatButton.icon(
+ color: Color(0xffF5F5F5),
+ shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)),
+ onPressed: callback,
+ icon: Icon(
+ _iconData,
+ size: 12,
+ color: Color(0xff2E303A),
+ ),
+ label: Text(
+ title,
+ style: TextStyle(fontSize: 12, letterSpacing: -0.48, fontWeight: FontWeight.w600, color: Color(0xff2E303A)),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/widgets/my_rich_text.dart b/lib/widgets/my_rich_text.dart
new file mode 100644
index 00000000..92100f48
--- /dev/null
+++ b/lib/widgets/my_rich_text.dart
@@ -0,0 +1,24 @@
+import 'package:flutter/material.dart';
+
+class MyRichText extends StatelessWidget {
+ final String title;
+ final String value;
+ final bool isArabic;
+ MyRichText(this.title,this.value,this.isArabic,{Key key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return RichText(
+ maxLines: 1,
+ text: TextSpan(
+ text: title,
+ style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff575757), letterSpacing: -0.4, height: 18 / 10),
+ children: [
+ TextSpan(
+ text: " $value",
+ style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
+ )
+ ]),
+ );
+ }
+}
diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart
index d2ff291e..59444b31 100644
--- a/lib/widgets/new_design/doctor_header.dart
+++ b/lib/widgets/new_design/doctor_header.dart
@@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
-import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
+import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
@@ -68,8 +68,8 @@ class DoctorHeader extends StatelessWidget {
_speciality,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
- headerModel.invoiceNo.isNotEmpty ? myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo, projectViewModel.isArabic) : Container(),
- myRichText(TranslationBase.of(context).branch, headerModel.projectName, projectViewModel.isArabic),
+ headerModel.invoiceNo.isNotEmpty ? MyRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo, projectViewModel.isArabic) : Container(),
+ MyRichText(TranslationBase.of(context).branch, headerModel.projectName, projectViewModel.isArabic),
],
),
),