diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 9d7d73c9..f9022bd3 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -4,7 +4,9 @@ const Map> localizedValues = { 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, 'lanEnglish': {'en': 'English', 'ar': 'English'}, 'lanArabic': {'en': 'العربية', 'ar': 'العربية'}, - 'doctorReply': {'en': 'Doctor Reply', 'ar': 'رد الطبيب'}, + 'theDoctor': {'en': 'Doctor', 'ar': 'الطبيب'}, + 'reply': {'en': 'Reply', 'ar': 'رد'}, + 'time': {'en': 'Time', 'ar': 'الوقت'}, 'fileNo': {'en': 'File No:', 'ar': 'رقم الملف:'}, 'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'}, @@ -30,6 +32,8 @@ const Map> localizedValues = { }, 'outPatients': {'en': 'Out-Patients', 'ar': 'ةالمريض الخارجي'}, 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, + 'searchAbout': {'en': 'Search', 'ar': 'البحث عن'}, + 'patient': {'en': 'Patient', 'ar': ' مريض'}, 'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'}, 'todayStatistics': {'en': 'Today Statistics', 'ar': 'إحصائيات اليوم'}, 'arrived': {'en': 'Arrived', 'ar': 'وصل'}, @@ -59,7 +63,8 @@ const Map> localizedValues = { 'searchMedicineNameHere': {'en': 'Search Medicine ', 'ar': 'ابحث هنا'}, 'youCanFind': {'en': 'You Can Find ', 'ar': 'تستطيع ان تجد '}, 'itemsInSearch': {'en': 'items in search', 'ar': 'عناصر في البحث'}, - 'qrReader': {'en': 'QR Reader', 'ar': 'قارىء رمز الQR'}, + 'qr': {'en': 'QR', 'ar': 'QR'}, + 'reader': {'en': 'Reader', 'ar': 'قارىء رمز ال'}, 'startScanning': {'en': 'Start Scanning', 'ar': 'بدء المسح'}, 'scanQrCode': { 'en': 'scan Qr code to retrieve patient profile', @@ -232,4 +237,16 @@ const Map> localizedValues = { 'en': 'Add Details Of Patient To search', 'ar': ' أضف تفاصيل المريض للبحث' }, + "welcome": {'en': 'Welcome', 'ar': ' أهلا بك'}, + 'youDoNotHaveAnyItem': { + 'en': 'You don\'t have any Items', + 'ar': 'لا يوجد اي نتائج' + }, + 'typeMedicineName': { + 'en': 'Type Medicine Name', + 'ar': 'اكتب اسم الدواء' + },'moreThan3Letter': { + 'en': 'Medicine Name Should Be More Than 3 letter', + 'ar': 'يجب أن يكون اسم الدواء أكثر من 3 أحرف' + }, }; diff --git a/lib/models/patient/vital_sign/vital_sign_res_model.dart b/lib/models/patient/vital_sign/vital_sign_res_model.dart index 28b43cd7..de96bb45 100644 --- a/lib/models/patient/vital_sign/vital_sign_res_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_res_model.dart @@ -170,7 +170,7 @@ class VitalSignResModel { triageCategory = json['TriageCategory']; gCScore = json['GCScore']; lineItemNo = json['LineItemNo']; - vitalSignDate = Helpers.convertStringToDate(json['VitalSignDate']); + vitalSignDate = json['VitalSignDate'] !=null? Helpers.convertStringToDate(json['VitalSignDate']): new DateTime.now(); actualTimeTaken = json['ActualTimeTaken']; sugarLevel = json['SugarLevel']; fBS = json['FBS']; diff --git a/lib/providers/medicine_provider.dart b/lib/providers/medicine_provider.dart index 8a0bef74..935529ca 100644 --- a/lib/providers/medicine_provider.dart +++ b/lib/providers/medicine_provider.dart @@ -50,7 +50,7 @@ class MedicineProvider with ChangeNotifier { resetDefaultValues(); try { _listRequestModel.itemID = itemId; - isFinished = true; + isFinished = false; await BaseAppClient.post(PHARMACY_LIST_URL, onSuccess: (dynamic response, int statusCode) { pharmaciesList = response['PharmList']; diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index 927ce478..28c6702a 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -56,7 +56,7 @@ class _QrReaderScreenState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: TranslationBase.of(context).qrReader, + appBarTitle: TranslationBase.of(context).qr+ TranslationBase.of(context).reader, body: Center( child: Container( margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index 004f1d04..18d70904 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -100,7 +100,9 @@ class _DashboardScreenState extends State { Row( children: [ AppText( - "Welcome", + TranslationBase + .of(context) + .welcome, fontSize: SizeConfig.textMultiplier * 1.7, color: Colors.white, ) @@ -110,63 +112,75 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ AppText( - 'Dr. ${authProvider.doctorProfile - .doctorName}', + 'Dr. ${authProvider.doctorProfile.doctorName}', fontWeight: FontWeight.bold, fontSize: SizeConfig.textMultiplier * 2.5, color: Colors.white, ) ], ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Container( - child: AppText( - authProvider.selectedClinicName != - null - ? authProvider.selectedClinicName - : authProvider.doctorProfile - .clinicDescription, - fontSize: - SizeConfig.textMultiplier * 1.7, - color: Colors.white, + SizedBox( + height: 4, + ), + InkWell( + onTap: () async { + showCupertinoPicker( + decKey: '', + context: context, + actionList: projectsProvider + .doctorClinicsList); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + child: AppText( + authProvider.selectedClinicName != + null + ? authProvider.selectedClinicName + : authProvider.doctorProfile + .clinicDescription, + fontSize: + SizeConfig.textMultiplier * 1.7, + color: Colors.white, + textAlign: TextAlign.center, + ), + alignment: projectsProvider.isArabic + ? Alignment.topRight + : Alignment.topLeft, ), - alignment: projectsProvider.isArabic - ? Alignment.topRight - : Alignment.topLeft, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - InkWell( - onTap: () async { - showCupertinoPicker( - decKey: '', - context: context, - actionList: projectsProvider - .doctorClinicsList); - }, - child: Container( - margin: EdgeInsets.only( - left: 5, top: 5, right: 10), - child: Icon( - DoctorApp.sync_icon, + Row( + mainAxisAlignment: + MainAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + InkWell( + + child: Container( + margin: EdgeInsets.only( + left: 5, + top: projectsProvider + .isArabic ? 0 : 5, + right: 10, + bottom: projectsProvider + .isArabic ? 15 : 7), + child: Icon( + DoctorApp.sync_icon, + + color: Colors.white, + size: SizeConfig + .textMultiplier * + 1.8, + )), + ), + ], + ), + ]), + ), - color: Colors.white, - size: SizeConfig - .textMultiplier * - 1.8, - )), - ), - ], - ), - ]) ], ), Expanded( @@ -427,6 +441,7 @@ class _DashboardScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Container( + margin: EdgeInsets.only(top: 10), child: Icon( DoctorApp.radiology, size: 40, @@ -434,6 +449,8 @@ class _DashboardScreenState extends State { ), ), Container( + margin: EdgeInsets.only(bottom: 10), + child: Column( children: [ AppText( @@ -645,11 +662,19 @@ class _DashboardScreenState extends State { color: Colors.black, ), ), - AppText( - TranslationBase - .of(context) - .searchPatient, - color: Colors.black, + Column( + children: [ + AppText( + TranslationBase.of(context).searchAbout, + color: Colors.black, + textAlign: TextAlign.center, + ), + AppText( + TranslationBase.of(context).patient, + color: Colors.black, + textAlign: TextAlign.center, + ) + ], ) ], ), @@ -667,11 +692,23 @@ class _DashboardScreenState extends State { size: 50, color: Colors.black, ), - AppText( - TranslationBase - .of(context) - .doctorReply, - color: Colors.black, + Column( + children: [ + AppText( + TranslationBase + .of(context) + .theDoctor, + textAlign: TextAlign.center, + color: Colors.black, + ), + AppText( + TranslationBase + .of(context) + .reply, + textAlign: TextAlign.center, + color: Colors.black, + ), + ], ) ], ), @@ -739,12 +776,27 @@ class _DashboardScreenState extends State { size: 50, color: Colors.black, ), - AppText( - TranslationBase - .of(context) - .qrReader, - color: Colors.black, - textAlign: TextAlign.center, + Column( + children: [ + AppText( + projectsProvider.isArabic + ? TranslationBase.of(context).reader + : TranslationBase.of(context).qr, + color: Colors.black, + textAlign: TextAlign.center, + ), + AppText( + projectsProvider.isArabic + ? TranslationBase + .of(context) + .qr + : TranslationBase + .of(context) + .reader, + color: Colors.black, + textAlign: TextAlign.center, + ), + ], ) ], ), @@ -886,6 +938,7 @@ class _DashboardScreenState extends State { children: actionList .map((e) => Flexible( child: Container( + height: 50, child: InkWell( onTap: () => changeClinic(e.clinicID, context), @@ -894,8 +947,6 @@ class _DashboardScreenState extends State { fontSize: SizeConfig.textMultiplier * 1.9, - - )), ), )) diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index d45c7349..764c1b34 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; @@ -14,19 +16,19 @@ import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import '../../util/extenstions.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_recognition_result.dart'; import 'package:speech_to_text/speech_to_text.dart'; -import 'dart:math'; + +import '../../util/extenstions.dart'; DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); class MedicineSearchScreen extends StatefulWidget with DrAppToastMsg { MedicineSearchScreen({this.changeLoadingStata}); + final Function changeLoadingStata; @override @@ -43,6 +45,7 @@ class _MedicineSearchState extends State { bool _isInit = true; final SpeechToText speech = SpeechToText(); String lastStatus = ''; + // String lastWords; List _localeNames = []; String lastError; @@ -50,13 +53,14 @@ class _MedicineSearchState extends State { double minSoundLevel = 50000; double maxSoundLevel = -50000; String reconizedWord; + @override void didChangeDependencies() { super.didChangeDependencies(); if (_isInit) { _medicineProvider = Provider.of(context); - requestPermissions(); - initSpeechState(); + // requestPermissions(); + // initSpeechState(); } _isInit = false; } @@ -92,151 +96,160 @@ class _MedicineSearchState extends State { appBarTitle: TranslationBase.of(context).searchMedicine, body: FractionallySizedBox( widthFactor: 0.97, - child: ListView( - children: [ - Column( - children: [ - Container( - child: Icon( - DoctorApp.medicine_search, - size: 100, - color: Colors.black, - ), - margin: EdgeInsets.only(top: 50), - ), - Padding( - padding: const EdgeInsets.only(top: 12.0), - child: AppText( - TranslationBase.of(context).type.toUpperCase(), - fontWeight: FontWeight.bold, - fontSize: SizeConfig.heightMultiplier * 2.5, - ), - ), - Padding( - padding: const EdgeInsets.only(top: 5.0), - child: AppText( - TranslationBase.of(context).searchMedicineImageCaption, - fontSize: SizeConfig.heightMultiplier * 2, - ), - ) - ], - ), - SizedBox(height: 15,), - FractionallySizedBox( - widthFactor: 0.9, - child: Column( + child: SingleChildScrollView( + child: Column( + children: [ + Column( children: [ Container( - child: AppTextFormField( - hintText: TranslationBase.of(context).searchMedicineNameHere, - controller: myController, - onSaved: (value) {}, - onFieldSubmitted: (value) { - searchMedicine(context); - }, - textInputAction: TextInputAction.search, - prefix: IconButton( - icon: Icon(Icons.mic), - color: - lastStatus == 'listening' ? Colors.red : Colors.grey, - onPressed: () { - myController.text = ''; - setState(() { - lastStatus = 'listening'; - }); - - startVoiceSearch(); - }), - inputFormatter: ONLY_LETTERS), + child: Icon( + DoctorApp.medicine_search, + size: 100, + color: Colors.black, + ), + margin: EdgeInsets.only(top: 50), ), - SizedBox(height: 15,), - - Container( - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - title: TranslationBase - .of(context) - .search, - onPressed: () { + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: AppText( + TranslationBase.of(context).type.toUpperCase(), + fontWeight: FontWeight.bold, + fontSize: SizeConfig.heightMultiplier * 2.5, + ), + ), + Padding( + padding: const EdgeInsets.only(top: 5.0), + child: AppText( + TranslationBase.of(context).searchMedicineImageCaption, + fontSize: SizeConfig.heightMultiplier * 2, + ), + ) + ], + ), + SizedBox( + height: 15, + ), + FractionallySizedBox( + widthFactor: 0.9, + child: Column( + children: [ + Container( + child: AppTextFormField( + hintText: TranslationBase.of(context) + .searchMedicineNameHere, + controller: myController, + onSaved: (value) {}, + onFieldSubmitted: (value) { searchMedicine(context); }, - ), - ], + textInputAction: TextInputAction.search, + // TODO return it back when it needed + // prefix: IconButton( + // icon: Icon(Icons.mic), + // color: + // lastStatus == 'listening' ? Colors.red : Colors.grey, + // onPressed: () { + // myController.text = ''; + // setState(() { + // lastStatus = 'listening'; + // }); + // + // startVoiceSearch(); + // }), + inputFormatter: ONLY_LETTERS), ), - ), - Container( - margin: EdgeInsets.only(left: SizeConfig.heightMultiplier * 2), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase - .of(context) - .youCanFind + - _medicineProvider.pharmacyItemsList.length - .toString() +" "+ - TranslationBase - .of(context) - .itemsInSearch, - fontWeight: FontWeight.bold, - ), - ], + SizedBox( + height: 15, ), - ), - Container( - child: !_medicineProvider.isFinished - ? DrAppCircularProgressIndeicator() - : _medicineProvider.hasError - ? Center( - child: Text( - _medicineProvider.errorMsg, - style: TextStyle( - color: Theme.of(context).errorColor), + Container( + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + title: TranslationBase.of(context).search, + onPressed: () { + searchMedicine(context); + }, + ), + ], ), - ) - : ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: _medicineProvider.pharmacyItemsList == - null - ? 0 - : _medicineProvider.pharmacyItemsList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - child: MedicineItemWidget( - label: - _medicineProvider.pharmacyItemsList[index] - ["ItemDescription"], - url: - _medicineProvider.pharmacyItemsList[index] - ["ProductImageBase64"], + ), + Container( + margin: EdgeInsets.only( + left: SizeConfig.heightMultiplier * 2), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).youCanFind + + _medicineProvider.pharmacyItemsList.length + .toString() + + " " + + TranslationBase.of(context).itemsInSearch, + fontWeight: FontWeight.bold, ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - PharmaciesListScreen( - itemID: _medicineProvider - .pharmacyItemsList[index] - ["ItemID"], - url: _medicineProvider - .pharmacyItemsList[index] - ["ProductImageBase64"]), - ), - ); - }, - ); - }, + ], + ), ), - ), - ], + Container( + height: MediaQuery.of(context).size.height * 0.35, + child: Container( + child: !_medicineProvider.isFinished + ? DrAppCircularProgressIndeicator() + : _medicineProvider.hasError + ? Center( + child: Text( + _medicineProvider.errorMsg, + style: TextStyle( + color: + Theme.of(context).errorColor), + ), + ) + : ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: + _medicineProvider.pharmacyItemsList == + null + ? 0 + : _medicineProvider + .pharmacyItemsList.length, + itemBuilder: + (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: _medicineProvider + .pharmacyItemsList[index] + ["ItemDescription"], + url: _medicineProvider + .pharmacyItemsList[index] + ["ImageSRCUrl"], + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + PharmaciesListScreen( + itemID: _medicineProvider + .pharmacyItemsList[ + index]["ItemID"], + url: _medicineProvider + .pharmacyItemsList[ + index]["ImageSRCUrl"]), + ), + ); + }, + ); + }, + ), + ), + ), + ], + ), ), - ), - - ], + ], + ), ), )); } @@ -245,7 +258,13 @@ class _MedicineSearchState extends State { FocusScope.of(context).unfocus(); if (myController.text.isNullOrEmpty()) { _medicineProvider.clearPharmacyItemsList(); - helpers.showErrorToast("Type Medicine Name"); + helpers.showErrorToast(TranslationBase.of(context).typeMedicineName) ; + //"Type Medicine Name") + return; + } + if (myController.text.length < 3) { + _medicineProvider.clearPharmacyItemsList(); + helpers.showErrorToast(TranslationBase.of(context).moreThan3Letter); return; } _medicineProvider.getMedicineItem(myController.text); diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index c35959c1..dd0a3649 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -6,15 +6,15 @@ import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; import 'package:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); @@ -80,8 +80,8 @@ class _PharmaciesListState extends State { child: ClipRRect( borderRadius: BorderRadius.all( Radius.circular(7)), - child: widget.url != null ?Image.memory( - dataFromBase64String(widget.url), + child: widget.url != null ?Image.network( + widget.url, height: SizeConfig.imageSizeMultiplier * 21, diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 59346cfc..dc1eda67 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -7,6 +7,7 @@ *@desc: */ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; @@ -14,23 +15,16 @@ import 'package:doctor_app_flutter/models/patient/topten_users_res_model.dart'; import 'package:doctor_app_flutter/providers/patients_provider.dart'; import 'package:doctor_app_flutter/providers/project_provider.dart'; import 'package:doctor_app_flutter/routes.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart'; - +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; 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:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import '../../config/size_config.dart'; -import 'package:hexcolor/hexcolor.dart'; - import '../../widgets/shared/app_scaffold_widget.dart'; -import '../../widgets/shared/card_with_bg_widget.dart'; -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; class PatientsScreen extends StatefulWidget { @override @@ -38,12 +32,12 @@ class PatientsScreen extends StatefulWidget { } class _PatientsScreenState extends State { - List litems; + List lItems; List parsed; List date; - List unfilterDate; + List unFilterDate; Color sideColor = Colors.black; List responseModelList; @@ -60,7 +54,7 @@ class _PatientsScreenState extends State { bool _isInit = true; String patientType; - String patientTypetitle; + String patientTypeTitle; var _isLoading = false; bool _isError = true; @@ -83,9 +77,9 @@ class _PatientsScreenState extends State { patientType = routeArgs['selectedType']; if (!projectsProvider.isArabic) - patientTypetitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; + patientTypeTitle = SERVICES_PATIANT_HEADER[int.parse(patientType)]; else - patientTypetitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)]; + patientTypeTitle = SERVICES_PATIANT_HEADER_AR[int.parse(patientType)]; print(patientType); @@ -101,8 +95,8 @@ class _PatientsScreenState extends State { _isLoading = false; if (res['MessageStatus'] == 1) { int val2 = int.parse(patientType); - litems = res[SERVICES_PATIANT2[val2]]; - parsed = litems; + lItems = res[SERVICES_PATIANT2[val2]]; + parsed = lItems; responseModelList = new ModelResponse.fromJson(parsed).list; responseModelList2 = responseModelList; _isError = false; @@ -314,12 +308,12 @@ class _PatientsScreenState extends State { PatientsProvider patientsProv = Provider.of(context); return AppScaffold( - appBarTitle: patientTypetitle, + appBarTitle: patientTypeTitle, body: _isLoading ? DrAppCircularProgressIndeicator() : _isError ? DrAppEmbeddedError(error: error) - : litems == null + : lItems == null || lItems.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).youDontHaveAnyPatient) : Container( @@ -327,7 +321,7 @@ class _PatientsScreenState extends State { scrollDirection: Axis.vertical, children: [ Container( - child: litems == null + child: lItems == null ? Column( children: [ Container( @@ -373,214 +367,235 @@ class _PatientsScreenState extends State { height: 10.0, ), Container( - //=============== decoration: BoxDecoration( color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), - //================ margin: EdgeInsets.fromLTRB(15, 0, 15, 0), - child: Column( + child: (responseModelList.length > 0) + ? Column( // mainAxisAlignment: MainAxisAlignment.center, children: responseModelList .map((PatiantInformtion item) { return Container( decoration: myBoxDecoration(), child: InkWell( - child: CardWithBgWidgetNew( - //CardWithBgWidget( - - widget: Column( - children: [ - Container( - // decoration: myBoxDecoration(), - child: Row( - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment - .start, - children: < - Widget>[ - Container( - decoration: - BoxDecoration( - gradient: LinearGradient( - begin: Alignment( - -1, - -1), - end: Alignment( - 1, - 1), - colors: [ - Colors.grey[100], - Colors.grey[200], - ]), - boxShadow: [ - BoxShadow( - color: Color.fromRGBO( - 0, - 0, - 0, - 0.08), - offset: Offset(0.0, - 5.0), - blurRadius: - 16.0) - ], - borderRadius: - BorderRadius.all( - Radius.circular(50.0)), - ), - width: 80, - height: 80, - child: Icon( - item.genderDescription == - "Male" - ? DoctorApp - .male - : DoctorApp - .female_icon, - size: 80, - )), + child: Row( + children: [ + Column( + mainAxisAlignment: + MainAxisAlignment + .start, + children: [ + Container( + decoration: + BoxDecoration( + gradient: LinearGradient( + begin: + Alignment( + -1, + -1), + end: + Alignment( + 1, 1), + colors: [ + Colors.grey[ + 100], + Colors.grey[ + 200], + ]), + boxShadow: [ + BoxShadow( + color: Color + .fromRGBO( + 0, + 0, + 0, + 0.08), + offset: + Offset( + 0.0, + 5.0), + blurRadius: + 16.0) ], + borderRadius: BorderRadius + .all(Radius + .circular( + 50.0)), ), - SizedBox( - width: 10, - ), - Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: < - Widget>[ - AppText( - item.firstName + - " " + - item.lastName, - fontSize: 2.0 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors - .white, - ), - SizedBox( - height: 8, + width: 80, + height: 80, + child: Icon( + item + .genderDescription == + "Male" + ? DoctorApp + .male + : DoctorApp + .female_icon, + size: 80, + )), + ], + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + SizedBox( + height: 15, + ), + AppText( + item.firstName + + " " + + item.lastName, + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight.bold, + backGroundcolor: + Colors.white, + ), + SizedBox( + height: 8, + ), + AppText( + TranslationBase + .of( + context) + .fileNo + + item.patientId + .toString(), + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight.bold, + backGroundcolor: + Colors.white, + ), + AppText( + TranslationBase + .of( + context) + .age + + item.age + .toString(), + fontSize: 2.0 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight.bold, + backGroundcolor: + Colors.white, + ), + SizedBox( + height: 8, + ), + SERVICES_PATIANT2[ + int.parse( + patientType)] == + "List_MyOutPatient" + ? Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: < + Widget>[ + Container( + height: + 20, + width: 80, + decoration: + BoxDecoration( + borderRadius: + BorderRadius + .circular( + 50), + color: Hexcolor( + "#20A169"), ), + child: AppText( - TranslationBase.of( - context) - .fileNo + - item.patientId - .toString(), - fontSize: 2.0 * - SizeConfig - .textMultiplier, + item + .startTime, + color: Colors + .white, + fontSize: + 2 * SizeConfig + .textMultiplier, + textAlign: + TextAlign + .center, fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors - .white, + FontWeight + .bold, ), - - // SizedBox( - // height: 8, - // ), + ), + SizedBox( + width: 60, + ), + Container( + child: AppText( - TranslationBase.of( - context) - .age + - item.age - .toString(), - fontSize: 2.0 * + convertDateFormat2( + item + .appointmentDate + .toString()), + fontSize: + 2.0 * SizeConfig .textMultiplier, fontWeight: - FontWeight - .bold, - backGroundcolor: - Colors - .white, - ), - SizedBox( - height: 8, + FontWeight + .bold, ), - SERVICES_PATIANT2[ - int.parse(patientType)] == - "List_MyOutPatient" - ? Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: < - Widget>[ - Container( - height: - 20, - width: - 80, - decoration: - BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Hexcolor("#20A169"), - ), - child: - AppText( - item.startTime, - color: Colors.white, - fontSize: 2 * SizeConfig.textMultiplier, - textAlign: TextAlign.center, - fontWeight: FontWeight.bold, - ), - ), - SizedBox( - width: - 60, - ), - Container( - child: - AppText( - convertDateFormat2(item.appointmentDate.toString()), - fontSize: 2.0 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - ) - ], - ) - : AppText( - item.nationalityName ?? - item.nationalityNameN, - fontSize: - 2.5 * - SizeConfig.textMultiplier, - ), - ], - ), - // Divider(color: Colors.grey) - ], - ), + ) + ], + ) + : AppText( + item + .nationalityName ?? + item + .nationalityNameN, + fontSize: 2.5 * + SizeConfig + .textMultiplier, + ), + SizedBox( + height: 15, + ), + ], ), - // Divider(color: Colors.grey) - ], - ), + ), + // Divider(color: Colors.grey) + ], ), onTap: () { Navigator.of(context) .pushNamed( - PATIENTS_PROFILE, - arguments: { + PATIENTS_PROFILE, + arguments: { "patient": item }); }, ), ); }).toList(), + ) + : Center( + child: DrAppEmbeddedError( + error: TranslationBase + .of(context) + .youDontHaveAnyPatient), ), ), ], @@ -610,65 +625,67 @@ class _PatientsScreenState extends State { } Widget _locationBar(BuildContext _context) { - return Container( - height: MediaQuery.of(context).size.height * 0.065, - width: SizeConfig.screenWidth * 0.9, - decoration: BoxDecoration( - color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: _locations.map((item) { - bool _isActive = _locations[_activeLocation] == item ? true : false; - return Column(mainAxisSize: MainAxisSize.min, children: [ - InkWell( - child: Center( - child: Container( - height: 40, - width: 90, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: _isActive ? Hexcolor("#B8382B") : Colors.white, - ), - child: Center( - child: Text( - item, - style: TextStyle( - fontSize: 12, - color: _isActive - ? Colors.white - : Colors.black, //Colors.black, - // backgroundColor:_isActive - // ? Hexcolor("#B8382B") - // : Colors.white,//sideColor, - - fontWeight: FontWeight.bold, - ), + return Expanded( + child: Container( + height: MediaQuery + .of(context) + .size + .height * 0.065, + width: SizeConfig.screenWidth * 0.95, + decoration: BoxDecoration( + color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _locations.map((item) { + bool _isActive = _locations[_activeLocation] == item ? true : false; + return Column(mainAxisSize: MainAxisSize.min, children: [ + InkWell( + child: Center( + child: Container( + height: 40, + width: 90, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + color: _isActive ? Hexcolor("#B8382B") : Colors.white, ), - )), - ), - onTap: () { - print(_locations.indexOf(item)); - - filterBooking(item.toString()); - - setState(() { - _activeLocation = _locations.indexOf(item); - }); - }), - _isActive - ? Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white), - alignment: Alignment.center, - height: 3, - width: 90, - ) - : Container() - ]); - }).toList(), + child: Center( + child: Text( + item, + style: TextStyle( + fontSize: 12, + color: _isActive + ? Colors.white + : Colors.black, //Colors.black, + + fontWeight: FontWeight.bold, + ), + ), + )), + ), + onTap: () { + print(_locations.indexOf(item)); + + filterBooking(item.toString()); + + setState(() { + _activeLocation = _locations.indexOf(item); + }); + }), + _isActive + ? Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white), + alignment: Alignment.center, + height: 3, + width: 90, + ) + : Container() + ]); + }).toList(), + ), ), ); } @@ -677,7 +694,6 @@ class _PatientsScreenState extends State { return BoxDecoration( border: Border( bottom: BorderSide( - // <--- top side color: Colors.grey, width: 1.0, ), diff --git a/lib/screens/patients/profile/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart index a171a0e9..51619dc9 100644 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ b/lib/screens/patients/profile/insurance_approvals_screen.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; @@ -15,7 +16,6 @@ import '../../../util/dr_app_shared_pref.dart'; import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); @@ -85,7 +85,7 @@ class _InsuranceApprovalsState extends State { ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : patientsProv.insuranceApporvalsList == null + : patientsProv.insuranceApporvalsList == null || patientsProv.insuranceApporvalsList.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).errorNoInsuranceApprovals) @@ -475,6 +475,7 @@ class _InsuranceApprovalsState extends State { } convertDateFormat(String str) { + if (str == null) return ''; const start = "/Date("; const end = "+0300)"; diff --git a/lib/screens/patients/profile/patient_orders_screen.dart b/lib/screens/patients/profile/patient_orders_screen.dart index 8effd1f9..05cdbfea 100644 --- a/lib/screens/patients/profile/patient_orders_screen.dart +++ b/lib/screens/patients/profile/patient_orders_screen.dart @@ -83,7 +83,7 @@ class _PatientsOrdersState extends State { ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : notesList == null + : notesList == null || notesList.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).errorNoOrders) : Column( diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart index 90640c59..aba49d7b 100644 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ b/lib/screens/patients/profile/progress_note_screen.dart @@ -83,7 +83,7 @@ class _ProgressNoteState extends State { ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : notesList == null + : notesList == null || notesList.length == 0 ? DrAppEmbeddedError( error: TranslationBase.of(context).errorNoProgressNote) : Column( diff --git a/lib/screens/patients/profile/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart index 3db9da32..2d1790ee 100644 --- a/lib/screens/patients/profile/radiology/radiology_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_screen.dart @@ -81,7 +81,7 @@ class _RadiologyScreenState extends State { ? DrAppEmbeddedError(error: patientsProv.error) : patientsProv.patientRadiologyList.length == 0 ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoVitalSign) + error: TranslationBase.of(context).youDoNotHaveAnyItem) : Container( margin: EdgeInsets.fromLTRB( SizeConfig.realScreenWidth * 0.05, diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart index ebe3b9d9..ef7c35fa 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart @@ -1,173 +1 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../../../lookups/patient_lookup.dart'; -import '../../../../models/patient/vital_sign/vital_sign_res_model.dart'; -import '../../../../providers/patients_provider.dart'; -import '../../../../screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; - - -/* - *@author: Elham Rababah - *@Date:03/6/2020 - *@param: - *@return: - *@desc: VitalSignItemDetailsScreen - */ -class VitalSignItemDetailsScreen extends StatelessWidget { - VitalSignItemDetailsScreen(); - // ; - PatientsProvider patientsProv; - List vitalList = []; - String pageTitle; - @override - Widget build(BuildContext context) { - patientsProv = Provider.of(context); - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - pageTitle = routeArgs['title']; - var pageKey = routeArgs['key']; - List VSchart; - vitalList = patientsProv.patientVitalSignOrderdSubList; - switch (pageKey) { - case vitalSignDetails.bodyMeasurements: - VSchart = [ - { - 'name': 'Highet', - 'title1': 'Date', - 'title2': 'Cm', - 'viewKey': 'HeightCm', - }, - { - 'name': 'Weight Kg', - 'title1': 'Date', - 'title2': 'Kg', - 'viewKey': 'WeightKg', - }, - { - 'name': 'BodyMassIndex', - 'title1': 'Date', - 'title2': 'BodyMass', - 'viewKey': 'BodyMassIndex', - }, - { - 'name': 'HeadCircumCm', - 'title1': 'Date', - 'title2': 'Cm', - 'viewKey': 'HeadCircumCm', - }, - { - 'name': 'Ideal Body Weight (Lbs)', - 'title1': 'Date', - 'title2': 'Ideal Weight', - 'viewKey': 'IdealBodyWeightLbs', - }, - { - 'name': 'LeanBodyWeightLbs (Lbs)', - 'title1': 'Date', - 'title2': 'Lean Weight', - 'viewKey': 'LeanBodyWeightLbs', - } - ]; - - break; - - case vitalSignDetails.temperature: - VSchart = [ - { - 'name': 'Temperature In Celcius', - 'title1': 'Date', - 'title2': 'C', - 'viewKey': 'TemperatureCelcius', - }, - ]; - - break; - case vitalSignDetails.pulse: - VSchart = [ - { - 'name': 'Pulse Beat Per Minute', - 'title1': 'Date', - 'title2': 'Minute', - 'viewKey': 'PulseBeatPerMinute', - }, - ]; - - break; - case vitalSignDetails.pespiration: - VSchart = [ - { - 'name': 'Respiration Beat Per Minute', - 'title1': 'Date', - 'title2': 'Beat Per Minute', - 'viewKey': 'RespirationBeatPerMinute', - }, - ]; - - break; - case vitalSignDetails.bloodPressure: - VSchart = [ - { - 'name': 'Blood Pressure Higher', - 'title1': 'Date', - 'title2': 'Minute', - 'viewKey': 'BloodPressureHigher', - }, - { - 'name': 'Blood Pressure Lower', - 'title1': 'Date', - 'title2': 'Minute', - 'viewKey': 'BloodPressureLower', - } - ]; - - break; - case vitalSignDetails.oxygenation: - VSchart = [ - { - 'name': 'FIO2', - 'title1': 'Date', - 'title2': 'Cm', - 'viewKey': 'FIO2', - }, - { - 'name': 'SAO2', - 'title1': 'Date', - 'title2': 'Cm', - 'viewKey': 'SAO2', - }, - ]; - - break; - case vitalSignDetails.painScale: - VSchart = [ - { - 'name': 'PainScore', - 'title1': 'Date', - 'title2': 'Cm', - 'viewKey': 'PainScore', - }, - ]; - - break; - - default: - } - return AppScaffold( - appBarTitle: pageTitle, - body: ListView( - children: VSchart.map((chartInfo) { - var vitalListTemp = vitalList.where((element) => element.toJson()[chartInfo['viewKey']] != null,); - return vitalListTemp.length !=0 ? VitalSingChartAndDetials( - vitalList: vitalList, - name: chartInfo['name'], - title1: chartInfo['title1'], - title2: chartInfo['title2'], - viewKey: chartInfo['viewKey']) : Container(); - }).toList(), - ), - ); - } -} - - +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../../../lookups/patient_lookup.dart'; import '../../../../models/patient/vital_sign/vital_sign_res_model.dart'; import '../../../../providers/patients_provider.dart'; import '../../../../screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart'; import '../../../../widgets/shared/app_scaffold_widget.dart'; /* *@author: Elham Rababah *@Date:03/6/2020 *@param: *@return: *@desc: VitalSignItemDetailsScreen */ class VitalSignItemDetailsScreen extends StatelessWidget { VitalSignItemDetailsScreen(); // ; PatientsProvider patientsProv; List vitalList = []; String pageTitle; @override Widget build(BuildContext context) { patientsProv = Provider.of(context); final routeArgs = ModalRoute.of(context).settings.arguments as Map; pageTitle = routeArgs['title']; var pageKey = routeArgs['key']; List VSchart; vitalList = patientsProv.patientVitalSignOrderdSubList; switch (pageKey) { case vitalSignDetails.bodyMeasurements: VSchart = [ { 'name': 'Highet', 'title1': 'Date', 'title2': 'Cm', 'viewKey': 'HeightCm', }, { 'name': 'Weight Kg', 'title1': 'Date', 'title2': 'Kg', 'viewKey': 'WeightKg', }, { 'name': 'BodyMassIndex', 'title1': 'Date', 'title2': 'BodyMass', 'viewKey': 'BodyMassIndex', }, { 'name': 'HeadCircumCm', 'title1': 'Date', 'title2': 'Cm', 'viewKey': 'HeadCircumCm', }, { 'name': 'Ideal Body Weight (Lbs)', 'title1': 'Date', 'title2': 'Ideal Weight', 'viewKey': 'IdealBodyWeightLbs', }, { 'name': 'LeanBodyWeightLbs (Lbs)', 'title1': 'Date', 'title2': 'Lean Weight', 'viewKey': 'LeanBodyWeightLbs', } ]; break; case vitalSignDetails.temperature: VSchart = [ { 'name': 'Temperature In Celcius', 'title1': 'Date', 'title2': 'C', 'viewKey': 'TemperatureCelcius', }, ]; break; case vitalSignDetails.pulse: VSchart = [ { 'name': 'Pulse Beat Per Minute', 'title1': 'Date', 'title2': 'Minute', 'viewKey': 'PulseBeatPerMinute', }, ]; break; case vitalSignDetails.pespiration: VSchart = [ { 'name': 'Respiration Beat Per Minute', 'title1': 'Date', 'title2': 'Beat Per Minute', 'viewKey': 'RespirationBeatPerMinute', }, ]; break; case vitalSignDetails.bloodPressure: VSchart = [ { 'name': 'Blood Pressure Higher', 'title1': 'Date', 'title2': 'Minute', 'viewKey': 'BloodPressureHigher', }, { 'name': 'Blood Pressure Lower', 'title1': 'Date', 'title2': 'Minute', 'viewKey': 'BloodPressureLower', } ]; break; case vitalSignDetails.oxygenation: VSchart = [ { 'name': 'FIO2', 'title1': 'Date', 'title2': 'Cm', 'viewKey': 'FIO2', }, { 'name': 'SAO2', 'title1': 'Date', 'title2': 'Cm', 'viewKey': 'SAO2', }, ]; break; case vitalSignDetails.painScale: VSchart = [ { 'name': 'PainScore', 'title1': 'Date', 'title2': 'Cm', 'viewKey': 'PainScore', }, ]; break; default: } return AppScaffold( appBarTitle: pageTitle, body: ListView( children: VSchart.map((chartInfo) { var vitalListTemp = vitalList.where( (element) => element.toJson()[chartInfo['viewKey']] != null, ); return vitalListTemp.length != 0 ? VitalSingChartAndDetials( vitalList: vitalList, name: chartInfo['name'], title1: chartInfo['title1'], title2: chartInfo['title2'], viewKey: chartInfo['viewKey']) : Center( child: Container( margin: EdgeInsets.only( top: MediaQuery.of(context).size.height * 0.45), child: Center( child: DrAppEmbeddedError( error: TranslationBase.of(context).youDoNotHaveAnyItem), ), )); }).toList(), ), ); } } \ No newline at end of file diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6e01b3c2..7351ed01 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -24,7 +24,8 @@ class TranslationBase { String get lanArabic => localizedValues['lanArabic'][locale.languageCode]; - String get doctorReply => localizedValues['doctorReply'][locale.languageCode]; + String get theDoctor => localizedValues['theDoctor'][locale.languageCode]; + String get reply => localizedValues['reply'][locale.languageCode]; String get time => localizedValues['time'][locale.languageCode]; @@ -56,6 +57,10 @@ class TranslationBase { String get outPatients => localizedValues['outPatients'][locale.languageCode]; String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; + String get searchAbout => + localizedValues['searchAbout'][locale.languageCode]; + String get patient => + localizedValues['patient'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode]; String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; @@ -91,7 +96,8 @@ class TranslationBase { String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; String get itemsInSearch => localizedValues['itemsInSearch'][locale.languageCode]; - String get qrReader => localizedValues['qrReader'][locale.languageCode]; + String get qr => localizedValues['qr'][locale.languageCode]; + String get reader => localizedValues['reader'][locale.languageCode]; String get startScanning => localizedValues['startScanning'][locale.languageCode]; String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; @@ -182,7 +188,8 @@ class TranslationBase { localizedValues['pleaseEnterTheCode'][locale.languageCode]; String get youDontHaveAnyPatient => localizedValues['youDon\'tHaveAnyPatient'][locale.languageCode]; - + String get youDoNotHaveAnyItem => + localizedValues['youDoNotHaveAnyItem'][locale.languageCode]; String get age => localizedValues['age'][locale.languageCode]; String get today => localizedValues['today'][locale.languageCode]; String get tomorrow => localizedValues['tomorrow'][locale.languageCode]; @@ -262,6 +269,10 @@ class TranslationBase { String get searchPatientImageCaptionBody => localizedValues['searchPatientImageCaptionBody'][locale.languageCode]; + + String get welcome => localizedValues['welcome'][locale.languageCode]; + String get typeMedicineName => localizedValues['typeMedicineName'][locale.languageCode]; + String get moreThan3Letter => localizedValues['moreThan3Letter'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index 7b435e9b..f1906578 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -284,14 +284,13 @@ class _MyReferralPatientWidgetState extends State { Form( key: _formKey, child: TextFields( + controller:answerController, + maxLines: 2, minLines: 2, hintText: TranslationBase.of(context).answerThePatient, fontWeight: FontWeight.normal, - initialValue: widget.myReferralPatientModel - .referredDoctorRemarks ?? - '', readOnly: _isLoading, validator: (value) { if (value.isEmpty) diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 4e3387a5..679d266d 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -164,15 +164,17 @@ class PatientProfileButton extends StatelessWidget { fontSize: SizeConfig.textMultiplier * 2, ), ), - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Container( - padding: EdgeInsets.all(10), - child: new Image.asset(url + icon)) - ], - )) + Expanded( + child: Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: EdgeInsets.all(10), + child: new Image.asset(url + icon)) + ], + )), + ) ]), ), decoration: BoxDecoration( diff --git a/lib/widgets/shared/app_buttons_widget.dart b/lib/widgets/shared/app_buttons_widget.dart index cc0d054e..090ad47a 100644 --- a/lib/widgets/shared/app_buttons_widget.dart +++ b/lib/widgets/shared/app_buttons_widget.dart @@ -15,7 +15,7 @@ class AppButton extends StatefulWidget { final double fontSize; final double padding; - AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2, this.padding = 5}); + AppButton({@required this.onPressed, this.title, this.icon, this.color, this.fontSize = 2, this.padding = 13}); _AppButtonState createState() => _AppButtonState(); diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 37c0717c..d022b352 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -125,7 +125,7 @@ class _AppDrawerState extends State { ), InkWell( child: DrawerItem( - TranslationBase.of(context).qrReader, DoctorApp.qr_code), + TranslationBase.of(context).qr+ TranslationBase.of(context).reader, DoctorApp.qr_code), onTap: () { Navigator.pop(context); Navigator.of(context).pushNamed(QR_READER); diff --git a/lib/widgets/shared/bottom_nav_bar.dart b/lib/widgets/shared/bottom_nav_bar.dart index 8b552468..6a791627 100644 --- a/lib/widgets/shared/bottom_nav_bar.dart +++ b/lib/widgets/shared/bottom_nav_bar.dart @@ -44,14 +44,14 @@ class _BottomNavBarState extends State { currentIndex: 0, name: TranslationBase.of(context).home, ), - BottomNavigationItem( - icon: DoctorApp.message_icon, - activeIcon: DoctorApp.message_icon_active, - changeIndex: _changeIndex, - index: _index, - currentIndex: 1, - name: TranslationBase.of(context).replay2, - ), + // BottomNavigationItem( + // icon: DoctorApp.message_icon, + // activeIcon: DoctorApp.message_icon_active, + // changeIndex: _changeIndex, + // index: _index, + // currentIndex: 1, + // name: TranslationBase.of(context).replay2, + // ), BottomNavigationItem( icon: DoctorApp.schedule_icon, activeIcon: DoctorApp.scdedule_icon_active, @@ -60,14 +60,14 @@ class _BottomNavBarState extends State { currentIndex: 2, name: TranslationBase.of(context).mySchedule, ), - BottomNavigationItem( - icon: DoctorApp.menu_icon, - activeIcon: DoctorApp.menu_icon_active, - changeIndex: _changeIndex, - index: _index, - currentIndex: 3, - name: TranslationBase.of(context).services, - ) + // BottomNavigationItem( + // icon: DoctorApp.menu_icon, + // activeIcon: DoctorApp.menu_icon_active, + // changeIndex: _changeIndex, + // index: _index, + // currentIndex: 3, + // name: TranslationBase.of(context).services, + // ) ], ), ),