From fe66dfe571be46bd440c0c099662d585586de0ef Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 4 Jun 2020 10:01:51 +0300 Subject: [PATCH 1/4] fix table cell --- lib/widgets/patients/vital_sign_details_wideget.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart index 437b4085..a2354e45 100644 --- a/lib/widgets/patients/vital_sign_details_wideget.dart +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -86,7 +86,7 @@ class _VitalSignDetailsWidgetState extends State { tableRow.add(TableRow(children: [ Expanded( child: Container( - height: 50, + padding: EdgeInsets.all(10), color: Colors.white, child: Center( child: Texts( @@ -98,7 +98,7 @@ class _VitalSignDetailsWidgetState extends State { ), Expanded( child: Container( - height: 50, + padding: EdgeInsets.all(10), color: Colors.white, child: Center( child: Texts( From 86d0d52f05e5ee5ed712a30b252f5bd53bc9c792 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Thu, 4 Jun 2020 10:05:14 +0300 Subject: [PATCH 2/4] SVG female --- lib/screens/patients/patients_screen.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index b5ec9b83..e958244f 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -398,9 +398,9 @@ class _PatientsScreenState extends State { url + avatarFemale, height: - 100.0, + 80.0, width: - 100.0, + 80.0, semanticsLabel: 'Female Logo') ], From 1935b781d6a0994380175b502a25d570e7ad6272 Mon Sep 17 00:00:00 2001 From: Amjad Amireh Date: Thu, 4 Jun 2020 12:56:42 +0300 Subject: [PATCH 3/4] Localization comment --- lib/config/localized_values.dart | 9 +++++++++ lib/util/translations_delegate_base.dart | 10 ++++++++++ .../doctor/my_referred_patient_widget.dart | 19 ++++++++++--------- .../shared/card_with_bgNew_widget.dart | 4 ++-- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 93575607..727bcee4 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -11,5 +11,14 @@ const Map> localizedValues = { 'messagesScreenToolbarTitle' : {'en': 'Messages','ar': 'الرسائل' }, 'mySchedule' : {'en': 'My Schedule', 'ar' : 'جدولي'}, 'errorNoSchedule' :{'en': 'You don\'t have any Schedule' , 'ar': 'ليس لديك أي جدول زمني'}, + 'verify': {'en': 'Verify', 'ar' : 'تحقق'}, + 'referralDoctor':{'en': 'Referral Doctor', 'ar' : 'الطبيب المُحول إليه'}, + 'referringClinic':{'en': 'Referring Clinic', 'ar' : 'العيادة المُحول إليها'}, + 'frequency':{'en': 'Frequency', 'ar' : 'نوع التحويلا'}, + 'priority':{'en': 'Priority', 'ar' : 'الأولوية'}, + 'maxResponseTime':{'en': 'Max Response Time', 'ar' : 'الوقت الأقصى للرد'}, + 'clinicDetailsandRemarks':{'en': 'Clinic Details and Remarks', 'ar' : 'ملاحضات وتفاصيل العيادة'}, + 'answerSuggestions':{'en': 'Answer/Suggestions', 'ar' : 'ملاحضات وتفاصيل العيادة'}, + }; diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index b5f75602..f6fc660a 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -40,6 +40,16 @@ class TranslationBase { String get errorNoSchedule => localizedValues['errorNoSchedule'][locale.languageCode]; + String get verify => localizedValues['verify'][locale.languageCode]; + String get referralDoctor => localizedValues['referralDoctor'][locale.languageCode]; + String get referringClinic => localizedValues['referringClinic'][locale.languageCode]; + String get frequency => localizedValues['frequency'][locale.languageCode]; + String get priority => localizedValues['priority'][locale.languageCode]; + String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; + String get clinicDetailsandRemarks=> localizedValues['clinicDetailsandRemarks'][locale.languageCode]; + String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; + + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/doctor/my_referred_patient_widget.dart b/lib/widgets/doctor/my_referred_patient_widget.dart index af5ea4f8..1af712ff 100644 --- a/lib/widgets/doctor/my_referred_patient_widget.dart +++ b/lib/widgets/doctor/my_referred_patient_widget.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/models/my_referral_patient_model.dart'; import 'package:doctor_app_flutter/models/my_referred_patient_model.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; @@ -96,7 +97,7 @@ class _MyReferredPatientWidgetState extends State { CrossAxisAlignment.start, children: [ AppText( - 'File No', + TranslationBase.of(context).fileNo, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, @@ -124,7 +125,7 @@ class _MyReferredPatientWidgetState extends State { CrossAxisAlignment.start, children: [ AppText( - 'Referral Doctor', + TranslationBase.of(context).referralDoctor, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, @@ -151,7 +152,7 @@ class _MyReferredPatientWidgetState extends State { CrossAxisAlignment.start, children: [ AppText( - 'Referring Clinic', + TranslationBase.of(context).referringClinic, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, @@ -179,7 +180,7 @@ class _MyReferredPatientWidgetState extends State { CrossAxisAlignment.start, children: [ AppText( - 'Frequency', + TranslationBase.of(context).frequency, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, @@ -207,7 +208,7 @@ class _MyReferredPatientWidgetState extends State { CrossAxisAlignment.start, children: [ AppText( - 'Priority', + TranslationBase.of(context).priority, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, @@ -235,7 +236,7 @@ class _MyReferredPatientWidgetState extends State { CrossAxisAlignment.start, children: [ AppText( - 'Max Response Time', + TranslationBase.of(context).maxResponseTime, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, @@ -263,7 +264,7 @@ class _MyReferredPatientWidgetState extends State { height: 5, ), AppText( - 'Clinic Details and Remarks', + TranslationBase.of(context).clinicDetailsandRemarks, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, textAlign: TextAlign.start, @@ -281,7 +282,7 @@ class _MyReferredPatientWidgetState extends State { height: 5, ), AppText( - 'Answer/Suggestions', + TranslationBase.of(context).answerSuggestions, fontSize: 1.7 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, textAlign: TextAlign.start, @@ -319,7 +320,7 @@ class _MyReferredPatientWidgetState extends State { DrAppToastMsg.showErrorToast(e); } }, - title: 'Verify', + title: TranslationBase.of(context).verify, loading: _isLoading, ), ) diff --git a/lib/widgets/shared/card_with_bgNew_widget.dart b/lib/widgets/shared/card_with_bgNew_widget.dart index 130d1b84..25cb509c 100644 --- a/lib/widgets/shared/card_with_bgNew_widget.dart +++ b/lib/widgets/shared/card_with_bgNew_widget.dart @@ -36,11 +36,11 @@ class CardWithBgWidgetNew extends StatelessWidget { children: [ Center( child: Container( - padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 + // padding:EdgeInsets.fromLTRB(0, 10,0, 10), //EdgeInsets.all(10.0),//10 // margin: EdgeInsets.only(left: 10), child: Padding( padding: const EdgeInsets.all(8.0), - child: widget, + child: Center(child: widget), )), ) ], From 40eb7f8064f77c7aa4e4dad251d720cb4deabd9d Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 4 Jun 2020 17:42:52 +0300 Subject: [PATCH 4/4] improve vital sgin and return the correct color to login header --- lib/config/config.dart | 4 +- lib/lookups/home_items_lookup.dart | 66 ----- lib/lookups/hospital_lookup.dart | 218 ++++++++++++++ .../vital_sign/vital_sign_details_screen.dart | 274 ++++++++++-------- .../profile/vital_sign/vital_sign_item.dart | 14 +- lib/widgets/auth/auth_header.dart | 7 +- lib/widgets/auth/login_form.dart | 18 +- 7 files changed, 396 insertions(+), 205 deletions(-) delete mode 100644 lib/lookups/home_items_lookup.dart create mode 100644 lib/lookups/hospital_lookup.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index f4494a91..5781a91d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -2,8 +2,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z]"; const ONLY_DATE = "[0-9/]"; -const BASE_URL = 'https://hmgwebservices.com/Services/'; -//const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; +// const BASE_URL = 'https://hmgwebservices.com/Services/'; +const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/lookups/home_items_lookup.dart b/lib/lookups/home_items_lookup.dart deleted file mode 100644 index 63b66844..00000000 --- a/lib/lookups/home_items_lookup.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:doctor_app_flutter/models/category_models.dart'; -import 'package:doctor_app_flutter/routes.dart'; - -const DUMMY_CATEGORIES = const [ - Category( - id: 'c1', - title: 'My Schedule', - image: 'assets/images/user_id_icon.png', - link: MY_SCHEDULE), - Category( - id: 'c2', - title: 'Patient Search', - image: 'assets/images/user_id_icon.png', - link: PATIENT_SEARCH), - Category( - id: 'c3', - title: 'outPatiant', - image: 'assets/images/user_id_icon.png', - link: PATIENTS), - Category( - id: 'c4', - title: 'InPatiant', - image: 'assets/images/user_id_icon.png', - link: PATIENTS), - Category( - id: 'c5', - title: 'Referral', - image: 'assets/images/user_id_icon.png', - link: PATIENTS), - Category( - id: 'c6', - title: 'Referred', - image: 'assets/images/user_id_icon.png', - link: PATIENTS), - Category( - id: 'c7', - title: 'Discharged Patient', - image: 'assets/images/user_id_icon.png', - link: PATIENTS), - Category( - id: 'c8', - title: 'Referral Discharge', - image: 'assets/images/user_id_icon.png', - link: PATIENTS), - Category( - id: 'c9', - title: 'Search For Medicine', - image: 'assets/images/user_id_icon.png', - link: MEDICINE_SEARCH), - Category( - id: 'c10', - title: 'Doctor Reply', - image: 'assets/images/user_id_icon.png', - link: DOCTOR_REPLY), - Category( - id: 'c11', - title: 'Blood Bank', - image: 'assets/images/user_id_icon.png', - link: BLOOD_BANK), - Category( - id: 'c12', - title: 'QR Reader', - image: 'assets/images/user_id_icon.png', - link: QR_READER), - ]; - \ No newline at end of file diff --git a/lib/lookups/hospital_lookup.dart b/lib/lookups/hospital_lookup.dart new file mode 100644 index 00000000..7e99a42b --- /dev/null +++ b/lib/lookups/hospital_lookup.dart @@ -0,0 +1,218 @@ + List ListProject= [ + { + "Desciption": "Dubai Hospital", + "DesciptionN": null, + "ID": 2, + "LegalName": "Dr. Sulaiman Al Habib Hospital FZ - LLC ", + "LegalNameN": "مستشفى الدكتور سليمان الحبيب منطقة حرة - ذ.م.م", + "Name": "Dubai Hospital", + "NameN": null, + "PhoneNumber": "+97144297777", + "SetupID": "505005", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "25.231273", + "Longitude": "55.320942", + "MainProjectID": 2, + "ProjectOutSA": true, + "UsingInDoctorApp": true + }, + { + "Desciption": "SZR Center", + "DesciptionN": null, + "ID": 3, + "LegalName": "Dr. Sulaiman Al Habib Hospital SZR - LLC ", + "LegalNameN": "مستشفى الدكتور سليمان الحبيب طريق الشيخ زايد", + "Name": "SZR Medical Center", + "NameN": null, + "PhoneNumber": "+97144297777", + "SetupID": "505005", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "25.154501", + "Longitude": "55.226000", + "MainProjectID": 3, + "ProjectOutSA": true, + "UsingInDoctorApp": true + }, + { + "Desciption": "Home Health Care (HHC)", + "DesciptionN": null, + "ID": 95, + "LegalName": "", + "LegalNameN": "", + "Name": "Home Health Care (HHC)", + "NameN": null, + "PhoneNumber": "+966114622224", + "SetupID": "91877 ", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.704242", + "Longitude": "46.675823", + "MainProjectID": 12, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Olaya Hospital", + "DesciptionN": null, + "ID": 12, + "LegalName": "from Sehat Al Olaya Medical Complex Company", + "LegalNameN": "شركة مجمع صحة العليا الطبي ", + "Name": "Olaya Hospital", + "NameN": null, + "PhoneNumber": "+966114622224", + "SetupID": "91877 ", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.704242", + "Longitude": "46.675823", + "MainProjectID": 12, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Ajaji Dental Clinic (AMS)", + "DesciptionN": null, + "ID": 99, + "LegalName": "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company", + "LegalNameN": "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان", + "Name": "Ajaji Dental Clinic (AMS)", + "NameN": null, + "PhoneNumber": "+966115259999", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Ajaji Dental Clinic (AMS)", + "DesciptionN": null, + "ID": 100, + "LegalName": "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company", + "LegalNameN": "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان", + "Name": "Ajaji Dental Clinic (AMS) Malaz", + "NameN": null, + "PhoneNumber": "+966115259999", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Arryan Hospital", + "DesciptionN": null, + "ID": 15, + "LegalName": "Al Rayan Hospital for Healthcare Company ", + "LegalNameN": "شركة مستشفى الريان للرعاية الطبية", + "Name": "Arryan Hospital", + "NameN": null, + "PhoneNumber": "+966114909999", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "MD Lab", + "DesciptionN": null, + "ID": 150, + "LegalName": "", + "LegalNameN": "", + "Name": "MD Lab", + "NameN": null, + "PhoneNumber": "+966114774700", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Takhassusi Hospital", + "DesciptionN": null, + "ID": 16, + "LegalName": "Western Specialist Hospital for Medical Care", + "LegalNameN": "شركة مستشفى الغرب التخصصي للرعاية الطبية ", + "Name": "Takhassusi Hospital", + "NameN": null, + "PhoneNumber": "+966112833333", + "SetupID": "102000", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.719364", + "Longitude": "46.657567", + "MainProjectID": 16, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Suwaidi Hospital", + "DesciptionN": null, + "ID": 17, + "LegalName": "Sehat Al Suwaidi Medical Company", + "LegalNameN": "شركة صحة السويدي الطبية", + "Name": "Suwaidi Hospital", + "NameN": null, + "PhoneNumber": "+966114754444", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "MainProjectID": 17, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Al Qassim Hospital\r\n", + "DesciptionN": null, + "ID": 21, + "LegalName": "Buraidah Al Takhassusi Hospital for Healthcare Company", + "LegalNameN": "شركة مستشفى بريدة التخصصي للرعاية الطبية ", + "Name": "Al Qassim Hospital", + "NameN": null, + "PhoneNumber": "+966163166666", + "SetupID": "051431", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "26.360724", + "Longitude": "43.945774", + "MainProjectID": 21, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Khobar Hospital", + "DesciptionN": null, + "ID": 60, + "LegalName": "Khobar Hospital", + "LegalNameN": "مستشفى الخبر", + "Name": "Khobar Hospital", + "NameN": null, + "PhoneNumber": "+966138711111", + "SetupID": "034423", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "MainProjectID": 60, + "ProjectOutSA": false, + "UsingInDoctorApp": true + } + ]; \ No newline at end of file diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart index ca21e7aa..16466704 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_screen.dart @@ -1,3 +1,5 @@ +import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -74,128 +76,154 @@ class _VitalSignDetailsScreenState extends State { final routeArgs = ModalRoute.of(context).settings.arguments as Map; vitalSing = routeArgs['vitalSing']; return AppScaffold( - appBarTitle: "vital Sing ", - isloading: patientsProv.isLoading, - body: Container( - child: Column( - children: [ - Row( - children: [ - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'Body Measurements', - 'key': vitalSignDetails.bodyMeasurements - }); - }, - child: Expanded( - child: VitalSignItem( - des: 'Body Measurements', - url: url + 'heartbeat.png', - lastVal: '137', - unit: 'Cm', - ), - ), - ), - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'Temperature', - 'key': vitalSignDetails.temperature - }); - }, - child: Expanded( - child: VitalSignItem( - des: 'Temperature', - url: url + 'heartbeat.png', - ), - ), - ), - ], - ), - Row( - children: [ - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'pulse', - 'key': vitalSignDetails.pulse - }); - }, - child: VitalSignItem( - des: 'Pulse', - url: url + 'heartbeat.png', - ), - ), - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'pespiration', - 'key': vitalSignDetails.pespiration - }); - }, - child: VitalSignItem( - des: 'Respiration', - url: url + 'heartbeat.png', - ), - ), - ], - ), - Row( - children: [ - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'Blood Pressure', - 'key': vitalSignDetails.bloodPressure - }); - }, - child: VitalSignItem( - des: 'Blood Pressure', - url: url + 'heartbeat.png', - ), - ), - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'Oxygenation', - 'key': vitalSignDetails.oxygenation - }); - }, - child: VitalSignItem( - des: 'Oxygenation', - url: url + 'heartbeat.png', - ), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - InkWell( - onTap: () { - Navigator.of(context).pushNamed(BODY_MEASUREMENTS, - arguments: { - 'title': 'Pain Scale', - 'key': vitalSignDetails.painScale - }); - }, - child: VitalSignItem( - des: 'Pain Scale', - url: url + 'heartbeat.png', - ), - ), - ], - ), - ], - ), - )); + appBarTitle: "vital Sing", + body: patientsProv.isLoading + ? DrAppCircularProgressIndeicator() + : patientsProv.isError + ? DrAppEmbeddedError(error: patientsProv.error) + : patientsProv.patientVitalSignOrderdSubList.length == 0 + ? DrAppEmbeddedError( + error: 'You don\'t have any vital Sings') + : Container( + child: Column( + children: [ + Row( + children: [ + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'Body Measurements', + 'key': + vitalSignDetails.bodyMeasurements + }); + }, + child: Expanded( + child: VitalSignItem( + des: 'Body Measurements', + url: url + 'heartbeat.png', + lastVal: patientsProv.patientVitalSignOrderdSubList[0].heightCm.toString(), + unit: 'Cm', + ), + ), + ), + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'Temperature', + 'key': vitalSignDetails.temperature, + + }); + }, + child: Expanded( + child: VitalSignItem( + des: 'Temperature', + url: url + 'heartbeat.png', + lastVal: patientsProv.patientVitalSignOrderdSubList[0].temperatureCelcius.toString(), + unit: 'C', + + ), + ), + ), + ], + ), + Row( + children: [ + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'pulse', + 'key': vitalSignDetails.pulse + }); + }, + child: VitalSignItem( + des: 'Pulse', + url: url + 'heartbeat.png', + lastVal: patientsProv.patientVitalSignOrderdSubList[0].pulseBeatPerMinute.toString(), + unit: 'M', + ), + ), + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'pespiration', + 'key': vitalSignDetails.pespiration + }); + }, + child: VitalSignItem( + des: 'Respiration', + url: url + 'heartbeat.png', + + lastVal: patientsProv.patientVitalSignOrderdSubList[0].respirationBeatPerMinute.toString(), + unit: 'M', + ), + ), + ], + ), + Row( + children: [ + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'Blood Pressure', + 'key': vitalSignDetails.bloodPressure + }); + }, + child: VitalSignItem( + des: 'Blood Pressure', + url: url + 'heartbeat.png', + lastVal: patientsProv.patientVitalSignOrderdSubList[0].bloodPressure.toString(), + unit: '', + ), + ), + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'Oxygenation', + 'key': vitalSignDetails.oxygenation + }); + }, + child: VitalSignItem( + des: 'Oxygenation', + url: url + 'heartbeat.png', + lastVal: patientsProv.patientVitalSignOrderdSubList[0].fIO2.toString(), + unit: '', + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + InkWell( + onTap: () { + Navigator.of(context).pushNamed( + BODY_MEASUREMENTS, + arguments: { + 'title': 'Pain Scale', + 'key': vitalSignDetails.painScale + }); + }, + child: VitalSignItem( + des: 'Pain Scale', + url: url + 'heartbeat.png', + ), + ), + ], + ), + ], + ), + )); } } - diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart index 9e25af85..d84d8ca0 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart @@ -1,7 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../../../config/size_config.dart'; import '../../../../widgets/shared/rounded_container_widget.dart'; + /* *@author: Elham Rababah *@Date:03/6/2020 @@ -46,15 +48,13 @@ class VitalSignItem extends StatelessWidget { des, style: TextStyle( fontSize: 1.7 * SizeConfig.textMultiplier, - color: Theme.of(context).primaryColor, + color: Hexcolor('#B8382C'), fontWeight: FontWeight.bold), ), ), Expanded( flex: 1, child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceEvenly, - // crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Image.asset( @@ -69,9 +69,11 @@ class VitalSignItem extends StatelessWidget { children: [ new TextSpan(text: lastVal), new TextSpan( - text: ' ${unit}', - style: - TextStyle(color: Theme.of(context).primaryColor)), + text: ' ${unit}', + style: TextStyle( + color: Hexcolor('#B8382C'), + ), + ), ], ), )) diff --git a/lib/widgets/auth/auth_header.dart b/lib/widgets/auth/auth_header.dart index 5fced98d..d9cf7f53 100644 --- a/lib/widgets/auth/auth_header.dart +++ b/lib/widgets/auth/auth_header.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../config/size_config.dart'; import '../../lookups/auth_lookup.dart'; @@ -113,7 +114,7 @@ class AuthHeader extends StatelessWidget { Text( text2, style: TextStyle( - color: Theme.of(context).primaryColor, + color: Hexcolor('#B8382C'), fontSize: textFontSize, fontWeight: FontWeight.w800), ) @@ -160,7 +161,7 @@ class AuthHeader extends StatelessWidget { style: TextStyle( fontSize: SizeConfig.isMobile ? 26 : SizeConfig.realScreenWidth * 0.030, fontWeight: FontWeight.w800, - color: Theme.of(context).primaryColor), + color: Hexcolor('#B8382C')), ), ); } @@ -176,7 +177,7 @@ class AuthHeader extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w800, fontSize: SizeConfig.isMobile ? 24 : SizeConfig.realScreenWidth * 0.029, - color: Theme.of(context).primaryColor, + color: Hexcolor('#B8382C'), ), ); } diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index 8ce783d0..ccee038f 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/lookups/hospital_lookup.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -35,6 +36,9 @@ class _LoginFormState extends State { String uniqueId = "Unknown"; var projectsList = []; + FocusNode focusPass; + FocusNode focusProject; + var userInfo = UserModel( UserID: '', Password: '', @@ -54,7 +58,7 @@ class _LoginFormState extends State { @override Widget build(BuildContext context) { final focusPass = FocusNode(); - final focusProject = FocusNode(); + final focusProject = FocusNode(); if (projectsList.length == 0) { getProjectsList(); @@ -106,7 +110,7 @@ class _LoginFormState extends State { onFieldSubmitted: (_) { FocusScope.of(context).requestFocus(focusProject); helpers.showCupertinoPicker( - context, projectsList, 'Name', onSelectProject); + context, projectsList, 'Name', onSelectProject); }, ), buildSizedBox(), @@ -147,8 +151,6 @@ class _LoginFormState extends State { ), RaisedButton( onPressed: () { - // Navigator.of(context).pushNamed(VERIFICATION_METHODS); - login(context, authProv, widget.changeLoadingStata); }, textColor: Colors.white, @@ -314,9 +316,14 @@ class _LoginFormState extends State { }); } else { // handel error - + setState(() { + projectsList = ListProject; + }); } }).catchError((err) { + setState(() { + projectsList = ListProject; + }); print(err); }); } @@ -330,5 +337,6 @@ class _LoginFormState extends State { userInfo.ProjectID = projectsList[index]["ID"]; projectIdController.text = projectsList[index]['Name']; }); + FocusScope.of(context).requestFocus(focusProject); } }