Merge branch 'master' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into pharmacy_module_feature_home_page

 Conflicts:
	lib/config/config.dart
	lib/config/localized_values.dart
	lib/pages/landing/landing_page.dart
	lib/uitl/translations_delegate_base.dart
	lib/widgets/others/app_scaffold_widget.dart
	pubspec.yaml
merge-requests/176/head
mosazaid 5 years ago
commit 11ff27bae3

@ -1,36 +1,11 @@
package com.cloud.diplomaticquarterapp
import android.content.ContentResolver
import android.content.Context
import android.media.RingtoneManager
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity : FlutterActivity() {
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine)
MethodChannel(flutterEngine.dartExecutor, "crossingthestreams.io/resourceResolver").setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
if ("drawableToUri" == call.method) {
val resourceId = this@MainActivity.resources.getIdentifier(call.arguments as String, "drawable", this@MainActivity.packageName)
result.success(resourceToUriString(this@MainActivity.applicationContext, resourceId))
}
if ("getAlarmUri" == call.method) {
result.success(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM).toString())
}
}
}
companion object {
private fun resourceToUriString(context: Context, resId: Int): String {
return (ContentResolver.SCHEME_ANDROID_RESOURCE
+ "://"
+ context.resources.getResourcePackageName(resId)
+ "/"
+ context.resources.getResourceTypeName(resId)
+ "/"
+ context.resources.getResourceEntryName(resId))
}
}
class MainActivity: FlutterFragmentActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -6,8 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660;
// const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com//';
const BASE_URL = 'https://uat.hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -280,6 +279,10 @@ const GET_COVID_DRIVETHRU_PAYMENT_INFO =
const GET_COVID_DRIVETHRU_FREE_SLOTS =
'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD =
'Services/Patients.svc/REST/Med_GetPatientLastRecord';
///My Trackers
const GET_DIABETIC_RESULT_AVERAGE =
'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage';

@ -547,18 +547,18 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Please enter the verification code send to",
"ar": "الرجاء إدخال رمز التحقق المرسل إلى"
},
"EyeMeasurements":{"en":"Eye Measurements","ar":"قياسات النظر"},
"Measurements":{"en":"Measurements","ar":"قياسات"},
"Classes":{"en":"Classes","ar":"نظارات"},
"ContactLens":{"en":"Contact Lens","ar":"العدسات اللاصقة"},
"RightEye":{"en":"Right Eye","ar":"العين اليمين"},
"Sphere":{"en":"Sphere","ar":"القوة"},
"Cylinder":{"en":"Cylinder","ar":"الدائرية"},
"Axis":{"en":"Axis","ar":"المحاور"},
"Prism":{"en":"Prism","ar":"موشور"},
"VA":{"en":"Prism","ar":"المحاور"},
"LeftEye":{"en":"Left Eye","ar":"العين اليسرى"},
"Brand":{"en":"Brand","ar":"النوع"},
"EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"},
"Measurements": {"en": "Measurements", "ar": "قياسات"},
"Classes": {"en": "Classes", "ar": "نظارات"},
"ContactLens": {"en": "Contact Lens", "ar": "العدسات اللاصقة"},
"RightEye": {"en": "Right Eye", "ar": "العين اليمين"},
"Sphere": {"en": "Sphere", "ar": "القوة"},
"Cylinder": {"en": "Cylinder", "ar": "الدائرية"},
"Axis": {"en": "Axis", "ar": "المحاور"},
"Prism": {"en": "Prism", "ar": "موشور"},
"VA": {"en": "Prism", "ar": "المحاور"},
"LeftEye": {"en": "Left Eye", "ar": "العين اليسرى"},
"Brand": {"en": "Brand", "ar": "النوع"},
"Power": {"en": "Power", "ar": "القوة"},
"Diameter": {"en": "Diameter", "ar": "القطر"},
"Remarks": {"en": "Remarks", "ar": "ملاحضات"},
@ -590,6 +590,11 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "View Doctor Responses",
"ar": "الاطلاع على ردود الأطباء"
},
"ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"},
"ServiceInformationTitle": {
"en": "Service Information",
"ar": "معلومات الخدمة"
},
"ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"},
"HomeHealthCare": {
"en": "Home Health Care",
@ -601,25 +606,58 @@ const Map<String, Map<String, String>> localizedValues = {
"ar":
"توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي)... "
},
"LoginRegister": {
"en": "Login/Register",
"ar": "دخول / تسجيل"
"LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"},
"OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"},
"info-lab": {
"en":
"This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
"ar":
"خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية."
},
"OrderLog": {
"en": "Order Log",
"ar": " سجل الطلبات"
"info-radiology": {
"en":
"This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.",
"ar":
"خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل."
},
"ServiceInformationButton":{"en":"LOGIN / REGISTER","ar":"دخول / تسجيل"},
"ServiceInformationTitle":{"en":"Service Information","ar":"معلومات الخدمة"},
"info-lab": {
"en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.",
"ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية."
"TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"},
"Beforeusing": {
"en": "Before using the checkup, please read Terms of Service.",
"ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"
},
"info-radiology": {
"en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.",
"ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل."
"accept": {
"en": "I read and accept Terms of Service and Privacy Policy",
"ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"
},
"data-safe-info": {
"en":
"Information that you provide is anonymous and not shared with anyone.",
"ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"
},
"data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"},
"informational": {
"en":
"Checkup is for informational purposes and is not a qualified medical opinion",
"ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"
},
"not-use-in-emerbency": {
"en": "Do not use in emergencies.",
"ar": "لا تستخدم في حالات الطوارئ"
},
"not-use-in-emerbency-details": {
"en": "In case of health emergency, ",
"ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"
},
"not-use-in-emerbency-details-call": {
"en": "call the nearest emergency number immediately",
"ar": " اتصل بأقرب رقم للطوارئ على الفور"
},
"check-diagnosis": {
"en": "Checkup is not a diagnosis.",
"ar": "الفحص ليس تشخيص."
},
"remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"},
// pharmacy module
"medicationRefill": {
@ -654,4 +692,13 @@ const Map<String, Map<String, String>> localizedValues = {
"en": "Delete All Items",
"ar": "حذف كافة العناصر"
},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
"select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
"i-am": {"en": "I am", "ar": "أنا"},
"years-old": {"en": "years old", "ar": "سنة"},
"drag-point": {
"en": "Drag point to change your age",
"ar": "اسحب لتغيير عمرك"
},
};

@ -1,4 +1,4 @@
enum OrderService { AMBULANCE }
enum OrderService { AMBULANCE,HOME_HEALTH_CARE,Comprehensive_Medical_Checkup }
extension SelectedOrderService on OrderService {
int getIdOrderService() {
@ -6,6 +6,13 @@ extension SelectedOrderService on OrderService {
case OrderService.AMBULANCE:
return 4;
break;
case OrderService.Comprehensive_Medical_Checkup:
return 3;
break;
case OrderService.HOME_HEALTH_CARE:
return 2;
break;
}
return 4;
}
@ -15,6 +22,12 @@ extension SelectedOrderService on OrderService {
case 4:
return OrderService.AMBULANCE;
break;
case 2:
return OrderService.HOME_HEALTH_CARE;
break;
case 3:
return OrderService.Comprehensive_Medical_Checkup;
break;
}
return OrderService.AMBULANCE;

@ -18,7 +18,7 @@ class PatientERInsertPresOrderRequestModel {
double longitude;
int createdBy;
int orderServiceID;
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =List();
List<PatientERHHCInsertServicesList> patientERHHCInsertServicesList = List();
PatientERInsertPresOrderRequestModel(
{this.versionID,
@ -38,6 +38,7 @@ class PatientERInsertPresOrderRequestModel {
this.longitude,
this.createdBy,
this.orderServiceID,
this.patientERHHCInsertServicesList
});
PatientERInsertPresOrderRequestModel.fromJson(Map<String, dynamic> json) {

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
@ -99,4 +100,16 @@ class CMCService extends BaseService {
super.error = error;
}, body: updatePresOrderRequestModel.toJson());
}
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: order.toJson());
}
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import '../base_service.dart';
@ -68,8 +69,7 @@ class HomeHealthCareService extends BaseService {
}, body: body);
}
Future updateHHCPresOrder(
UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
@ -79,4 +79,15 @@ class HomeHealthCareService extends BaseService {
super.error = error;
}, body: updatePresOrderRequestModel.toJson());
}
Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async {
hasError = false;
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: order.toJson());
}
}

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
@ -34,7 +36,7 @@ class CMCViewModel extends BaseViewModel {
.getCMCAllServices();
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: cmcAllServicesList[0].iD);
await getCheckupItems(cMCGetItemsRequestModel);
await getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel,isFirst: true);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.Error);
@ -42,13 +44,16 @@ class CMCViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
Future getCheckupItems(CMCGetItemsRequestModel cMCGetItemsRequestModel) async {
await _cMCService
.getCheckupItems(cMCGetItemsRequestModel);
Future getCheckupItems({CMCGetItemsRequestModel cMCGetItemsRequestModel, bool isFirst = false}) async {
if(!isFirst)
setState(ViewState.Busy);
await _cMCService.getCheckupItems(cMCGetItemsRequestModel);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.Error);
}
if(!isFirst)
setState(ViewState.Idle);
}
Future getCmcAllPresOrders() async {
@ -89,4 +94,17 @@ class CMCViewModel extends BaseViewModel {
await _cMCService
.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel);
}
//TODO check it in uat
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user.patientID;
order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService();
await _cMCService.insertPresPresOrder(order: order);
if (_cMCService.hasError) {
error = _cMCService.error;
setState(ViewState.ErrorLocal);
} else {
getCmcAllPresOrders();
}
}
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
@ -5,6 +6,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
@ -65,8 +67,7 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
}
Future updateHHCPresOrder(
UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async {
setState(ViewState.Busy);
await _homeHealthCareService.updateHHCPresOrder(
updatePresOrderRequestModel);
@ -78,6 +79,19 @@ class HomeHealthCareViewModel extends BaseViewModel {
}
}
Future insertPresPresOrder({PatientERInsertPresOrderRequestModel order}) async {
setState(ViewState.Busy);
order.createdBy = user.patientID;
order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService();
await _homeHealthCareService.insertPresPresOrder(order: order);
if (_homeHealthCareService.hasError) {
error = _homeHealthCareService.error;
setState(ViewState.ErrorLocal);
} else {
getHHCAllPresOrders();
}
}
}

@ -54,6 +54,7 @@ class MyApp extends StatelessWidget {
const Locale('en', ''), // English
],
theme: ThemeData(
fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
@ -66,8 +67,7 @@ class MyApp extends StatelessWidget {
hintColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor:
HexColor('#E9E9E9'), // Colors.grey[100],
scaffoldBackgroundColor: HexColor('#E9E9E9'), // Colors.grey[100],
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,

@ -4,14 +4,18 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'new_cmc_step_one_page.dart';
import 'new_cmc_step_three_page.dart';
import 'new_cmc_step_tow_page.dart';
class NewCMCPage extends StatefulWidget {
NewCMCPage({this.model});
@ -27,7 +31,9 @@ class _NewCMCPageState extends State<NewCMCPage>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 1;
int pageSelected = 2;
double _latitude;
double _longitude;
CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel;
@ -54,6 +60,18 @@ class _NewCMCPageState extends State<NewCMCPage>
: []);
_controller = new PageController();
_getCurrentLocation();
}
_getCurrentLocation() async {
await getLastKnownPosition().then((value) {
_latitude = value.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
_latitude = 0;
});
}
@override
@ -94,216 +112,230 @@ class _NewCMCPageState extends State<NewCMCPage>
child: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height * 0.8,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
widget.model.cmcAllOrderDetail.length != 0
? FractionallySizedBox(
heightFactor: 0.8,
widthFactor: 0.9,
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
child: Column(
children: [
Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width*0.05, right: MediaQuery.of(context).size.width*0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
),
),
Expanded(
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
onPageChanged: (index) {
setState(() {
_currentIndex = index;
});
},
scrollDirection: Axis.horizontal,
children: <Widget>[
widget.model.cmcAllOrderDetail.length != 0
? FractionallySizedBox(
heightFactor: 0.8,
widthFactor: 0.9,
child: Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
height: 12,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
"Pending",
fontSize: 22,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
"Pending",
fontSize: 22,
),
],
),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
widget.model.cmcAllOrderDetail[0]
.createdOn)),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].description
.toString() ??
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
widget.model.cmcAllOrderDetail[0]
.createdOn)),
fontSize: 22,
height: 12,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].description
.toString() ??
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
height: 12,
),
],
),
),
SizedBox(
height: 12,
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
),
],
),
)
: NewCMCStepOnePage(
changePageViewIndex: changePageViewIndex,
cMCInsertPresOrderRequestModel:
cMCInsertPresOrderRequestModel,
model: widget.model,
),
NewCMCStepTowPage(
longitude: _longitude,
latitude: _latitude,
changePageViewIndex: changePageViewIndex,
cmcInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel,
model: widget.model,
), NewCMCStepThreePage(
changePageViewIndex: changePageViewIndex,
cmcInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel,
model: widget.model,
),
],
),
)
: NewCMCStepOnePage(
changePageViewIndex: changePageViewIndex,
cMCInsertPresOrderRequestModel:
cMCInsertPresOrderRequestModel,
model: widget.model,
),
// NewEReferralStepTowPage(
// changePageViewIndex: changePageViewIndex,
// patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
//
// ),
// NewEReferralStepThreePage(
// changePageViewIndex: changePageViewIndex,
// patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
//
// ),
],
),
),

@ -20,12 +20,10 @@ class NewCMCStepOnePage extends StatefulWidget {
: super(key: key);
@override
_NewCMCStepOnePageState createState() =>
_NewCMCStepOnePageState();
_NewCMCStepOnePageState createState() => _NewCMCStepOnePageState();
}
class _NewCMCStepOnePageState
extends State<NewCMCStepOnePage> {
class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
@override
void initState() {
super.initState();
@ -34,176 +32,200 @@ class _NewCMCStepOnePageState
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: Column(
children: [
FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 20,
),
Texts(
// TranslationBase.of(context).advancePaymentLabel,
"Select Home Health Care Services",
textAlign: TextAlign.center,
),
Column(
children: widget.model.cmcAllServicesList.map((
service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
children: [
Row(
children: [
Radio(
isShowAppBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: Column(
children: [
FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 20,
),
Texts(
"Select Home Health Care Services",
textAlign: TextAlign.center,
),
Column(
children:
widget.model.cmcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
children: [
Row(
children: [
Radio(
value: service.serviceID,
activeColor: Colors.red[800],
onChanged: (newValue) async {
PatientERCMCInsertServicesList patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: service.price,
serviceID: service.serviceID
.toString(),
selectedServiceName: service
.description,
selectedServiceNameAR:
service.description,
recordID: 1,
totalPrice: service.totalPrice,
vAT: service.vAT);
PatientERCMCInsertServicesList
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: service.price,
serviceID: service.serviceID
.toString(),
selectedServiceName:
service.description,
selectedServiceNameAR:
service.description,
recordID: 1,
totalPrice:
service.totalPrice,
vAT: service.vAT);
setState(() {
widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList =
[patientERCMCInsertServicesList];
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
});
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel (checkupType:newValue );
await widget.model.getCheckupItems(cMCGetItemsRequestModel);
CMCGetItemsRequestModel
cMCGetItemsRequestModel =
new CMCGetItemsRequestModel(
checkupType: newValue);
await widget.model.getCheckupItems(
cMCGetItemsRequestModel:
cMCGetItemsRequestModel);
},
groupValue: widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList.length >0?int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[0]
.serviceID):1),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
fontSize: 15,
),
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList
.length >
0
? int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
: 1),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
fontSize: 15,
),
),
],
),
],
),
);
}).toList(),
),
],
),
),
SizedBox(height: 30,),
Container(
color: Colors.white,
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 0.8,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
// border: Border(
// bottom: BorderSide(
// color: Colors.grey,
// width: 1.0,
// ),
// ),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
item.itemName,
fontSize: 15,
),
],
),
),
SizedBox(
height: 12,
),
],
),
),
],
),
);
}).toList()),
)
],
),
}).toList(),
),
],
),
),
SizedBox(
height: 30,
),
Container(
color: Colors.white,
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
style: BorderStyle.solid,
width: 0.5,
color: Colors.grey)),
//borderRadius: ,
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
item.itemName,
fontSize: 15,
),
],
),
),
SizedBox(
height: 12,
),
],
),
),
),
);
}).toList()),
)
],
),
),
),
bottomSheet:Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery
.of(context)
.size
.width * 0.9,
child: SecondaryButton(
label: "Next",
// disabled: this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length ==0,
textColor: Theme
.of(context)
.backgroundColor),
),
],
),
));
}
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
textColor: Theme.of(context).backgroundColor,
onTap: () {
if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length = null) {
int index = widget.model.cmcAllServicesList.length;
PatientERCMCInsertServicesList
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[index-1].price,
serviceID: widget.model.cmcAllServicesList[index-1].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[index-1].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[index-1].description,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[index-1].totalPrice,
vAT: widget.model.cmcAllServicesList[index-1].vAT);
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
widget.changePageViewIndex(1);
}
},
),
),
],
),
),
);
}
}

@ -0,0 +1,165 @@
import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class NewCMCStepThreePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel;
final Function changePageViewIndex;
final CMCViewModel model;
NewCMCStepThreePage(
{Key key,
this.changePageViewIndex,
this.model,
this.cmcInsertPresOrderRequestModel});
@override
_NewCMCStepThreePageState createState() =>
_NewCMCStepThreePageState();
}
class _NewCMCStepThreePageState
extends State<NewCMCStepThreePage> {
Completer<GoogleMapController> _controller = Completer();
static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746,
);
final Set<Marker> markers = new Set();
@override
void initState() {
if (widget.cmcInsertPresOrderRequestModel.latitude != null) {
markers.clear();
markers.add(
Marker(
markerId: MarkerId(
widget.cmcInsertPresOrderRequestModel.latitude.hashCode
.toString(),
),
position: LatLng(
widget.cmcInsertPresOrderRequestModel.latitude,
widget.cmcInsertPresOrderRequestModel.longitude)),
);
_kGooglePlex = CameraPosition(
target: LatLng(widget.cmcInsertPresOrderRequestModel.latitude,
widget.cmcInsertPresOrderRequestModel.longitude),
zoom: 14.4746,
);
}
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
height: 400,
width: double.maxFinite,
margin: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Order Details'),
SizedBox(
height: 12,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)),
padding: EdgeInsets.all(8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Location :'),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 200,
child: GoogleMap(
mapType: MapType.normal,
markers: markers,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
),
),
),
SizedBox(
height: 12,
),
Texts('Selected Service :'),
...List.generate(
widget.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Service Name :',
fontSize: 12,
),
SizedBox(
height: 5,
),
Texts(
widget
.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList[index]
.selectedServiceName,
fontSize: 15,
bold: true,
),
],
),
),
)
],
),
)
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Confirm",
onTap: () async {
await widget.model.insertPresPresOrder(order: widget.cmcInsertPresOrderRequestModel);
if (widget.model.state != ViewState.ErrorLocal) {
widget.changePageViewIndex(0);
}
},
textColor: Theme.of(context).backgroundColor),
),
],
),
),
);
}
}

@ -0,0 +1,113 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/close_back.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
class NewCMCStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
final double longitude;
final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel;
final Function changePageViewIndex;
final CMCViewModel model;
const NewCMCStepTowPage(
{Key key,
this.onPick,
this.latitude,
this.longitude,
this.cmcInsertPresOrderRequestModel,
this.changePageViewIndex,
this.model})
: super(key: key);
@override
_NewCMCStepTowPageState createState() =>
_NewCMCStepTowPageState();
}
class _NewCMCStepTowPageState
extends State<NewCMCStepTowPage> {
double latitude = 0;
double longitude = 0;
@override
void initState() {
if (widget.cmcInsertPresOrderRequestModel.latitude == null) {
latitude = widget.latitude;
longitude = widget.longitude;
} else {
latitude = widget.cmcInsertPresOrderRequestModel.latitude;
longitude = widget.cmcInsertPresOrderRequestModel.longitude;
}
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.cmcInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).next,
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: true,
),
);
}
}

@ -1,5 +1,3 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart';
import 'package:flutter/material.dart';
@ -8,7 +6,6 @@ import 'new_e_referral_step_three_page.dart';
import 'new_e_referral_step_two_page.dart';
class StartIndexForNewEReferral extends StatefulWidget {
StartIndexForNewEReferral();
@override
@ -22,8 +19,8 @@ class _StartIndexForNewEReferralState extends State<StartIndexForNewEReferral>
int _currentIndex = 1;
int pageSelected = 2;
CreateEReferralRequestModel createEReferralRequestModel = new CreateEReferralRequestModel();
CreateEReferralRequestModel createEReferralRequestModel =
new CreateEReferralRequestModel();
@override
void initState() {
@ -46,7 +43,7 @@ class _StartIndexForNewEReferralState extends State<StartIndexForNewEReferral>
body: SafeArea(
child: SingleChildScrollView(
child: Container(
height: MediaQuery.of(context).size.height,
height: MediaQuery.of(context).size.height * 0.9,
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller,
@ -64,12 +61,10 @@ class _StartIndexForNewEReferralState extends State<StartIndexForNewEReferral>
NewEReferralStepTowPage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
NewEReferralStepThreePage(
changePageViewIndex: changePageViewIndex,
createEReferralRequestModel: createEReferralRequestModel,
),
],
),

@ -95,7 +95,7 @@ class _NewEReferralStepOnePageState extends State<NewEReferralStepOnePage> {
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
widthFactor: 0.9,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -6,8 +6,11 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
class NewHomeHealthCareStepOnePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel
@ -27,135 +30,148 @@ class NewHomeHealthCareStepOnePage extends StatefulWidget {
_NewHomeHealthCareStepOnePageState();
}
class _NewHomeHealthCareStepOnePageState
extends State<NewHomeHealthCareStepOnePage> {
@override
void initState() {
if(widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList==null)
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList = [];
class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOnePage> {
PickResult _result;
@override
void initState() {
if (widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList == null)
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList = [];
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Texts(
"Select Home Health Care Services",
textAlign: TextAlign.center,
),
Column(
children: widget.model.hhcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
children: [
Row(
children: [
Checkbox(
value: isServiceSelected(
service.serviceID),
activeColor: Colors.black38,
onChanged: (bool newValue) {
setState(() {
if(!isServiceSelected(service.serviceID))
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add( PatientERHHCInsertServicesList(
recordID:widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
serviceID: service.serviceID,
serviceName: service.description));
else
removeSelected(service.serviceID);
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
fontSize: 15,
),
isShowAppBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Texts(
"Select Home Health Care Services",
textAlign: TextAlign.center,
),
Column(
children: widget.model.hhcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
children: [
Row(
children: [
Checkbox(
value: isServiceSelected(service.serviceID),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (!isServiceSelected(
service.serviceID))
widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.add(PatientERHHCInsertServicesList(
recordID: widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length,
serviceID: service.serviceID,
serviceName:
service.description));
else
removeSelected(service.serviceID);
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
fontSize: 15,
),
),
],
),
],
),
);
}).toList(),
)
],
),
),
],
),
],
),
);
}).toList(),
)
],
),
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
disabled: this
.widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length ==
0,
textColor: Theme.of(context).backgroundColor),
),
],
),
));
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
disabled: this
.widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length == 0,
onTap: (){
widget.changePageViewIndex(1);
},
textColor: Theme.of(context).backgroundColor),
),
],
),
),
);
}
isServiceSelected(int serviceId) {
Iterable <PatientERHHCInsertServicesList> patientERHHCInsertServicesList = widget
.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList
.where((element) => serviceId == element.serviceID);
if(patientERHHCInsertServicesList.length > 0) {
return true;
}
return false;
Iterable<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =
widget
.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList
.where((element) => serviceId == element.serviceID);
if (patientERHHCInsertServicesList.length > 0) {
return true;
}
return false;
}
removeSelected(int serviceId){
Iterable <PatientERHHCInsertServicesList> patientERHHCInsertServicesList = widget
.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList
.where((element) => serviceId == element.serviceID);
removeSelected(int serviceId) {
Iterable<PatientERHHCInsertServicesList> patientERHHCInsertServicesList =
widget
.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList
.where((element) => serviceId == element.serviceID);
if(patientERHHCInsertServicesList.length > 0)
if (patientERHHCInsertServicesList.length > 0)
setState(() {
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.remove(patientERHHCInsertServicesList);
widget
.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList
.remove(patientERHHCInsertServicesList.first);
});
}
}

@ -0,0 +1,172 @@
import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class NewHomeHealthCareStepThreePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel
patientERInsertPresOrderRequestModel;
final Function changePageViewIndex;
final HomeHealthCareViewModel model;
NewHomeHealthCareStepThreePage(
{Key key,
this.patientERInsertPresOrderRequestModel,
this.changePageViewIndex,
this.model});
@override
_NewHomeHealthCareStepThreePageState createState() =>
_NewHomeHealthCareStepThreePageState();
}
class _NewHomeHealthCareStepThreePageState
extends State<NewHomeHealthCareStepThreePage> {
Completer<GoogleMapController> _controller = Completer();
static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746,
);
final Set<Marker> markers = new Set();
@override
void initState() {
if (widget.patientERInsertPresOrderRequestModel.latitude != null) {
markers.clear();
markers.add(
Marker(
markerId: MarkerId(
widget.patientERInsertPresOrderRequestModel.latitude.hashCode
.toString(),
),
position: LatLng(
widget.patientERInsertPresOrderRequestModel.latitude,
widget.patientERInsertPresOrderRequestModel.longitude)),
);
_kGooglePlex = CameraPosition(
target: LatLng(widget.patientERInsertPresOrderRequestModel.latitude,
widget.patientERInsertPresOrderRequestModel.longitude),
zoom: 14.4746,
);
}
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
width: double.maxFinite,
margin: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Order Details'),
SizedBox(
height: 12,
),
Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12)),
padding: EdgeInsets.all(8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Location :'),
SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 200,
child: GoogleMap(
mapType: MapType.normal,
markers: markers,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
),
),
),
SizedBox(
height: 12,
),
Texts('Selected Service :'),
...List.generate(
widget.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Service Name :',
fontSize: 12,
),
SizedBox(
height: 5,
),
Texts(
widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList[index]
.serviceName,
fontSize: 15,
bold: true,
),
],
),
),
)
],
),
),
SizedBox(
height: 57,
),
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Confirm",
disabled: widget.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList.length ==
0,
onTap: () async {
await widget.model.insertPresPresOrder(
order: widget.patientERInsertPresOrderRequestModel);
if (widget.model.state != ViewState.ErrorLocal) {
widget.changePageViewIndex(0);
}
},
textColor: Theme.of(context).backgroundColor),
),
],
),
),
);
}
}

@ -0,0 +1,112 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/close_back.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
final double longitude;
final PatientERInsertPresOrderRequestModel
patientERInsertPresOrderRequestModel;
final Function changePageViewIndex;
final HomeHealthCareViewModel model;
const NewHomeHealthCareStepTowPage(
{Key key,
this.onPick,
this.latitude,
this.longitude,
this.patientERInsertPresOrderRequestModel,
this.changePageViewIndex,
this.model})
: super(key: key);
@override
_NewHomeHealthCareStepTowPageState createState() =>
_NewHomeHealthCareStepTowPageState();
}
class _NewHomeHealthCareStepTowPageState
extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0;
double longitude = 0;
@override
void initState() {
if (widget.patientERInsertPresOrderRequestModel.latitude == null) {
latitude = widget.latitude;
longitude = widget.longitude;
} else {
latitude = widget.patientERInsertPresOrderRequestModel.latitude;
longitude = widget.patientERInsertPresOrderRequestModel.longitude;
}
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientERInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.patientERInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).next,
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: true,
),
);
}
}

@ -4,12 +4,15 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import '../StepsWidget.dart';
import 'new_Home_health_care_step_one_page.dart';
@ -18,7 +21,6 @@ class NewHomeHealthCarePage extends StatefulWidget {
NewHomeHealthCarePage({this.model});
final HomeHealthCareViewModel model;
@override
_NewHomeHealthCarePageState createState() => _NewHomeHealthCarePageState();
}
@ -27,7 +29,8 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
with TickerProviderStateMixin {
PageController _controller;
int _currentIndex = 1;
int pageSelected = 2;
double _latitude;
double _longitude;
PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel =
new PatientERInsertPresOrderRequestModel();
@ -36,8 +39,19 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
void initState() {
super.initState();
_controller = new PageController();
_getCurrentLocation();
}
_getCurrentLocation() async {
await getLastKnownPosition().then((value) {
_latitude = value.latitude;
_longitude = value.longitude;
}).catchError((e) {
_longitude = 0;
_latitude = 0;
});
}
@override
void dispose() {
super.dispose();
@ -285,6 +299,18 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
model: widget.model,
),
NewHomeHealthCareStepTowPage(
latitude: _latitude,
longitude: _longitude,
changePageViewIndex: _changeCurrentTab,
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
model: widget.model,
),
NewHomeHealthCareStepThreePage(
changePageViewIndex: _changeCurrentTab,
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel,
model: widget.model,
)
],
),

@ -13,7 +13,7 @@ class StepsWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return projectViewModel.isArabic? Stack(
return !projectViewModel.isArabic? Stack(
children: [
Container(
height: 50,

@ -1,35 +1,32 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.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/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/family/my-family.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.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.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:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'h2o/h2o_page.dart';
class AllHabibMedicalService extends StatefulWidget {
@override
@ -37,6 +34,17 @@ class AllHabibMedicalService extends StatefulWidget {
}
class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getAuthUser();
});
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -177,7 +185,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: EReferralIndexPage()),
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
@ -214,8 +225,9 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
title: TranslationBase.of(context).todoList,
),
ServicesContainer(
onTap: () => Navigator.of(context).pushNamed(
SYMPTOM_CHECKER,
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
@ -315,4 +327,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
);
}
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
print(authUser.patientID);
}
}
}

@ -235,7 +235,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
return children;
},
),
onDaySelected: (date, events,holidays) {
onDaySelected: (date, events,format) {
_onDaySelected(date, events);
_animationController.forward(from: 0.0);
},
@ -385,8 +385,8 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments>
color: _calendarController.isSelected(date)
? Colors.green[400]
: _calendarController.isToday(date)
? Colors.brown[300]
: Colors.blue[400],
? Colors.brown[300]
: Colors.blue[400],
),
width: 40.0,
height: 40.0,

@ -348,8 +348,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
return children;
},
),
onDaySelected: (date, events,holidays) {
_onDaySelected(date, events);
onDaySelected: (date, event,formats) {
_onDaySelected(date, event,);
_animationController.forward(from: 0.0);
},
onVisibleDaysChanged: _onVisibleDaysChanged,

@ -63,7 +63,6 @@ class _PickupLocationState extends State<PickupLocation> {
_longitude = 0;
_latitude = 0;
});
// currentLocation = LatLng(position.latitude, position.longitude);
}
@override
@ -364,7 +363,6 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
//TODO show dialog projects
SizedBox(
height: 45,

@ -172,7 +172,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
physics: NeverScrollableScrollPhysics(),
children: [
AppointmentActions(appo: widget.appo, tabController: _tabController, enableFooterButton: enableFooterButton),
DocAvailableAppointments(doctor: getDoctorObject())
DocAvailableAppointments(doctor: getDoctorObject(), isLiveCareAppointment: widget.appo.isLiveCareAppointment)
],
controller: _tabController,
),

@ -139,7 +139,7 @@ class _ToDoState extends State<ToDo> {
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 20.0, left: 20.0, right: 20.0),
top: 10.0, left: 20.0, right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,

@ -1,5 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -69,7 +68,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("SADAD");
updateSelectedPaymentMethod("VISA");
},
child: Card(
elevation: 3.0,
@ -77,7 +76,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "SADAD"
side: selectedPaymentMethod == "VISA"
? BorderSide(
color: Colors.green, width: 5.0)
: BorderSide(
@ -88,12 +87,41 @@ class _PaymentMethodState extends State<PaymentMethod> {
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset(
"assets/images/new-design/sadad.png"),
"assets/images/new-design/visa.png"),
),
),
),
),
),
// Expanded(
// child: Container(
// child: InkWell(
// onTap: () {
// updateSelectedPaymentMethod("SADAD");
// },
// child: Card(
// elevation: 3.0,
// margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
// color: Colors.white,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10),
// side: selectedPaymentMethod == "SADAD"
// ? BorderSide(
// color: Colors.green, width: 5.0)
// : BorderSide(
// color: Colors.transparent, width: 0.0),
// ),
// child: Container(
// height: 120.0,
// padding: EdgeInsets.all(7.0),
// width: MediaQuery.of(context).size.width * 0.45,
// child: Image.asset(
// "assets/images/new-design/sadad.png"),
// ),
// ),
// ),
// ),
// ),
],
),
),
@ -102,35 +130,6 @@ class _PaymentMethodState extends State<PaymentMethod> {
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("VISA");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "VISA"
? BorderSide(
color: Colors.green, width: 5.0)
: BorderSide(
color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset(
"assets/images/new-design/visa.png"),
),
),
),
),
),
Expanded(
child: Container(
child: InkWell(
@ -160,14 +159,6 @@ class _PaymentMethodState extends State<PaymentMethod> {
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
child: InkWell(
@ -200,6 +191,13 @@ class _PaymentMethodState extends State<PaymentMethod> {
],
),
),
Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[],
),
),
],
),
),

@ -24,7 +24,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
child: Container(
height: MediaQuery.of(context).size.height * 0.67,
height: 510.0,
width: 450.0,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -99,10 +99,10 @@ class _HomePageState extends State<HomePage> {
Container(
margin: EdgeInsets.only(
top: 15.0, left: 3.5, right: 3.5),
// child: SvgPicture.asset(
// 'assets/images/new-design/covid-19-car.svg',
// width: 45.0,
// height: 45.0),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
),
Container(
margin: EdgeInsets.only(
@ -176,11 +176,11 @@ class _HomePageState extends State<HomePage> {
.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
// child: SvgPicture.asset(
// projectViewModel.isArabic
// ? 'assets/images/new-design/livecare_arabic_logo.svg'
// : 'assets/images/new-design/liveCare_white_logo.svg',
// ),
child: SvgPicture.asset(
projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg',
),
),
),
),

@ -123,7 +123,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
AppGlobal.context = context;
});
_requestIOSPermissions();
pageController = PageController(keepPage: true);
pageController = PageController(keepPage: true);
// _firebaseMessaging.setAutoInitEnabled(true);
//
// if (Platform.isIOS) {

@ -36,13 +36,13 @@ class _State extends State<ClinicCard> {
return Row(
children: <Widget>[
Card(
margin: EdgeInsets.fromLTRB(13.0, 10.0, 8.0, 8.0),
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
width: MediaQuery.of(context).size.width * 0.75,
padding: EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -17,8 +17,11 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
@ -81,7 +84,13 @@ class _clinic_listState extends State<ClinicList> {
service
.getERAppointmentFees(selectedClinicID, context)
.then((res) {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
if (res['HasAppointment'] == true) {
isError = true;
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
} else {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
isError = false;
}
})
.catchError((err) {
print(err);
@ -97,10 +106,57 @@ class _clinic_listState extends State<ClinicList> {
});
}
showLiveCareCancelDialog(String msg, res) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: msg,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () =>
{cancelAppointment(res)},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
cancelAppointment(res) {
AppoitmentAllHistoryResultList appo = AppoitmentAllHistoryResultList();
appo.clinicID = res['ClinicID'];
appo.doctorID = res['DoctorID'];
appo.endTime = res['EndTime'];
appo.projectID = res['ProjectID'];
appo.startTime = res['StrAppointmentDate'];
appo.appointmentNo = res['AppointmentID'];
appo.isLiveCareAppointment = true;
appo.originalClinicID = 0;
appo.originalProjectID = res['ProjectID'];
appo.appointmentDate = res['AppointmentDate'];
ConfirmDialog.closeAlertDialog(context);
DoctorsListService service = new DoctorsListService();
service
.cancelAppointment(appo, context)
.then((res) {
print(res);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
startLiveCare();
});
}
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
LiveCareService service = new LiveCareService();
service.getERAppointmentTime(selectedClinicID, context).then((res) {
print(res['WatingtimeInteger']);
print(res);
showLiveCarePaymentDialog(
getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) {

@ -247,8 +247,8 @@ class ConfirmPaymentPage extends StatelessWidget {
DoctorsListService service = new DoctorsListService();
service
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
Utils.getAdvancePaymentTransID(
appo.projectID, authenticatedUser.patientID),
AppGlobal.context)
.then((res) {
print("Printing Payment Status Reponse!!!!");
@ -302,5 +302,4 @@ class ConfirmPaymentPage extends StatelessWidget {
Future navigateToHome(context) async {
Navigator.of(context).pushNamed(HOME);
}
}

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
@ -407,10 +408,10 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
flex: 1,
child: InkWell(
//TODO
// onTap: () {
// Navigator.push(
// context, FadePage(page: DoctorHomePage()));
// },
onTap: () {
Navigator.push(
context, FadePage(page: SmartWatchInstructions()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
.smartWatches,

@ -0,0 +1,145 @@
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class HealthDataList extends StatefulWidget {
@override
_HealthDataListState createState() => _HealthDataListState();
}
class _HealthDataListState extends State<HealthDataList> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "Smartwatches",
isShowAppBar: true,
body: Container(
height: MediaQuery.of(context).size.height,
margin: EdgeInsets.all(20.0),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
child: Image.asset(
"assets/images/SmartWatches/heartrate_icon.png",
width: 60.0,
height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Heart Rate",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
Divider(
color: Colors.grey[500],
),
Row(
children: [
Container(
child: Image.asset(
"assets/images/SmartWatches/sleep_data.png",
width: 60.0,
height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Sleep Data",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
Divider(
color: Colors.grey[500],
),
Row(
children: [
Container(
child: Image.asset(
"assets/images/SmartWatches/heartrate_icon.png",
width: 60.0,
height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Steps",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
Divider(
color: Colors.grey[500],
),
Row(
children: [
Container(
child: Image.asset(
"assets/images/SmartWatches/heartrate_icon.png",
width: 60.0,
height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Distance",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
Divider(
color: Colors.grey[500],
),
Row(
children: [
Container(
child: Image.asset(
"assets/images/SmartWatches/heartrate_icon.png",
width: 60.0,
height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Energy",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
Divider(
color: Colors.grey[500],
),
],
),
),
),
bottomSheet: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.1,
color: Colors.grey[100],
child: Column(
children: <Widget>[
Divider(
color: Colors.transparent,
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
onTap: () {
// launch(model.radImageURL);
},
label: 'Sync Health Data',
backgroundColor: Colors.grey[800],
),
),
],
),
));
}
}

@ -0,0 +1,819 @@
import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class SmartWatchInstructions extends StatefulWidget {
@override
_SmartWatchInstructionsState createState() => _SmartWatchInstructionsState();
}
class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
CarouselController buttonCarouselController = CarouselController();
bool hasAlreadySynced = false;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getLastPatientRecord(context);
});
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "Sync Health Data",
isShowAppBar: true,
body: Container(
child: Platform.isIOS
? _getAppleWatchInstructions()
: _getGoogleWatchInstructions(),
));
}
_getAppleWatchInstructions() {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: CarouselSlider(
carouselController: buttonCarouselController,
options: CarouselOptions(
enableInfiniteScroll: false,
viewportFraction: 0.95,
height: MediaQuery.of(context).size.height * 0.9),
items: [1, 2].map((i) {
return Builder(
builder: (BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 5.0),
child: Card(
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white.withOpacity(1.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: i == 1
? Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Supported Smartwatches",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
),
Container(
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-1.jpeg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Apple Watch Series 1",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-2.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Apple Watch Series 2",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-3.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Apple Watch Series 3",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-4.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Apple Watch Series 4",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-5.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Apple Watch Series 5",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/Apple-Watch-6.png",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Apple Watch Series 6",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand3.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text("Mi Band 3",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand4.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text("Mi Band 4",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.fromLTRB(
10.0, 30.0, 10.0, 10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Before syncing data, please make sure that you have followed the instructions properly",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("CONTINUE",
style: TextStyle(fontSize: 18.0)),
),
),
),
],
)
: Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Watch Instructions:",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.fromLTRB(
10.0, 20.0, 10.0, 10.0),
child: Text(
"Before syncing data, please make sure that following instructions are met: ",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.fromLTRB(
10.0, 20.0, 10.0, 10.0),
child: Text(
"1. Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"2. Make sure that your Apple Watch is connected with the Watch & Health Apps.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"3. Make sure that data like heart rate, steps, distance etc. are being shown on your health app.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.fromLTRB(
15.0, 110.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("SYNC HEALTH DATA",
style: TextStyle(fontSize: 18.0)),
),
),
),
hasAlreadySynced ? Container(
margin: EdgeInsets.fromLTRB(
15.0, 0.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
_openHealthDataList();
},
child: Text("ALREADY SYNCED",
style: TextStyle(fontSize: 18.0)),
),
),
): Container(),
],
),
));
},
);
}).toList(),
),
)
],
),
);
}
_getGoogleWatchInstructions() {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: CarouselSlider(
carouselController: buttonCarouselController,
options: CarouselOptions(
enableInfiniteScroll: false,
viewportFraction: 0.95,
height: MediaQuery.of(context).size.height * 0.9),
items: [1, 2].map((i) {
return Builder(
builder: (BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 5.0),
child: Card(
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white.withOpacity(1.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: i == 1
? Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Supported Smartwatches",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
),
Container(
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/huawei-watch-2.png",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Huawei Watch 2",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/ticwatche2.png",
width: 70.0,
height: 70.0),
Container(
child: Text(
"Mobovi TicWatch E2",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/huawei-watch-2-classic.png",
width: 70.0,
height: 70.0),
Container(
child: Text("Huawei Watch",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/ticwatche2.png",
width: 70.0,
height: 70.0),
Container(
child: Text("Fossil Sport",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/misfit-vapor-2.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"MisFit Vapor 2",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/lg-watch-sport.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text(
"LG Watch Sport",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand3.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text("Mi Band 3",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand4.jpg",
width: 70.0,
height: 70.0),
Container(
child: Text("Mi Band 4",
style: TextStyle(
fontSize: 12.0)),
)
],
),
),
),
],
),
),
InkWell(
onTap: () {
launch(
"https://wearos.google.com/#find-your-watch");
},
child: Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(
"More Supported Smartwatches...",
style: TextStyle(
fontSize: 17.0,
color: Colors.blue,
decoration:
TextDecoration.underline)),
),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Before syncing data, please make sure that you have followed the instructions properly",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("CONTINUE",
style: TextStyle(fontSize: 18.0)),
),
),
),
],
)
: Column(
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Watch Instructions:",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Before syncing data, please make sure that following instructions are met: ",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"2. Make sure that you have installed your watch related apps from Google PlayStore.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"4. Make sure that your smart watch apps are linked/associated with Google Fit App.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
),
Container(
margin: EdgeInsets.fromLTRB(
15.0, 95.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("SYNC HEALTH DATA",
style: TextStyle(fontSize: 18.0)),
),
),
),
hasAlreadySynced ? Container(
margin: EdgeInsets.fromLTRB(
15.0, 0.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
_openHealthDataList();
},
child: Text("ALREADY SYNCED",
style: TextStyle(fontSize: 18.0)),
),
),
) : Container(),
],
),
));
},
);
}).toList(),
),
)
],
),
);
}
getLastPatientRecord(BuildContext context) {
SmartWatchIntegrationService service = new SmartWatchIntegrationService();
service.getLastPatientRecord(context).then((res) {
if (res['MessageStatus'] == 1) {
print(res['Med_GetPatientLastRecordList']);
setState(() {
if (res['Med_GetPatientLastRecordList'] != null)
hasAlreadySynced = true;
else
hasAlreadySynced = false;
});
} else {}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
}
_openHealthDataList() {
Navigator.push(
context, MaterialPageRoute(builder: (context) => HealthDataList()));
}
}

@ -0,0 +1,131 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/routes.dart';
class SymptomInfo extends StatefulWidget {
@override
_SymptomInfo createState() => new _SymptomInfo();
}
class _SymptomInfo extends State<SymptomInfo> {
bool checkValue = false;
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).termsService,
isShowAppBar: true,
body: Padding(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).beforeUsing,
fontWeight: FontWeight.bold,
fontSize: 14,
// textAlign: TextAlign.center,
),
Container(
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
),
padding: EdgeInsets.all(30),
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
AppText(TranslationBase.of(context).remeberthat,
fontSize: 16),
SizedBox(
height: 10,
),
AppText(
'1. ' + TranslationBase.of(context).checkDiagnosis,
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(TranslationBase.of(context).informational,
fontSize: 16),
SizedBox(
height: 10,
),
AppText(
'2. ' + TranslationBase.of(context).notUseInEmbergency,
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(
TranslationBase.of(context).notUseInEmbergencyDetails,
fontSize: 16),
AppText(
TranslationBase.of(context).notUseInEmbergencyCall,
underline: true,
color: Colors.blue,
fontSize: 16),
SizedBox(
height: 10,
),
AppText(
'3.' + TranslationBase.of(context).dataSafe,
fontWeight: FontWeight.bold,
fontSize: 16,
),
AppText(TranslationBase.of(context).dataSafeInfo,
fontSize: 16),
],
),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Padding(
padding: EdgeInsets.all(10),
child: CheckboxListTile(
title: AppText(TranslationBase.of(context).accept),
value: checkValue,
onChanged: (newValue) {
setState(() {
this.checkValue = newValue;
});
},
controlAffinity: ListTileControlAffinity
.leading, // <-- leading Checkbox
),
),
Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).next,
() => {
if (checkValue == true)
{
Navigator.of(context).pushNamed(
SELECT_GENDER,
)
}
},
color: checkValue == true
? Colors.black
: Colors.grey,
textColor: Colors.white,
))
],
),
],
))
],
)));
}
}

@ -0,0 +1,124 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:flutter_xlider/flutter_xlider.dart';
class SelectGender extends StatefulWidget {
@override
_SelectGender createState() => new _SelectGender();
}
class _SelectGender extends State<SelectGender> {
double slider = 22;
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).gender,
isShowAppBar: true,
body: Padding(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
//TranslationBase.of(context).beforeUsing,
TranslationBase.of(context).selectGender,
fontWeight: FontWeight.bold,
fontSize: 20,
// textAlign: TextAlign.center,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
AppText(TranslationBase.of(context).iAma, fontSize: 16),
SizedBox(
height: 10,
),
Row(
children: [
Expanded(
child: Container(
height: 200,
width: 150,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
shadowColor: Colors.red,
child: Image.asset(
'assets/images/female_face.png')))),
Expanded(
child: Container(
height: 200,
width: 150,
child: Card(
shadowColor: Colors.red,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
child: Image.asset(
'assets/images/male_face.png'))))
],
),
AppText(TranslationBase.of(context).selectAge,
fontSize: 25),
SizedBox(
height: 10,
),
AppText(
TranslationBase.of(context).iAm +
' ' +
slider.toString() +
' ' +
TranslationBase.of(context)
.yearOld, //TranslationBase.of(context).remeberthat,
fontSize: 16),
SizedBox(
height: 30,
),
FlutterSlider(
values: [slider],
max: 90,
min: 14,
onDragCompleted: (handlerIndex, lowerValue, upperValue) {
print(lowerValue);
print(upperValue);
setState(() {
slider = upperValue;
});
},
),
],
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: DefaultButton(
TranslationBase.of(context).next,
() => {
Navigator.of(context).pushNamed(
SYMPTOM_CHECKER,
)
},
))
],
),
],
))
],
)));
}
}

File diff suppressed because one or more lines are too long

@ -10,6 +10,8 @@ import 'package:diplomaticquarterapp/pages/login/login.dart';
import 'package:diplomaticquarterapp/pages/login/register.dart';
import 'package:diplomaticquarterapp/pages/family/add-family_type.dart';
import 'package:diplomaticquarterapp/pages/family/add-family-member.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/symtom-checker.dart';
const String INIT_ROUTE = '/';
@ -27,6 +29,8 @@ const String ADD_FAMILY_MEMBER_TYPE = 'add-family-member-type';
const String ADD_FAMILY_MEMBER = 'add-family-member';
const String LIVE_CARE = 'live-care';
const String SYMPTOM_CHECKER = 'symptom-checker';
const String SYMPTOM_CHECKER_INFO = 'symptom-checker-info';
const String SELECT_GENDER = 'select-gender';
var routes = {
HOME: (_) => LandingPage(),
WELCOME_LOGIN: (_) => WelcomeLogin(),
@ -40,5 +44,7 @@ var routes = {
ADD_FAMILY_MEMBER_TYPE: (_) => AddFamilyMemberType(),
ADD_FAMILY_MEMBER: (_) => AddMember(),
LIVE_CARE: (_) => LiveCareHome(),
SYMPTOM_CHECKER: (_) => SymptomChecker()
SYMPTOM_CHECKER: (_) => SymptomChecker(),
SYMPTOM_CHECKER_INFO: (_) => SymptomInfo(),
SELECT_GENDER: (_) => SelectGender()
};

@ -66,7 +66,8 @@ class DoctorsListService extends BaseService {
// "Latitude": 0,
// "Longitude": 0,
// "License": true,
"IsVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false,
"SearchForVoiceCommand":
doctorId != null && doctorId.length > 0 ? true : false,
"DoctorIDsList": doctorId,
"Latitude": lat != null ? lat.toString() : 0,
"Longitude": long != null ? long.toString() : 0,
@ -212,8 +213,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getDoctorScheduledFreeSlots(
int docID, int clinicID, int projectID, int serviceID, BuildContext context) async {
Future<Map> getDoctorScheduledFreeSlots(int docID, int clinicID,
int projectID, int serviceID, BuildContext context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
@ -241,10 +242,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
@ -301,8 +302,14 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> insertLiveCareScheduleAppointment(int docID, int clinicID, int projectID, int serviceID,
String selectedTime, String selectedDate, BuildContext context) async {
Future<Map> insertLiveCareScheduleAppointment(
int docID,
int clinicID,
int projectID,
int serviceID,
String selectedTime,
String selectedDate,
BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -348,10 +355,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(INSERT_LIVECARE_SCHEDULE_APPOINTMENT,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
@ -437,10 +444,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(GET_PATIENT_SHARE_LIVECARE,
onSuccess: (response, statusCode) async {
localRes = response['OnlineCheckInAppointments'][0];
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response['OnlineCheckInAppointments'][0];
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
@ -519,8 +526,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> confirmAppointment(
int appoNo, int clinicID, int projectID, bool isLiveCare, BuildContext context) async {
Future<Map> confirmAppointment(int appoNo, int clinicID, int projectID,
bool isLiveCare, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -564,9 +571,8 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> insertVIDARequest(
int appoNo, int clinicID, int projectID, int serviceID, int docID, BuildContext context) async {
Future<Map> insertVIDARequest(int appoNo, int clinicID, int projectID,
int serviceID, int docID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -613,10 +619,10 @@ class DoctorsListService extends BaseService {
await baseAppClient.post(INSERT_VIDA_REQUEST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}

@ -0,0 +1,54 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart';
class SmartWatchIntegrationService extends BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences();
AppGlobal appGlobal = new AppGlobal();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
Future<Map> getLastPatientRecord(BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getString(APP_LANGUAGE);
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"License": true
};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_LAST_RECORD,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -1,6 +1,7 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/localized_values.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart';
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/material.dart';
@ -95,9 +96,11 @@ class TranslationBase {
String get confirm => localizedValues['confirm'][locale.languageCode];
String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode];
String get confirmLiveCare =>
localizedValues['confirmLiveCare'][locale.languageCode];
String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode];
String get waitingForDoctor =>
localizedValues['waitingForDoctor'][locale.languageCode];
String get confirmLater =>
localizedValues['confirmLater'][locale.languageCode];
@ -674,15 +677,23 @@ class TranslationBase {
localizedValues['DoctorResponses'][locale.languageCode];
String get newDes => localizedValues['New'][locale.languageCode];
String get all => localizedValues['All'][locale.languageCode];
String get questionHere => localizedValues['QuestionHere'][locale.languageCode];
String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode];
String get serviceInformation => localizedValues['ServiceInformation'][locale.languageCode];
String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode];
String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode];
String get loginRegister => localizedValues['LoginRegister'][locale.languageCode];
String get questionHere =>
localizedValues['QuestionHere'][locale.languageCode];
String get viewDoctorResponses =>
localizedValues['ViewDoctorResponses'][locale.languageCode];
String get serviceInformationButton =>
localizedValues['ServiceInformationButton'][locale.languageCode];
String get serviceInformationTitle =>
localizedValues['ServiceInformationTitle'][locale.languageCode];
String get serviceInformation =>
localizedValues['ServiceInformation'][locale.languageCode];
String get homeHealthCare =>
localizedValues['HomeHealthCare'][locale.languageCode];
String get homeHealthCareText =>
localizedValues['HomeHealthCareText'][locale.languageCode];
String get loginRegister =>
localizedValues['LoginRegister'][locale.languageCode];
String get orderLog => localizedValues['OrderLog'][locale.languageCode];
String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode];
String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode];
String get infoLab => localizedValues['info-lab'][locale.languageCode];
String get infoRadiology => localizedValues['info-radiology'][locale.languageCode];
@ -695,6 +706,33 @@ class TranslationBase {
String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode];
String get bestSellers => localizedValues['bestSellers'][locale.languageCode];
String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode];
String get infoRadiology =>
localizedValues['info-radiology'][locale.languageCode];
String get termsService =>
localizedValues['TermsService'][locale.languageCode];
String get beforeUsing => localizedValues['Beforeusing'][locale.languageCode];
String get accept => localizedValues['accept'][locale.languageCode];
String get dataSafeInfo =>
localizedValues['data-safe-info'][locale.languageCode];
String get dataSafe => localizedValues['data-safe'][locale.languageCode];
String get informational =>
localizedValues['informational'][locale.languageCode];
String get checkDiagnosis =>
localizedValues['check-diagnosis'][locale.languageCode];
String get remeberthat => localizedValues['remeberthat'][locale.languageCode];
String get notUseInEmbergency =>
localizedValues['not-use-in-emerbency'][locale.languageCode];
String get notUseInEmbergencyDetails =>
localizedValues['not-use-in-emerbency-details'][locale.languageCode];
String get notUseInEmbergencyCall =>
localizedValues['not-use-in-emerbency-details-call'][locale.languageCode];
String get selectGender =>
localizedValues['select-gender'][locale.languageCode];
String get iAma => localizedValues['i-am-a'][locale.languageCode];
String get selectAge => localizedValues['select-age'][locale.languageCode];
String get iAm => localizedValues['i-am'][locale.languageCode];
String get yearOld => localizedValues['years-old'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -257,11 +257,17 @@ class _TextsState extends State<Texts> {
hidden = !hidden;
});
},
child: Text(hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w800,
fontFamily: "WorkSans")),
child: Text(
hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w800,
fontFamily:
Localizations.localeOf(context).languageCode == 'ar'
? 'Cairo'
: 'WorkSans',
),
),
),
),
],

@ -51,7 +51,8 @@ class AppScaffold extends StatelessWidget {
this.floatingActionButton,
this.title,
this.description,
this.isShowDecPage = true, this.isBottomBar,this.backgroundColor});
this.isShowDecPage = true,
this.isBottomBar,this.backgroundColor});
@override
Widget build(BuildContext context) {
@ -69,7 +70,8 @@ class AppScaffold extends StatelessWidget {
),
title: Text(authenticatedUserObject.isLogin
? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle),leading: Builder(
: TranslationBase.of(context).serviceInformationTitle),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
},
@ -80,7 +82,10 @@ class AppScaffold extends StatelessWidget {
icon: Icon(FontAwesomeIcons.home),
color: Colors.white,
onPressed: () {
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
},
),
],
@ -91,14 +96,14 @@ class AppScaffold extends StatelessWidget {
title: appBarTitle,
description: description,
)
:baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(),
: baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(),
baseViewModel: baseViewModel,
)
: buildBodyWidget(),
bottomSheet: bottomSheet,
floatingActionButton: floatingActionButton ?? floatingActionButton,
//floatingActionButton: floatingActionButton ?? floatingActionButton,
// bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox()
// floatingActionButton: FloatingSearchButton(),

@ -34,9 +34,10 @@ class PickupLocationFromMap extends StatelessWidget {
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
selectInitialPosition: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
onPick(result);

@ -70,6 +70,7 @@ dependencies:
# Notification Banner
dropdown_banner: ^1.4.0
flutter_xlider: ^3.4.0
# flutter_local_notifications:
# charts
@ -78,6 +79,8 @@ dependencies:
#image banner slider
carousel_slider: ^2.3.1
google_maps_flutter: ^1.0.3
# Qr code Scanner TODO fix it
#barcode_scan: ^3.0.1
@ -180,9 +183,33 @@ flutter:
fonts:
- family: WorkSans
fonts:
- asset: assets/fonts/Work_Sans/WorkSans-Regular.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Light_0.eot
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Light_0.otf
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Light_0.ttf
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Light_0.woff
weight: 300
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Regular.otf
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Regular.ttf
- asset: assets/fonts/en/WorkSans-Light/WorkSans-Regular.woff
weight: 400
- asset: assets/fonts/en/WorkSans-Bold/WorkSans-Bold.eot
- asset: assets/fonts/en/WorkSans-Bold/WorkSans-Bold.otf
- asset: assets/fonts/en/WorkSans-Bold/WorkSans-Bold.ttf
- asset: assets/fonts/en/WorkSans-Bold/WorkSans-Bold.woff
weight: 700
- family: Cairo
fonts:
- asset: assets/fonts/ar/Cairo-Light/Cairo-Light.eot
- asset: assets/fonts/ar/Cairo-Light/Cairo-Light.otf
- asset: assets/fonts/ar/Cairo-Light/Cairo-Light.ttf
- asset: assets/fonts/ar/Cairo-Light/Cairo-Light.woff
weight: 300
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf
- asset: assets/fonts/ar/Cairo-Bold/Cairo-Bold.woff
weight: 700
- family: DQIcons

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Loading…
Cancel
Save