diff --git a/android/app/build.gradle b/android/app/build.gradle index af0821ee..fd6c7720 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -38,7 +38,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.doctor_app_flutter" + applicationId "com.hmg.hmgDr" minSdkVersion 18 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() diff --git a/android/app/google-services.json b/android/app/google-services.json index 27e5dfb1..db548786 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -1,41 +1,34 @@ { "project_info": { - "project_number": "1097451043303", - "project_id": "doctor-app-35ddc", - "storage_bucket": "doctor-app-35ddc.appspot.com" + "project_number": "157373154094", + "project_id": "hmg-doctor-app-1553688619744", + "storage_bucket": "hmg-doctor-app-1553688619744.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:1097451043303:android:f82ecce9562ecaad866542", + "mobilesdk_app_id": "1:157373154094:android:daeea3a4e1f4462a1bf0bf", "android_client_info": { - "package_name": "com.example.doctor_app_flutter" + "package_name": "com.hmg.hmgDr" } }, "oauth_client": [ { - "client_id": "1097451043303-u7bl21167fq5b7u06cqpq621psv9s3qh.apps.googleusercontent.com", + "client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyChu44P8Dp8jtRqnoDR2mdjqKgSKQq-FPY" + "current_key": "AIzaSyDX8RPwu00MyrpqC-T2zXtrUQvTQGRv1mM" } ], "services": { "appinvite_service": { "other_platform_oauth_client": [ { - "client_id": "1097451043303-u7bl21167fq5b7u06cqpq621psv9s3qh.apps.googleusercontent.com", + "client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com", "client_type": 3 - }, - { - "client_id": "1097451043303-ifgtu6ub88dlk5dmv5tm531a5s47gbre.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "com.hmg.doctorApp" - } } ] } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 631e9b28..317d0290 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.hmg.hmgDr"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index fdd8f424..57a59745 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.hmg.hmgDr"> diff --git a/android/google-services.json b/android/google-services.json index 3c00f05c..db548786 100644 --- a/android/google-services.json +++ b/android/google-services.json @@ -1,33 +1,33 @@ { "project_info": { - "project_number": "1008895414777", - "project_id": "doctorapp-9f172", - "storage_bucket": "doctorapp-9f172.appspot.com" + "project_number": "157373154094", + "project_id": "hmg-doctor-app-1553688619744", + "storage_bucket": "hmg-doctor-app-1553688619744.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:1008895414777:android:d00fe21d6955c21b1f6d28", + "mobilesdk_app_id": "1:157373154094:android:daeea3a4e1f4462a1bf0bf", "android_client_info": { - "package_name": "com.example.doctor_app_flutter" + "package_name": "com.hmg.hmgDr" } }, "oauth_client": [ { - "client_id": "1008895414777-3mg88j5ocs5r1au7rf4sh3f4pgsri2f2.apps.googleusercontent.com", + "client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyCNncEIj8ehVUSxV89rx0x1NaWp8t1YVkw" + "current_key": "AIzaSyDX8RPwu00MyrpqC-T2zXtrUQvTQGRv1mM" } ], "services": { "appinvite_service": { "other_platform_oauth_client": [ { - "client_id": "1008895414777-3mg88j5ocs5r1au7rf4sh3f4pgsri2f2.apps.googleusercontent.com", + "client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com", "client_type": 3 } ] diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f78..25fb7fb6 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -2,25 +2,25 @@ - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 878a1850..a365fcf4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -322,4 +322,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.1 +COCOAPODS: 1.10.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index f35ae084..f0784432 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -375,7 +375,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -383,12 +383,14 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp; + MARKETING_VERSION = 1.3.1; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -508,7 +510,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -516,12 +518,14 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp; + MARKETING_VERSION = 1.3.1; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -537,7 +541,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -545,12 +549,14 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp; + MARKETING_VERSION = 1.3.1; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.hmgDr; PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 645c587b..2314a2c8 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + HMG Doctor CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,22 +17,35 @@ CFBundlePackageType APPL CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion - $(FLUTTER_BUILD_NUMBER) + $(CURRENT_PROJECT_VERSION) + FirebaseAppDelegateProxyEnabled + LSRequiresIPhoneOS + NSAppleMusicUsageDescription + ${PRODUCT_NAME} requires access to use voice command + NSCalendarsUsageDescription + This app requires calendar access to set reminders for Virtual & Normal Appointments. NSCameraUsageDescription - Camera permission is required for barcode scanning. + App requires access to camera incase you are interested to attach images to your Qr Code. + NSContactsUsageDescription + This app requires contacts access to show incoming virtual consultation request. NSFaceIDUsageDescription We are using it for authentication - - NSAppleMusicUsageDescription - ${PRODUCT_NAME} requires access to use voice command - - + NSLocationWhenInUseUsageDescription + This App requires access to your location to show the nearest hospitals from your location. + NSMicrophoneUsageDescription + This app requires microphone access to enable virtual consultation between patient & doctor + NSMotionUsageDescription + This app requires motion detection access to function properly. + NSPhotoLibraryUsageDescription + Need to upload image + NSSpeechRecognitionUsageDescription + This permission is not needed by the app, but it is required by an underlying API. If you see this dialog, contact us. UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -50,15 +65,5 @@ UIViewControllerBasedStatusBarAppearance - - NSCameraUsageDescription - App requires access to camera incase you are interested to attach images to your Qr Code. - NSPhotoLibraryUsageDescription - Need to upload image - - NSMicrophoneUsageDescription - ${PRODUCT_NAME} always Microphone use - FirebaseAppDelegateProxyEnabled - diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index e92a921c..177b95ee 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -147,7 +147,7 @@ class BaseAppClient { : SETUP_ID; } - body['VersionID'] = 8.3; + body['VersionID'] = 5.8; body['Channel'] = CHANNEL; body['LanguageID'] = languageID == 'ar' ? 1 : 2; diff --git a/lib/config/config.dart b/lib/config/config.dart index 07151d1d..9596a029 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -336,7 +336,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 5.9; +const VERSION_ID = 5.8; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index c494dbe0..dbce6d1a 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -384,7 +384,10 @@ const Map> localizedValues = { 'headCircum': {'en': "Head Circum", 'ar': 'محيط الرأس'}, 'leanBodyWeight': {'en': "Lean Body Weight", 'ar': 'وزن الجسم الهزيل'}, 'bodyMassIndex': {'en': "Body Mass Index", 'ar': 'مؤشر كتلة الجسم'}, - 'yourBodyMassIndex': {'en': "Body Mass Index is", 'ar': 'مؤشر كتلة الجسم هو'}, + 'yourBodyMassIndex': { + 'en': "Body Mass Index is", + 'ar': 'مؤشر كتلة الجسم هو' + }, 'bmiUnderWeight': {'en': "UnderWeight", 'ar': 'تحت الوزن'}, 'bmiHealthy': {'en': "Healthy", 'ar': 'صحي'}, 'bmiOverWeight': {'en': "OverWeight", 'ar': 'فوق الوزن'}, @@ -444,7 +447,7 @@ const Map> localizedValues = { 'en': "Is Sick Leave Required", 'ar': 'هل الإجازة المرضية مطلوبة' }, - 'patientPregnant': {'en': "Patient Pregnant", 'ar': 'حمل المريض'}, + 'patientPregnant': {'en': "Patient Pregnant", 'ar': 'المريض حامل'}, 'treatmentLine': { 'en': "Main line of treatment", 'ar': 'الخط الرئيسي للعلاج' @@ -944,4 +947,6 @@ const Map> localizedValues = { }, "insurance22": {"en": "Insurance", "ar": "موافقات"}, "approvals22": {"en": "Approvals", "ar": "التامين"}, + "severe": {"en": "Severe", "ar": "الشدة"}, + "graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"}, }; diff --git a/lib/core/service/patient-admission-request-service.dart b/lib/core/service/patient-admission-request-service.dart index bdbf125e..c97f8426 100644 --- a/lib/core/service/patient-admission-request-service.dart +++ b/lib/core/service/patient-admission-request-service.dart @@ -163,7 +163,7 @@ class AdmissionRequestService extends LookupService { hasError = false; Map body = Map(); - body['patientMRN'] = patientMrn; + body['PatientMRN'] = patientMrn; await baseAppClient.post( GET_DIET_TYPES, diff --git a/lib/core/service/patient-doctor-referral-service.dart b/lib/core/service/patient-doctor-referral-service.dart index 4ced36be..680adada 100644 --- a/lib/core/service/patient-doctor-referral-service.dart +++ b/lib/core/service/patient-doctor-referral-service.dart @@ -29,7 +29,7 @@ class PatientReferralService extends LookupService { "LanguageID": 1, "stamp": "2020-02-26T13:51:44.111Z", "IPAdress": "11.11.11.11", - "VersionID": 1.2, + "VersionID": 5.8, "Channel": 9, "TokenID": "", "SessionID": "i1UJwCTSqt", diff --git a/lib/core/viewModel/hospital_view_model.dart b/lib/core/viewModel/hospital_view_model.dart index 7865a40f..a49b85e5 100644 --- a/lib/core/viewModel/hospital_view_model.dart +++ b/lib/core/viewModel/hospital_view_model.dart @@ -13,7 +13,7 @@ class HospitalViewModel with ChangeNotifier { "LanguageID": 1, "stamp": "2020-02-26T13:51:44.111Z", "IPAdress": "11.11.11.11", - "VersionID": 1.2, + "VersionID": 5.8, "Channel": 9, "TokenID": "", "SessionID": "i1UJwCTSqt", diff --git a/lib/core/viewModel/patient-vital-sign-viewmodel.dart b/lib/core/viewModel/patient-vital-sign-viewmodel.dart index cd02f538..59b13fe8 100644 --- a/lib/core/viewModel/patient-vital-sign-viewmodel.dart +++ b/lib/core/viewModel/patient-vital-sign-viewmodel.dart @@ -23,7 +23,7 @@ class VitalSignsViewModel extends BaseViewModel { String hartRat = "0"; String respirationBeatPerMinute = "0"; String bloodPressure = "0 / 0"; - String oxygenation = "0 - 0"; + String oxygenation = "0"; String painScore = "-"; String painLocation = "-"; String painCharacter = "-"; @@ -93,11 +93,11 @@ class VitalSignsViewModel extends BaseViewModel { bloodPressure == 'null') { bloodPressure = element.bloodPressure.toString(); } - if (oxygenation == "0 - 0" || + if (oxygenation == "0" || oxygenation == null || oxygenation == 'null') { oxygenation = - "${element.sAO2.toString()} - ${element.fIO2.toString()}"; + "${element.sAO2.toString()}";/* - ${element.fIO2.toString()}*/ } if (painScore == null || painScore == "-") { painScore = element.painScore.toString() != 'null' diff --git a/lib/models/doctor/profile_req_Model.dart b/lib/models/doctor/profile_req_Model.dart index 6a850811..8f2ef985 100644 --- a/lib/models/doctor/profile_req_Model.dart +++ b/lib/models/doctor/profile_req_Model.dart @@ -29,7 +29,7 @@ class ProfileReqModel { this.languageID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress='11.11.11.11', - this.versionID=1.2, + this.versionID=5.5, this.channel=9, this.sessionID='E2bsEeYEJo', this.tokenID, diff --git a/lib/models/patient/get_clinic_by_project_id_request.dart b/lib/models/patient/get_clinic_by_project_id_request.dart index 862fbab4..09198dc0 100644 --- a/lib/models/patient/get_clinic_by_project_id_request.dart +++ b/lib/models/patient/get_clinic_by_project_id_request.dart @@ -40,7 +40,7 @@ class ClinicByProjectIdRequest { this.languageID = 2, this.stamp = "2020-06-03T11:18:19.979Z", this.iPAdress = "11.11.11.11", - this.versionID = 1.2, + this.versionID = 5.5, this.channel = 9, this.tokenID, this.sessionID = "JBXRsDl37L", diff --git a/lib/models/patient/get_list_stp_referral_frequency_request.dart b/lib/models/patient/get_list_stp_referral_frequency_request.dart index 3b3c2655..7f466deb 100644 --- a/lib/models/patient/get_list_stp_referral_frequency_request.dart +++ b/lib/models/patient/get_list_stp_referral_frequency_request.dart @@ -37,7 +37,7 @@ class STPReferralFrequencyRequest { {this.languageID = 2, this.stamp = "2020-06-03T11:18:19.986Z", this.iPAdress = "11.11.11.11", - this.versionID = 1.2, + this.versionID = 5.8, this.channel = 9, this.tokenID, this.sessionID = "JBXRsDl37L", diff --git a/lib/models/patient/insurance_aprovals_request.dart b/lib/models/patient/insurance_aprovals_request.dart index e36355d8..2d3ac663 100644 --- a/lib/models/patient/insurance_aprovals_request.dart +++ b/lib/models/patient/insurance_aprovals_request.dart @@ -45,7 +45,7 @@ class InsuranceAprovalsRequest { this.languageID = 2, this.stamp = '2020-04-23T21:01:21.492Z', this.ipAdress = '11.11.11.11', - this.versionID = 1.2, + this.versionID = 5.8, this.tokenID , this.sessionID = 'e29zoooEJ4', this.isLoginForDoctorApp = true, diff --git a/lib/models/patient/lab_orders/lab_orders_req_model.dart b/lib/models/patient/lab_orders/lab_orders_req_model.dart index 0295ce8d..a97f4093 100644 --- a/lib/models/patient/lab_orders/lab_orders_req_model.dart +++ b/lib/models/patient/lab_orders/lab_orders_req_model.dart @@ -28,7 +28,7 @@ class LabOrdersReqModel { this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress='11.11.11.11', - this.versionID=1.2, + this.versionID=5.5, this.channel=9, this.sessionID='E2bsEeYEJo', this.isLoginForDoctorApp =true, diff --git a/lib/models/patient/orders_request.dart b/lib/models/patient/orders_request.dart index 5e1283fa..1372cfd6 100644 --- a/lib/models/patient/orders_request.dart +++ b/lib/models/patient/orders_request.dart @@ -49,7 +49,7 @@ class OrdersRequest { this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, - this.versionID = 1.2, + this.versionID = 5.5, this.patientOutSA = false}); OrdersRequest.fromJson(Map json) { diff --git a/lib/models/patient/prescription/prescription_req_model.dart b/lib/models/patient/prescription/prescription_req_model.dart index 45ca2d74..9141c282 100644 --- a/lib/models/patient/prescription/prescription_req_model.dart +++ b/lib/models/patient/prescription/prescription_req_model.dart @@ -27,7 +27,7 @@ class PrescriptionReqModel { this.languageID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress = '11.11.11.11', - this.versionID = 1.2, + this.versionID = 5.5, this.channel = 9, this.sessionID = 'E2bsEeYEJo', this.tokenID, diff --git a/lib/models/patient/progress_note_request.dart b/lib/models/patient/progress_note_request.dart index ce38b56e..fe0add5f 100644 --- a/lib/models/patient/progress_note_request.dart +++ b/lib/models/patient/progress_note_request.dart @@ -49,7 +49,7 @@ class ProgressNoteRequest { this.sessionID = "LlBk8lUEJY", this.isLoginForDoctorApp = true, this.patientTypeID = 1, - this.versionID = 1.2, + this.versionID = 5.5, this.patientOutSA = false}); ProgressNoteRequest.fromJson(Map json) { diff --git a/lib/models/patient/radiology/radiology_req_model.dart b/lib/models/patient/radiology/radiology_req_model.dart index b39fb393..47154d8b 100644 --- a/lib/models/patient/radiology/radiology_req_model.dart +++ b/lib/models/patient/radiology/radiology_req_model.dart @@ -25,7 +25,7 @@ class RadiologyReqModel { this.languageID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress = '11.11.11.11', - this.versionID = 1.2, + this.versionID = 5.5, this.channel = 9, this.sessionID = 'E2bsEeYEJo', this.tokenID, diff --git a/lib/models/patient/refer_to_doctor_request.dart b/lib/models/patient/refer_to_doctor_request.dart index 28eb488b..83db54f4 100644 --- a/lib/models/patient/refer_to_doctor_request.dart +++ b/lib/models/patient/refer_to_doctor_request.dart @@ -84,7 +84,7 @@ class ReferToDoctorRequest { this.languageID = 2, this.stamp = "2020-06-03T11:26:42.358Z", this.iPAdress = "11.11.11.11", - this.versionID = 1.2, + this.versionID = 5.5, this.channel = 9, @required this.tokenID, this.sessionID = "JBXRsDl37L", diff --git a/lib/models/patient/vital_sign/vital_sign_req_model.dart b/lib/models/patient/vital_sign/vital_sign_req_model.dart index ddd1f7d2..2cfd24c2 100644 --- a/lib/models/patient/vital_sign/vital_sign_req_model.dart +++ b/lib/models/patient/vital_sign/vital_sign_req_model.dart @@ -31,7 +31,7 @@ class VitalSignReqModel { this.tokenID, this.stamp = '2020-04-26T09:32:18.317Z', this.iPAdress='11.11.11.11', - this.versionID=1.2, + this.versionID=5.8, this.channel=9, this.sessionID='E2bsEeYEJo', this.isLoginForDoctorApp=true, diff --git a/lib/models/pharmacies/pharmacies_List_request_model.dart b/lib/models/pharmacies/pharmacies_List_request_model.dart index 33588345..90b5c378 100644 --- a/lib/models/pharmacies/pharmacies_List_request_model.dart +++ b/lib/models/pharmacies/pharmacies_List_request_model.dart @@ -26,7 +26,7 @@ class PharmaciesListRequestModel { this.languageID = 2, this.stamp = '2020-04-23T21:01:21.492Z', this.ipAdress = '11.11.11.11', - this.versionID = 5.3, + this.versionID = 5.5, this.tokenID, this.sessionID = 'e29zoooEJ4', this.isLoginForDoctorApp = true, diff --git a/lib/models/pharmacies/pharmacies_items_request_model.dart b/lib/models/pharmacies/pharmacies_items_request_model.dart index 9602a803..4f2e947a 100644 --- a/lib/models/pharmacies/pharmacies_items_request_model.dart +++ b/lib/models/pharmacies/pharmacies_items_request_model.dart @@ -10,7 +10,7 @@ class PharmaciesItemsRequestModel { String pHRItemName; int pageIndex = 0; int pageSize = 20; - double versionID = 5.3; + double versionID = 5.5; int channel = 3; int languageID = 2; String iPAdress = "10.20.10.20"; @@ -24,7 +24,7 @@ class PharmaciesItemsRequestModel { {this.pHRItemName, this.pageIndex = 0, this.pageSize = 20, - this.versionID = 5.3, + this.versionID = 5.8, this.channel = 3, this.languageID = 2, this.iPAdress = "10.20.10.20", diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index 2b55d7aa..6b37efbe 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -45,7 +45,7 @@ class _QrReaderScreenState extends State { LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", IPAdress: "11.11.11.11", - VersionID: 1.2, + VersionID: 5.5, Channel: 9, TokenID: "@dm!n", SessionID: "5G0yXn0Jnq", diff --git a/lib/screens/doctor/patient_arrival_screen.dart b/lib/screens/doctor/patient_arrival_screen.dart index 3b1467d2..e4f933e7 100644 --- a/lib/screens/doctor/patient_arrival_screen.dart +++ b/lib/screens/doctor/patient_arrival_screen.dart @@ -31,7 +31,7 @@ class _PatientArrivalScreen extends State LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", IPAdress: "11.11.11.11", - VersionID: 1.2, + VersionID: 5.8, Channel: 9, TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", SessionID: "5G0yXn0Jnq", diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 307b635c..d3d2c827 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -18,6 +18,7 @@ import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart' import 'package:doctor_app_flutter/screens/patients/DischargedPatientPage.dart'; import 'package:doctor_app_flutter/screens/patients/PatientsInPatientScreen.dart'; import 'package:doctor_app_flutter/screens/patients/ReferralDischargedPatientPage.dart'; +import 'package:doctor_app_flutter/screens/patients/out_patient/out_patient_screen.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_screen_new.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search/patients_screen_new.dart'; import 'package:doctor_app_flutter/screens/patients/patient_search_screen.dart'; @@ -555,14 +556,9 @@ class _HomeScreenState extends State { context, MaterialPageRoute( builder: (context) => - PatientsScreenNew( - isSearch: false, - isInpatient: false, + OutPatientsScreen( patientSearchRequestModel: - PatientSearchRequestModel(from: date, to: date,doctorID: authProvider.doctorProfile.doctorID), - selectedPatientType: - PatientType.OutPatient, - isSearchWithKeyInfo: false, + PatientSearchRequestModel(from: date, to: date,doctorID: authProvider.doctorProfile.doctorID) ), )); }, diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart new file mode 100644 index 00000000..8a4a7b3d --- /dev/null +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -0,0 +1,251 @@ +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/patient_type.dart'; +import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; +import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; +import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/patients/patient_search/header.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/PatientCard.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/errors/error_message.dart'; +import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +// ignore: must_be_immutable +class OutPatientsScreen extends StatefulWidget { + final patientSearchForm; + final selectedType; + final isAppbar; + final arrivalType; + final isView; + final PatientType selectedPatientType; + final PatientSearchRequestModel patientSearchRequestModel; + final bool isSearchWithKeyInfo; + final bool isSearch; + final bool isInpatient; + final bool isSearchAndOut; + final String searchKey; + + + OutPatientsScreen( + {this.patientSearchForm, + this.selectedType, + this.isAppbar = true, + this.arrivalType, + this.isView, + this.selectedPatientType, + this.patientSearchRequestModel, + this.isSearchWithKeyInfo = true, + this.isSearch = false, + this.isInpatient = false, this.searchKey, this.isSearchAndOut=false}); + + @override + _OutPatientsScreenState createState() => _OutPatientsScreenState(); +} + +class _OutPatientsScreenState extends State { + int clinicId; + AuthViewModel authProvider; + + List _locations = []; //['All', 'Today', 'Tomorrow', 'Next Week']; + + int _activeLocation = 0; + String patientType; + String patientTypeTitle; + var selectedFilter = 1; + String arrivalType; + ProjectViewModel projectsProvider; + var isView; + final _controller = TextEditingController(); + + PatientModel patient; + + + @override + Widget build(BuildContext context) { + authProvider = Provider.of(context); + _locations = [ + TranslationBase.of(context).today, + TranslationBase.of(context).tomorrow, + TranslationBase.of(context).nextWeek, + ]; + final screenSize = MediaQuery.of(context).size; + + + return BaseView( + onModelReady: (model) async { + await model.getOutPatient(widget.patientSearchRequestModel); + }, + builder: (_, model, w) => AppScaffold( + appBarTitle: "Search Patient", + isShowAppBar: true, + appBar: HeaderInSearch( + title: "My Out patient", + + ), + baseViewModel: model, + body: Column( + children: [ + Container( + // color: Colors.red, + height: screenSize.height * 0.070, + decoration: TextFieldsUtils + .containerBorderDecoration( + Color(0Xffffffff), + Color(0xFFCCCCCC), + borderRadius: 4, + borderWidth: 0), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _locations.map((item) { + bool _isActive = _locations[_activeLocation] == item + ? true + : false; + + return Expanded( + child: InkWell( + onTap: () async { + setState(() { + _activeLocation = _locations.indexOf(item); + }); + GifLoaderDialogUtils.showMyDialog(context); + await model.getPatientBasedOnDate(item: item, + selectedPatientType: widget.selectedPatientType, + patientSearchRequestModel: widget + .patientSearchRequestModel, + isSearchWithKeyInfo: widget.isSearchWithKeyInfo); + GifLoaderDialogUtils.hideDialog(context); + }, + child: Center( + child: Container( + height: screenSize.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + _isActive + ? Color(0xFFD02127 /*B8382B*/) + : Color(0xFFEAEAEA), + _isActive ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Center( + child: AppText( + item, + fontSize: SizeConfig.textMultiplier * 1.8, + color: _isActive ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), + ), + ), + ), + ), + ); + }).toList(), + ), + ), + + SizedBox(height: 18.5), + Container( + width: SizeConfig.screenWidth * 0.9, + height: 75, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, top: 10), + child: AppText( + TranslationBase.of( + context) + .searchPatientName, + fontSize: 13, + )), + AppTextFormField( + // focusNode: focusProject, + controller: _controller, + borderColor: Colors.white, + prefix: IconButton( + icon: Icon( + DoctorApp.filter_1, + color: Colors.black, + ), + iconSize: 20, + padding: + EdgeInsets.only( + bottom: 30), + ), + onChanged: (String str) { + model.searchData(str); + }), + ])), + SizedBox( + height: 10.0, + ), + Expanded( + child: Container( + child: model.filterData.isEmpty + ? Center( + child: ErrorMessage( + error: TranslationBase.of(context) + .youDontHaveAnyPatient, + ), + ) + : ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model.filterData.length, + itemBuilder: (BuildContext ctxt, int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: PatientCard( + patientInfo: model.filterData[index], + patientType: patientType, + arrivalType: arrivalType, + isFromSearch:widget.isSearchAndOut, + isInpatient: widget.isInpatient, + onTap: () { + // TODO change the parameter to daynamic + Navigator.of(context).pushNamed( + PATIENTS_PROFILE, + arguments: { + "patient": model.filterData[index], + "patientType": "1", + "from": widget + .patientSearchRequestModel.from, + "to": widget + .patientSearchRequestModel.from, + "isSearch": false, + "isInpatient": false, + "arrivalType": "7", + "isSearchAndOut": false, + }); + }, + // isFromSearch: widget.isSearch, + ), + ); + })), + ), + ], + ) + ), + ); + } +} diff --git a/lib/screens/patients/patient_search/patient_search_screen_new.dart b/lib/screens/patients/patient_search/patient_search_screen_new.dart index c17c173a..5270511d 100644 --- a/lib/screens/patients/patient_search/patient_search_screen_new.dart +++ b/lib/screens/patients/patient_search/patient_search_screen_new.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart'; import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; @@ -12,6 +13,7 @@ import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dar import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -107,8 +109,14 @@ class _PatientSearchScreenNewState extends State { isTextFieldHasSuffix: false, maxLines: 1, minLines: 1, + inputType:TextInputType.number, hasBorder: true, controller: patientFileInfoController, + inputFormatters: [ + FilteringTextInputFormatter.allow( + RegExp(ONLY_NUMBERS)) + ], + onChanged: (_){}, validationError: (isFormSubmitted && ( patientFileInfoController .text.isEmpty && diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index c0541103..88b8547b 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -62,7 +62,7 @@ class _PatientSearchScreenState extends State { LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", IPAdress: "11.11.11.11", - VersionID: 1.2, + VersionID: 5.8, Channel: 9, TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", SessionID: "5G0yXn0Jnq", diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 95cf80f5..586d0238 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -97,7 +97,7 @@ class _PatientsScreenState extends State { LanguageID: 2, stamp: "2020-03-02T13:56:39.170Z", IPAdress: "11.11.11.11", - VersionID: 1.2, + VersionID: 5.5, Channel: 9, TokenID: "2Fi7HoIHB0eDyekVa6tCJg==", SessionID: "5G0yXn0Jnq", diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index dd93be70..d23397da 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -44,6 +44,7 @@ class _AdmissionRequestThirdScreenState String clinicError; String doctorError; String sickLeaveCommentError; + String dietTypeError; String medicalHistoryError; String surgicalHistoryError; @@ -78,8 +79,6 @@ class _AdmissionRequestThirdScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // PatientProfileHeaderNewDesign( - // patient, patientType, arrivalType), Container( margin: EdgeInsets.all(16.0), child: Column( @@ -87,15 +86,15 @@ class _AdmissionRequestThirdScreenState children: [ AppText( "${TranslationBase.of(context).admission}", - fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), ), AppText( - "${TranslationBase.of(context).request}", - fontFamily: 'Poppins', + TranslationBase.of(context).request, fontSize: SizeConfig.textMultiplier * 3, fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), ) ], ), @@ -109,7 +108,7 @@ class _AdmissionRequestThirdScreenState AppText( TranslationBase.of(context) .specialityAndDoctorDetail, - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w700, ), @@ -278,6 +277,7 @@ class _AdmissionRequestThirdScreenState height: screenSize.height * 0.075, hintText: TranslationBase.of(context).dietType, isTextFieldHasSuffix: true, + validationError: dietTypeError, dropDownText: _selectedDietType != null ? _selectedDietType['nameEn'] : null, @@ -426,6 +426,11 @@ class _AdmissionRequestThirdScreenState }else { sickLeaveCommentError = null; } + if(_selectedDietType == null){ + dietTypeError = TranslationBase.of(context).fieldRequired; + }else { + dietTypeError = null; + } if(_postMedicalHistoryController.text == ""){ medicalHistoryError = TranslationBase.of(context).fieldRequired; }else { diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index 71a29a1e..120b6adf 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -76,15 +76,15 @@ class _AdmissionRequestThirdScreenState children: [ AppText( "${TranslationBase.of(context).admission}", - fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), ), AppText( - "${TranslationBase.of(context).request}", - fontFamily: 'Poppins', + TranslationBase.of(context).request, fontSize: SizeConfig.textMultiplier * 3, fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), ) ], ), @@ -96,7 +96,7 @@ class _AdmissionRequestThirdScreenState children: [ AppText( TranslationBase.of(context).diagnosisDetail, - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w700, ), diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 05a43460..90131c03 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -91,8 +91,6 @@ class _AdmissionRequestSecondScreenState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // PatientProfileHeaderNewDesign( - // patient, patientType, arrivalType), Container( margin: EdgeInsets.all(16.0), child: Column( @@ -100,15 +98,15 @@ class _AdmissionRequestSecondScreenState children: [ AppText( "${TranslationBase.of(context).admission}", - fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), ), AppText( - "${TranslationBase.of(context).request}", - fontFamily: 'Poppins', + TranslationBase.of(context).request, fontSize: SizeConfig.textMultiplier * 3, fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), ) ], ), @@ -122,7 +120,7 @@ class _AdmissionRequestSecondScreenState AppText( TranslationBase.of(context) .postPlansEstimatedCost, - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w700, ), @@ -170,7 +168,7 @@ class _AdmissionRequestSecondScreenState ), AppText( TranslationBase.of(context).otherInformation, - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w700, ), diff --git a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart index b6699b22..6026c9e9 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -45,7 +46,7 @@ class LabResultChartAndDetails extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "Graph Details", + TranslationBase.of(context).graphDetails, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, fontFamily: 'Poppins', diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index bae49ef9..b160f48c 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -102,14 +102,17 @@ class _PatientProfileScreenState extends State height: (patient.patientStatusType != null && patient.patientStatusType == 43) ? 210 - : 0, + : isDischargedPatient?240:0, ), Container( - height: !isSearchAndOut ? MediaQuery + height: !isSearchAndOut ? isDischargedPatient?MediaQuery .of(context) .size - .height * 0.70 : MediaQuery + .height * 0.64 : MediaQuery + .of(context) + .size + .height * 0.65 : MediaQuery .of(context) .size .height * 0.69, @@ -131,7 +134,7 @@ class _PatientProfileScreenState extends State NeverScrollableScrollPhysics(), crossAxisSpacing: 10, mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, + childAspectRatio: 1 / 1.01, crossAxisCount: 3, children: [ PatientProfileButton( @@ -431,7 +434,7 @@ class _PatientProfileScreenState extends State NeverScrollableScrollPhysics(), crossAxisSpacing: 10, mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, + childAspectRatio: 1 / 1.01, crossAxisCount: 3, children: [ PatientProfileButton( @@ -676,7 +679,7 @@ class _PatientProfileScreenState extends State NeverScrollableScrollPhysics(), crossAxisSpacing: 10, mainAxisSpacing: 10, - childAspectRatio: 1 / 1.0, + childAspectRatio: 1 / 1.01, crossAxisCount: 3, children: [ PatientProfileButton( diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart index c77e9a49..d98e17be 100644 --- a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart @@ -102,36 +102,56 @@ class _AddExaminationPageState extends State { setState(() { widget.mySelectedExamination .add(selectedExamination); - }); - }, + }); + }, + ), + ], + ), ), ], ), ), + ), + ], + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + border: Border.all(color: HexColor('#707070'), width: 0), + ), + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + child: FractionallySizedBox( + widthFactor: .80, + child: Center( + child: AppButton( + title: + "${TranslationBase.of(context).addExamination}", + padding: 10, + color: Color(0xFF359846), + onPressed: () { + widget.addSelectedExamination(); + }, + ), + ), + ), + ), + SizedBox( + height: 5, + ), ], ), ), - ), - Container( - padding: EdgeInsets.all(16), - color: Colors.white, - child: AppButton( - title:"${TranslationBase.of(context).addExamination}", - color: HexColor("#359846"), - fontColor: Colors.white, - vPadding: 12, - radius: 12, - fontWeight: FontWeight.w600, - fontSize: SizeConfig.textMultiplier * 2.5, - onPressed: () { - widget.addSelectedExamination(); - }, - ), - ) - ], - ), - ), - ); + )); } isServiceSelected(MasterKeyModel masterKey) { diff --git a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart index 10f9c2a6..216fbd53 100644 --- a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart @@ -40,7 +40,7 @@ class UpdateChiefComplaints extends StatelessWidget { maxLines: 25, minLines: 7, hasBorder: true, - validationError:complaintsController.text.isEmpty && complaintsControllerError !=''?complaintsControllerError:null , + validationError:complaintsControllerError !=''?complaintsControllerError:null , ), SizedBox( @@ -55,7 +55,7 @@ class UpdateChiefComplaints extends StatelessWidget { maxLines: 25, minLines: 7, hasBorder: true, - validationError:illnessController.text.isEmpty && illnessControllerError !=''?illnessControllerError:null , + validationError:illnessControllerError !=''?illnessControllerError:null , ), SizedBox( height: 10, @@ -74,7 +74,7 @@ class UpdateChiefComplaints extends StatelessWidget { maxLines: 25, minLines: 7, hasBorder: true, - validationError:medicationController.text.isEmpty && medicationControllerError !=''?medicationControllerError:null , + validationError:medicationControllerError !=''?medicationControllerError:null , ), SizedBox( 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 0b41e0a2..a6f36784 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 @@ -57,15 +57,15 @@ class VitalSignDetailsScreen extends StatelessWidget { children: [ AppText( "${patient.firstName ?? patient.patientDetails.firstName}'s", - fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.6, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w700, + color: Color(0xFF2E303A), ), AppText( TranslationBase.of(context).vitalSign, - fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 3, fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), ) ], ), @@ -90,7 +90,7 @@ class VitalSignDetailsScreen extends StatelessWidget { children: [ AppText( "${TranslationBase.of(context).yourBodyMassIndex} ${mode.bodyMax}", - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 2.0, fontWeight: FontWeight.w700, ), @@ -544,8 +544,8 @@ class VitalSignDetailsScreen extends StatelessWidget { .oxygenation, imagePath: "${assetBasePath}oxg.png", - lastVal: mode.oxygenation, - unit: "%", + lastVal: "${mode.oxygenation}%", + unit: "", ), ), InkWell( @@ -576,198 +576,11 @@ class VitalSignDetailsScreen extends StatelessWidget { imagePath: "${assetBasePath}painScale.png", lastVal: mode.painScore, - unit: "", + unit: TranslationBase.of(context).severe, ), ), ], ), - /*RoundedContainer( - width: MediaQuery.of(context).size.width / 2, - margin: EdgeInsets.symmetric( - horizontal: 0.0, vertical: 16), - child: Container( - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.only(top: 8), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Expanded( - child: Container( - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Row( - children: [ - AppText( - "${TranslationBase.of(context).painScale}", - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${mode.painScore}", - fontSize: SizeConfig.textMultiplier * 1.3, - color: Colors.grey.shade700, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - "Location", - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${mode.painLocation}", - fontSize: SizeConfig.textMultiplier * 1.3, - color: Colors.grey.shade700, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - "Character", - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${mode.painCharacter}", - fontSize: SizeConfig.textMultiplier * 1.3, - color: Colors.grey.shade700, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - "Duration", - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${mode.painDuration}", - fontSize: SizeConfig.textMultiplier * 1.3, - color: Colors.grey.shade700, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).painManagement, - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${mode.isPainDone}", - fontSize: SizeConfig.textMultiplier * 1.3, - color: Colors.grey.shade700, - fontWeight: FontWeight.normal, - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).frequency, - fontSize: SizeConfig.textMultiplier * 1.5, - color: Colors.black, - fontWeight: FontWeight.w700, - ), - SizedBox( - width: 8, - ), - AppText( - "${mode.painFrequency}", - fontSize: SizeConfig.textMultiplier * 1.3, - color: Colors.grey.shade700, - fontWeight: FontWeight.normal, - ), - ], - ), - ], - ), - ), - ), - Container( - child: Image.asset( - "${assetBasePath}painScale.png", - width: 40, - height: 40, - )) - ], - ), - ), - Container( - child: Column( - children: [ - Align( - alignment: - Alignment.topRight, - child: Icon( - EvaIcons.eye, - ), - ), - Align( - alignment: - Alignment.topLeft, - child: Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: AppText( - "${TranslationBase.of(context).painScale}", - fontFamily: 'Poppins', - fontSize: SizeConfig - .textMultiplier * - 1.3, - fontWeight: - FontWeight.bold, - ), - ), - ), - ], - ), - ), - ], - ), - ), - ),*/ ], ), ), 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 fbea0452..20d5b439 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_item.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_item.dart @@ -52,6 +52,7 @@ class VitalSignItem extends StatelessWidget { fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.4, fontWeight: FontWeight.bold, + color: Color(0xFF2E303A), margin: 0, ), Expanded( @@ -62,7 +63,7 @@ class VitalSignItem extends StatelessWidget { fontFamily: 'Poppins', fontSize: SizeConfig.textMultiplier * 1.2, fontWeight: FontWeight.w700, - color: Color(0xFFB8382C), + color: Color(0xFFD02127), margin: 0, ), ], @@ -98,7 +99,7 @@ class VitalSignItem extends StatelessWidget { margin: EdgeInsets.only(left: 5, right: 5), child: AppText( "$des", - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 1.3, fontWeight: FontWeight.bold, ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart index f59f6c23..2d4abec8 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart @@ -58,7 +58,7 @@ class VitalSingChartAndDetials extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "Graph Details", + TranslationBase.of(context).graphDetails, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index 27256525..0ac2f18b 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -63,7 +63,7 @@ class VitalSingChartBloodPressure extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "Graph Details", + TranslationBase.of(context).graphDetails, fontSize: SizeConfig.textMultiplier * 2.3, fontWeight: FontWeight.bold, fontFamily: 'Poppins', diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index c86ba9e3..67764fc4 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -100,11 +100,9 @@ class TranslationBase { String get referral => localizedValues['referral'][locale.languageCode]; String get inPatient => localizedValues['inPatient'][locale.languageCode]; - String get inPatientLabel => - localizedValues['inPatientLabel'][locale.languageCode]; + String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode]; - String get inPatientAll => - localizedValues['inPatientAll'][locale.languageCode]; + String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode]; String get operations => localizedValues['operations'][locale.languageCode]; @@ -1178,8 +1176,7 @@ class TranslationBase { localizedValues['SpecialResult'][locale.languageCode]; String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; - String get showMoreBtn => - localizedValues['show-more-btn'][locale.languageCode]; + String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; String get showDetail => localizedValues['showDetail'][locale.languageCode]; String get viewProfile => localizedValues['viewProfile'][locale.languageCode]; @@ -1300,6 +1297,8 @@ class TranslationBase { localizedValues["noMedicalFileFound"][locale.languageCode]; String get insurance22 => localizedValues["insurance22"][locale.languageCode]; String get approvals22 => localizedValues["approvals22"][locale.languageCode]; + String get severe => localizedValues["severe"][locale.languageCode]; + String get graphDetails => localizedValues["graphDetails"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/patients/profile/PatientProfileButton.dart b/lib/widgets/patients/profile/PatientProfileButton.dart index 66d33fe7..9a027e36 100644 --- a/lib/widgets/patients/profile/PatientProfileButton.dart +++ b/lib/widgets/patients/profile/PatientProfileButton.dart @@ -1,9 +1,11 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.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'; class PatientProfileButton extends StatelessWidget { final String nameLine1; @@ -42,6 +44,8 @@ class PatientProfileButton extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectsProvider = Provider.of(context); + return new Container( margin: new EdgeInsets.symmetric(horizontal: 4.0), padding: EdgeInsets.fromLTRB(10, 10, 10, 5), @@ -63,11 +67,11 @@ class PatientProfileButton extends StatelessWidget { url + icon, width: 50, height: 50, - )) + ),) ], )), Container( - alignment: Alignment.topLeft, + alignment: projectsProvider.isArabic ? Alignment.topRight : Alignment.topLeft, padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/widgets/shared/app_expandable_notifier.dart b/lib/widgets/shared/app_expandable_notifier.dart index 5e934167..76a7f57e 100644 --- a/lib/widgets/shared/app_expandable_notifier.dart +++ b/lib/widgets/shared/app_expandable_notifier.dart @@ -1,3 +1,4 @@ +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; @@ -30,7 +31,7 @@ class AppExpandableNotifier extends StatelessWidget { header: Padding( padding: EdgeInsets.all(10), child: Text( - "See Graph Details", + "${TranslationBase.of(context).graphDetails}", style: TextStyle(fontWeight: FontWeight.bold), )), collapsed: Text(''), diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index eab11a57..e63acba2 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -48,71 +48,74 @@ class AppButton extends StatefulWidget { class _AppButtonState extends State { @override Widget build(BuildContext context) { - return IgnorePointer( - ignoring: widget.loading ||widget.disabled, - child: RawMaterialButton( - fillColor: widget.disabled - ? Colors.grey : widget.color != null ? widget.color : HexColor("#B8382C"), - splashColor: widget.color, - child: Padding( - padding: (widget.hPadding > 0 || widget.vPadding > 0) - ? EdgeInsets.symmetric( - vertical: widget.vPadding, horizontal: widget.hPadding) - : EdgeInsets.only( - top: widget.padding, - bottom: widget.padding, - //right: SizeConfig.widthMultiplier * widget.padding, - //left: SizeConfig.widthMultiplier * widget.padding - ), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - if (widget.icon != null) - Container(width: 25, height: 25, child: widget.icon), - if (widget.iconData != null) - Icon( - widget.iconData, - color: Colors.white, - ), - if (widget.icon != null || widget.iconData != null) - SizedBox( - width: 5.0, - ), - widget.loading - ? Padding( - padding: EdgeInsets.all(2.6), - child: SizedBox( - height: 19.0, - width: 19.0, - child: CircularProgressIndicator( - backgroundColor: Colors.white, - valueColor: AlwaysStoppedAnimation( - Colors.grey[300], + return Container( + height: MediaQuery.of(context).size.height * 0.075, + child: IgnorePointer( + ignoring: widget.loading ||widget.disabled, + child: RawMaterialButton( + fillColor: widget.disabled + ? Colors.grey : widget.color != null ? widget.color : HexColor("#B8382C"), + splashColor: widget.color, + child: Padding( + padding: (widget.hPadding > 0 || widget.vPadding > 0) + ? EdgeInsets.symmetric( + vertical: widget.vPadding, horizontal: widget.hPadding) + : EdgeInsets.only( + top: widget.padding, + bottom: widget.padding, + //right: SizeConfig.widthMultiplier * widget.padding, + //left: SizeConfig.widthMultiplier * widget.padding + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (widget.icon != null) + Container(width: 25, height: 25, child: widget.icon), + if (widget.iconData != null) + Icon( + widget.iconData, + color: Colors.white, + ), + if (widget.icon != null || widget.iconData != null) + SizedBox( + width: 5.0, + ), + widget.loading + ? Padding( + padding: EdgeInsets.all(2.6), + child: SizedBox( + height: 19.0, + width: 19.0, + child: CircularProgressIndicator( + backgroundColor: Colors.white, + valueColor: AlwaysStoppedAnimation( + Colors.grey[300], + ), ), ), + ) + : Container( + child: AppText( + widget.title, + color: widget.fontColor, + fontSize: SizeConfig.textMultiplier * widget.fontSize, + fontWeight: widget.fontWeight, + ), ), - ) - : Container( - child: AppText( - widget.title, - color: widget.fontColor, - fontSize: SizeConfig.textMultiplier * widget.fontSize, - fontWeight: widget.fontWeight, - ), - ), - ], + ], + ), ), + onPressed: widget.disabled ? (){} : widget.onPressed, + shape: RoundedRectangleBorder( + side: BorderSide( + color: + widget.hasBorder ? widget.borderColor : widget.disabled + ? Colors.grey : widget.color ?? Color(0xFFB8382C), + width: 0.8, + ), + borderRadius: BorderRadius.all(Radius.circular(widget.radius))), ), - onPressed: widget.disabled ? (){} : widget.onPressed, - shape: RoundedRectangleBorder( - side: BorderSide( - color: - widget.hasBorder ? widget.borderColor : widget.disabled - ? Colors.grey : widget.color ?? Color(0xFFB8382C), - width: 0.8, - ), - borderRadius: BorderRadius.all(Radius.circular(widget.radius))), ), ); } diff --git a/lib/widgets/shared/buttons/button_bottom_sheet.dart b/lib/widgets/shared/buttons/button_bottom_sheet.dart index 224907d9..9db662d2 100644 --- a/lib/widgets/shared/buttons/button_bottom_sheet.dart +++ b/lib/widgets/shared/buttons/button_bottom_sheet.dart @@ -4,20 +4,61 @@ import 'app_buttons_widget.dart'; class ButtonBottomSheet extends StatelessWidget { - final double height; - final String buttonTitle; - final Function onPressed; + final GestureTapCallback onPressed; + final String title; + final IconData iconData; + final Widget icon; + final Color color; + final double fontSize; + final double padding; + final Color fontColor; + final bool loading; + final bool disabled; + final FontWeight fontWeight; + final bool hasBorder; + final Color borderColor; + final double radius; + final double vPadding; + final double hPadding; - ButtonBottomSheet({@required this.height, @required this.buttonTitle, @required this.onPressed}); + ButtonBottomSheet({@required this.onPressed, + this.title, + this.iconData, + this.icon, + this.color, + this.fontSize = 2, + this.padding = 13, + this.loading = false, + this.disabled = false, + this.fontColor = Colors.white, + this.fontWeight = FontWeight.normal, + this.vPadding = 0, + this.hPadding = 0, + this.radius = 8.0, + this.hasBorder = false, + this.borderColor,}); @override Widget build(BuildContext context) { return Container( - height: height ?? null, margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), child: AppButton( - title: buttonTitle, + title: title, onPressed: onPressed, + fontWeight: fontWeight, + color: color, + fontSize: fontSize, + padding: padding, + disabled: disabled, + radius: radius, + hasBorder: hasBorder, + fontColor: fontColor, + icon: icon, + iconData: iconData, + hPadding: hPadding, + vPadding: vPadding, + borderColor: borderColor, + loading: loading, ), ); } diff --git a/lib/widgets/shared/errors/error_message.dart b/lib/widgets/shared/errors/error_message.dart index 53c41d2b..21e04e6c 100644 --- a/lib/widgets/shared/errors/error_message.dart +++ b/lib/widgets/shared/errors/error_message.dart @@ -12,22 +12,24 @@ class ErrorMessage extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox(height: 100,), - Image.asset('assets/images/no-data.png'), - Center( - child: Center( - child: Padding( - padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30), - child: Center(child: AppText(error??'' , textAlign: TextAlign.center,)), + return SingleChildScrollView( + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 100,), + Image.asset('assets/images/no-data.png'), + Center( + child: Center( + child: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12,right: 20, left: 30), + child: Center(child: AppText(error??'' , textAlign: TextAlign.center,)), + ), ), - ), - ) + ) - ], + ], + ), ), ); } diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index 31115b11..e91236e8 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -76,8 +76,8 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState child: Column( children: [ AppTextFieldCustom( - height: - MediaQuery.of(context).size.height * 0.070, + // height: + // MediaQuery.of(context).size.height * 0.070, hintText: TranslationBase.of(context).selectAllergy, isTextFieldHasSuffix: true, diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index 88b95936..12eaaa7c 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -1,8 +1,10 @@ import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_field_error.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:provider/provider.dart'; import '../app_texts_widget.dart'; @@ -50,10 +52,12 @@ class AppTextFieldCustom extends StatefulWidget { class _AppTextFieldCustomState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Column( children: [ Container( - height: widget.height != 0 ? widget.height + 8 : null, + height: widget.height != 0 && widget.maxLines == 1 ? widget.height + 8 : null, decoration: widget.hasBorder ? TextFieldsUtils.containerBorderDecoration( Color(0Xffffffff), @@ -72,7 +76,7 @@ class _AppTextFieldCustomState extends State { child: Container( padding: widget.dropDownText == null ? EdgeInsets.symmetric(vertical: 0) - : EdgeInsets.symmetric(vertical: 8), + : EdgeInsets.symmetric(vertical: 0), // 8.0 child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, @@ -82,40 +86,45 @@ class _AppTextFieldCustomState extends State { widget.dropDownText != null) AppText( widget.hintText, - fontFamily: 'Poppins', + color: Color(0xFF2E303A), fontSize: SizeConfig.textMultiplier * 1.4, fontWeight: FontWeight.w700, ), widget.dropDownText == null - ? TextField( - textAlign: TextAlign.left, - decoration: - TextFieldsUtils.textFieldSelectorDecoration( - widget.hintText, null, true), - style: TextStyle( - fontSize: SizeConfig.textMultiplier * 1.7, - fontFamily: 'Poppins', - color: Colors.grey.shade800, - ), - controller: widget.controller, - keyboardType: widget.inputType, - enabled: widget.enabled, - minLines: widget.minLines, - maxLines: widget.maxLines, - inputFormatters: widget.inputFormatters != null - ? widget.inputFormatters - : [], - onChanged: (value) { - if (widget.onChanged != null) { - widget.onChanged(value); + ? Container( + height: widget.height != 0 && widget.maxLines == 1 ? widget.height - 22 : null, + child: TextField( + textAlign: projectViewModel.isArabic + ? TextAlign.right + : TextAlign.left, + decoration: + TextFieldsUtils.textFieldSelectorDecoration( + widget.hintText, null, true), + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.7, + fontFamily: 'Poppins', + color: Color(0xFF575757), + ), + controller: widget.controller, + keyboardType: widget.inputType, + enabled: widget.enabled, + minLines: widget.minLines, + maxLines: widget.maxLines, + inputFormatters: widget.inputFormatters != null + ? widget.inputFormatters + : [], + onChanged: (value) { setState(() {}); - } - }, - ) + if (widget.onChanged != null) { + widget.onChanged(value); + } + }, + ), + ) : AppText( widget.dropDownText, fontFamily: 'Poppins', - color: Colors.grey.shade800, + color: Color(0xFF575757), fontSize: SizeConfig.textMultiplier * 1.7, ), ], diff --git a/pubspec.lock b/pubspec.lock index e9386145..9d52ce65 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -566,7 +566,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3-nullsafety.1" + version: "0.6.2" json_annotation: dependency: transitive description: @@ -608,7 +608,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.4" + version: "1.3.0-nullsafety.3" mime: dependency: transitive description: @@ -900,7 +900,7 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.10.0-nullsafety.1" sticky_headers: dependency: "direct main" description: @@ -1091,5 +1091,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0 <=2.11.0-213.1.beta" + dart: ">=2.10.0 <2.11.0" flutter: ">=1.22.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 347b7a62..58dd50be 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter project. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 +version: 1.2.2+2 environment: sdk: ">=2.8.0 <3.0.0"