done design dashboard

merge-requests/34/head
Mohammad Aljammal 6 years ago
parent 9cf5c80aae
commit 8989fbc9b7

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
const MAX_SMALL_SCREEN = 660; const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/Services'; const BASE_URL = 'https://hmgwebservices.com/Services';
const GET_PROJECT = '/Lists.svc/REST/GetProject'; const GET_PROJECT = '/Lists.svc/REST/GetProject';

@ -58,15 +58,41 @@ const Map<String, Map<String, String>> localizedValues = {
'viewQR': {'en': 'View QR Code', 'ar': 'عرض رمز الاستجابة السريعة'}, 'viewQR': {'en': 'View QR Code', 'ar': 'عرض رمز الاستجابة السريعة'},
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, 'cancelAppoMsg': {
'en': 'Are you sure you want to cancel this appointment?',
'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'
},
'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'}, 'upcoming-noAction': {
'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'}, 'en': 'No Action Required',
'upcoming-payment-pending': {'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'}, 'ar': 'لا يوجد إجراء مطلوب'
'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي الانتظار'}, },
'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'}, 'upcoming-confirm': {
'upcoming-virtual': {'en': 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'}, 'en': 'Please confirm the appointment to avoid cancellation',
'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'}, 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'
},
'upcoming-payment-pending': {
'en':
'Online Payment will be Activated before 24 Hours of Appointment Time',
'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'
},
'upcoming-payment-now': {
'en': 'Pay Online now to avoid long waiting queue',
'ar': 'ادفع الآن لتفادي الانتظار'
},
'upcoming-QR': {
'en': 'Use the QR Code to Check-In in hospital',
'ar': 'استخدم الرمز لتسجيل الحضور في المستشفى'
},
'upcoming-virtual': {
'en':
'This is a virtual appointment, Please adhere to the instructions for a seamless experience.',
'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'
},
'upcoming-livecare': {
'en': 'This is a LiveCare appointment',
'ar': 'هذا موعد لايف كير'
},
'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'}, 'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'},
'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'}, 'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'},
'raise': {'en': 'Raise', 'ar': 'رفع'}, 'raise': {'en': 'Raise', 'ar': 'رفع'},
@ -161,27 +187,67 @@ const Map<String, Map<String, String>> localizedValues = {
"before": {"en": "Before", "ar": "قبل"}, "before": {"en": "Before", "ar": "قبل"},
"minute": {"en": "Minutes", "ar": "دقيقة"}, "minute": {"en": "Minutes", "ar": "دقيقة"},
"hour": {"en": "Hour", "ar": "ساعة"}, "hour": {"en": "Hour", "ar": "ساعة"},
"reminderSuccess": {"en": "The reminder has been added successfully", "ar": "يضاف التذكير بنجاح"}, "reminderSuccess": {
"patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, "en": "The reminder has been added successfully",
"ar": "يضاف التذكير بنجاح"
},
"patientShareToDo": {
"en": "Amount before tax: ",
"ar": "المبلغ قبل الضريبة:"
},
"patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"},
"patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, "patientShareTotalToDo": {
"en": "Total amount Due: ",
"ar": "المبلغ الإجمالي المستحق:"
},
'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'},
'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, 'noNeedToWaitInLine': {
'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'}, 'en': 'No need to stand in line.',
'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, 'ar': 'لا داعي للوقوف في الطابور.'
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, },
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, 'useQRAppoAttend': {
'scanQRHospital': {'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'}, 'en': 'Use the QR code to register the appointment attendance.',
'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'
},
'passQRAppoAttend': {
'en':
'Pass the QR code through the attendance devices available in the Hospital.',
'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'
},
'sitWaitingQR': {
'en': 'Sit in the waiting rooms until called by the nurse.',
'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'
},
'attendRegisterCode': {
'en': 'Attendance registration code',
'ar': 'رمز تسجيل الحضور'
},
'scanQRHospital': {
'en': 'Scan above QR Code to Check-In on the Machine in Hospital',
'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'
},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"close": {"en": "Close", "ar": "مغلق"}, "close": {"en": "Close", "ar": "مغلق"},
"booked": {"en": "Booked", "ar": "محجوز"}, "booked": {"en": "Booked", "ar": "محجوز"},
"confirmed": {"en": "Confirmed", "ar": "مؤكد"}, "confirmed": {"en": "Confirmed", "ar": "مؤكد"},
"arrived": {"en": "Arrived", "ar": "تم الحضور"}, "arrived": {"en": "Arrived", "ar": "تم الحضور"},
"payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, "payNowBookSuccess": {
"payNowBookSuccesstext1": {"en": "Pay Now using online payment service From secure payment gateways", "ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"}, "en": "Pay now via Al Habib App",
"payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment Or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"}, "ar": "ادفع الآن عبر تطبيق الحبيب"
},
"payNowBookSuccesstext1": {
"en": "Pay Now using online payment service From secure payment gateways",
"ar": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة"
},
"payNowBookSuccesstext2": {
"en": "You can also Pay Later via online payment Or in Hospital",
"ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع عبر الإنترنت أو في المستشفى"
},
'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'}, 'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'},
'askDocNotAllowed': {'en': 'This service will be available for last 15 days doctor Visit only', 'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'}, 'askDocNotAllowed': {
'en': 'This service will be available for last 15 days doctor Visit only',
'ar': 'هذه الخدمة متاحة للزيارات خلال اخر 15 يوم فقط'
},
"more-verify": { "more-verify": {
"en": "More Verification Options", "en": "More Verification Options",
"ar": "المزيد من خيارات التحقق" "ar": "المزيد من خيارات التحقق"
@ -252,5 +318,20 @@ const Map<String, Map<String, String>> localizedValues = {
"policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التاميت:"}, "policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التاميت:"},
"seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"}, "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"},
"insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"},
"requestType": {"en": "Request Type", "ar": "نوع الاستفسار"} "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"},
"MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'},
"myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك البية'},
"viewMore": {"en": "View More", 'ar': 'عرض المزيد'},
"homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'},
"OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدلايات الحبيب'},
"EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'},
"OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع عبر الإلكتدوني'},
"OffersAndPackages": {"en": "Offers and Packages", 'ar': 'العروض والباقات'},
"ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check up", 'ar': 'فحص طبي شامل'},
"HMGService": {"en": "HMG Service", 'ar': 'جميع خدمات الحبيب'},
"ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'},
"viewAll": {"en": "View All", 'ar': 'عرض الكل'},
"ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'},
"ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'},
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
}; };

@ -2,10 +2,16 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import '../../../locator.dart';
import '../../../routes.dart';
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
///Example ///Example
@ -15,6 +21,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// body: null); /// body: null);
class BaseAppClient { class BaseAppClient {
post(String endPoint, post(String endPoint,
{Map<String, dynamic> body, {Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess, Function(dynamic response, int statusCode) onSuccess,
@ -24,19 +31,32 @@ class BaseAppClient {
try { try {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
body['SetupID'] = body.containsKey('SetupID') ? body['SetupID']!=null? body['SetupID'] :SETUP_ID :SETUP_ID; body['SetupID'] = body.containsKey('SetupID')
body['VersionID'] = body.containsKey('VersionID') ? body['VersionID']!=null? body['VersionID'] :VERSION_ID :VERSION_ID; ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
: SETUP_ID;
body['VersionID'] = body.containsKey('VersionID')
? body['VersionID'] != null ? body['VersionID'] : VERSION_ID
: VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID; body['generalid'] = GENERAL_ID;
body['PatientOutSA'] = body.containsKey('PatientOutSA') ? body['PatientOutSA']!=null? body['PatientOutSA'] :PATIENT_OUT_SA :PATIENT_OUT_SA; body['PatientOutSA'] = body.containsKey('PatientOutSA')
? body['PatientOutSA'] != null ? body['PatientOutSA'] : PATIENT_OUT_SA
: PATIENT_OUT_SA;
body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND; body['isDentalAllowedBackend'] = IS_DENTAL_ALLOWED_BACKEND;
body['DeviceTypeID'] = DeviceTypeID; body['DeviceTypeID'] = DeviceTypeID;
body['PatientType'] = body.containsKey('PatientType') ? body['PatientType']!=null? body['PatientType'] :PATIENT_TYPE :PATIENT_TYPE; body['PatientType'] = body.containsKey('PatientType')
body['PatientTypeID'] = body.containsKey('PatientTypeID') ? body['PatientTypeID']!=null? body['PatientTypeID'] :PATIENT_TYPE_ID :PATIENT_TYPE_ID; ? body['PatientType'] != null ? body['PatientType'] : PATIENT_TYPE
: PATIENT_TYPE;
body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null
? body['PatientTypeID']
: PATIENT_TYPE_ID
: PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
body['TokenID'] = token; body['TokenID'] = token;
body['PatientID'] = user['PatientID']; body['PatientID'] = user['PatientID'];
@ -101,6 +121,8 @@ class BaseAppClient {
logout() async { logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE);
} }
String getSessionId(String id) { String getSessionId(String id) {

@ -43,10 +43,10 @@ class ProjectViewModel with ChangeNotifier {
void loadSharedPrefLanguage() async { void loadSharedPrefLanguage() async {
currentLanguage = await sharedPref.getString(APP_LANGUAGE); currentLanguage = await sharedPref.getString(APP_LANGUAGE);
_appLocale = Locale(currentLanguage ?? 'en'); _appLocale = Locale(currentLanguage ?? 'ar');
_isArabic = currentLanguage != null _isArabic = currentLanguage != null
? currentLanguage == 'ar' ? true : false ? currentLanguage == 'ar' ? true : false
: false; : true;
notifyListeners(); notifyListeners();
} }

@ -62,4 +62,5 @@ void setupLocator() {
locator.registerFactory(() => MedicalViewModel()); locator.registerFactory(() => MedicalViewModel());
locator.registerFactory(() => DashboardViewModel()); locator.registerFactory(() => DashboardViewModel());
locator.registerFactory(() => AppointmentRateViewModel()); locator.registerFactory(() => AppointmentRateViewModel());
} }

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';
@ -54,7 +55,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400], hintColor: Colors.grey[400],
disabledColor: Colors.grey[300], disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0), errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Colors.grey[100], scaffoldBackgroundColor:Hexcolor('#E0E0E0'),// Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0), textSelectionHandleColor: Color.fromRGBO(80, 100, 253, 1.0),
canvasColor: Colors.white, canvasColor: Colors.white,

@ -1,16 +1,12 @@
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/hospital_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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';
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:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart';
import '../base/base_view.dart';
import '../feedback/feedback_home_page.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
@override @override
@ -20,37 +16,492 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
body: Container( body: Container(
width: double.infinity, width: double.infinity,
child: FractionallySizedBox( child: SingleChildScrollView(
widthFactor: 0.95,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell( Stack(
onTap: ()=>Navigator.push(context, FadePage(page: FeedbackHomePage())), children: <Widget>[
Column(
children: <Widget>[
Container(
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage(
'assets/images/timeline_bg.png'),
fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
Positioned(
top: 30,
left: 15,
right: 15,
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Row(
children: <Widget>[
Expanded(
child: Container(
height: 110,
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.transparent
.withOpacity(0.3),
),
),
),
Expanded(
child: Container(
height: 110,
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.transparent
.withOpacity(0.3),
)),
),
],
),
),
)
],
),
),
Container(width: double.infinity, height: 80)
],
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation ==
Orientation.landscape
? 0.02
: 0.03),
child: Container( child: Container(
margin: EdgeInsets.only(top: 12),
width: double.infinity, width: double.infinity,
height: 180, height: 125,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Hexcolor('#A59E9E'),
shape: BoxShape.rectangle,
border:
Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover)),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).myMedicalFile,
color: Colors.black87,
bold: true,
fontSize: 23,
),
SizedBox(
height: 5,
),
Texts(
TranslationBase.of(context).myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
alignment: projectViewModel.isArabic? Alignment.bottomLeft: Alignment.bottomRight,
child: InkWell(
onTap: () {},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: Hexcolor('#D81A2E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.circular(12.0),
border: Border.all( border: Border.all(
color: Colors.grey[400], color: Colors.transparent, width: 0.5),
width: 1.0, borderRadius:
BorderRadius.all(Radius.circular(9)),
),
child: Center(
child: Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontSize: 12,
),
),
),
),
)
],
),
),
),
),
],
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).homeHealthCareService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
),
),
),
height: 150,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/new-design/pharmacy_icon.png',
width: 40,
height: 40,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
)
],
),
),
),
height: 150,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
DashboardItem(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: 14,
)
],
),
),
),
height: 150,
color: Hexcolor("#747C80"),
imageName: 'emergency_service_image.png',
),
],
), ),
), ),
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/new-design/online_payment_icon.png',
width: 80,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
Container(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/offer_icon.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).offersAndPackages,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
width: MediaQuery.of(context).size.width * 0.29,
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center( child: Center(
child: Texts('Feedback'), child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).comprehensiveMedicalCheckup,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.60,
)
],
),
),
), ),
height: 150,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
), ),
), ),
], ],
), ),
), ),
SizedBox(
height: 8,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).hMGService,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context).viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Text(
TranslationBase.of(context).viewMore,
//color: Colors.white,
//fontWeight: FontWeight.normal,
)
],
),
),
height: 100,
imageName: 'hmg_services_bg .png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
),
DashboardItem(
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).contactUs,
color: Colors.white,
fontWeight: FontWeight.normal,
),
Texts(
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
),
Expanded(
child: Container(),
),
Texts(
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.normal,
)
],
),
),
height: 100,
imageName: 'contact_us_bg.png',
opacity: 0.5,
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
),
],
),
),
SizedBox(
height: 80,
)
],
),
),
),
);
}
}
class DashboardItem extends StatelessWidget {
const DashboardItem(
{this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4})
: super(key: key);
final bool hasBorder;
final String imageName;
final Widget child;
final Function onTap;
final double width;
final double height;
final Color color;
final double opacity;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
height: height != null
? height
: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.19
: MediaQuery.of(context).size.height * 0.35,
decoration: BoxDecoration(
color: !hasBorder
? color != null ? color : Hexcolor('#050705').withOpacity(opacity)
: Colors.white,
borderRadius: BorderRadius.circular(6.0),
border: hasBorder
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null
? DecorationImage(
image: AssetImage('assets/images/$imageName'),
fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn),
)
: null,
),
child: Center(
child: child,
),
), ),
); );
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.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/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
@ -10,9 +11,11 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'home_page.dart'; import 'home_page.dart';
class LandingPage extends StatefulWidget { class LandingPage extends StatefulWidget {
@ -93,7 +96,7 @@ class _LandingPageState extends State<LandingPage> {
case 0: case 0:
return TranslationBase.of(context).home; return TranslationBase.of(context).home;
case 1: case 1:
return 'Search Medicine'; return 'Medical Profile';
case 2: case 2:
return TranslationBase.of(context).mySchedule; return TranslationBase.of(context).mySchedule;
case 3: case 3:

@ -404,6 +404,23 @@ class TranslationBase {
localizedValues['insuranceCards'][locale.languageCode]; localizedValues['insuranceCards'][locale.languageCode];
String get requestType => String get requestType =>
localizedValues['requestType'][locale.languageCode]; localizedValues['requestType'][locale.languageCode];
String get myMedicalFile =>localizedValues['MyMedicalFile'][locale.languageCode];
String get myMedicalFileSubTitle =>localizedValues['myMedicalFileSubTitle'][locale.languageCode];
String get viewMore =>localizedValues['viewMore'][locale.languageCode];
String get homeHealthCareService =>localizedValues['homeHealthCareService'][locale.languageCode];
String get onlinePharmacy =>localizedValues['OnlinePharmacy'][locale.languageCode];
String get emergencyService =>localizedValues['EmergencyService'][locale.languageCode];
String get onlinePaymentService =>localizedValues['OnlinePaymentService'][locale.languageCode];
String get offersAndPackages =>localizedValues['OffersAndPackages'][locale.languageCode];
String get comprehensiveMedicalCheckup =>localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode];
String get hMGService =>localizedValues['HMGService'][locale.languageCode];
String get viewAllHabibMedicalService =>localizedValues['ViewAllHabibMedicalService'][locale.languageCode];
String get viewAll =>localizedValues['viewAll'][locale.languageCode];
String get contactUs =>localizedValues['ContactUs'][locale.languageCode];
String get viewAllWaysReachUs =>localizedValues['ViewAllWaysReachUs'][locale.languageCode];
String get medicalProfile =>localizedValues['medicalProfile'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -58,7 +58,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
changeIndex: _changeIndex, changeIndex: _changeIndex,
index: _index, index: _index,
currentIndex: 1, currentIndex: 1,
name: TranslationBase.of(context).replay2, name: TranslationBase.of(context).medicalProfile,
), ),
// Expanded( // Expanded(
// child: SizedBox( // child: SizedBox(

Loading…
Cancel
Save