From ba5f29ee9f651ad7c22c064d89b21c222081d906 Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Wed, 4 Jan 2023 09:52:54 +0300 Subject: [PATCH] updated code for v.3.3 --- ios/Runner.xcodeproj/project.pbxproj | 125 ++- ios/Runner/Info.plist | 2 + lib/config/config.dart | 405 +++------ lib/core/service/AnalyticsService.dart | 13 +- .../viewModel/authentication_view_model.dart | 212 ++--- lib/core/viewModel/base_view_model.dart | 3 +- lib/screens/ER_singin/ER_singin_screen.dart | 204 +++-- lib/screens/live_care/video_call.dart | 112 +-- .../line_chart_for_diabetic.dart | 17 +- .../line_chart_curved_lab_history.dart | 14 +- .../notes/note/progress_note_screen.dart | 796 +++++++----------- .../profile/vital_sign/line_chart_curved.dart | 59 +- .../line_chart_curved_blood_pressure.dart | 45 +- .../reschedule_leaves/reschedule_leave.dart | 475 +++-------- lib/widgets/shared/app_texts_widget.dart | 68 +- .../shared/dialogs/dailog-list-select.dart | 19 +- .../shared/dialogs/master_key_dailog.dart | 34 +- .../dialogs/search-drugs-dailog-list.dart | 18 +- .../shared/text_fields/TextFields.dart | 100 +-- pubspec.lock | 375 +++++---- pubspec.yaml | 28 +- speech_to_text/example/lib/main.dart | 19 +- speech_to_text/example/pubspec.lock | 40 +- speech_to_text/pubspec.lock | 38 +- 24 files changed, 1240 insertions(+), 1981 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 3c58fe30..af797b24 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -14,8 +14,8 @@ 30F70E6C266F56FD005D8F8E /* MainAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */; }; 30F70E6F266F6509005D8F8E /* VideoCallRequestParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F70E6E266F6509005D8F8E /* VideoCallRequestParameters.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3D7F2AC9B3EBF568D59B943B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 7645621A848A5D0B29B97C46 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4E9718EA62661304F55A32D /* Pods_Runner.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -37,13 +37,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0762701A9540BA69842BCA9C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 29211CD725C165D600DD740D /* RunnerRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerRelease.entitlements; sourceTree = ""; }; 29211E4125C172B700DD740D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; - 2ADF20AFB51DAEC9BED1884D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 300790F9266FB14B0052174C /* VCEmbeder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VCEmbeder.swift; sourceTree = ""; }; 300790FB26710CAB0052174C /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 30F70E6B266F56FD005D8F8E /* MainAppViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainAppViewController.swift; sourceTree = ""; }; @@ -61,7 +58,10 @@ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9CE61EBC24AB366E008D68DD /* VideoCallViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoCallViewController.swift; sourceTree = ""; }; 9CE61ECC24ADBB4C008D68DD /* ICallProtocoll.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICallProtocoll.swift; sourceTree = ""; }; - E5CA53445955DBB6BB6D164C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + C55D4AE245B71956447BA22F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + C8801C5E6B82B6CB497CA5C7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + E333B59AA5538E0304102FD2 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + E4E9718EA62661304F55A32D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -69,7 +69,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 3D7F2AC9B3EBF568D59B943B /* Pods_Runner.framework in Frameworks */, + 7645621A848A5D0B29B97C46 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -104,9 +104,9 @@ 7D66D387293CE5376A07EC5F /* Pods */ = { isa = PBXGroup; children = ( - 2ADF20AFB51DAEC9BED1884D /* Pods-Runner.debug.xcconfig */, - E5CA53445955DBB6BB6D164C /* Pods-Runner.release.xcconfig */, - 0762701A9540BA69842BCA9C /* Pods-Runner.profile.xcconfig */, + C55D4AE245B71956447BA22F /* Pods-Runner.debug.xcconfig */, + C8801C5E6B82B6CB497CA5C7 /* Pods-Runner.release.xcconfig */, + E333B59AA5538E0304102FD2 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -129,7 +129,7 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 7D66D387293CE5376A07EC5F /* Pods */, - C1938275850F66EAA5D7AC0F /* Frameworks */, + A9562A4C43D78E443FA8BFD1 /* Frameworks */, ); sourceTree = ""; }; @@ -171,10 +171,10 @@ name = "Supporting Files"; sourceTree = ""; }; - C1938275850F66EAA5D7AC0F /* Frameworks */ = { + A9562A4C43D78E443FA8BFD1 /* Frameworks */ = { isa = PBXGroup; children = ( - 104DCFE405BA413255D4BDD9 /* Pods_Runner.framework */, + E4E9718EA62661304F55A32D /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -186,14 +186,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - C79BE4619064E868C0DFBD12 /* [CP] Check Pods Manifest.lock */, + 4CBD0CB2C106C3E696B88FDB /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 3DBDEDAE0EB70F8613EE7963 /* [CP] Embed Pods Frameworks */, + C21500C474806845DCE7C12A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -215,6 +215,7 @@ TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 3A359E86ZF; LastSwiftMigration = 1100; }; }; @@ -267,7 +268,43 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 3DBDEDAE0EB70F8613EE7963 /* [CP] Embed Pods Frameworks */ = { + 4CBD0CB2C106C3E696B88FDB /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + C21500C474806845DCE7C12A /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -280,7 +317,7 @@ "${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", - "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework", "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", @@ -301,8 +338,7 @@ "${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework", "${BUILT_PRODUCTS_DIR}/flutter_keyboard_visibility/flutter_keyboard_visibility.framework", "${BUILT_PRODUCTS_DIR}/fluttertoast/fluttertoast.framework", - "${BUILT_PRODUCTS_DIR}/hexcolor/hexcolor.framework", - "${BUILT_PRODUCTS_DIR}/local_auth/local_auth.framework", + "${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework", "${BUILT_PRODUCTS_DIR}/maps_launcher/maps_launcher.framework", "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", @@ -322,7 +358,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", @@ -343,8 +379,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_keyboard_visibility.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fluttertoast.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hexcolor.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maps_launcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", @@ -361,42 +396,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - C79BE4619064E868C0DFBD12 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -489,12 +488,12 @@ }; 249021D4217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + baseConfigurationReference = E333B59AA5538E0304102FD2 /* Pods-Runner.profile.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -627,12 +626,12 @@ }; 97C147061CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + baseConfigurationReference = C55D4AE245B71956447BA22F /* Pods-Runner.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -660,13 +659,13 @@ }; 97C147071CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + baseConfigurationReference = C8801C5E6B82B6CB497CA5C7 /* Pods-Runner.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements; CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 2314a2c8..31c95209 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -65,5 +65,7 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/lib/config/config.dart b/lib/config/config.dart index 2195aff2..4a246275 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,119 +5,85 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; +//const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; -const PATIENT_PROGRESS_NOTE_URL = - "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; -const PATIENT_INSURANCE_APPROVALS_URL = - "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; -const PATIENT_REFER_TO_DOCTOR_URL = - "Services/DoctorApplication.svc/REST/ReferToDoctor"; -const PATIENT_GET_DOCTOR_BY_CLINIC_URL = - "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; - -const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = - "Services/Doctors.svc/REST/SearchDoctorsByTime"; - -const GET_CLINICS_FOR_DOCTOR = - 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; -const PATIENT_GET_LIST_REFERAL_URL = - "Services/Lists.svc/REST/GetList_STPReferralFrequency"; -const PATIENT_GET_CLINIC_BY_PROJECT_URL = - "Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; +const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; +const PATIENT_INSURANCE_APPROVALS_URL = "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; +const PATIENT_REFER_TO_DOCTOR_URL = "Services/DoctorApplication.svc/REST/ReferToDoctor"; +const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; + +const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = "Services/Doctors.svc/REST/SearchDoctorsByTime"; + +const GET_CLINICS_FOR_DOCTOR = 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; +const PATIENT_GET_LIST_REFERAL_URL = "Services/Lists.svc/REST/GetList_STPReferralFrequency"; +const PATIENT_GET_CLINIC_BY_PROJECT_URL = "Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo"; const GET_CLINICS = "Services/DoctorApplication.svc/REST/GetClinics"; -const GET_REFERRAL_FACILITIES = - 'Services/DoctorApplication.svc/REST/GetReferralFacilities'; +const GET_REFERRAL_FACILITIES = 'Services/DoctorApplication.svc/REST/GetReferralFacilities'; const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo'; -const GET_PATIENT_VITAL_SIGN = - 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; -const GET_PATIENT_VITAL_SIGN_DATA = - 'Services/DoctorApplication.svc/REST/GetVitalSigns'; -const GET_PATIENT_LAB_OREDERS = - 'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; +const GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN_DATA = 'Services/DoctorApplication.svc/REST/GetVitalSigns'; +const GET_PATIENT_LAB_OREDERS = 'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; -const GET_LIVECARE_PENDINGLIST = - 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; +const GET_LIVECARE_PENDINGLIST = 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; const START_LIVE_CARE_CALL = 'LiveCareApi/DoctorApp/CallPatient'; -const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = - "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; +const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; -const GET_PRESCRIPTION_REPORT = - 'Services/Patients.svc/REST/GetPrescriptionReport'; +const GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/GetPrescriptionReport'; -const GT_MY_PATIENT_QUESTION = - 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions'; +const GT_MY_PATIENT_QUESTION = 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions'; -const PRM_SEARCH_PATIENT = - 'Services/Patients.svc/REST/GetPatientInformation_PRM'; +const PRM_SEARCH_PATIENT = 'Services/Patients.svc/REST/GetPatientInformation_PRM'; const GET_PATIENT = 'Services/DoctorApplication.svc/REST/'; -const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = - 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; +const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; -const GET_MY_REFERRAL_PATIENT = - 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; +const GET_MY_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor'; -const ADD_REFERRED_DOCTOR_REMARKS = - 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; +const ADD_REFERRED_DOCTOR_REMARKS = 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; -const GET_MY_REFERRED_PATIENT = - 'Services/DoctorApplication.svc/REST/GtMyReferredPatient'; +const GET_MY_REFERRED_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredPatient'; -const GET_MY_REFERRED_OUT_PATIENT = - 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient'; +const GET_MY_REFERRED_OUT_PATIENT = 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient'; -const GET_PENDING_REFERRAL_PATIENT = - 'Services/DoctorApplication.svc/REST/PendingReferrals'; +const GET_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/PendingReferrals'; -const CREATE_REFERRAL_PATIENT = - 'Services/DoctorApplication.svc/REST/CreateReferral'; +const CREATE_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/CreateReferral'; -const RESPONSE_PENDING_REFERRAL_PATIENT = - 'Services/DoctorApplication.svc/REST/RespondReferral'; +const RESPONSE_PENDING_REFERRAL_PATIENT = 'Services/DoctorApplication.svc/REST/RespondReferral'; const GET_PATIENT_REFERRAL = 'Services/DoctorApplication.svc/REST/GetRefferal'; const POST_UCAF = 'Services/DoctorApplication.svc/REST/PostUCAF'; -const GET_DOCTOR_WORKING_HOURS_TABLE = - 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; +const GET_DOCTOR_WORKING_HOURS_TABLE = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; -const GET_PATIENT_LAB_RESULTS = - 'Services/DoctorApplication.svc/REST/GetPatientLabResults'; +const GET_PATIENT_LAB_RESULTS = 'Services/DoctorApplication.svc/REST/GetPatientLabResults'; const LOGIN_URL = 'Services/Sentry.svc/REST/MemberLogIN_New'; -const INSERT_DEVICE_IMEI = - 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails'; +const INSERT_DEVICE_IMEI = 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails'; // 'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI'; // const SELECT_DEVICE_IMEI = // 'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI'; -const SELECT_DEVICE_IMEI = - 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI'; +const SELECT_DEVICE_IMEI = 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI'; -const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = - 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType'; +const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType'; -const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = - 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp'; +const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp'; -const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = - 'Services/DoctorApplication.svc/REST/SendVerificationCode'; -const MEMBER_CHECK_ACTIVATION_CODE_NEW = - 'Services/Sentry.svc/REST/MemberCheckActivationCode_New'; +const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = 'Services/DoctorApplication.svc/REST/SendVerificationCode'; +const MEMBER_CHECK_ACTIVATION_CODE_NEW = 'Services/Sentry.svc/REST/MemberCheckActivationCode_New'; -const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = - 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; +const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles'; const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin'; @@ -125,268 +91,179 @@ const SEND_SMS_INSTRUCTIONS = 'LiveCareApi/DoctorApp/SendSMSInstruction'; const GET_ALTERNATIVE_SERVICE = 'LiveCareApi/DoctorApp/GetAlternativeServices'; const END_CALL = 'LiveCareApi/DoctorApp/EndCall'; const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge'; -const GET_DASHBOARD = - 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; -const GET_SICKLEAVE_STATISTIC = - 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; -const ARRIVED_PATIENT_URL = - 'Services/DoctorApplication.svc/REST/PatientArrivalList'; +const GET_DASHBOARD = 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; +const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; +const ARRIVED_PATIENT_URL = 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; -const GET_COVERING_DOCTORS = - 'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; +const GET_COVERING_DOCTORS = 'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; -const UPDATE_RESCHDEULE = - 'Services/DoctorApplication.svc/REST/PatchRequisition'; -const GET_RESCHEDULE_LEAVE = - 'Services/DoctorApplication.svc/REST/GetRequisition'; -const GET_PRESCRIPTION_LIST = - 'Services/DoctorApplication.svc/REST/GetPrescription'; - -const POST_PRESCRIPTION_LIST = - 'Services/DoctorApplication.svc/REST/PostPrescription'; -const GET_PROCEDURE_LIST = - 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; -const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; +const UPDATE_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PatchRequisition'; +const GET_RESCHEDULE_LEAVE = 'Services/DoctorApplication.svc/REST/GetRequisition'; +const GET_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/GetPrescription'; +const POST_PRESCRIPTION_LIST = 'Services/DoctorApplication.svc/REST/PostPrescription'; +const GET_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; +const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; -const GET_PATIENT_IN_PATIENT_LIST = - 'Services/DoctorApplication.svc/REST/GetMyInPatient'; +const GET_PATIENT_IN_PATIENT_LIST = 'Services/DoctorApplication.svc/REST/GetMyInPatient'; -const Verify_Referral_Doctor_Remarks = - 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; +const Verify_Referral_Doctor_Remarks = 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; ///Lab Order const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; -const GET_Patient_LAB_SPECIAL_RESULT = - 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; -const SEND_LAB_RESULT_EMAIL = - 'Services/Notifications.svc/REST/SendLabReportEmail'; -const GET_Patient_LAB_RESULT = - 'Services/Patients.svc/REST/GetPatientLabResults'; -const GET_Patient_LAB_ORDERS_RESULT = - 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; -const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = - 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription'; +const GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; +const GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription'; // SOAP const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; -const POST_EPISODE_FOR_IN_PATIENT = - 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; +const POST_EPISODE_FOR_IN_PATIENT = 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; -const POST_CHIEF_COMPLAINT = - 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; -const POST_PHYSICAL_EXAM = - 'Services/DoctorApplication.svc/REST/PostPhysicalExam'; -const POST_PROGRESS_NOTE = - '/Services/DoctorApplication.svc/REST/PostProgressNote'; +const POST_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; +const POST_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PostPhysicalExam'; +const POST_PROGRESS_NOTE = '/Services/DoctorApplication.svc/REST/PostProgressNote'; const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment'; const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies'; const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory'; -const PATCH_CHIEF_COMPLAINT = - 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; +const PATCH_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; -const PATCH_PHYSICAL_EXAM = - 'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; -const PATCH_PROGRESS_NOTE = - 'Services/DoctorApplication.svc/REST/PatchProgressNote'; +const PATCH_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; +const PATCH_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/PatchProgressNote'; const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment'; const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory'; -const GET_CHIEF_COMPLAINT = - 'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; +const GET_CHIEF_COMPLAINT = 'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam'; const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote'; const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment'; +const GET_LIST_CATEGORISE = 'Services/DoctorApplication.svc/REST/GetProcedureCategories'; -const GET_LIST_CATEGORISE = - 'Services/DoctorApplication.svc/REST/GetProcedureCategories'; - -const GET_CATEGORISE_PROCEDURE = - 'Services/DoctorApplication.svc/REST/GetProcedure'; +const GET_CATEGORISE_PROCEDURE = 'Services/DoctorApplication.svc/REST/GetProcedure'; const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure'; -const UPDATE_PRESCRIPTION = - 'Services/DoctorApplication.svc/REST/PatchPrescription'; +const UPDATE_PRESCRIPTION = 'Services/DoctorApplication.svc/REST/PatchPrescription'; const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList'; -const DRUG_TO_DRUG = - 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction'; +const DRUG_TO_DRUG = 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction'; const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile'; const GET_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors'; const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards'; -const GET_ROOM_CATEGORIES = - 'Services/DoctorApplication.svc/REST/GetRoomCategories'; -const GET_DIAGNOSIS_TYPES = - 'Services/DoctorApplication.svc/REST/DiagnosisTypes'; +const GET_ROOM_CATEGORIES = 'Services/DoctorApplication.svc/REST/GetRoomCategories'; +const GET_DIAGNOSIS_TYPES = 'Services/DoctorApplication.svc/REST/DiagnosisTypes'; const GET_DIET_TYPES = 'Services/DoctorApplication.svc/REST/DietTypes'; const GET_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes'; -const POST_ADMISSION_REQUEST = - 'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; -const GET_ITEM_BY_MEDICINE = - 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode'; +const POST_ADMISSION_REQUEST = 'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; +const GET_ITEM_BY_MEDICINE = 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode'; -const GET_PROCEDURE_VALIDATION = - 'Services/DoctorApplication.svc/REST/ValidateProcedures'; -const GET_BOX_QUANTITY = - 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; +const GET_PROCEDURE_VALIDATION = 'Services/DoctorApplication.svc/REST/ValidateProcedures'; +const GET_BOX_QUANTITY = 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; ///GET ECG const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults"; -const GET_MY_REFERRAL_INPATIENT = - "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; +const GET_MY_REFERRAL_INPATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; -const GET_MY_REFERRAL_OUT_PATIENT = - "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient"; +const GET_MY_REFERRAL_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient"; -const GET_MY_DISCHARGE_PATIENT = - "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; -const GET_DISCHARGE_PATIENT = - "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; +const GET_MY_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; +const GET_DISCHARGE_PATIENT = "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; -const GET_PAtIENTS_INSURANCE_APPROVALS = - "Services/Patients.svc/REST/GetApprovalStatus"; +const GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; -const GET_IN_PATIENT_ORDERS = - 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; +const GET_IN_PATIENT_ORDERS = 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; ///Prescriptions -const GET_PRESCRIPTIONS_ALL_ORDERS = - 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PRESCRIPTION_REPORT_NEW = - 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; -const SEND_PRESCRIPTION_EMAIL = - 'Services/Notifications.svc/REST/SendPrescriptionEmail'; -const GET_PRESCRIPTION_REPORT_ENH = - 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; -const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = - "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; -const CREATE_PROGRESS_NOTE_FOR_INPATIENT = - "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; +const GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PRESCRIPTION_REPORT_NEW = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +const SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +const GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; +const CREATE_PROGRESS_NOTE_FOR_INPATIENT = "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; -const GET_MY_OUT_PATIENT = - "Services/DoctorApplication.svc/REST/GetMyOutPatient"; +const GET_MY_OUT_PATIENT = "Services/DoctorApplication.svc/REST/GetMyOutPatient"; -const PATIENT_MEDICAL_REPORT_GET_LIST = - "Services/Patients.svc/REST/DAPP_ListMedicalReport"; -const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = - "Services/Patients.svc/REST/DAPP_GetTemplateByID"; -const PATIENT_MEDICAL_REPORT_INSERT = - "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; -const PATIENT_MEDICAL_REPORT_VERIFIED = - "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; +const PATIENT_MEDICAL_REPORT_GET_LIST = "Services/Patients.svc/REST/DAPP_ListMedicalReport"; +const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = "Services/Patients.svc/REST/DAPP_GetTemplateByID"; +const PATIENT_MEDICAL_REPORT_INSERT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; +const PATIENT_MEDICAL_REPORT_VERIFIED = "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; -const GET_PROCEDURE_TEMPLETE = - 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet'; +const GET_PROCEDURE_TEMPLETE = 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet'; const GET_TEMPLETE_LIST = 'Services/Doctors.svc/REST/DAPP_TemplateGet'; -const GET_PROCEDURE_TEMPLETE_DETAILS = - "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; -const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = - 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp'; +const GET_PROCEDURE_TEMPLETE_DETAILS = "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; +const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp'; -const DOCTOR_CHECK_HAS_LIVE_CARE = - "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare"; +const DOCTOR_CHECK_HAS_LIVE_CARE = "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare"; const LIVE_CARE_IS_LOGIN = "LiveCareApi/DoctorApp/UseIsLogin"; -const ADD_REFERRED_REMARKS_NEW = - "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; -const GET_SPECIAL_CLINICAL_CARE_LIST = - "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList"; -const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = - "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList"; - -const INSERT_MEDICAL_REPORT = - "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; - -const UPDATE_MEDICAL_REPORT = - "Services/Patients.svc/REST/DAPP_UpdateMedicalReport"; -const GET_SICK_LEAVE_DOCTOR_APP = - "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; +const ADD_REFERRED_REMARKS_NEW = "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; +const GET_SPECIAL_CLINICAL_CARE_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList"; +const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList"; + +const INSERT_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; + +const UPDATE_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_UpdateMedicalReport"; +const GET_SICK_LEAVE_DOCTOR_APP = "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; const ADD_PATIENT_TO_DOCTOR = "LiveCareApi/DoctorApp/AssignPatientToDoctor"; const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue"; -const CREATE_DOCTOR_RESPONSE = - "Services/DoctorApplication.svc/REST/CreateDoctorResponse"; -const GET_DOCTOR_NOT_REPLIED_COUNTS = - "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; -const ALL_SPECIAL_LAB_RESULT = - "services/Patients.svc/REST/GetPatientLabSpecialResultsALL"; -const GET_MEDICATION_FOR_IN_PATIENT = - "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient"; -const GET_EPISODE_FOR_INPATIENT = - "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient"; +const CREATE_DOCTOR_RESPONSE = "Services/DoctorApplication.svc/REST/CreateDoctorResponse"; +const GET_DOCTOR_NOT_REPLIED_COUNTS = "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; +const ALL_SPECIAL_LAB_RESULT = "services/Patients.svc/REST/GetPatientLabSpecialResultsALL"; +const GET_MEDICATION_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient"; +const GET_EPISODE_FOR_INPATIENT = "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient"; ///Operation Details Services -const GET_RESERVATIONS = - "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails"; -const GET_OPERATION_DETAILS = - "Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails"; -const UPDATE_OPERATION_REPORT = - "Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport"; +const GET_RESERVATIONS = "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails"; +const GET_OPERATION_DETAILS = "Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails"; +const UPDATE_OPERATION_REPORT = "Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport"; -const NURSING_PROGRESS_NOTE = - "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote"; -const GET_DIAGNOSIS_FOR_IN_PATIENT = - "Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient"; +const NURSING_PROGRESS_NOTE = "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote"; +const GET_DIAGNOSIS_FOR_IN_PATIENT = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient"; -const GET_DIABETIC_CHART_VALUES = - "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; +const GET_DIABETIC_CHART_VALUES = "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; -const GET_PENDING_ORDERS = - "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; +const GET_PENDING_ORDERS = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; -const GET_ADMISSION_ORDERS = - "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; +const GET_ADMISSION_ORDERS = "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; ///Patient Registration Services -const CHECK_PATIENT_FOR_REGISTRATION = - "Services/Authentication.svc/REST/CheckPatientForRegisteration"; -const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = - "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration"; -const CHECK_ACTIVATION_CODE_FOR_PATIENT = - "Services/Authentication.svc/REST/CheckActivationCode"; -const PATIENT_REGISTRATION = - "Services/Authentication.svc/REST/PatientRegistration"; +const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration"; +const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration"; +const CHECK_ACTIVATION_CODE_FOR_PATIENT = "Services/Authentication.svc/REST/CheckActivationCode"; +const PATIENT_REGISTRATION = "Services/Authentication.svc/REST/PatientRegistration"; const GET_PATIENT_INFO = "Services/NHIC.svc/REST/GetPatientInfo"; /// Discharge Summary -const GET_PENDING_DISCHARGE_SUMMARY = - "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary"; -const GET_ALL_DISCHARGE_SUMMARY = - "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; - -const VTE_ASSESSMENT = - "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo"; +const GET_PENDING_DISCHARGE_SUMMARY = "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary"; +const GET_ALL_DISCHARGE_SUMMARY = "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; -const GET_INTERVENTION_MEDICATION = - "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications"; +const VTE_ASSESSMENT = "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo"; -const GET_INTERVENTION_MEDICATION_HISTORY = - "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory"; +const GET_INTERVENTION_MEDICATION = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications"; -const SET_ACCEPTED_OR_REJECTED = - "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; +const GET_INTERVENTION_MEDICATION_HISTORY = "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory"; -const GET_STP_MASTER_LIST = - "Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList"; +const SET_ACCEPTED_OR_REJECTED = "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; +const GET_STP_MASTER_LIST = "Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList"; -const DOCTOR_ER_SIGN_ASSESSMENT = - "Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment"; +const DOCTOR_ER_SIGN_ASSESSMENT = "Services/DoctorApplication.svc/REST/DoctorApp_DoctorERSignAssessment"; var selectedPatientType = 1; @@ -411,26 +288,8 @@ var SERVICES_PATIANT2 = [ "List_MyReferralPatient", "patientArrivalList" ]; -var SERVICES_PATIANT_HEADER = [ - "My OutPatient", - "My InPatient", - "Discharge", - "Referred", - "Referral Discharge", - "Tomorrow", - "Referral", - "Arrival Patient" -]; -var SERVICES_PATIANT_HEADER_AR = [ - "المريض الخارجي", - "المريض المنوم", - "المريض المعافى", - "المريض المحول الي", - "المريض المحال المعافى", - "مريض الغد", - "المريض المحول مني", - "المريض الواصل" -]; +var SERVICES_PATIANT_HEADER = ["My OutPatient", "My InPatient", "Discharge", "Referred", "Referral Discharge", "Tomorrow", "Referral", "Arrival Patient"]; +var SERVICES_PATIANT_HEADER_AR = ["المريض الخارجي", "المريض المنوم", "المريض المعافى", "المريض المحول الي", "المريض المحال المعافى", "مريض الغد", "المريض المحول مني", "المريض الواصل"]; const PRIMARY_COLOR = 0xff515B5D; @@ -438,7 +297,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 = 8.3; +const VERSION_ID = 8.9; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; @@ -450,7 +309,6 @@ const GENERAL_ID = 'Cs2020@2016\$2958'; const PATIENT_TYPE = 1; const PATIENT_TYPE_ID = 1; - /// Timer Info const TIMER_MIN = 10; @@ -459,7 +317,6 @@ class AppGlobal { static Color appRedColor = Color(0xFFD02127); static Color appGreenColor = Color(0xFF359846); static Color appTextColor = Color(0xFF2B353E); - static Color scheduleTextColor = Color(0xFF2E303A); - static Color inProgressColor = Color(0xFFCC9B14); - + static Color scheduleTextColor = Color(0xFF2E303A); + static Color inProgressColor = Color(0xFFCC9B14); } diff --git a/lib/core/service/AnalyticsService.dart b/lib/core/service/AnalyticsService.dart index e194ed9a..b2290299 100644 --- a/lib/core/service/AnalyticsService.dart +++ b/lib/core/service/AnalyticsService.dart @@ -3,14 +3,13 @@ import 'package:firebase_analytics/observer.dart'; import 'package:flutter/cupertino.dart'; class AnalyticsService { - final FirebaseAnalytics _analytics = FirebaseAnalytics(); + // final FirebaseAnalytics _analytics = FirebaseAnalytics(); + static FirebaseAnalyticsObserver observer = FirebaseAnalyticsObserver(analytics: analytics); + static FirebaseAnalytics analytics = FirebaseAnalytics.instance; + FirebaseAnalyticsObserver getAnalyticsObserver() => FirebaseAnalyticsObserver(analytics: analytics); - FirebaseAnalyticsObserver getAnalyticsObserver() => - FirebaseAnalyticsObserver(analytics: _analytics); - - Future logEvent( - {@required String eventCategory, @required String eventAction}) async { - await _analytics.logEvent(name: 'event', parameters: { + Future logEvent({@required String eventCategory, @required String eventAction}) async { + await analytics.logEvent(name: 'event', parameters: { "eventCategory": eventCategory, "eventAction": eventAction, }); diff --git a/lib/core/viewModel/authentication_view_model.dart b/lib/core/viewModel/authentication_view_model.dart index 9f0b28e5..0a20fb47 100644 --- a/lib/core/viewModel/authentication_view_model.dart +++ b/lib/core/viewModel/authentication_view_model.dart @@ -26,7 +26,7 @@ import 'package:doctor_app_flutter/utils/utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/services.dart'; -import 'package:local_auth/auth_strings.dart'; +// import 'package:local_auth/auth_strings.dart'; import 'package:local_auth/local_auth.dart'; enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED, UNVERIFIED } @@ -41,20 +41,13 @@ class AuthenticationViewModel extends BaseViewModel { NewLoginInformationModel get loginInfo => _authService.loginInfo; - List get doctorProfilesList => - _authService.doctorProfilesList; + List get doctorProfilesList => _authService.doctorProfilesList; - SendActivationCodeForDoctorAppResponseModel - get activationCodeVerificationScreenRes => - _authService.activationCodeVerificationScreenRes; + SendActivationCodeForDoctorAppResponseModel get activationCodeVerificationScreenRes => _authService.activationCodeVerificationScreenRes; - SendActivationCodeForDoctorAppResponseModel - get activationCodeForDoctorAppRes => - _authService.activationCodeForDoctorAppRes; + SendActivationCodeForDoctorAppResponseModel get activationCodeForDoctorAppRes => _authService.activationCodeForDoctorAppRes; - CheckActivationCodeForDoctorAppResponseModel - get checkActivationCodeForDoctorAppRes => - _authService.checkActivationCodeForDoctorAppRes; + CheckActivationCodeForDoctorAppResponseModel get checkActivationCodeForDoctorAppRes => _authService.checkActivationCodeForDoctorAppRes; NewLoginInformationModel loggedUser; GetIMEIDetailsModel user; @@ -88,32 +81,20 @@ class AuthenticationViewModel extends BaseViewModel { profileInfo['IMEI'] = token; profileInfo['LogInTypeID'] = await sharedPref.getInt(OTP_TYPE); profileInfo['BioMetricEnabled'] = true; - profileInfo['MobileNo'] = - loggedIn != null ? loggedIn['MobileNumber'] : user.mobile; - InsertIMEIDetailsModel insertIMEIDetailsModel = - InsertIMEIDetailsModel.fromJson(profileInfo); - insertIMEIDetailsModel.genderDescription = - profileInfo['Gender_Description']; - insertIMEIDetailsModel.genderDescriptionN = - profileInfo['Gender_DescriptionN']; - insertIMEIDetailsModel.genderDescriptionN = - profileInfo['Gender_DescriptionN']; + profileInfo['MobileNo'] = loggedIn != null ? loggedIn['MobileNumber'] : user.mobile; + InsertIMEIDetailsModel insertIMEIDetailsModel = InsertIMEIDetailsModel.fromJson(profileInfo); + insertIMEIDetailsModel.genderDescription = profileInfo['Gender_Description']; + insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN']; + insertIMEIDetailsModel.genderDescriptionN = profileInfo['Gender_DescriptionN']; insertIMEIDetailsModel.titleDescription = profileInfo['Title_Description']; - insertIMEIDetailsModel.titleDescriptionN = - profileInfo['Title_DescriptionN']; + insertIMEIDetailsModel.titleDescriptionN = profileInfo['Title_DescriptionN']; insertIMEIDetailsModel.projectID = await sharedPref.getInt(PROJECT_ID); - insertIMEIDetailsModel.doctorID = loggedIn != null - ? loggedIn['List_MemberInformation'][0]['MemberID'] - : user.doctorID; - insertIMEIDetailsModel.outSA = - loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA; - insertIMEIDetailsModel.vidaAuthTokenID = - await sharedPref.getString(VIDA_AUTH_TOKEN_ID); - insertIMEIDetailsModel.vidaRefreshTokenID = - await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); + insertIMEIDetailsModel.doctorID = loggedIn != null ? loggedIn['List_MemberInformation'][0]['MemberID'] : user.doctorID; + insertIMEIDetailsModel.outSA = loggedIn != null ? loggedIn['PatientOutSA'] : user.outSA; + insertIMEIDetailsModel.vidaAuthTokenID = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); + insertIMEIDetailsModel.vidaRefreshTokenID = await sharedPref.getString(VIDA_REFRESH_TOKEN_ID); insertIMEIDetailsModel.password = userInfo.password; - insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID - : int.parse(user.editedBy.toString()); + insertIMEIDetailsModel.loginDoctorID = loggedUser != null ? loggedUser.listMemberInformation[0].employeeID : int.parse(user.editedBy.toString()); await _authService.insertDeviceImei(insertIMEIDetailsModel); if (_authService.hasError) { @@ -141,25 +122,22 @@ class AuthenticationViewModel extends BaseViewModel { } /// send activation code for for msg methods - Future sendActivationCodeVerificationScreen( - AuthMethodTypes authMethodType) async { + Future sendActivationCodeVerificationScreen(AuthMethodTypes authMethodType) async { setState(ViewState.BusyLocal); - ActivationCodeForVerificationScreenModel activationCodeModel = - ActivationCodeForVerificationScreenModel( - iMEI: user.iMEI, - facilityId: user.projectID, - memberID: user.doctorID, - loginDoctorID: int.parse(user.editedBy.toString()), - zipCode: user.outSA == true ? '971' : '966', - mobileNumber: user.mobile, - oTPSendType: authMethodType.getTypeIdService(), - isMobileFingerPrint: 1, - vidaAuthTokenID: user.vidaAuthTokenID, - vidaRefreshTokenID: user.vidaRefreshTokenID); + ActivationCodeForVerificationScreenModel activationCodeModel = ActivationCodeForVerificationScreenModel( + iMEI: user.iMEI, + facilityId: user.projectID, + memberID: user.doctorID, + loginDoctorID: int.parse(user.editedBy.toString()), + zipCode: user.outSA == true ? '971' : '966', + mobileNumber: user.mobile, + oTPSendType: authMethodType.getTypeIdService(), + isMobileFingerPrint: 1, + vidaAuthTokenID: user.vidaAuthTokenID, + vidaRefreshTokenID: user.vidaRefreshTokenID); await sharedPref.setString(DOCTOR_ID, user.editedBy.toString()); - await _authService - .sendActivationCodeVerificationScreen(activationCodeModel); + await _authService.sendActivationCodeVerificationScreen(activationCodeModel); if (_authService.hasError) { error = _authService.error; setState(ViewState.ErrorLocal); @@ -168,8 +146,7 @@ class AuthenticationViewModel extends BaseViewModel { } /// send activation code for silent login - Future sendActivationCodeForDoctorApp( - {AuthMethodTypes authMethodType, String password}) async { + Future sendActivationCodeForDoctorApp({AuthMethodTypes authMethodType, String password}) async { setState(ViewState.BusyLocal); int projectID = await sharedPref.getInt(PROJECT_ID); ActivationCodeModel activationCodeModel = ActivationCodeModel( @@ -184,57 +161,45 @@ class AuthenticationViewModel extends BaseViewModel { error = _authService.error; setState(ViewState.ErrorLocal); } else { - await sharedPref.setString( - TOKEN, _authService.activationCodeForDoctorAppRes.logInTokenID); + await sharedPref.setString(TOKEN, _authService.activationCodeForDoctorAppRes.logInTokenID); setState(ViewState.Idle); } } /// check activation code for sms and whats app - Future checkActivationCodeForDoctorApp( - {String activationCode, bool isSilentLogin = false}) async { + Future checkActivationCodeForDoctorApp({String activationCode, bool isSilentLogin = false}) async { setState(ViewState.BusyLocal); - CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = - new CheckActivationCodeRequestModel( - zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode, - mobileNumber: - loggedUser != null ? loggedUser.mobileNumber : user.mobile, - projectID: await sharedPref.getInt(PROJECT_ID) != null - ? await sharedPref.getInt(PROJECT_ID) - : user.projectID, - logInTokenID: await sharedPref.getString(TOKEN), - activationCode: activationCode ?? '0000', - memberID: userInfo.userID != null - ? int.parse(userInfo.userID) - : user.doctorID, - password: userInfo.password, - facilityId: userInfo.projectID != null - ? userInfo.projectID.toString() - : user.projectID.toString(), - oTPSendType: await sharedPref.getInt(OTP_TYPE), - iMEI: localToken, - loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID - : int.parse(user.editedBy.toString()),///loggedUser.listMemberInformation[0].employeeID, - // loggedUser.listMemberInformation[0].employeeID, - isForSilentLogin: isSilentLogin, - generalid: "Cs2020@2016\$2958"); - await _authService - .checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); + CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel( + zipCode: loggedUser != null ? loggedUser.zipCode : user.zipCode, + mobileNumber: loggedUser != null ? loggedUser.mobileNumber : user.mobile, + projectID: await sharedPref.getInt(PROJECT_ID) != null ? await sharedPref.getInt(PROJECT_ID) : user.projectID, + logInTokenID: await sharedPref.getString(TOKEN), + activationCode: activationCode ?? '0000', + memberID: userInfo.userID != null ? int.parse(userInfo.userID) : user.doctorID, + password: userInfo.password, + facilityId: userInfo.projectID != null ? userInfo.projectID.toString() : user.projectID.toString(), + oTPSendType: await sharedPref.getInt(OTP_TYPE), + iMEI: localToken, + loginDoctorID: loggedUser != null ? loggedUser.listMemberInformation[0].employeeID : int.parse(user.editedBy.toString()), + + ///loggedUser.listMemberInformation[0].employeeID, + // loggedUser.listMemberInformation[0].employeeID, + isForSilentLogin: isSilentLogin, + generalid: "Cs2020@2016\$2958"); + await _authService.checkActivationCodeForDoctorApp(checkActivationCodeForDoctorApp); if (_authService.hasError) { error = _authService.error; setState(ViewState.ErrorLocal); } else { - await setDataAfterSendActivationSuccess( - checkActivationCodeForDoctorAppRes); + await setDataAfterSendActivationSuccess(checkActivationCodeForDoctorAppRes); setState(ViewState.Idle); } } /// get list of Hospitals Future getHospitalsList(memberID) async { - GetHospitalsRequestModel getHospitalsRequestModel = - GetHospitalsRequestModel(); + GetHospitalsRequestModel getHospitalsRequestModel = GetHospitalsRequestModel(); getHospitalsRequestModel.memberID = memberID; await _hospitalsService.getHospitals(getHospitalsRequestModel); if (_hospitalsService.hasError) { @@ -266,16 +231,11 @@ class AuthenticationViewModel extends BaseViewModel { } /// add  token to shared preferences in case of send activation code is success - setDataAfterSendActivationSuccess( - CheckActivationCodeForDoctorAppResponseModel - sendActivationCodeForDoctorAppResponseModel) async { + setDataAfterSendActivationSuccess(CheckActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) async { // print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); - await sharedPref.setString(VIDA_AUTH_TOKEN_ID, - sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); - await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, - sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); - await sharedPref.setString(TOKEN, - sendActivationCodeForDoctorAppResponseModel.authenticationTokenID); + await sharedPref.setString(VIDA_AUTH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); + await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sendActivationCodeForDoctorAppResponseModel.vidaRefreshTokenID); + await sharedPref.setString(TOKEN, sendActivationCodeForDoctorAppResponseModel.authenticationTokenID); } saveObjToString(String key, value) async { @@ -284,21 +244,23 @@ class AuthenticationViewModel extends BaseViewModel { /// ask user to add his biometric showIOSAuthMessages() async { - const iosStrings = const IOSAuthMessages( - cancelButton: 'cancel', - goToSettingsButton: 'settings', - goToSettingsDescription: 'Please set up your Touch ID.', - lockOut: 'Please Enable Your Touch ID'); - - try { - await auth.authenticateWithBiometrics( - localizedReason: 'Scan your fingerprint to authenticate', - useErrorDialogs: true, - stickyAuth: true, - iOSAuthStrings: iosStrings); - } on PlatformException catch (e) { - DrAppToastMsg.showErrorToast(e.toString()); - } + //TODO FOR UPGRADE NEED TO BE TESTED FIRST + + // const iosStrings = const IOSAuthMessages( + // cancelButton: 'cancel', + // goToSettingsButton: 'settings', + // goToSettingsDescription: 'Please set up your Touch ID.', + // lockOut: 'Please Enable Your Touch ID'); + + // try { + // await auth.authenticateWithBiometrics( + // localizedReason: 'Scan your fingerprint to authenticate', + // useErrorDialogs: true, + // stickyAuth: true, + // // iOSAuthStrings: iosStrings); + // } on PlatformException catch (e) { + // DrAppToastMsg.showErrorToast(e.toString()); + // } } /// add profile to base view model super class @@ -308,12 +270,7 @@ class AuthenticationViewModel extends BaseViewModel { /// get doctor profile based on clinic model Future getDoctorProfileBasedOnClinic(ClinicModel clinicInfo) async { - ProfileReqModel docInfo = new ProfileReqModel( - doctorID: clinicInfo.doctorID, - clinicID: clinicInfo.clinicID, - license: true, - projectID: clinicInfo.projectID, - languageID: 2); + ProfileReqModel docInfo = new ProfileReqModel(doctorID: clinicInfo.doctorID, clinicID: clinicInfo.clinicID, license: true, projectID: clinicInfo.projectID, languageID: 2); ///TODO change the lan await _authService.getDoctorProfileBasedOnClinic(docInfo); @@ -328,17 +285,12 @@ class AuthenticationViewModel extends BaseViewModel { /// add some logic in case of check activation code is success onCheckActivationCodeSuccess({bool isSilentLogin = false}) async { - sharedPref.setString( - TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID); - if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null && - checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) { - localSetDoctorProfile( - checkActivationCodeForDoctorAppRes.listDoctorProfile[0]); + sharedPref.setString(TOKEN, checkActivationCodeForDoctorAppRes.authenticationTokenID); + if (checkActivationCodeForDoctorAppRes.listDoctorProfile != null && checkActivationCodeForDoctorAppRes.listDoctorProfile.isNotEmpty) { + localSetDoctorProfile(checkActivationCodeForDoctorAppRes.listDoctorProfile[0]); } else { - sharedPref.setObj( - CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic); - ClinicModel clinic = ClinicModel.fromJson( - checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson()); + sharedPref.setObj(CLINIC_NAME, checkActivationCodeForDoctorAppRes.listDoctorsClinic); + ClinicModel clinic = ClinicModel.fromJson(checkActivationCodeForDoctorAppRes.listDoctorsClinic[0].toJson()); await getDoctorProfileBasedOnClinic(clinic); } } @@ -382,10 +334,8 @@ class AuthenticationViewModel extends BaseViewModel { } else { if (_authService.dashboardItemsList.length > 0) { user = _authService.dashboardItemsList[0]; - sharedPref.setObj( - LAST_LOGIN_USER, _authService.dashboardItemsList[0]); - await sharedPref.setString( - VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID); + sharedPref.setObj(LAST_LOGIN_USER, _authService.dashboardItemsList[0]); + await sharedPref.setString(VIDA_REFRESH_TOKEN_ID, user.vidaRefreshTokenID); await sharedPref.setString(VIDA_AUTH_TOKEN_ID, user.vidaAuthTokenID); this.unverified = true; } diff --git a/lib/core/viewModel/base_view_model.dart b/lib/core/viewModel/base_view_model.dart index 2cbc593b..0785f4d8 100644 --- a/lib/core/viewModel/base_view_model.dart +++ b/lib/core/viewModel/base_view_model.dart @@ -23,8 +23,7 @@ class BaseViewModel extends ChangeNotifier { notifyListeners(); } - Future getDoctorProfile( - {bool isGetProfile = false}) async { + Future getDoctorProfile({bool isGetProfile = false}) async { if (isGetProfile) { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); if (profile != null) { diff --git a/lib/screens/ER_singin/ER_singin_screen.dart b/lib/screens/ER_singin/ER_singin_screen.dart index 0d9dbc5e..767d4e54 100644 --- a/lib/screens/ER_singin/ER_singin_screen.dart +++ b/lib/screens/ER_singin/ER_singin_screen.dart @@ -34,14 +34,15 @@ class _ErSignInScreenState extends State { ProjectViewModel projectViewModel; @override Widget build(BuildContext context) { - projectViewModel = Provider.of(context); + projectViewModel = Provider.of(context); return BaseView( builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, - appBar: PatientSearchHeader(title: "ER Sign In",) - , + appBar: PatientSearchHeader( + title: "ER Sign In", + ), body: Center( child: Container( margin: EdgeInsets.only(top: SizeConfig.realScreenHeight / 7), @@ -58,10 +59,7 @@ class _ErSignInScreenState extends State { SizedBox( height: 7, ), - AppText(TranslationBase.of(context).scanERQrCode, - fontSize: 14, - fontWeight: FontWeight.w400, - textAlign: TextAlign.center), + AppText(TranslationBase.of(context).scanERQrCode, fontSize: 14, fontWeight: FontWeight.w400, textAlign: TextAlign.center), SizedBox( height: 15, ), @@ -95,29 +93,28 @@ class _ErSignInScreenState extends State { _scanQrAndGetPatient(BuildContext context, ERSignInViewModel model) async { var result = (await BarcodeScanner.scan()).rawContent; if (result != "") { - try{ + try { List listOfParams = result.split(','); int patientID = 0; - if (listOfParams[0].length != 0) - patientID = int.parse(listOfParams[0]); - showMyDialog(context:context, firstAction: (){ - signInERPatient(context: context, model: model, patientId: patientID, signInType: 1); - } , secondAction: (){ - signInERPatient(context: context, model: model, patientId: patientID, signInType: 2); - - } ); - }catch(e){ + if (listOfParams[0].length != 0) patientID = int.parse(listOfParams[0]); + showMyDialog( + context: context, + firstAction: () { + signInERPatient(context: context, model: model, patientId: patientID, signInType: 1); + }, + secondAction: () { + signInERPatient(context: context, model: model, patientId: patientID, signInType: 2); + }); + } catch (e) { Utils.showErrorToast("Please Enter Valid Code"); } - } } - - signInERPatient ({BuildContext context, ERSignInViewModel model, patientId, signInType}) async { + signInERPatient({BuildContext context, ERSignInViewModel model, patientId, signInType}) async { GifLoaderDialogUtils.showMyDialog(context); - await model.signInERPatient(patientId:patientId, signInType: signInType ); - if(model.state == ViewState.ErrorLocal) { + await model.signInERPatient(patientId: patientId, signInType: signInType); + if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); } else { /// TODO Elham* Create this in Utils @@ -125,103 +122,100 @@ class _ErSignInScreenState extends State { } GifLoaderDialogUtils.hideDialog(context); Navigator.of(context).pop(); - } /// TODO Elham* Make this as custom Dialog - showMyDialog({BuildContext context, Function firstAction,Function secondAction, }) { + showMyDialog({ + BuildContext context, + Function firstAction, + Function secondAction, + }) { showDialog( context: context, builder: (ctx) => Center( - child: Container( - width: MediaQuery.of(context).size.width * 0.8, - height: 250, - child: AppScaffold( - isShowAppBar: false, - body: Container( - color: Colors.white, - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // SizedBox(height: 20,), - SizedBox( - height: 10, - ), - Row( + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + height: 250, + child: AppScaffold( + isShowAppBar: false, + body: Container( + color: Colors.white, + child: Center( + child: Column( mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - AppText( - "Select option", - fontWeight: FontWeight.w600, - color: Colors.black, - fontSize: 16, + // SizedBox(height: 20,), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AppText( + "Select option", + fontWeight: FontWeight.w600, + color: Colors.black, + fontSize: 16, + ), + ], + ), + SizedBox( + height: 10, + ), + DividerWithSpacesAround(), + SizedBox( + height: 12, ), - ], - ), - SizedBox( - height: 10, - ), - DividerWithSpacesAround(), - SizedBox( - height: 12, - ), - Container( - padding: EdgeInsets.all(20), - color: Colors.white, - child: AppText( - projectViewModel.isArabic - ? "الرجاء اختيار الإجراء الذي تريد القيام به" - : 'Please choose the action you want to do ', - fontSize: 15, - textAlign: TextAlign.center, - ), - ), + Container( + padding: EdgeInsets.all(20), + color: Colors.white, + child: AppText( + projectViewModel.isArabic ? "الرجاء اختيار الإجراء الذي تريد القيام به" : 'Please choose the action you want to do ', + fontSize: 15, + textAlign: TextAlign.center, + ), + ), - SizedBox( - height: 8, + SizedBox( + height: 8, + ), + DividerWithSpacesAround(), + FractionallySizedBox( + widthFactor: 0.75, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + ElevatedButton( + child: AppText( + "Sing In", + fontWeight: FontWeight.w600, + color: Colors.black, + fontSize: 16, + ), //Text("Cancel"), + onPressed: () async { + await firstAction(); + }), + ElevatedButton( + child: AppText( + "Sing Out", + fontWeight: FontWeight.w600, + color: Colors.black, + fontSize: 16, + ), //Text("Confirm", ), + onPressed: () async { + await secondAction(); + }) + ], + ), + ) + ], ), - DividerWithSpacesAround(), - FractionallySizedBox( - widthFactor: 0.75, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - FlatButton( - child: AppText( - "Sing In", - fontWeight: FontWeight.w600, - color: Colors.black, - fontSize: 16, - ), //Text("Cancel"), - onPressed: () async { - await firstAction(); - - - }), - FlatButton( - child: AppText( - "Sing Out", - fontWeight: FontWeight.w600, - color: Colors.black, - fontSize: 16, - ), //Text("Confirm", ), - onPressed: () async { - await secondAction(); - }) - ], - ), - ) - ], + ), ), ), ), - ), - ), - )); + )); } - - } diff --git a/lib/screens/live_care/video_call.dart b/lib/screens/live_care/video_call.dart index d3851be0..146519c6 100644 --- a/lib/screens/live_care/video_call.dart +++ b/lib/screens/live_care/video_call.dart @@ -70,10 +70,7 @@ class _VideoCallPageState extends State { kApiKey: '46209962', vcId: widget.patientData.vcId, isRecording: tokenData != null ? tokenData.isRecording : false, - patientName: widget.patientData.fullName ?? - widget.patientData.firstName != null - ? "${widget.patientData.firstName} ${widget.patientData.lastName}" - : "-", + patientName: widget.patientData.fullName ?? widget.patientData.firstName != null ? "${widget.patientData.firstName} ${widget.patientData.lastName}" : "-", tokenID: token, //"hfkjshdf347r8743", generalId: "Cs2020@2016\$2958", @@ -105,8 +102,7 @@ class _VideoCallPageState extends State { }); connectOpenTok(result); - }).catchError((error) => - {Utils.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()}); } @override @@ -134,20 +130,14 @@ class _VideoCallPageState extends State { ), Text( _start == 0 ? 'Dailing' : 'Connected', - style: TextStyle( - color: Colors.deepPurpleAccent, - fontWeight: FontWeight.w300, - fontSize: 15), + style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15), ), SizedBox( height: MediaQuery.of(context).size.height * 0.02, ), Text( widget.patientData.fullName, - style: TextStyle( - color: Colors.deepPurpleAccent, - fontWeight: FontWeight.w900, - fontSize: 20), + style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w900, fontSize: 20), ), SizedBox( height: MediaQuery.of(context).size.height * 0.02, @@ -155,10 +145,7 @@ class _VideoCallPageState extends State { Container( child: Text( _start == 0 ? 'Connecting...' : _timmer.toString(), - style: TextStyle( - color: Colors.deepPurpleAccent, - fontWeight: FontWeight.w300, - fontSize: 15), + style: TextStyle(color: Colors.deepPurpleAccent, fontWeight: FontWeight.w300, fontSize: 15), )), SizedBox( height: MediaQuery.of(context).size.height * 0.02, @@ -205,22 +192,21 @@ class _VideoCallPageState extends State { _showAlert(BuildContext context) async { await showDialog( context: context, - builder: (dialogContex) => AlertDialog(content: StatefulBuilder( - builder: (BuildContext context, StateSetter setState) { + builder: (dialogContex) => AlertDialog(content: StatefulBuilder(builder: (BuildContext context, StateSetter setState) { return Container( height: MediaQuery.of(context).size.height * 0.7, width: MediaQuery.of(context).size.width * .9, child: Stack( fit: StackFit.loose, - overflow: Overflow.visible, + // overflow: Overflow.visible, + children: [ Positioned( right: -40.0, top: -40.0, child: InkResponse( onTap: () { - Navigator.of(context, rootNavigator: true) - .pop('dialog'); + Navigator.of(context, rootNavigator: true).pop('dialog'); Navigator.of(context).pop(); }, child: CircleAvatar( @@ -236,41 +222,41 @@ class _VideoCallPageState extends State { children: [ Padding( padding: EdgeInsets.all(8.0), - child: RaisedButton( - onPressed: () => {endCall()}, - child: - Text(TranslationBase.of(context).endcall), - color: Colors.red, - textColor: Colors.white, - )), + child: ElevatedButton( + onPressed: () => {endCall()}, + child: Text(TranslationBase.of(context).endcall), + style: ElevatedButton.styleFrom(backgroundColor: Colors.red, textStyle: TextStyle(color: Colors.white)) + + //color: Colors.red, + //textColor: Colors.white, + )), Padding( padding: EdgeInsets.all(8.0), - child: RaisedButton( - onPressed: () => {resumeCall()}, - child: - Text(TranslationBase.of(context).resumecall), - color: AppGlobal.appGreenColor, - textColor: Colors.white, - ), + child: ElevatedButton( + onPressed: () => {resumeCall()}, + child: Text(TranslationBase.of(context).resumecall), + style: ElevatedButton.styleFrom(backgroundColor: AppGlobal.appGreenColor, textStyle: TextStyle(color: Colors.white)) + + // color: AppGlobal.appGreenColor, + // textColor: Colors.white, + ), ), Padding( padding: EdgeInsets.all(8.0), - child: RaisedButton( - onPressed: () => {endCallWithCharge()}, - child: Text(TranslationBase.of(context) - .endcallwithcharge), - textColor: Colors.white, - ), + child: ElevatedButton( + onPressed: () => {endCallWithCharge()}, + child: Text(TranslationBase.of(context).endcallwithcharge), + style: ElevatedButton.styleFrom(textStyle: TextStyle(color: Colors.white))), ), Padding( padding: EdgeInsets.all(8.0), - child: RaisedButton( + child: ElevatedButton( onPressed: () => { setState(() => {isTransfer = true}) }, - child: Text( - TranslationBase.of(context).transfertoadmin), - color: Colors.yellow[900], + child: Text(TranslationBase.of(context).transfertoadmin), + style: ElevatedButton.styleFrom(textStyle: TextStyle(color: Colors.yellow[900])), + // color: Colors.yellow[900], ), ), isTransfer == true @@ -283,16 +269,13 @@ class _VideoCallPageState extends State { child: TextField( maxLines: 3, controller: notes, - decoration: InputDecoration.collapsed( - hintText: - "Enter your notes here"), + decoration: InputDecoration.collapsed(hintText: "Enter your notes here"), )), Center( - child: RaisedButton( - onPressed: () => - {this.transferToAdmin(notes)}, + child: ElevatedButton( + onPressed: () => {this.transferToAdmin(notes)}, child: Text('Transfer'), - color: Colors.yellow[900], + style: ElevatedButton.styleFrom(textStyle: TextStyle(color: Colors.yellow[900])), )) ], ) @@ -312,33 +295,24 @@ class _VideoCallPageState extends State { transferToAdmin(notes) { closeRoute(); - _liveCareProvider - .transfterToAdmin(widget.patientData, notes) - .then((result) { + _liveCareProvider.transfterToAdmin(widget.patientData, notes).then((result) { connectOpenTok(result); - }).catchError((error) => - {Utils.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()}); } endCall() { closeRoute(); - _liveCareProvider - .endCall(widget.patientData, false, doctorprofile['DoctorID']) - .then((result) { + _liveCareProvider.endCall(widget.patientData, false, doctorprofile['DoctorID']).then((result) { print(result); - }).catchError((error) => - {Utils.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()}); } endCallWithCharge() { - _liveCareProvider - .endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID']) - .then((result) { + _liveCareProvider.endCallWithCharge(widget.patientData.vcId, doctorprofile['DoctorID']).then((result) { closeRoute(); print('end callwith charge'); print(result); - }).catchError((error) => - {Utils.showErrorToast(error), Navigator.of(context).pop()}); + }).catchError((error) => {Utils.showErrorToast(error), Navigator.of(context).pop()}); } closeRoute() { diff --git a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart index 093a5f69..7f1755b1 100644 --- a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart +++ b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart @@ -10,8 +10,7 @@ class LineChartForDiabetic extends StatelessWidget { final int indexes; final bool isOX; - LineChartForDiabetic( - {this.title, this.timeSeries1, this.indexes, this.isOX = false}); + LineChartForDiabetic({this.title, this.timeSeries1, this.indexes, this.isOX = false}); List xAxixs = List(); List yAxixs = List(); @@ -52,8 +51,7 @@ class LineChartForDiabetic extends StatelessWidget { ), Expanded( child: Padding( - padding: - const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), child: LineChart( sampleData1(context), swapAnimationDuration: const Duration(milliseconds: 250), @@ -84,11 +82,10 @@ class LineChartForDiabetic extends StatelessWidget { touchTooltipData: LineTouchTooltipData( tooltipBgColor: Colors.white, ), - touchCallback: (LineTouchResponse touchResponse) {}, + //touchCallback: (LineTouchResponse touchResponse) {}, handleBuiltInTouches: true, ), - gridData: FlGridData( - show: true, drawVerticalLine: true, drawHorizontalLine: true), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true), titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, @@ -109,10 +106,8 @@ class LineChartForDiabetic extends StatelessWidget { } else return ''; } else { - if (value.toInt() == 0) - return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; - if (value.toInt() == timeSeries1.length - 1) - return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + if (value.toInt() == 0) return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + if (value.toInt() == timeSeries1.length - 1) return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; if (xAxixs.contains(value.toInt())) { return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; } diff --git a/lib/screens/patients/profile/lab_result/history/line_chart_curved_lab_history.dart b/lib/screens/patients/profile/lab_result/history/line_chart_curved_lab_history.dart index e07990b9..f23f973a 100644 --- a/lib/screens/patients/profile/lab_result/history/line_chart_curved_lab_history.dart +++ b/lib/screens/patients/profile/lab_result/history/line_chart_curved_lab_history.dart @@ -90,11 +90,10 @@ class LineChartCurvedLabHistoryState extends State { touchTooltipData: LineTouchTooltipData( tooltipBgColor: Colors.white, ), - touchCallback: (LineTouchResponse touchResponse) {}, + // touchCallback: (LineTouchResponse touchResponse) {}, handleBuiltInTouches: true, ), - gridData: FlGridData( - show: true, drawVerticalLine: true, drawHorizontalLine: true), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true), titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, @@ -108,8 +107,7 @@ class LineChartCurvedLabHistoryState extends State { rotateAngle: -65, getTitles: (value) { print(value); - DateTime date = AppDateUtils.convertStringToDate( - widget.labResultHistory[value.toInt()].verifiedOnDateTime); + DateTime date = AppDateUtils.convertStringToDate(widget.labResultHistory[value.toInt()].verifiedOnDateTime); if (widget.labResultHistory.length < 8) { if (widget.labResultHistory.length > value.toInt()) { return '${date.day}/ ${date.year}'; @@ -117,8 +115,7 @@ class LineChartCurvedLabHistoryState extends State { return ''; } else { if (value.toInt() == 0) return '${date.day}/ ${date.year}'; - if (value.toInt() == widget.labResultHistory.length - 1) - return '${date.day}/ ${date.year}'; + if (value.toInt() == widget.labResultHistory.length - 1) return '${date.day}/ ${date.year}'; if (xAxixs.contains(value.toInt())) { return '${date.day}/ ${date.year}'; } @@ -203,8 +200,7 @@ class LineChartCurvedLabHistoryState extends State { List spots = List(); for (int index = 0; index < widget.labResultHistory.length; index++) { try { - var resultValueDouble = - double.parse(widget.labResultHistory[index].resultValue); + var resultValueDouble = double.parse(widget.labResultHistory[index].resultValue); spots.add(FlSpot(index.toDouble(), resultValueDouble)); } catch (e) { print(e); diff --git a/lib/screens/patients/profile/notes/note/progress_note_screen.dart b/lib/screens/patients/profile/notes/note/progress_note_screen.dart index 19882b9c..a32a8791 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -45,8 +45,7 @@ class _ProgressNoteState extends State { AuthenticationViewModel authenticationViewModel; ProjectViewModel projectViewModel; - getProgressNoteList(BuildContext context, PatientViewModel model, - {bool isLocalBusy = false}) async { + getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; String token = await sharedPref.getString(TOKEN); @@ -61,10 +60,7 @@ class _ProgressNoteState extends State { tokenID: token, patientTypeID: patient.patientType, languageID: 2); - model - .getPatientProgressNote(progressNoteRequest.toJson(), - isLocalBusy: isLocalBusy) - .then((c) { + model.getPatientProgressNote(progressNoteRequest.toJson(), isLocalBusy: isLocalBusy).then((c) { notesList = model.patientProgressNoteList; }); } @@ -76,8 +72,7 @@ class _ProgressNoteState extends State { final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; String arrivalType = routeArgs['arrivalType']; - if (routeArgs.containsKey('isDischargedPatient')) - isDischargedPatient = routeArgs['isDischargedPatient']; + if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( onModelReady: (model) => getProgressNoteList(context, model), builder: (_, model, w) => AppScaffold( @@ -88,511 +83,338 @@ class _ProgressNoteState extends State { patient, isInpatient: true, ), - body: Container( - color: Colors.grey[200], - child: Column( - children: [ - if (!isDischargedPatient) - AddNewOrder( - onTap: () async { - await locator().logEvent( - eventCategory: "Progress Note Screen", - eventAction: "Update Progress Note", - ); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => UpdateNoteOrder( - patientModel: model, - patient: patient, - visitType: widget.visitType, - isUpdate: false, - ), - settings: RouteSettings(name: 'UpdateNoteOrder'), - ), - ); - }, - label: widget.visitType == 3 - ? TranslationBase.of(context).addNewOrderSheet - : TranslationBase.of(context).addProgressNote, + body: Container( + color: Colors.grey[200], + child: Column( + children: [ + if (!isDischargedPatient) + AddNewOrder( + onTap: () async { + await locator().logEvent( + eventCategory: "Progress Note Screen", + eventAction: "Update Progress Note", + ); + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => UpdateNoteOrder( + patientModel: model, + patient: patient, + visitType: widget.visitType, + isUpdate: false, + ), + settings: RouteSettings(name: 'UpdateNoteOrder'), ), - Expanded( - child: Container( - child: ListView.builder( - itemCount: model.patientProgressNoteList.length, - itemBuilder: (BuildContext ctxt, int index) { - return FractionallySizedBox( - widthFactor: 0.95, - child: CardWithBgWidget( - hasBorder: false, - bgColor: model.patientProgressNoteList[index] - .status == - 1 && - authenticationViewModel - .doctorProfile.doctorID != - model - .patientProgressNoteList[ - index] - .createdBy - ? Color(0xFFCC9B14) - : model.patientProgressNoteList[index] - .status == - 4 - ? Colors.red.shade700 - : model.patientProgressNoteList[index] - .status == - 2 - ? AppGlobal.appGreenColor - : Color(0xFFCC9B14), - widget: Column( - children: [ - Column( - crossAxisAlignment: - CrossAxisAlignment.start, + ); + }, + label: widget.visitType == 3 ? TranslationBase.of(context).addNewOrderSheet : TranslationBase.of(context).addProgressNote, + ), + Expanded( + child: Container( + child: ListView.builder( + itemCount: model.patientProgressNoteList.length, + itemBuilder: (BuildContext ctxt, int index) { + return FractionallySizedBox( + widthFactor: 0.95, + child: CardWithBgWidget( + hasBorder: false, + bgColor: model.patientProgressNoteList[index].status == 1 && authenticationViewModel.doctorProfile.doctorID != model.patientProgressNoteList[index].createdBy + ? Color(0xFFCC9B14) + : model.patientProgressNoteList[index].status == 4 + ? Colors.red.shade700 + : model.patientProgressNoteList[index].status == 2 + ? AppGlobal.appGreenColor + : Color(0xFFCC9B14), + widget: Column( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.patientProgressNoteList[index].status == 1 && authenticationViewModel.doctorProfile.doctorID != model.patientProgressNoteList[index].createdBy) + AppText( + TranslationBase.of(context).notePending, + fontWeight: FontWeight.bold, + color: Color(0xFFCC9B14), + fontSize: 12, + ), + if (model.patientProgressNoteList[index].status == 4) + AppText( + TranslationBase.of(context).noteCanceled, + fontWeight: FontWeight.bold, + color: Colors.red.shade700, + fontSize: 12, + ), + if (model.patientProgressNoteList[index].status == 2) + AppText( + TranslationBase.of(context).noteVerified, + fontWeight: FontWeight.bold, + color: AppGlobal.appGreenColor, + fontSize: 12, + ), + if (model.patientProgressNoteList[index].status != 2 && + model.patientProgressNoteList[index].status != 4 && + authenticationViewModel.doctorProfile.doctorID == model.patientProgressNoteList[index].createdBy) + Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (model - .patientProgressNoteList[ - index] - .status == - 1 && - authenticationViewModel - .doctorProfile.doctorID != - model - .patientProgressNoteList[ - index] - .createdBy) - AppText( - TranslationBase.of(context) - .notePending, - fontWeight: FontWeight.bold, - color: Color(0xFFCC9B14), - fontSize: 12, - ), - if (model - .patientProgressNoteList[ - index] - .status == - 4) - AppText( - TranslationBase.of(context) - .noteCanceled, - fontWeight: FontWeight.bold, - color: Colors.red.shade700, - fontSize: 12, - ), - if (model - .patientProgressNoteList[ - index] - .status == - 2) - AppText( - TranslationBase.of(context) - .noteVerified, - fontWeight: FontWeight.bold, - color: AppGlobal.appGreenColor, - fontSize: 12, - ), - if (model.patientProgressNoteList[index].status != 2 && - model - .patientProgressNoteList[ - index] - .status != - 4 && - authenticationViewModel - .doctorProfile.doctorID == - model - .patientProgressNoteList[ - index] - .createdBy) - Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - UpdateNoteOrder( - note: model - .patientProgressNoteList[ - index], - patientModel: - model, - patient: - patient, - visitType: widget - .visitType, - isUpdate: true, - )), - ); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.grey[600], - borderRadius: - BorderRadius.circular( - 10), - ), - // color:Colors.red[600], + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => UpdateNoteOrder( + note: model.patientProgressNoteList[index], + patientModel: model, + patient: patient, + visitType: widget.visitType, + isUpdate: true, + )), + ); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[600], + borderRadius: BorderRadius.circular(10), + ), + // color:Colors.red[600], - child: Row( - children: [ - Icon( - DoctorApp.edit_1, - size: 12, - color: Colors.white, - ), - SizedBox( - width: 2, - ), - AppText( - TranslationBase.of( - context) - .update, - fontSize: 10, - color: Colors.white, - ), - ], - ), - padding: EdgeInsets.all(6), + child: Row( + children: [ + Icon( + DoctorApp.edit_1, + size: 12, + color: Colors.white, ), - ), - SizedBox( - width: 10, - ), - InkWell( - onTap: () async { - showMyDialog( - context: context, - actionName: "verify", - confirmFun: () async { - GifLoaderDialogUtils - .showMyDialog( - context); - UpdateNoteReqModel - reqModel = - UpdateNoteReqModel( - admissionNo: int - .parse(patient - .admissionNo), - cancelledNote: - false, - lineItemNo: model - .patientProgressNoteList[ - index] - .lineItemNo, - conditionId: model - .patientProgressNoteList[ - index].condition, - createdBy: model - .patientProgressNoteList[ - index] - .createdBy, - notes: model - .patientProgressNoteList[ - index] - .notes, - verifiedNote: true, - patientTypeID: - patient - .patientType, - patientOutSA: false, - ); - await model - .updatePatientProgressNote( - reqModel); - await getProgressNoteList( - context, model, - isLocalBusy: - true); - GifLoaderDialogUtils - .hideDialog( - context); - }); - }, - child: Container( - decoration: BoxDecoration( - color: AppGlobal - .appGreenColor, - borderRadius: - BorderRadius.circular( - 10), - ), - // color:Colors.red[600], - - child: Row( - children: [ - Icon( - FontAwesomeIcons - .check, - size: 12, - color: Colors.white, - ), - SizedBox( - width: 2, - ), - AppText( - TranslationBase.of( - context) - .noteVerify, - fontSize: 10, - color: Colors.white, - ), - ], - ), - padding: EdgeInsets.all(6), + SizedBox( + width: 2, ), - ), - SizedBox( - width: 10, - ), - InkWell( - onTap: () async { - showMyDialog( - context: context, - actionName: - TranslationBase.of( - context) - .cancel, - confirmFun: () async { - GifLoaderDialogUtils - .showMyDialog( - context, - ); - UpdateNoteReqModel - reqModel = - UpdateNoteReqModel( - admissionNo: int - .parse(patient - .admissionNo), - conditionId: model - .patientProgressNoteList[ - index].condition, - cancelledNote: true, - lineItemNo: model - .patientProgressNoteList[ - index] - .lineItemNo, - createdBy: model - .patientProgressNoteList[ - index] - .createdBy, - notes: model - .patientProgressNoteList[ - index] - .notes, - verifiedNote: false, - patientTypeID: - patient - .patientType, - patientOutSA: false, - ); - await model - .updatePatientProgressNote( - reqModel); - await getProgressNoteList( - context, model, - isLocalBusy: - true); - GifLoaderDialogUtils - .hideDialog( - context); - }); - }, - child: Container( - decoration: BoxDecoration( - color: Colors.red[600], - borderRadius: - BorderRadius.circular( - 10), - ), - // color:Colors.red[600], - - child: Row( - children: [ - Icon( - FontAwesomeIcons - .trash, - size: 12, - color: Colors.white, - ), - SizedBox( - width: 2, - ), - AppText( - 'Cancel', - fontSize: 10, - color: Colors.white, - ), - ], - ), - padding: EdgeInsets.all(6), + AppText( + TranslationBase.of(context).update, + fontSize: 10, + color: Colors.white, ), - ), - SizedBox( - width: 10, - ) - ], + ], + ), + padding: EdgeInsets.all(6), ), + ), SizedBox( - height: 10, + width: 10, ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.60, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .createdBy + ' ', - fontSize: 10, - ), - Expanded( - child: AppText( - model - .patientProgressNoteList[ - index] - .doctorName ?? - '', - fontWeight: - FontWeight.w600, - fontSize: 12, - isCopyable: true, - ), - ), - ], - ), - Row( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of(context).conditionDescription + ' : ', - fontSize: 10, - ), - Expanded( - child: AppText( - model.patientProgressNoteList[index].conditionDescription ?? '', - fontWeight: - FontWeight.w600, - fontSize: 12, - isCopyable: true, - ), - ), - ], - ), - ], - ), + InkWell( + onTap: () async { + showMyDialog( + context: context, + actionName: "verify", + confirmFun: () async { + GifLoaderDialogUtils.showMyDialog(context); + UpdateNoteReqModel reqModel = UpdateNoteReqModel( + admissionNo: int.parse(patient.admissionNo), + cancelledNote: false, + lineItemNo: model.patientProgressNoteList[index].lineItemNo, + conditionId: model.patientProgressNoteList[index].condition, + createdBy: model.patientProgressNoteList[index].createdBy, + notes: model.patientProgressNoteList[index].notes, + verifiedNote: true, + patientTypeID: patient.patientType, + patientOutSA: false, + ); + await model.updatePatientProgressNote(reqModel); + await getProgressNoteList(context, model, isLocalBusy: true); + GifLoaderDialogUtils.hideDialog(context); + }); + }, + child: Container( + decoration: BoxDecoration( + color: AppGlobal.appGreenColor, + borderRadius: BorderRadius.circular(10), ), - Column( + // color:Colors.red[600], + + child: Row( children: [ - AppText( - model - .patientProgressNoteList[ - index] - .createdOn != - null - ? AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils - .getDateTimeFromServerFormat(model - .patientProgressNoteList[ - index] - .createdOn), - isArabic: - projectViewModel - .isArabic, - isMonthShort: true) - : AppDateUtils - .getDayMonthYearDateFormatted( - DateTime.now(), - isArabic: - projectViewModel - .isArabic), - fontWeight: FontWeight.w600, - fontSize: 14, - isCopyable: true, + Icon( + FontAwesomeIcons.check, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, ), AppText( - model - .patientProgressNoteList[ - index] - .createdOn != - null - ? AppDateUtils.getHour( - AppDateUtils - .getDateTimeFromServerFormat(model - .patientProgressNoteList[ - index] - .createdOn)) - : AppDateUtils.getHour( - DateTime.now()), - fontWeight: FontWeight.w600, - fontSize: 14, - isCopyable: true, + TranslationBase.of(context).noteVerify, + fontSize: 10, + color: Colors.white, ), ], - crossAxisAlignment: - CrossAxisAlignment.end, - ) - ], + ), + padding: EdgeInsets.all(6), + ), ), SizedBox( - height: 8, + width: 10, ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Expanded( - child: AppText( - model - .patientProgressNoteList[ - index] - .notes, + InkWell( + onTap: () async { + showMyDialog( + context: context, + actionName: TranslationBase.of(context).cancel, + confirmFun: () async { + GifLoaderDialogUtils.showMyDialog( + context, + ); + UpdateNoteReqModel reqModel = UpdateNoteReqModel( + admissionNo: int.parse(patient.admissionNo), + conditionId: model.patientProgressNoteList[index].condition, + cancelledNote: true, + lineItemNo: model.patientProgressNoteList[index].lineItemNo, + createdBy: model.patientProgressNoteList[index].createdBy, + notes: model.patientProgressNoteList[index].notes, + verifiedNote: false, + patientTypeID: patient.patientType, + patientOutSA: false, + ); + await model.updatePatientProgressNote(reqModel); + await getProgressNoteList(context, model, isLocalBusy: true); + GifLoaderDialogUtils.hideDialog(context); + }); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.red[600], + borderRadius: BorderRadius.circular(10), + ), + // color:Colors.red[600], + + child: Row( + children: [ + Icon( + FontAwesomeIcons.trash, + size: 12, + color: Colors.white, + ), + SizedBox( + width: 2, + ), + AppText( + 'Cancel', fontSize: 10, - isCopyable: true, + color: Colors.white, ), - ), - ]) + ], + ), + padding: EdgeInsets.all(6), + ), + ), + SizedBox( + width: 10, + ) ], ), - SizedBox( - height: 20, + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.60, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).createdBy + ' ', + fontSize: 10, + ), + Expanded( + child: AppText( + model.patientProgressNoteList[index].doctorName ?? '', + fontWeight: FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).conditionDescription + ' : ', + fontSize: 10, + ), + Expanded( + child: AppText( + model.patientProgressNoteList[index].conditionDescription ?? '', + fontWeight: FontWeight.w600, + fontSize: 12, + isCopyable: true, + ), + ), + ], + ), + ], + ), + ), + Column( + children: [ + AppText( + model.patientProgressNoteList[index].createdOn != null + ? AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn), + isArabic: projectViewModel.isArabic, isMonthShort: true) + : AppDateUtils.getDayMonthYearDateFormatted(DateTime.now(), isArabic: projectViewModel.isArabic), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + AppText( + model.patientProgressNoteList[index].createdOn != null + ? AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(model.patientProgressNoteList[index].createdOn)) + : AppDateUtils.getHour(DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + isCopyable: true, + ), + ], + crossAxisAlignment: CrossAxisAlignment.end, + ) + ], + ), + SizedBox( + height: 8, + ), + Row(mainAxisAlignment: MainAxisAlignment.start, children: [ + Expanded( + child: AppText( + model.patientProgressNoteList[index].notes, + fontSize: 10, + isCopyable: true, + ), ), - ], - ), + ]) + ], ), - ); - }), - ), - ), - ], + SizedBox( + height: 20, + ), + ], + ), + ), + ); + }), ), ), + ], + ), + ), ), ); } - /// TODO Elham* Make this as custom Dialog showMyDialog({BuildContext context, Function confirmFun, String actionName}) { showDialog( @@ -637,9 +459,7 @@ class _ProgressNoteState extends State { padding: EdgeInsets.all(20), color: Colors.white, child: AppText( - projectViewModel.isArabic - ? "هل أنت متأكد أنك تريد تنفيذ $actionName هذا الأمر؟" - : 'Are you sure you want $actionName this order?', + projectViewModel.isArabic ? "هل أنت متأكد أنك تريد تنفيذ $actionName هذا الأمر؟" : 'Are you sure you want $actionName this order?', fontSize: 15, textAlign: TextAlign.center, ), @@ -654,7 +474,7 @@ class _ProgressNoteState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - FlatButton( + ElevatedButton( child: AppText( TranslationBase.of(context).cancel, fontWeight: FontWeight.w600, @@ -664,7 +484,7 @@ class _ProgressNoteState extends State { onPressed: () { Navigator.of(context).pop(); }), - FlatButton( + ElevatedButton( child: AppText( TranslationBase.of(context).noteConfirm, fontWeight: FontWeight.w600, diff --git a/lib/screens/patients/profile/vital_sign/line_chart_curved.dart b/lib/screens/patients/profile/vital_sign/line_chart_curved.dart index ae102b88..c97c6041 100644 --- a/lib/screens/patients/profile/vital_sign/line_chart_curved.dart +++ b/lib/screens/patients/profile/vital_sign/line_chart_curved.dart @@ -96,18 +96,16 @@ class LineChartCurved extends StatelessWidget { } } - LineChartData sampleData1(context) { return LineChartData( lineTouchData: LineTouchData( touchTooltipData: LineTouchTooltipData( tooltipBgColor: Colors.white, ), - touchCallback: (LineTouchResponse touchResponse) {}, + //touchCallback: (LineTouchResponse touchResponse) {}, handleBuiltInTouches: true, ), - gridData: FlGridData( - show: true, drawVerticalLine: true, drawHorizontalLine: true), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true), titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, @@ -133,9 +131,7 @@ class LineChartCurved extends StatelessWidget { return ''; } } else { - if (value.toInt() == 0 || - value.toInt() == timeSeries.length - 1 || - xAxixs.contains(value.toInt())) { + if (value.toInt() == 0 || value.toInt() == timeSeries.length - 1 || xAxixs.contains(value.toInt())) { DateTime dateTime = timeSeries[value.toInt()].time; if (isDatesSameYear) { return monthFormat.format(dateTime); @@ -163,25 +159,25 @@ class LineChartCurved extends StatelessWidget { return ''; }, ), - leftTitles: SideTitles( - showTitles: true, - getTextStyles: (cxt, value) => const TextStyle( - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 10, - ), - interval:getInterval(), - - // getTitles: (value) { - // if (value.toInt() == 0) - // return '${value.toInt()}'; - // else if (value.toInt() % horizontalInterval == 0) - // return '${value.toInt()}'; - // else - // return ''; - // }, - margin: 12, + leftTitles: SideTitles( + showTitles: true, + getTextStyles: (cxt, value) => const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, ), + interval: getInterval(), + + // getTitles: (value) { + // if (value.toInt() == 0) + // return '${value.toInt()}'; + // else if (value.toInt() % horizontalInterval == 0) + // return '${value.toInt()}'; + // else + // return ''; + // }, + margin: 12, + ), ), borderData: FlBorderData( show: true, @@ -230,15 +226,12 @@ class LineChartCurved extends StatelessWidget { // return value.toDouble(); // } - - double getInterval(){ - + double getInterval() { return getMaxY() - getMinY() <= 100 ? 20 : getMaxY() - getMinY() <= 1000 - ? 100 - : 200; - + ? 100 + : 200; } double getMaxY() { @@ -268,9 +261,7 @@ class LineChartCurved extends StatelessWidget { int previousDateYear = 0; for (int index = 0; index < timeSeries.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); - if (isDatesSameYear == false || - (previousDateYear != 0 && - previousDateYear != timeSeries[index].time.year)) { + if (isDatesSameYear == false || (previousDateYear != 0 && previousDateYear != timeSeries[index].time.year)) { isDatesSameYear = false; } previousDateYear = timeSeries[index].time.year; diff --git a/lib/screens/patients/profile/vital_sign/line_chart_curved_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/line_chart_curved_blood_pressure.dart index f4def5ee..ba983005 100644 --- a/lib/screens/patients/profile/vital_sign/line_chart_curved_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/line_chart_curved_blood_pressure.dart @@ -12,12 +12,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { final int indexes; final bool isOX; - LineChartCurvedBloodPressure( - {this.title, - this.timeSeries1, - this.indexes, - this.timeSeries2, - this.isOX = false}); + LineChartCurvedBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.isOX = false}); List xAxixs = List(); List yAxixs = List(); @@ -58,8 +53,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), Expanded( child: Padding( - padding: - const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), child: LineChart( sampleData1(context), swapAnimationDuration: const Duration(milliseconds: 250), @@ -78,15 +72,12 @@ class LineChartCurvedBloodPressure extends StatelessWidget { Container( width: 20, height: 20, - decoration: BoxDecoration( - shape: BoxShape.rectangle, - color: Theme.of(context).primaryColor), + decoration: BoxDecoration(shape: BoxShape.rectangle, color: Theme.of(context).primaryColor), ), SizedBox( width: 5, ), - AppText( - isOX ? "SAO2" : TranslationBase.of(context).systolicLng) + AppText(isOX ? "SAO2" : TranslationBase.of(context).systolicLng) ], ), SizedBox( @@ -97,8 +88,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { Container( width: 20, height: 20, - decoration: BoxDecoration( - shape: BoxShape.rectangle, color: Colors.red), + decoration: BoxDecoration(shape: BoxShape.rectangle, color: Colors.red), ), SizedBox( width: 5, @@ -131,11 +121,10 @@ class LineChartCurvedBloodPressure extends StatelessWidget { touchTooltipData: LineTouchTooltipData( tooltipBgColor: Colors.white, ), - touchCallback: (LineTouchResponse touchResponse) {}, + // touchCallback: (LineTouchResponse touchResponse) {}, handleBuiltInTouches: true, ), - gridData: FlGridData( - show: true, drawVerticalLine: true, drawHorizontalLine: true), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true), titlesData: FlTitlesData( bottomTitles: SideTitles( showTitles: true, @@ -155,10 +144,8 @@ class LineChartCurvedBloodPressure extends StatelessWidget { } else return ''; } else { - if (value.toInt() == 0) - return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; - if (value.toInt() == timeSeries1.length - 1) - return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + if (value.toInt() == 0) return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; + if (value.toInt() == timeSeries1.length - 1) return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; if (xAxixs.contains(value.toInt())) { return '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}'; } @@ -173,7 +160,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { fontWeight: FontWeight.bold, fontSize: 10, ), - interval:getInterval(), + interval: getInterval(), getTitles: (value) { return '${value.toInt()}'; }, @@ -200,24 +187,20 @@ class LineChartCurvedBloodPressure extends StatelessWidget { ), minX: 0, maxX: 0, - maxY: getMaxY() + getInterval(), + maxY: getMaxY() + getInterval(), minY: 0, lineBarsData: getData(context), ); } - double getInterval(){ - + double getInterval() { return getMaxY() - getMinY() <= 100 ? 20 : getMaxY() - getMinY() <= 1000 - ? 100 - : 200; - + ? 100 + : 200; } - - double getMaxY() { double max = 0; timeSeries1.forEach((element) { diff --git a/lib/screens/reschedule_leaves/reschedule_leave.dart b/lib/screens/reschedule_leaves/reschedule_leave.dart index 3ebf5b97..35de7fe7 100644 --- a/lib/screens/reschedule_leaves/reschedule_leave.dart +++ b/lib/screens/reschedule_leaves/reschedule_leave.dart @@ -56,12 +56,8 @@ class _RescheduleLeaveScreen extends State { void _presentDatePicker(id) { var date = new DateTime.now(); - var initialDate = id == 'fromDate' - ? new DateTime(date.year, date.month, date.day + 15) - : new DateTime(fromDate.year, fromDate.month, fromDate.day); - var firstDate = id == 'fromDate' - ? new DateTime(date.year, date.month, date.day + 15) - : new DateTime(fromDate.year, fromDate.month, fromDate.day); + var initialDate = id == 'fromDate' ? new DateTime(date.year, date.month, date.day + 15) : new DateTime(fromDate.year, fromDate.month, fromDate.day); + var firstDate = id == 'fromDate' ? new DateTime(date.year, date.month, date.day + 15) : new DateTime(fromDate.year, fromDate.month, fromDate.day); showDatePicker( context: context, initialDate: initialDate, @@ -94,9 +90,7 @@ class _RescheduleLeaveScreen extends State { @override Widget build(BuildContext context) { projectsProvider = Provider.of(context); - offTime = widget.updateData != null - ? widget.updateData.requisitionType.toString() - : offTime; + offTime = widget.updateData != null ? widget.updateData.requisitionType.toString() : offTime; return BaseView( onModelReady: (model) => model.getClinicsList(), builder: (_, model, w) => BaseView( @@ -126,23 +120,13 @@ class _RescheduleLeaveScreen extends State { children: [ Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), width: double.infinity, child: Padding( padding: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 0.9, - bottom: - SizeConfig.widthMultiplier * 0.9, - right: SizeConfig.widthMultiplier * 3, - left: SizeConfig.widthMultiplier * 3), + top: SizeConfig.widthMultiplier * 0.9, bottom: SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, @@ -150,35 +134,22 @@ class _RescheduleLeaveScreen extends State { model2.allOffTime.length > 0 ? Expanded( // add Expanded to have your dropdown button fill remaining space - child: - DropdownButtonHideUnderline( - child: - DropdownButton( + child: DropdownButtonHideUnderline( + child: DropdownButton( // focusColor: Colors.grey, isExpanded: true, - value: offTime == null - ? model2.allOffTime[0] - ['code'] - : offTime, + value: offTime == null ? model2.allOffTime[0]['code'] : offTime, iconSize: 40, elevation: 16, - selectedItemBuilder: - (BuildContext - context) { - return model2.allOffTime - .map((item) { + selectedItemBuilder: (BuildContext context) { + return model2.allOffTime.map((item) { return Row( - mainAxisSize: - MainAxisSize - .max, + mainAxisSize: MainAxisSize.max, children: [ AppText( - item[ - 'description'], + item['description'], - fontSize: SizeConfig - .textMultiplier * - 2.1, + fontSize: SizeConfig.textMultiplier * 2.1, // color: // Colors.grey, ), @@ -192,29 +163,21 @@ class _RescheduleLeaveScreen extends State { }); if (offTime == '1') { model2.getReasons(18); - } else if (offTime == - '2') { + } else if (offTime == '2') { model2.getReasons(19); - } else if (offTime == - '3' || - offTime == '5') { - model2 - .getReasons(102); + } else if (offTime == '3' || offTime == '5') { + model2.getReasons(102); setState(() { offTime = newValue; }); } }, - items: model2.allOffTime - .map((item) { - return DropdownMenuItem< - String>( - value: item['code'] - .toString(), + items: model2.allOffTime.map((item) { + return DropdownMenuItem( + value: item['code'].toString(), child: Text( item['description'], - textAlign: - TextAlign.end, + textAlign: TextAlign.end, ), ); }).toList(), @@ -231,38 +194,23 @@ class _RescheduleLeaveScreen extends State { children: [ Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: - HexColor("#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ AppTextFormField( - hintText: TranslationBase.of( - context) - .fromDate, + hintText: TranslationBase.of(context).fromDate, borderColor: Colors.white, - prefix: IconButton( - icon: Icon(Icons - .calendar_today)), - textInputType: - TextInputType.number, + prefix: IconButton(icon: Icon(Icons.calendar_today)), + textInputType: TextInputType.number, controller: _toDateController, onTap: () { - _presentDatePicker( - 'fromDate'); + _presentDatePicker('fromDate'); }, inputFormatter: ONLY_DATE, - onChanged: (val) => - fromDate = val, - onSaved: (val) => - fromDate = val, + onChanged: (val) => fromDate = val, + onSaved: (val) => fromDate = val, ) ], )), @@ -271,38 +219,23 @@ class _RescheduleLeaveScreen extends State { Expanded( child: Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all( - Radius.circular( - 6.0)), - border: Border.all( - width: 1.0, - color: HexColor( - "#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ DateTimePicker( - timeHintText: - TranslationBase.of( - context) - .fromTime, - type: DateTimePickerType - .time, + timeHintText: TranslationBase.of(context).fromTime, + type: DateTimePickerType.time, controller: _controller4, - onChanged: (val) => - fromTime = val, + onChanged: (val) => fromTime = val, validator: (val) { print(val); // setState( // () => _valueToValidate4 = val); return null; }, - onSaved: (val) => - fromTime = val, + onSaved: (val) => fromTime = val, ) ], ), @@ -311,38 +244,23 @@ class _RescheduleLeaveScreen extends State { Expanded( child: Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all( - Radius.circular( - 6.0)), - border: Border.all( - width: 1.0, - color: HexColor( - "#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ DateTimePicker( - timeHintText: - TranslationBase.of( - context) - .toTime, - type: DateTimePickerType - .time, + timeHintText: TranslationBase.of(context).toTime, + type: DateTimePickerType.time, controller: _controller5, - onChanged: (val) => - toTime = val, + onChanged: (val) => toTime = val, validator: (val) { print(val); // setState( // () => _valueToValidate4 = val); return null; }, - onSaved: (val) => - toTime = val, + onSaved: (val) => toTime = val, ) ], ), @@ -356,35 +274,20 @@ class _RescheduleLeaveScreen extends State { children: [ Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: - HexColor("#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ AppTextFormField( - hintText: - TranslationBase.of( - context) - .fromDate, + hintText: TranslationBase.of(context).fromDate, borderColor: Colors.white, - prefix: IconButton( - icon: Icon(Icons - .calendar_today)), - textInputType: - TextInputType.number, + prefix: IconButton(icon: Icon(Icons.calendar_today)), + textInputType: TextInputType.number, readOnly: true, - controller: - _toDateController, + controller: _toDateController, onTap: () { - _presentDatePicker( - 'fromDate'); + _presentDatePicker('fromDate'); }, inputFormatter: ONLY_DATE, onChanged: (value) { @@ -396,35 +299,20 @@ class _RescheduleLeaveScreen extends State { )), Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: - HexColor("#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ AppTextFormField( - hintText: - TranslationBase - .of(context) - .toDate, + hintText: TranslationBase.of(context).toDate, readOnly: true, borderColor: Colors.white, - prefix: IconButton( - icon: Icon(Icons - .calendar_today)), - textInputType: - TextInputType.number, - controller: - _toDateController2, + prefix: IconButton(icon: Icon(Icons.calendar_today)), + textInputType: TextInputType.number, + controller: _toDateController2, onTap: () { - _presentDatePicker( - 'toDate'); + _presentDatePicker('toDate'); }, inputFormatter: ONLY_DATE, onChanged: (value) { @@ -438,23 +326,13 @@ class _RescheduleLeaveScreen extends State { ), Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), width: double.infinity, child: Padding( padding: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 0.9, - bottom: - SizeConfig.widthMultiplier * 0.9, - right: SizeConfig.widthMultiplier * 3, - left: SizeConfig.widthMultiplier * 3), + top: SizeConfig.widthMultiplier * 0.9, bottom: SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, @@ -462,39 +340,21 @@ class _RescheduleLeaveScreen extends State { model2.allReasons.length > 0 ? Expanded( // add Expanded to have your dropdown button fill remaining space - child: - DropdownButtonHideUnderline( - child: - DropdownButton( + child: DropdownButtonHideUnderline( + child: DropdownButton( focusColor: Colors.grey, isExpanded: true, - value: model2 - .allReasons[0] - ['id'] - .toString() ?? - "", + value: model2.allReasons[0]['id'].toString() ?? "", iconSize: 40, elevation: 16, - selectedItemBuilder: - (BuildContext - context) { - return model2.allReasons - .map((item) { + selectedItemBuilder: (BuildContext context) { + return model2.allReasons.map((item) { return Row( - mainAxisSize: - MainAxisSize - .max, + mainAxisSize: MainAxisSize.max, children: [ AppText( - projectsProvider - .isArabic - ? item[ - 'nameAr'] - : item[ - 'nameEn'], - fontSize: SizeConfig - .textMultiplier * - 2.1, + projectsProvider.isArabic ? item['nameAr'] : item['nameEn'], + fontSize: SizeConfig.textMultiplier * 2.1, // color: // Colors.grey, ), @@ -507,20 +367,12 @@ class _RescheduleLeaveScreen extends State { reason = newValue; }) }, - items: model2.allReasons - .map((item) { - return DropdownMenuItem< - String>( - value: item['id'] - .toString(), + items: model2.allReasons.map((item) { + return DropdownMenuItem( + value: item['id'].toString(), child: Text( - projectsProvider - .isArabic - ? item['nameAr'] - : item[ - 'nameEn'], - textAlign: - TextAlign.end, + projectsProvider.isArabic ? item['nameAr'] : item['nameEn'], + textAlign: TextAlign.end, ), ); }).toList(), @@ -535,23 +387,13 @@ class _RescheduleLeaveScreen extends State { Container( margin: EdgeInsets.all(8), - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all(width: 1.0, color: HexColor("#CCCCCC"))), width: double.infinity, child: Padding( padding: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 0.9, - bottom: - SizeConfig.widthMultiplier * 0.9, - right: SizeConfig.widthMultiplier * 3, - left: SizeConfig.widthMultiplier * 3), + top: SizeConfig.widthMultiplier * 0.9, bottom: SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, @@ -562,56 +404,24 @@ class _RescheduleLeaveScreen extends State { child: DropdownSearch( mode: Mode.BOTTOM_SHEET, - dropdownSearchDecoration: - InputDecoration( - contentPadding: - EdgeInsets - .all(0), - border: - InputBorder - .none), + dropdownSearchDecoration: InputDecoration(contentPadding: EdgeInsets.all(0), border: InputBorder.none), //maxHeight: 300, - items: model2 - .coveringDoctors - .map((item) { - return projectsProvider - .isArabic - ? item[ - 'doctorNameN'] - : item[ - 'doctorName']; + items: model2.coveringDoctors.map((item) { + return projectsProvider.isArabic ? item['doctorNameN'] : item['doctorName']; }).toList(), // label: "Doctor List", onChanged: (item) { - model2.coveringDoctors - .forEach( - (newVal) => { - if (newVal[ - 'doctorName'] == - item) - doctorID = - newVal['DoctorID'] - }); + model2.coveringDoctors.forEach((newVal) => {if (newVal['doctorName'] == item) doctorID = newVal['DoctorID']}); }, - selectedItem: - getSelectedDoctor( - model2), + selectedItem: getSelectedDoctor(model2), showSearchBox: true, popupTitle: Container( height: 50, - decoration: - BoxDecoration( - color: Theme.of( - context) - .primaryColorDark, - borderRadius: - BorderRadius.only( - topLeft: - Radius.circular( - 20), - topRight: - Radius.circular( - 20), + decoration: BoxDecoration( + color: Theme.of(context).primaryColorDark, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), ), ), child: Center( @@ -619,25 +429,16 @@ class _RescheduleLeaveScreen extends State { '', style: TextStyle( fontSize: 24, - fontWeight: - FontWeight - .bold, - color: - Colors.white, + fontWeight: FontWeight.bold, + color: Colors.white, ), ), ), ), - popupShape: - RoundedRectangleBorder( - borderRadius: - BorderRadius.only( - topLeft: - Radius.circular( - 24), - topRight: - Radius.circular( - 24), + popupShape: RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(24), + topRight: Radius.circular(24), ), ), ), @@ -650,17 +451,12 @@ class _RescheduleLeaveScreen extends State { )), SizedBox(height: SizeConfig.screenHeight * .3), Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), child: Wrap( alignment: WrapAlignment.center, children: [ AppButton( - title: widget.isUpdate == true - ? TranslationBase.of(context) - .updateReschedule - : TranslationBase.of(context) - .addReschedule, + title: widget.isUpdate == true ? TranslationBase.of(context).updateReschedule : TranslationBase.of(context).addReschedule, color: HexColor('#359846'), onPressed: () { if (offTime == '1' || offTime == '2') { @@ -670,9 +466,7 @@ class _RescheduleLeaveScreen extends State { addRecheduleLeave(model2); } } else { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context) - .onlyOfftimeHoliday); + DrAppToastMsg.showErrorToast(TranslationBase.of(context).onlyOfftimeHoliday); } }, ), @@ -705,16 +499,13 @@ class _RescheduleLeaveScreen extends State { final df = new DateFormat('HH:mm:ss'); final dateFormat = new DateFormat('yyyy-MM-dd'); this.offTime = widget.updateData.requisitionType.toString(); - _toDateController.text = - dateFormat.format(DateTime.parse(widget.updateData.dateTimeFrom)); + _toDateController.text = dateFormat.format(DateTime.parse(widget.updateData.dateTimeFrom)); //df.format(DateTime.parse(widget.updateData.dateTimeFrom)); - this.fromTime = - df.format(DateTime.parse(widget.updateData.dateTimeFrom)); + this.fromTime = df.format(DateTime.parse(widget.updateData.dateTimeFrom)); this.fromTime = this.fromTime.substring(0, this.fromTime.length - 3); this.toTime = df.format(DateTime.parse(widget.updateData.dateTimeTo)); this.toTime = this.toTime.substring(0, this.toTime.length - 3); - _toDateController2.text = - dateFormat.format(DateTime.parse(widget.updateData.dateTimeTo)); + _toDateController2.text = dateFormat.format(DateTime.parse(widget.updateData.dateTimeTo)); _controller5.text = toTime; _controller4.text = fromTime; toDate = _toDateController2.text; @@ -727,8 +518,7 @@ class _RescheduleLeaveScreen extends State { getClinicName(model) { var clinicID = this.profile['ClinicID'] ?? 1; - var clinicInfo = - model.clinicsList.where((i) => i['ClinicID'] == clinicID).toList(); + var clinicInfo = model.clinicsList.where((i) => i['ClinicID'] == clinicID).toList(); return clinicInfo.length > 0 ? clinicInfo[0]['ClinicDescription'] : ""; } @@ -738,16 +528,8 @@ class _RescheduleLeaveScreen extends State { var fromDates = fromDate; var toDates = toDate; if (offTime == '1') { - fromDate = df.format(DateTime.parse(dateFormat.format(fromDates) + - 'T' + - fromTime + - ':' + - DateTime.now().second.toString())); - toDate = df.format(DateTime.parse(dateFormat.format(fromDates) + - 'T' + - toTime + - ':' + - DateTime.now().second.toString())); + fromDate = df.format(DateTime.parse(dateFormat.format(fromDates) + 'T' + fromTime + ':' + DateTime.now().second.toString())); + toDate = df.format(DateTime.parse(dateFormat.format(fromDates) + 'T' + toTime + ':' + DateTime.now().second.toString())); } else { fromDate = df.format(fromDates); toDate = df.format(toDates); @@ -762,19 +544,10 @@ class _RescheduleLeaveScreen extends State { "dateTimeTo": toDate, "date": offTime == '1' ? fromDate : df.format(DateTime.now()), "reasonId": reason == null ? model.allOffTime[0]['code'] : reason, - "coveringDoctorId": - doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, + "coveringDoctorId": doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, "status": 2, "schedule": [ - { - "weekDayId": 1, - "shiftId": 1, - "isOpen": true, - "timeFrom": fromTime, - "timeTo": toTime, - "timeFromstr": "", - "timeTostr": "" - } + {"weekDayId": 1, "shiftId": 1, "isOpen": true, "timeFrom": fromTime, "timeTo": toTime, "timeFromstr": "", "timeTostr": ""} ] } }; @@ -785,9 +558,7 @@ class _RescheduleLeaveScreen extends State { Navigator.pushNamedAndRemoveUntil(context, HOME, (r) => false); Navigator.push( context, - MaterialPageRoute( - builder: (context) => AddRescheduleLeaveScreen(), - settings: RouteSettings(name: 'AddRescheduleLeaveScreen') + MaterialPageRoute(builder: (context) => AddRescheduleLeaveScreen(), settings: RouteSettings(name: 'AddRescheduleLeaveScreen') // MyReferredPatient(), ), ); @@ -802,21 +573,11 @@ class _RescheduleLeaveScreen extends State { dynamic fromDates = fromDate; dynamic toDates = toDate; if (offTime == '1') { - fromDate = df.format(DateTime.parse(_toDateController.text)) + - 'T' + - fromTime + - ':' + - DateTime.now().second.toString(); - toDate = df.format(DateTime.parse(_toDateController2.text)) + - 'T' + - toTime + - ':' + - DateTime.now().second.toString(); + fromDate = df.format(DateTime.parse(_toDateController.text)) + 'T' + fromTime + ':' + DateTime.now().second.toString(); + toDate = df.format(DateTime.parse(_toDateController2.text)) + 'T' + toTime + ':' + DateTime.now().second.toString(); } else { - fromDate = df.format( - fromDates is DateTime ? fromDates : DateTime.parse(fromDates)); - toDate = - df.format(toDates is DateTime ? toDates : DateTime.parse(toDates)); + fromDate = df.format(fromDates is DateTime ? fromDates : DateTime.parse(fromDates)); + toDate = df.format(toDates is DateTime ? toDates : DateTime.parse(toDates)); } Map request = { @@ -829,19 +590,10 @@ class _RescheduleLeaveScreen extends State { "dateTimeTo": toDate, "date": offTime == '1' ? fromDate : df.format(DateTime.now()), "reasonId": reason == null ? model.allOffTime[0]['code'] : reason, - "coveringDoctorId": - doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, + "coveringDoctorId": doctorID == null ? model.coveringDoctors[0]['doctorID'] : doctorID, "status": 2, "schedule": [ - { - "weekDayId": 1, - "shiftId": 1, - "isOpen": true, - "timeFrom": "", - "timeTo": "", - "timeFromstr": fromTime, - "timeTostr": toTime - } + {"weekDayId": 1, "shiftId": 1, "isOpen": true, "timeFrom": "", "timeTo": "", "timeFromstr": fromTime, "timeTostr": toTime} ] } }; @@ -852,9 +604,7 @@ class _RescheduleLeaveScreen extends State { Navigator.pushNamedAndRemoveUntil(context, HOME, (r) => false); Navigator.push( context, - MaterialPageRoute( - builder: (context) => AddRescheduleLeaveScreen(), - settings: RouteSettings(name: 'AddRescheduleLeaveScreen')), + MaterialPageRoute(builder: (context) => AddRescheduleLeaveScreen(), settings: RouteSettings(name: 'AddRescheduleLeaveScreen')), ); } }); @@ -863,13 +613,10 @@ class _RescheduleLeaveScreen extends State { getSelectedDoctor(model2) { var doctorName; if (doctorID == null) - return projectsProvider.isArabic - ? model2.coveringDoctors[0]['doctorNameN'] - : model2.coveringDoctors[0]['doctorName']; + return projectsProvider.isArabic ? model2.coveringDoctors[0]['doctorNameN'] : model2.coveringDoctors[0]['doctorName']; else { model2.coveringDoctors.forEach((newVal) => { - if (newVal['doctorID'].toString() == doctorID) - {doctorName = newVal['doctorName']} + if (newVal['doctorID'].toString() == doctorID) {doctorName = newVal['doctorName']} }); return doctorName; } diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index 006c1499..2ea3aa8f 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -97,13 +97,7 @@ class _AppTextState extends State { Widget build(BuildContext context) { return GestureDetector( child: Container( - margin: widget.margin != null - ? EdgeInsets.all(widget.margin) - : EdgeInsets.only( - top: widget.marginTop, - right: widget.marginRight, - bottom: widget.marginBottom, - left: widget.marginLeft), + margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, @@ -118,21 +112,16 @@ class _AppTextState extends State { right: 0, child: Container( decoration: BoxDecoration( - gradient: LinearGradient( - colors: [ - Theme.of(context).backgroundColor, - Theme.of(context).backgroundColor.withOpacity(0), - ], - begin: Alignment.bottomCenter, - end: Alignment.topCenter)), + gradient: LinearGradient(colors: [ + Theme.of(context).backgroundColor, + Theme.of(context).backgroundColor.withOpacity(0), + ], begin: Alignment.bottomCenter, end: Alignment.topCenter)), height: 30, ), ) ], ), - if (widget.allowExpand && - widget.readMore && - text.length > widget.maxLength) + if (widget.allowExpand && widget.readMore && text.length > widget.maxLength) Padding( padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), child: InkWell( @@ -165,17 +154,11 @@ class _AppTextState extends State { if (widget.isCopyable) { return Theme( data: ThemeData( - textSelectionColor: Colors.lightBlueAccent, + highlightColor: Colors.lightBlueAccent, ), child: Container( child: SelectableText( - !hidden - ? text - : (text.substring( - 0, - text.length > widget.maxLength - ? widget.maxLength - : text.length)), + !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)), textAlign: widget.textAlign, // overflow: widget.maxLines != null // ? ((widget.maxLines > 1) @@ -184,18 +167,12 @@ class _AppTextState extends State { // : null, maxLines: widget.maxLines ?? null, style: widget.style != null - ? _getFontStyle().copyWith( - fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color, - fontWeight: widget.fontWeight ?? _getFontWeight(), - height: widget.fontHeight) + ? _getFontStyle().copyWith(fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color, fontWeight: widget.fontWeight ?? _getFontWeight(), height: widget.fontHeight) : TextStyle( fontStyle: widget.italic ? FontStyle.italic : null, - color: - widget.color != null ? widget.color : Color(0xff2E303A), + color: widget.color != null ? widget.color : Color(0xff2E303A), fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: widget.letterSpacing ?? - (widget.variant == "overline" ? 1.5 : null), + letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration, @@ -205,32 +182,17 @@ class _AppTextState extends State { ); } else { return Text( - !hidden - ? text - : (text.substring( - 0, - text.length > widget.maxLength - ? widget.maxLength - : text.length)), + !hidden ? text : (text.substring(0, text.length > widget.maxLength ? widget.maxLength : text.length)), textAlign: widget.textAlign, - overflow: widget.maxLines != null - ? ((widget.maxLines > 1) - ? TextOverflow.fade - : TextOverflow.ellipsis) - : null, + overflow: widget.maxLines != null ? ((widget.maxLines > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null, maxLines: widget.maxLines ?? null, style: widget.style != null - ? _getFontStyle().copyWith( - fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color, - fontWeight: widget.fontWeight ?? _getFontWeight(), - height: widget.fontHeight) + ? _getFontStyle().copyWith(fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color, fontWeight: widget.fontWeight ?? _getFontWeight(), height: widget.fontHeight) : TextStyle( fontStyle: widget.italic ? FontStyle.italic : null, color: widget.color != null ? widget.color : Colors.black, fontSize: widget.fontSize ?? _getFontSize(), - letterSpacing: widget.letterSpacing ?? - (widget.variant == "overline" ? 1.5 : null), + letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null), fontWeight: widget.fontWeight ?? _getFontWeight(), fontFamily: widget.fontFamily ?? 'Poppins', decoration: widget.textDecoration, diff --git a/lib/widgets/shared/dialogs/dailog-list-select.dart b/lib/widgets/shared/dialogs/dailog-list-select.dart index 36eeb62b..ed06506c 100644 --- a/lib/widgets/shared/dialogs/dailog-list-select.dart +++ b/lib/widgets/shared/dialogs/dailog-list-select.dart @@ -46,12 +46,12 @@ class _ListSelectDialogState extends State { } showAlertDialog(BuildContext context) { - Widget cancelButton = FlatButton( + Widget cancelButton = ElevatedButton( child: Text(TranslationBase.of(context).cancel), onPressed: () { Navigator.of(context).pop(); }); - Widget continueButton = FlatButton( + Widget continueButton = ElevatedButton( child: Text(this.widget.okText), onPressed: () { Navigator.of(context).pop(); @@ -77,11 +77,7 @@ class _ListSelectDialogState extends State { Container( height: MediaQuery.of(context).size.height * 0.070, child: TextField( - decoration: Utils.textFieldSelectorDecoration( - widget.hintSearchText ?? - TranslationBase.of(context).search, - null, - false, + decoration: Utils.textFieldSelectorDecoration(widget.hintSearchText ?? TranslationBase.of(context).search, null, false, suffixIcon: Icon( Icons.search, )), @@ -101,10 +97,7 @@ class _ListSelectDialogState extends State { groupValue: Utils.convertToTitleCase(widget.selectedValue[widget.attributeValueId].toString()), value: item[widget.attributeValueId].toString(), activeColor: AppGlobal.appRedColor, - selected: item[widget.attributeValueId] - .toString() == - widget.selectedValue[widget.attributeValueId] - .toString(), + selected: item[widget.attributeValueId].toString() == widget.selectedValue[widget.attributeValueId].toString(), onChanged: (val) { setState(() { widget.selectedValue = item; @@ -131,9 +124,7 @@ class _ListSelectDialogState extends State { if (query.isNotEmpty) { List dummyListData = List(); dummySearchList.forEach((item) { - if ("${item[widget.attributeName].toString()}" - .toLowerCase() - .contains(query.toLowerCase())) { + if ("${item[widget.attributeName].toString()}".toLowerCase().contains(query.toLowerCase())) { dummyListData.add(item); } }); diff --git a/lib/widgets/shared/dialogs/master_key_dailog.dart b/lib/widgets/shared/dialogs/master_key_dailog.dart index 4c4eb8f0..382a4b63 100644 --- a/lib/widgets/shared/dialogs/master_key_dailog.dart +++ b/lib/widgets/shared/dialogs/master_key_dailog.dart @@ -15,12 +15,7 @@ class MasterKeyDailog extends StatefulWidget { MasterKeyModel selectedValue; final bool isICD; - MasterKeyDailog( - {@required this.list, - @required this.okText, - @required this.okFunction, - this.selectedValue, - this.isICD = false}); + MasterKeyDailog({@required this.list, @required this.okText, @required this.okFunction, this.selectedValue, this.isICD = false}); @override _MasterKeyDailogState createState() => _MasterKeyDailogState(); @@ -41,22 +36,20 @@ class _MasterKeyDailogState extends State { showAlertDialog(BuildContext context, ProjectViewModel projectViewModel) { // set up the buttons - Widget cancelButton = FlatButton( + Widget cancelButton = ElevatedButton( child: AppText( TranslationBase.of(context).cancel, color: Colors.grey, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * - (SizeConfig.isWidthLarge ? 3.5 : 5), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge ? 3.5 : 5), ), onPressed: () { Navigator.of(context).pop(); }); - Widget continueButton = FlatButton( + Widget continueButton = ElevatedButton( child: AppText( this.widget.okText, color: Colors.grey, - fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * - (SizeConfig.isWidthLarge ? 3.5 : 5), + fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * (SizeConfig.isWidthLarge ? 3.5 : 5), ), onPressed: () { this.widget.okFunction(widget.selectedValue); @@ -83,21 +76,12 @@ class _MasterKeyDailogState extends State { ...widget.list .map((item) => RadioListTile( title: AppText( - '${projectViewModel.isArabic ? item.nameAr : item.nameEn}' + - (widget.isICD ? '/${item.code}' : ''), + '${projectViewModel.isArabic ? item.nameAr : item.nameEn}' + (widget.isICD ? '/${item.code}' : ''), ), - groupValue: widget.isICD - ? widget.selectedValue.code.toString() - : widget.selectedValue.id.toString(), - value: widget.isICD - ? widget.selectedValue.code.toString() - : item.id.toString(), + groupValue: widget.isICD ? widget.selectedValue.code.toString() : widget.selectedValue.id.toString(), + value: widget.isICD ? widget.selectedValue.code.toString() : item.id.toString(), activeColor: Colors.blue.shade700, - selected: widget.isICD - ? item.code.toString() == - widget.selectedValue.code.toString() - : item.id.toString() == - widget.selectedValue.id.toString(), + selected: widget.isICD ? item.code.toString() == widget.selectedValue.code.toString() : item.id.toString() == widget.selectedValue.id.toString(), onChanged: (val) { setState(() { widget.selectedValue = item; diff --git a/lib/widgets/shared/dialogs/search-drugs-dailog-list.dart b/lib/widgets/shared/dialogs/search-drugs-dailog-list.dart index e528f2b5..0bfa2a42 100644 --- a/lib/widgets/shared/dialogs/search-drugs-dailog-list.dart +++ b/lib/widgets/shared/dialogs/search-drugs-dailog-list.dart @@ -9,12 +9,7 @@ class ListSelectDialog extends StatefulWidget { final Function(dynamic) okFunction; dynamic selectedValue; - ListSelectDialog( - {@required this.list, - @required this.attributeName, - @required this.attributeValueId, - @required this.okText, - @required this.okFunction}); + ListSelectDialog({@required this.list, @required this.attributeName, @required this.attributeValueId, @required this.okText, @required this.okFunction}); @override _ListSelectDialogState createState() => _ListSelectDialogState(); @@ -34,12 +29,12 @@ class _ListSelectDialogState extends State { showAlertDialog(BuildContext context) { // set up the buttons - Widget cancelButton = FlatButton( + Widget cancelButton = ElevatedButton( child: Text(TranslationBase.of(context).cancel), onPressed: () { Navigator.of(context).pop(); }); - Widget continueButton = FlatButton( + Widget continueButton = ElevatedButton( child: Text(this.widget.okText), onPressed: () { this.widget.okFunction(widget.selectedValue); @@ -66,13 +61,10 @@ class _ListSelectDialogState extends State { ...widget.list .map((item) => RadioListTile( title: Text("${item[widget.attributeName].toString()}"), - groupValue: widget.selectedValue[widget.attributeValueId] - .toString(), + groupValue: widget.selectedValue[widget.attributeValueId].toString(), value: item[widget.attributeValueId].toString(), activeColor: Colors.blue.shade700, - selected: item[widget.attributeValueId].toString() == - widget.selectedValue[widget.attributeValueId] - .toString(), + selected: item[widget.attributeValueId].toString() == widget.selectedValue[widget.attributeValueId].toString(), onChanged: (val) { setState(() { widget.selectedValue = item; diff --git a/lib/widgets/shared/text_fields/TextFields.dart b/lib/widgets/shared/text_fields/TextFields.dart index bc4600b4..005d4c0e 100644 --- a/lib/widgets/shared/text_fields/TextFields.dart +++ b/lib/widgets/shared/text_fields/TextFields.dart @@ -4,8 +4,7 @@ import 'package:flutter/services.dart'; class NumberTextInputFormatter extends TextInputFormatter { @override - TextEditingValue formatEditUpdate( - TextEditingValue oldValue, TextEditingValue newValue) { + TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) { final int newTextLength = newValue.text.length; int selectionIndex = newValue.selection.end; int usedSubstringIndex = 0; @@ -27,8 +26,7 @@ class NumberTextInputFormatter extends TextInputFormatter { if (newValue.selection.end >= 10) selectionIndex++; } // Dump the rest. - if (newTextLength >= usedSubstringIndex) - newText.write(newValue.text.substring(usedSubstringIndex)); + if (newTextLength >= usedSubstringIndex) newText.write(newValue.text.substring(usedSubstringIndex)); return TextEditingValue( text: newText.toString(), selection: TextSelection.collapsed(offset: selectionIndex), @@ -168,28 +166,20 @@ class _TextFieldsState extends State { view = false; }); }, - child: Icon(EvaIcons.eye, - size: 24.0, color: Color.fromRGBO(78, 62, 253, 1.0))) + child: Icon(EvaIcons.eye, size: 24.0, color: Color.fromRGBO(78, 62, 253, 1.0))) : InkWell( onTap: () { this.setState(() { view = true; }); }, - child: Icon(EvaIcons.eyeOff, - size: 24.0, color: Colors.grey[500]))); + child: Icon(EvaIcons.eyeOff, size: 24.0, color: Colors.grey[500]))); } break; default: if (widget.suffixIcon != null) - return InkWell( - onTap: widget.onSuffixTap, - child: Icon(widget.suffixIcon, - size: 22.0, - color: widget.suffixIconColor != null - ? widget.suffixIconColor - : Colors.grey[500])); + return InkWell(onTap: widget.onSuffixTap, child: Icon(widget.suffixIcon, size: 22.0, color: widget.suffixIconColor != null ? widget.suffixIconColor : Colors.grey[500])); else return null; } @@ -216,10 +206,7 @@ class _TextFieldsState extends State { // color: Color.fromRGBO(70, 68, 167, focus ? 0.20 : 0), // offset: Offset(0.0, 13.0), // blurRadius: focus ? 34.0 : 12.0) - BoxShadow( - color: Color.fromRGBO(110, 68, 80, focus ? 0.20 : 0), - offset: Offset(0.0, 13.0), - blurRadius: focus ? 34.0 : 12.0) + BoxShadow(color: Color.fromRGBO(110, 68, 80, focus ? 0.20 : 0), offset: Offset(0.0, 13.0), blurRadius: focus ? 34.0 : 12.0) ]), child: Column( children: [ @@ -239,7 +226,7 @@ class _TextFieldsState extends State { textInputAction: widget.inputAction, minLines: widget.minLines ?? 1, maxLines: widget.maxLines ?? 1, - maxLengthEnforced: widget.maxLengthEnforced, + //maxLengthEnforced: widget.maxLengthEnforced, initialValue: widget.initialValue, onChanged: (value) { if (widget.showLabelText) { @@ -264,8 +251,7 @@ class _TextFieldsState extends State { autofocus: widget.autoFocus ?? false, validator: widget.validator, onSaved: widget.onSaved, - style: Theme.of(context).textTheme.bodyText1.copyWith( - fontSize: widget.fontSize, fontWeight: widget.fontWeight), + style: Theme.of(context).textTheme.bodyText1.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), inputFormatters: widget.keyboardType == TextInputType.phone ? [ // WhitelistingTextInputFormatter.digitsOnly, @@ -286,73 +272,29 @@ class _TextFieldsState extends State { fontWeight: widget.fontWeight, color: widget.hintColor ?? Theme.of(context).hintColor, ), - contentPadding: widget.padding != null - ? widget.padding - : EdgeInsets.symmetric( - vertical: - (widget.bare && !widget.keepPadding) ? 0.0 : 10.0, - horizontal: 16.0), + contentPadding: widget.padding != null ? widget.padding : EdgeInsets.symmetric(vertical: (widget.bare && !widget.keepPadding) ? 0.0 : 10.0, horizontal: 16.0), filled: true, - fillColor: widget.bare - ? Colors.transparent - : Theme.of(context).backgroundColor, + fillColor: widget.bare ? Colors.transparent : Theme.of(context).backgroundColor, suffixIcon: _buildSuffixIcon(), prefixIcon: widget.prefixIcon, - errorStyle: TextStyle( - fontSize: 12.0, - fontWeight: widget.fontWeight, - height: widget.borderOnlyError ? 0.0 : null), + errorStyle: TextStyle(fontSize: 12.0, fontWeight: widget.fontWeight, height: widget.borderOnlyError ? 0.0 : null), errorBorder: OutlineInputBorder( - borderSide: widget.hasBorder - ? BorderSide( - color: Theme.of(context) - .errorColor - .withOpacity(widget.bare ? 0.0 : 0.5), - width: 1.0) - : BorderSide(color: Colors.transparent, width: 0), - borderRadius: widget.hasBorder - ? BorderRadius.circular( - widget.bare ? 0.0 : widget.borderRadius) - : BorderRadius.circular(0.0), + borderSide: widget.hasBorder ? BorderSide(color: Theme.of(context).errorColor.withOpacity(widget.bare ? 0.0 : 0.5), width: 1.0) : BorderSide(color: Colors.transparent, width: 0), + borderRadius: widget.hasBorder ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), focusedErrorBorder: OutlineInputBorder( - borderSide: widget.hasBorder - ? BorderSide( - color: Theme.of(context) - .errorColor - .withOpacity(widget.bare ? 0.0 : 0.5), - width: 1.0) - : BorderSide(color: Colors.transparent, width: 0), - borderRadius: BorderRadius.circular( - widget.bare ? 0.0 : widget.borderRadius)), + borderSide: widget.hasBorder ? BorderSide(color: Theme.of(context).errorColor.withOpacity(widget.bare ? 0.0 : 0.5), width: 1.0) : BorderSide(color: Colors.transparent, width: 0), + borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)), focusedBorder: OutlineInputBorder( - borderSide: widget.hasBorder - ? BorderSide( - color: widget.borderColor, width: widget.borderWidth) - : BorderSide(color: Colors.transparent, width: 0), - borderRadius: widget.hasBorder - ? BorderRadius.circular( - widget.bare ? 0.0 : widget.borderRadius) - : BorderRadius.circular(0.0), + borderSide: widget.hasBorder ? BorderSide(color: widget.borderColor, width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), + borderRadius: widget.hasBorder ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), disabledBorder: OutlineInputBorder( - borderSide: widget.hasBorder - ? BorderSide( - color: widget.borderColor, width: widget.borderWidth) - : BorderSide(color: Colors.transparent, width: 0), - borderRadius: widget.hasBorder - ? BorderRadius.circular( - widget.bare ? 0.0 : widget.borderRadius) - : BorderRadius.circular(0.0)), + borderSide: widget.hasBorder ? BorderSide(color: widget.borderColor, width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), + borderRadius: widget.hasBorder ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0)), enabledBorder: OutlineInputBorder( - borderSide: widget.hasBorder - ? BorderSide( - color: widget.borderColor, width: widget.borderWidth) - : BorderSide(color: Colors.transparent, width: 0), - borderRadius: widget.hasBorder - ? BorderRadius.circular( - widget.bare ? 0.0 : widget.borderRadius) - : BorderRadius.circular(0.0), + borderSide: widget.hasBorder ? BorderSide(color: widget.borderColor, width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), + borderRadius: widget.hasBorder ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), ), ), diff --git a/pubspec.lock b/pubspec.lock index 424d9a09..5cda33f5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -8,6 +8,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "22.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.12" analyzer: dependency: transitive description: @@ -21,49 +28,49 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.3.5" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.9.0" autocomplete_textfield: dependency: "direct main" description: name: autocomplete_textfield url: "https://pub.dartlang.org" source: hosted - version: "1.7.3" + version: "2.0.1" badges: dependency: "direct main" description: name: badges url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" barcode_scan2: dependency: "direct main" description: name: barcode_scan2 url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "4.2.2" bazel_worker: dependency: transitive description: name: bazel_worker url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" boolean_selector: dependency: transitive description: @@ -140,42 +147,35 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.1.4" + version: "8.4.2" cached_network_image: dependency: "direct main" description: name: cached_network_image url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "3.2.3" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" + version: "1.2.1" charts_common: dependency: transitive description: @@ -203,7 +203,7 @@ packages: name: chewie url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.3.6" chewie_audio: dependency: transitive description: @@ -224,7 +224,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" code_builder: dependency: transitive description: @@ -238,7 +238,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" connectivity: dependency: "direct main" description: @@ -273,28 +273,28 @@ packages: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.1.1" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.0.2" csslib: dependency: transitive description: name: csslib url: "https://pub.dartlang.org" source: hosted - version: "0.17.1" + version: "0.17.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" dart_style: dependency: transitive description: @@ -329,21 +329,21 @@ packages: name: dropdown_search url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "3.0.1" equatable: dependency: transitive description: name: equatable url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" eva_icons_flutter: dependency: "direct main" description: name: eva_icons_flutter url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.1.0" expandable: dependency: "direct main" description: @@ -357,112 +357,119 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.1" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.2" + version: "6.1.4" file_picker: dependency: "direct main" description: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "3.0.4" - firebase: - dependency: transitive - description: - name: firebase - url: "https://pub.dartlang.org" - source: hosted - version: "9.0.2" + version: "4.6.1" firebase_analytics: dependency: "direct main" description: name: firebase_analytics url: "https://pub.dartlang.org" source: hosted - version: "8.3.4" + version: "10.1.0" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "3.3.17" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web url: "https://pub.dartlang.org" source: hosted - version: "0.3.0+1" + version: "0.5.1+8" firebase_core: dependency: transitive description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "1.12.0" + version: "2.4.1" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "4.2.4" + version: "4.5.2" firebase_core_web: dependency: transitive description: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "1.5.4" + version: "2.1.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging url: "https://pub.dartlang.org" source: hosted - version: "10.0.9" + version: "14.2.1" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.1.6" + version: "4.2.10" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web url: "https://pub.dartlang.org" source: hosted - version: "2.2.7" + version: "3.2.11" fixnum: dependency: transitive description: name: fixnum url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" fl_chart: dependency: "direct main" description: name: fl_chart url: "https://pub.dartlang.org" source: hosted - version: "0.36.4" + version: "0.40.6" + flex_color_picker: + dependency: transitive + description: + name: flex_color_picker + url: "https://pub.dartlang.org" + source: hosted + version: "2.6.1" + flex_seed_scheme: + dependency: transitive + description: + name: flex_seed_scheme + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -474,7 +481,7 @@ packages: name: flutter_blurhash url: "https://pub.dartlang.org" source: hosted - version: "0.6.0" + version: "0.7.0" flutter_cache_manager: dependency: transitive description: @@ -488,7 +495,7 @@ packages: name: flutter_colorpicker url: "https://pub.dartlang.org" source: hosted - version: "0.5.0" + version: "1.0.3" flutter_datetime_picker: dependency: "direct main" description: @@ -523,14 +530,28 @@ packages: name: flutter_inappwebview url: "https://pub.dartlang.org" source: hosted - version: "5.3.2" + version: "5.7.2+3" flutter_keyboard_visibility: dependency: transitive description: name: flutter_keyboard_visibility url: "https://pub.dartlang.org" source: hosted - version: "5.1.1" + version: "5.4.0" + flutter_keyboard_visibility_linux: + dependency: transitive + description: + name: flutter_keyboard_visibility_linux + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_macos: + dependency: transitive + description: + name: flutter_keyboard_visibility_macos + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" flutter_keyboard_visibility_platform_interface: dependency: transitive description: @@ -545,13 +566,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + flutter_keyboard_visibility_windows: + dependency: transitive + description: + name: flutter_keyboard_visibility_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" flutter_layout_grid: dependency: transitive description: name: flutter_layout_grid url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.6" flutter_localizations: dependency: "direct main" description: flutter @@ -577,7 +605,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.7" flutter_staggered_grid_view: dependency: "direct main" description: @@ -615,14 +643,14 @@ packages: name: fluttertoast url: "https://pub.dartlang.org" source: hosted - version: "8.0.8" + version: "8.1.2" font_awesome_flutter: dependency: "direct main" description: name: font_awesome_flutter url: "https://pub.dartlang.org" source: hosted - version: "9.2.0" + version: "10.3.0" get_it: dependency: "direct main" description: @@ -636,7 +664,7 @@ packages: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.1" graphs: dependency: transitive description: @@ -650,7 +678,7 @@ packages: name: hexcolor url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "3.0.1" hijri: dependency: transitive description: @@ -671,28 +699,28 @@ packages: name: html url: "https://pub.dartlang.org" source: hosted - version: "0.15.0" + version: "0.15.1" html_editor_enhanced: dependency: "direct main" description: name: html_editor_enhanced url: "https://pub.dartlang.org" source: hosted - version: "2.2.0+1-dev.1" + version: "2.5.0" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.4" + version: "0.13.5" http_interceptor: dependency: "direct main" description: name: http_interceptor url: "https://pub.dartlang.org" source: hosted - version: "0.4.1" + version: "1.0.2" http_multi_server: dependency: transitive description: @@ -706,7 +734,7 @@ packages: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.2" infinite_listview: dependency: transitive description: @@ -734,7 +762,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" json_annotation: dependency: transitive description: @@ -748,14 +776,42 @@ packages: name: local_auth url: "https://pub.dartlang.org" source: hosted - version: "1.1.10" + version: "2.1.3" + local_auth_android: + dependency: transitive + description: + name: local_auth_android + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.17" + local_auth_ios: + dependency: transitive + description: + name: local_auth_ios + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.12" + local_auth_platform_interface: + dependency: transitive + description: + name: local_auth_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.6" + local_auth_windows: + dependency: transitive + description: + name: local_auth_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" logging: dependency: transitive description: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.0" maps_launcher: dependency: "direct main" description: @@ -769,21 +825,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.11" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.3" nested: dependency: transitive description: @@ -811,21 +874,21 @@ packages: name: octo_image url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" package_config: dependency: transitive description: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.2" path_drawing: dependency: transitive description: @@ -846,49 +909,49 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.11" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.22" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.11" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "2.1.7" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.6" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.7" pedantic: dependency: transitive description: @@ -902,28 +965,49 @@ packages: name: percent_indicator url: "https://pub.dartlang.org" source: hosted - version: "3.4.0" + version: "4.2.2" permission_handler: dependency: "direct main" description: name: permission_handler url: "https://pub.dartlang.org" source: hosted - version: "8.3.0" + version: "10.2.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + url: "https://pub.dartlang.org" + source: hosted + version: "10.2.0" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + url: "https://pub.dartlang.org" + source: hosted + version: "9.0.7" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "3.9.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.1.0" platform: dependency: transitive description: @@ -937,21 +1021,28 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.3" pointer_interceptor: dependency: transitive description: name: pointer_interceptor url: "https://pub.dartlang.org" source: hosted - version: "0.9.1" + version: "0.9.3+3" + pointycastle: + dependency: transitive + description: + name: pointycastle + url: "https://pub.dartlang.org" + source: hosted + version: "3.6.2" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.5.1" process: dependency: transitive description: @@ -965,21 +1056,21 @@ packages: name: protobuf url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.0" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.2" + version: "6.0.5" pub_semver: dependency: transitive description: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.3" pubspec_parse: dependency: transitive description: @@ -993,14 +1084,14 @@ packages: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "3.0.1+1" + version: "3.2.1" rxdart: dependency: transitive description: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.27.3" + version: "0.27.7" scratch_space: dependency: transitive description: @@ -1014,63 +1105,63 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "2.0.15" shared_preferences_android: dependency: transitive description: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.14" shared_preferences_ios: dependency: transitive description: name: shared_preferences_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.1.1" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.4.0" shelf_web_socket: dependency: transitive description: @@ -1089,14 +1180,14 @@ packages: name: source_maps url: "https://pub.dartlang.org" source: hosted - version: "0.10.10" + version: "0.10.11" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.0" speech_to_text: dependency: "direct main" description: @@ -1110,14 +1201,14 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.2.2" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.4.0+2" stack_trace: dependency: transitive description: @@ -1131,7 +1222,7 @@ packages: name: sticky_headers url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.3.0+2" stream_channel: dependency: transitive description: @@ -1145,35 +1236,35 @@ packages: name: stream_transform url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" synchronized: dependency: transitive description: name: synchronized url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.0+3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.12" timing: dependency: transitive description: @@ -1194,133 +1285,133 @@ packages: name: tuple url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" url_launcher: dependency: "direct main" description: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.20" + version: "6.1.7" url_launcher_android: dependency: transitive description: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.15" + version: "6.0.22" url_launcher_ios: dependency: transitive description: name: url_launcher_ios url: "https://pub.dartlang.org" source: hosted - version: "6.0.15" + version: "6.0.17" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.1" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.13" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" uuid: dependency: transitive description: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.5" + version: "3.0.7" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" video_player: dependency: transitive description: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "2.2.18" + version: "2.4.10" video_player_android: dependency: transitive description: name: video_player_android url: "https://pub.dartlang.org" source: hosted - version: "2.2.17" + version: "2.3.10" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation url: "https://pub.dartlang.org" source: hosted - version: "2.2.18" + version: "2.3.8" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "5.0.2" + version: "6.0.1" video_player_web: dependency: transitive description: name: video_player_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.13" visibility_detector: dependency: transitive description: name: visibility_detector url: "https://pub.dartlang.org" source: hosted - version: "0.2.2" + version: "0.3.3" wakelock: dependency: transitive description: name: wakelock url: "https://pub.dartlang.org" source: hosted - version: "0.5.6" + version: "0.6.2" wakelock_macos: dependency: transitive description: @@ -1355,7 +1446,7 @@ packages: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" web_socket_channel: dependency: transitive description: @@ -1376,49 +1467,49 @@ packages: name: webview_flutter_android url: "https://pub.dartlang.org" source: hosted - version: "2.8.2" + version: "2.10.4" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.9.5" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview url: "https://pub.dartlang.org" source: hosted - version: "2.7.1" + version: "2.9.5" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.3.11" + version: "2.6.1" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+1" + version: "0.2.0+2" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "5.4.1" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: - dart: ">=2.15.0 <3.0.0" - flutter: ">=2.8.0" + dart: ">=2.18.1 <3.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index dfc76868..d29099e0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -27,7 +27,7 @@ environment: dependencies: flutter: sdk: flutter - hexcolor: ^2.0.4 + hexcolor: ^3.0.1 flutter_localizations: sdk: flutter flutter_device_type: ^0.4.0 @@ -38,8 +38,8 @@ dependencies: # imei_plugin: ^1.2.0 # flutter_flexible_toast: ^0.1.4 fluttertoast: ^8.0.8 - local_auth: ^1.1.6 - http_interceptor: ^0.4.1 + local_auth: ^2.1.3 + http_interceptor: ^1.0.2 connectivity: ^3.0.6 maps_launcher: ^2.0.0 @@ -48,8 +48,8 @@ dependencies: flutter_swiper: ^1.1.6 #Icons eva_icons_flutter: ^3.0.0 - font_awesome_flutter: ^9.0.0 - dropdown_search: ^2.0.1 + font_awesome_flutter: ^10.3.0 + dropdown_search: ^3.0.1 flutter_staggered_grid_view: ^0.4.0 expandable: ^5.0.1 @@ -57,7 +57,7 @@ dependencies: # Qr code Scanner barcode_scan2: ^4.1.4 # permissions - permission_handler: ^8.0.1 + permission_handler: ^10.2.0 device_info: ^2.0.2 # The following adds the Cupertino Icons font to your application. @@ -65,23 +65,23 @@ dependencies: cupertino_icons: ^1.0.3 # SVG #flutter_svg: ^1.0.0 - percent_indicator: ^3.0.1 + percent_indicator: ^4.2.2 #Dependency Injection get_it: ^7.1.3 #chart - fl_chart: ^0.36.1 + fl_chart: ^0.40.2 # Firebase - firebase_messaging: ^10.0.1 - firebase_analytics : ^8.3.4 + firebase_messaging: ^14.2.1 + firebase_analytics : ^10.1.0 #GIF image flutter_gifimage: ^1.0.1 #Autocomplete TextField - autocomplete_textfield: ^1.7.3 + autocomplete_textfield: ^2.0.1 date_time_picker: ^2.0.0 # Html @@ -89,15 +89,15 @@ dependencies: # Flutter Html View flutter_html: ^2.1.0 - sticky_headers: ^0.2.0 - file_picker: ^3.0.2+2 + sticky_headers: ^0.3.0+2 + file_picker: ^4.6.1 #speech to text speech_to_text: path: speech_to_text quiver: ^3.0.0 - flutter_colorpicker: ^0.5.0 + flutter_colorpicker: ^1.0.3 # Html Editor Enhanced html_editor_enhanced: ^2.1.1 diff --git a/speech_to_text/example/lib/main.dart b/speech_to_text/example/lib/main.dart index 0115b828..f9e672fa 100644 --- a/speech_to_text/example/lib/main.dart +++ b/speech_to_text/example/lib/main.dart @@ -33,8 +33,7 @@ class _MyAppState extends State { } Future initSpeechState() async { - bool hasSpeech = await speech.initialize( - onError: errorListener, onStatus: statusListener); + bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); if (hasSpeech) { _localeNames = await speech.locales(); @@ -49,7 +48,7 @@ class _MyAppState extends State { }); } - void requestPermissions() async{ + void requestPermissions() async { Map statuses = await [ Permission.microphone, ].request(); @@ -86,9 +85,7 @@ class _MyAppState extends State { children: [ FlatButton( child: Text('Start'), - onPressed: !_hasSpeech || speech.isListening - ? null - : startListening, + onPressed: !_hasSpeech || speech.isListening ? null : startListening, ), FlatButton( child: Text('Stop'), @@ -151,15 +148,9 @@ class _MyAppState extends State { height: 40, alignment: Alignment.center, decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - blurRadius: .26, - spreadRadius: level * 1.5, - color: Colors.black.withOpacity(.05)) - ], + boxShadow: [BoxShadow(blurRadius: .26, spreadRadius: level * 1.5, color: Colors.black.withOpacity(.05))], color: Colors.white, - borderRadius: - BorderRadius.all(Radius.circular(50)), + borderRadius: BorderRadius.all(Radius.circular(50)), ), child: IconButton(icon: Icon(Icons.mic)), ), diff --git a/speech_to_text/example/pubspec.lock b/speech_to_text/example/pubspec.lock index 6809f75f..f7f8a8a5 100644 --- a/speech_to_text/example/pubspec.lock +++ b/speech_to_text/example/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.8.2" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.3.1" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -80,14 +80,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.11" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.7.0" nested: dependency: transitive description: @@ -101,7 +101,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" permission_handler: dependency: "direct main" description: @@ -141,7 +141,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.1" speech_to_text: dependency: "direct dev" description: @@ -155,49 +155,49 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.4.3" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.1" sdks: - dart: ">=2.10.0-110 <2.11.0" - flutter: ">=1.16.0 <2.0.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=1.16.0" diff --git a/speech_to_text/pubspec.lock b/speech_to_text/pubspec.lock index efc63cc7..a892c39c 100644 --- a/speech_to_text/pubspec.lock +++ b/speech_to_text/pubspec.lock @@ -28,14 +28,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.8.2" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" build: dependency: transitive description: @@ -98,14 +98,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -119,7 +119,7 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" code_builder: dependency: transitive description: @@ -133,7 +133,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" convert: dependency: transitive description: @@ -168,7 +168,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" fixnum: dependency: transitive description: @@ -262,14 +262,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.11" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.7.0" mime: dependency: transitive description: @@ -304,7 +304,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" pedantic: dependency: transitive description: @@ -372,21 +372,21 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" stream_transform: dependency: transitive description: @@ -400,21 +400,21 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.4.3" timing: dependency: transitive description: @@ -428,14 +428,14 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.1" watcher: dependency: transitive description: @@ -458,5 +458,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.14.0 <3.0.0" flutter: ">=1.10.0"