Merge branch 'development' into pharmacy-Fatima
# Conflicts: # lib/config/config.dart # lib/core/service/parmacyModule/parmacy_module_service.dart # lib/pages/pharmacies/product_detail.dart # lib/pages/pharmacies/screens/pharmacy_module_page.dartmerge-requests/277/head
@ -0,0 +1,14 @@
|
||||
{
|
||||
"client":{
|
||||
"appType":"1",
|
||||
"cp_id":"2640966000002322881",
|
||||
"product_id":"736430079244816576",
|
||||
"client_id":"563737844552565952",
|
||||
"client_secret":"9C9A2C272576B8AE6E886C78AF944E8354B91F0AF3381129BB8369FB35E41C47",
|
||||
"project_id":"736430079244816576",
|
||||
"app_id":"103856487",
|
||||
"api_key":"CgB6e3x90XxBrOCMun809w+DOzcFEettcBDUF3fqaLry1ViqTeJqoPwpfaOq/uGw//x0oYwucu9aWazs+Rdj0GUF",
|
||||
"package_name":"com.cloud.diplomaticquarterapp"
|
||||
},
|
||||
"configuration_version":"1.0"
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
{
|
||||
"client":{
|
||||
"appType":"1",
|
||||
"cp_id":"2640966000002322881",
|
||||
"product_id":"736430079244816567",
|
||||
"client_id":"563735388191982656",
|
||||
"client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF",
|
||||
"project_id":"736430079244816567",
|
||||
"app_id":"102857389",
|
||||
"api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI",
|
||||
"package_name":"com.ejada.hmg"
|
||||
},
|
||||
"configuration_version":"1.0"
|
||||
}
|
||||
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
@ -1,25 +1,461 @@
|
||||
PODS:
|
||||
- android_intent (0.0.1):
|
||||
- Flutter
|
||||
- barcode_scan_fix (0.0.1):
|
||||
- Flutter
|
||||
- MTBBarcodeScanner
|
||||
- connectivity (0.0.1):
|
||||
- Flutter
|
||||
- Reachability
|
||||
- connectivity_for_web (0.1.0):
|
||||
- Flutter
|
||||
- connectivity_macos (0.0.1):
|
||||
- Flutter
|
||||
- device_calendar (0.0.1):
|
||||
- Flutter
|
||||
- device_info (0.0.1):
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (6.33.0):
|
||||
- FirebaseCore (= 6.10.3)
|
||||
- Firebase/Messaging (6.33.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 4.7.0)
|
||||
- firebase_core (0.5.3):
|
||||
- Firebase/CoreOnly (~> 6.33.0)
|
||||
- Flutter
|
||||
- firebase_core_web (0.1.0):
|
||||
- Flutter
|
||||
- firebase_messaging (7.0.3):
|
||||
- Firebase/CoreOnly (~> 6.33.0)
|
||||
- Firebase/Messaging (~> 6.33.0)
|
||||
- firebase_core
|
||||
- Flutter
|
||||
- FirebaseCore (6.10.3):
|
||||
- FirebaseCoreDiagnostics (~> 1.6)
|
||||
- GoogleUtilities/Environment (~> 6.7)
|
||||
- GoogleUtilities/Logger (~> 6.7)
|
||||
- FirebaseCoreDiagnostics (1.7.0):
|
||||
- GoogleDataTransport (~> 7.4)
|
||||
- GoogleUtilities/Environment (~> 6.7)
|
||||
- GoogleUtilities/Logger (~> 6.7)
|
||||
- nanopb (~> 1.30906.0)
|
||||
- FirebaseInstallations (1.7.0):
|
||||
- FirebaseCore (~> 6.10)
|
||||
- GoogleUtilities/Environment (~> 6.7)
|
||||
- GoogleUtilities/UserDefaults (~> 6.7)
|
||||
- PromisesObjC (~> 1.2)
|
||||
- FirebaseInstanceID (4.8.0):
|
||||
- FirebaseCore (~> 6.10)
|
||||
- FirebaseInstallations (~> 1.6)
|
||||
- GoogleUtilities/Environment (~> 6.7)
|
||||
- GoogleUtilities/UserDefaults (~> 6.7)
|
||||
- FirebaseMessaging (4.7.1):
|
||||
- FirebaseCore (~> 6.10)
|
||||
- FirebaseInstanceID (~> 4.7)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.7)
|
||||
- GoogleUtilities/Environment (~> 6.7)
|
||||
- GoogleUtilities/Reachability (~> 6.7)
|
||||
- GoogleUtilities/UserDefaults (~> 6.7)
|
||||
- Protobuf (>= 3.9.2, ~> 3.9)
|
||||
- Flutter (1.0.0)
|
||||
- flutter_email_sender (0.0.1):
|
||||
- Flutter
|
||||
- flutter_flexible_toast (0.0.1):
|
||||
- Flutter
|
||||
- flutter_inappwebview (0.0.1):
|
||||
- Flutter
|
||||
- flutter_local_notifications (0.0.1):
|
||||
- Flutter
|
||||
- flutter_plugin_android_lifecycle (0.0.1):
|
||||
- Flutter
|
||||
- flutter_tts (0.0.1):
|
||||
- Flutter
|
||||
- geolocator (6.1.9):
|
||||
- Flutter
|
||||
- google_maps_flutter (0.0.1):
|
||||
- Flutter
|
||||
- GoogleMaps (< 3.10)
|
||||
- GoogleDataTransport (7.5.1):
|
||||
- nanopb (~> 1.30906.0)
|
||||
- GoogleMaps (3.9.0):
|
||||
- GoogleMaps/Maps (= 3.9.0)
|
||||
- GoogleMaps/Base (3.9.0)
|
||||
- GoogleMaps/Maps (3.9.0):
|
||||
- GoogleMaps/Base
|
||||
- GoogleUtilities/AppDelegateSwizzler (6.7.2):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network
|
||||
- GoogleUtilities/Environment (6.7.2):
|
||||
- PromisesObjC (~> 1.2)
|
||||
- GoogleUtilities/Logger (6.7.2):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Network (6.7.2):
|
||||
- GoogleUtilities/Logger
|
||||
- "GoogleUtilities/NSData+zlib"
|
||||
- GoogleUtilities/Reachability
|
||||
- "GoogleUtilities/NSData+zlib (6.7.2)"
|
||||
- GoogleUtilities/Reachability (6.7.2):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/UserDefaults (6.7.2):
|
||||
- GoogleUtilities/Logger
|
||||
- hexcolor (0.0.1):
|
||||
- Flutter
|
||||
- image_cropper (0.0.3):
|
||||
- Flutter
|
||||
- TOCropViewController (~> 2.5.4)
|
||||
- image_picker (0.0.1):
|
||||
- Flutter
|
||||
- just_audio (0.0.1):
|
||||
- Flutter
|
||||
- local_auth (0.0.1):
|
||||
- Flutter
|
||||
- location (0.0.1):
|
||||
- Flutter
|
||||
- manage_calendar_events (0.0.1):
|
||||
- Flutter
|
||||
- map_launcher (0.0.1):
|
||||
- Flutter
|
||||
- maps_launcher (0.0.1):
|
||||
- Flutter
|
||||
- MTBBarcodeScanner (5.0.11)
|
||||
- nanopb (1.30906.0):
|
||||
- nanopb/decode (= 1.30906.0)
|
||||
- nanopb/encode (= 1.30906.0)
|
||||
- nanopb/decode (1.30906.0)
|
||||
- nanopb/encode (1.30906.0)
|
||||
- native_device_orientation (0.0.1):
|
||||
- Flutter
|
||||
- native_progress_hud (0.0.1):
|
||||
- Flutter
|
||||
- NVActivityIndicatorView (5.1.1):
|
||||
- NVActivityIndicatorView/Base (= 5.1.1)
|
||||
- NVActivityIndicatorView/Base (5.1.1)
|
||||
- path_provider (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_linux (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_macos (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_windows (0.0.1):
|
||||
- Flutter
|
||||
- "permission_handler (5.0.1+1)":
|
||||
- Flutter
|
||||
- PromisesObjC (1.2.11)
|
||||
- Protobuf (3.13.0)
|
||||
- Reachability (3.2)
|
||||
- screen (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_linux (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_macos (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_web (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_windows (0.0.1):
|
||||
- Flutter
|
||||
- speech_to_text (0.0.1):
|
||||
- Flutter
|
||||
- Try
|
||||
- TOCropViewController (2.5.5)
|
||||
- Try (2.1.1)
|
||||
- "twilio_programmable_video (0.5.0+4)":
|
||||
- Flutter
|
||||
- TwilioVideo (~> 3.4)
|
||||
- TwilioVideo (3.8.0)
|
||||
- url_launcher (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_linux (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_macos (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_web (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_windows (0.0.1):
|
||||
- Flutter
|
||||
- vibration (1.7.3):
|
||||
- Flutter
|
||||
- vibration_web (1.6.2):
|
||||
- Flutter
|
||||
- video_player (0.0.1):
|
||||
- Flutter
|
||||
- video_player_web (0.0.1):
|
||||
- Flutter
|
||||
- wakelock (0.0.1):
|
||||
- Flutter
|
||||
- webview_flutter (0.0.1):
|
||||
- Flutter
|
||||
- wifi (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- android_intent (from `.symlinks/plugins/android_intent/ios`)
|
||||
- barcode_scan_fix (from `.symlinks/plugins/barcode_scan_fix/ios`)
|
||||
- connectivity (from `.symlinks/plugins/connectivity/ios`)
|
||||
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
|
||||
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
|
||||
- device_calendar (from `.symlinks/plugins/device_calendar/ios`)
|
||||
- device_info (from `.symlinks/plugins/device_info/ios`)
|
||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||
- firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
|
||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_email_sender (from `.symlinks/plugins/flutter_email_sender/ios`)
|
||||
- flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
|
||||
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
|
||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
||||
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
|
||||
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
|
||||
- geolocator (from `.symlinks/plugins/geolocator/ios`)
|
||||
- google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`)
|
||||
- hexcolor (from `.symlinks/plugins/hexcolor/ios`)
|
||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
||||
- image_picker (from `.symlinks/plugins/image_picker/ios`)
|
||||
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
||||
- local_auth (from `.symlinks/plugins/local_auth/ios`)
|
||||
- location (from `.symlinks/plugins/location/ios`)
|
||||
- manage_calendar_events (from `.symlinks/plugins/manage_calendar_events/ios`)
|
||||
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
|
||||
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
|
||||
- native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`)
|
||||
- native_progress_hud (from `.symlinks/plugins/native_progress_hud/ios`)
|
||||
- NVActivityIndicatorView
|
||||
- path_provider (from `.symlinks/plugins/path_provider/ios`)
|
||||
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
|
||||
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
|
||||
- path_provider_windows (from `.symlinks/plugins/path_provider_windows/ios`)
|
||||
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
|
||||
- screen (from `.symlinks/plugins/screen/ios`)
|
||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
|
||||
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
|
||||
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
|
||||
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
|
||||
- shared_preferences_windows (from `.symlinks/plugins/shared_preferences_windows/ios`)
|
||||
- speech_to_text (from `.symlinks/plugins/speech_to_text/ios`)
|
||||
- twilio_programmable_video (from `.symlinks/plugins/twilio_programmable_video/ios`)
|
||||
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
||||
- url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
|
||||
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
|
||||
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
|
||||
- url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/ios`)
|
||||
- vibration (from `.symlinks/plugins/vibration/ios`)
|
||||
- vibration_web (from `.symlinks/plugins/vibration_web/ios`)
|
||||
- video_player (from `.symlinks/plugins/video_player/ios`)
|
||||
- video_player_web (from `.symlinks/plugins/video_player_web/ios`)
|
||||
- wakelock (from `.symlinks/plugins/wakelock/ios`)
|
||||
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
|
||||
- wifi (from `.symlinks/plugins/wifi/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Firebase
|
||||
- FirebaseCore
|
||||
- FirebaseCoreDiagnostics
|
||||
- FirebaseInstallations
|
||||
- FirebaseInstanceID
|
||||
- FirebaseMessaging
|
||||
- GoogleDataTransport
|
||||
- GoogleMaps
|
||||
- GoogleUtilities
|
||||
- MTBBarcodeScanner
|
||||
- nanopb
|
||||
- NVActivityIndicatorView
|
||||
- PromisesObjC
|
||||
- Protobuf
|
||||
- Reachability
|
||||
- TOCropViewController
|
||||
- Try
|
||||
- TwilioVideo
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
android_intent:
|
||||
:path: ".symlinks/plugins/android_intent/ios"
|
||||
barcode_scan_fix:
|
||||
:path: ".symlinks/plugins/barcode_scan_fix/ios"
|
||||
connectivity:
|
||||
:path: ".symlinks/plugins/connectivity/ios"
|
||||
connectivity_for_web:
|
||||
:path: ".symlinks/plugins/connectivity_for_web/ios"
|
||||
connectivity_macos:
|
||||
:path: ".symlinks/plugins/connectivity_macos/ios"
|
||||
device_calendar:
|
||||
:path: ".symlinks/plugins/device_calendar/ios"
|
||||
device_info:
|
||||
:path: ".symlinks/plugins/device_info/ios"
|
||||
firebase_core:
|
||||
:path: ".symlinks/plugins/firebase_core/ios"
|
||||
firebase_core_web:
|
||||
:path: ".symlinks/plugins/firebase_core_web/ios"
|
||||
firebase_messaging:
|
||||
:path: ".symlinks/plugins/firebase_messaging/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_email_sender:
|
||||
:path: ".symlinks/plugins/flutter_email_sender/ios"
|
||||
flutter_flexible_toast:
|
||||
:path: ".symlinks/plugins/flutter_flexible_toast/ios"
|
||||
flutter_inappwebview:
|
||||
:path: ".symlinks/plugins/flutter_inappwebview/ios"
|
||||
flutter_local_notifications:
|
||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||
flutter_plugin_android_lifecycle:
|
||||
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
|
||||
flutter_tts:
|
||||
:path: ".symlinks/plugins/flutter_tts/ios"
|
||||
geolocator:
|
||||
:path: ".symlinks/plugins/geolocator/ios"
|
||||
google_maps_flutter:
|
||||
:path: ".symlinks/plugins/google_maps_flutter/ios"
|
||||
hexcolor:
|
||||
:path: ".symlinks/plugins/hexcolor/ios"
|
||||
image_cropper:
|
||||
:path: ".symlinks/plugins/image_cropper/ios"
|
||||
image_picker:
|
||||
:path: ".symlinks/plugins/image_picker/ios"
|
||||
just_audio:
|
||||
:path: ".symlinks/plugins/just_audio/ios"
|
||||
local_auth:
|
||||
:path: ".symlinks/plugins/local_auth/ios"
|
||||
location:
|
||||
:path: ".symlinks/plugins/location/ios"
|
||||
manage_calendar_events:
|
||||
:path: ".symlinks/plugins/manage_calendar_events/ios"
|
||||
map_launcher:
|
||||
:path: ".symlinks/plugins/map_launcher/ios"
|
||||
maps_launcher:
|
||||
:path: ".symlinks/plugins/maps_launcher/ios"
|
||||
native_device_orientation:
|
||||
:path: ".symlinks/plugins/native_device_orientation/ios"
|
||||
native_progress_hud:
|
||||
:path: ".symlinks/plugins/native_progress_hud/ios"
|
||||
path_provider:
|
||||
:path: ".symlinks/plugins/path_provider/ios"
|
||||
path_provider_linux:
|
||||
:path: ".symlinks/plugins/path_provider_linux/ios"
|
||||
path_provider_macos:
|
||||
:path: ".symlinks/plugins/path_provider_macos/ios"
|
||||
path_provider_windows:
|
||||
:path: ".symlinks/plugins/path_provider_windows/ios"
|
||||
permission_handler:
|
||||
:path: ".symlinks/plugins/permission_handler/ios"
|
||||
screen:
|
||||
:path: ".symlinks/plugins/screen/ios"
|
||||
shared_preferences:
|
||||
:path: ".symlinks/plugins/shared_preferences/ios"
|
||||
shared_preferences_linux:
|
||||
:path: ".symlinks/plugins/shared_preferences_linux/ios"
|
||||
shared_preferences_macos:
|
||||
:path: ".symlinks/plugins/shared_preferences_macos/ios"
|
||||
shared_preferences_web:
|
||||
:path: ".symlinks/plugins/shared_preferences_web/ios"
|
||||
shared_preferences_windows:
|
||||
:path: ".symlinks/plugins/shared_preferences_windows/ios"
|
||||
speech_to_text:
|
||||
:path: ".symlinks/plugins/speech_to_text/ios"
|
||||
twilio_programmable_video:
|
||||
:path: ".symlinks/plugins/twilio_programmable_video/ios"
|
||||
url_launcher:
|
||||
:path: ".symlinks/plugins/url_launcher/ios"
|
||||
url_launcher_linux:
|
||||
:path: ".symlinks/plugins/url_launcher_linux/ios"
|
||||
url_launcher_macos:
|
||||
:path: ".symlinks/plugins/url_launcher_macos/ios"
|
||||
url_launcher_web:
|
||||
:path: ".symlinks/plugins/url_launcher_web/ios"
|
||||
url_launcher_windows:
|
||||
:path: ".symlinks/plugins/url_launcher_windows/ios"
|
||||
vibration:
|
||||
:path: ".symlinks/plugins/vibration/ios"
|
||||
vibration_web:
|
||||
:path: ".symlinks/plugins/vibration_web/ios"
|
||||
video_player:
|
||||
:path: ".symlinks/plugins/video_player/ios"
|
||||
video_player_web:
|
||||
:path: ".symlinks/plugins/video_player_web/ios"
|
||||
wakelock:
|
||||
:path: ".symlinks/plugins/wakelock/ios"
|
||||
webview_flutter:
|
||||
:path: ".symlinks/plugins/webview_flutter/ios"
|
||||
wifi:
|
||||
:path: ".symlinks/plugins/wifi/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
android_intent: 367df2f1277a74e4a90e14a8ab3df3112d087052
|
||||
barcode_scan_fix: 80dd65de55f27eec6591dd077c8b85f2b79e31f1
|
||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
|
||||
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
|
||||
device_calendar: 23b28a5f1ab3bf77e34542fb1167e1b8b29a98f5
|
||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
||||
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
|
||||
firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
|
||||
firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
|
||||
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
|
||||
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
|
||||
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
|
||||
FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
|
||||
FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1
|
||||
FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a
|
||||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
|
||||
flutter_email_sender: f787522d0e82f50e5766c1213dbffff22fdcf009
|
||||
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
|
||||
flutter_inappwebview: 69dfbac46157b336ffbec19ca6dfd4638c7bf189
|
||||
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
|
||||
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
|
||||
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
|
||||
geolocator: 057a0c63a43e9c5296d8ad845a3ac8e6df23d899
|
||||
google_maps_flutter: c7f9c73576de1fbe152a227bfd6e6c4ae8088619
|
||||
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
|
||||
GoogleMaps: 4b5346bddfe6911bb89155d43c903020170523ac
|
||||
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
|
||||
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
|
||||
image_cropper: c8f9b4157933c7bb965a66d1c5e6c8fd408c6eb4
|
||||
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
|
||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
|
||||
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
|
||||
manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
|
||||
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
|
||||
maps_launcher: eae38ee13a9c3f210fa04e04bb4c073fa4c6ed92
|
||||
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
|
||||
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
|
||||
native_device_orientation: e24d00be281de72996640885d80e706142707660
|
||||
native_progress_hud: f95f5529742b36a3c7fdecfa88dc018319e39bf9
|
||||
NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667
|
||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
||||
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
|
||||
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
|
||||
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
|
||||
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
|
||||
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
|
||||
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
|
||||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
||||
screen: abd91ca7bf3426e1cc3646d27e9b2358d6bf07b0
|
||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
|
||||
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
|
||||
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
|
||||
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
|
||||
shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae
|
||||
speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe
|
||||
TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe
|
||||
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
|
||||
twilio_programmable_video: 6a41593640f3d86af60b22541fd457b22deaae7f
|
||||
TwilioVideo: c13a51ceca375e91620eb7578d2573c90cf53b46
|
||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
|
||||
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
|
||||
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
|
||||
url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5
|
||||
vibration: b5a33e764c3f609a975b9dca73dce20fdde627dc
|
||||
vibration_web: 0ba303d92469ba34d71c612a228b315908d7fcd9
|
||||
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
|
||||
video_player_web: da8cadb8274ed4f8dbee8d7171b420dedd437ce7
|
||||
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4
|
||||
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
|
||||
wifi: d7d77c94109e36c4175d845f0a5964eadba71060
|
||||
|
||||
PODFILE CHECKSUM: d94bd40f28772938199c67fcced06ffe96096c14
|
||||
PODFILE CHECKSUM: 5a17be3f8af73a757fa4439c77cf6ab2db29a6e7
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
COCOAPODS: 1.10.0
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
class ClinicCategory {
|
||||
int clinicID;
|
||||
int categoryID;
|
||||
String categoryName;
|
||||
String categoryNameN;
|
||||
String icon;
|
||||
String bodyImageEN;
|
||||
String fullImageEN;
|
||||
String bodyImageAR;
|
||||
String fullmageAR;
|
||||
bool isActive;
|
||||
bool isCategoryGroup;
|
||||
Null sortOrderAR;
|
||||
Null sortOrderEN;
|
||||
String clinicName;
|
||||
|
||||
ClinicCategory(
|
||||
{this.clinicID,
|
||||
this.categoryID,
|
||||
this.categoryName,
|
||||
this.categoryNameN,
|
||||
this.icon,
|
||||
this.bodyImageEN,
|
||||
this.fullImageEN,
|
||||
this.bodyImageAR,
|
||||
this.fullmageAR,
|
||||
this.isActive,
|
||||
this.isCategoryGroup,
|
||||
this.sortOrderAR,
|
||||
this.sortOrderEN,
|
||||
this.clinicName});
|
||||
|
||||
ClinicCategory.fromJson(Map<String, dynamic> json) {
|
||||
clinicID = json['ClinicID'];
|
||||
categoryID = json['CategoryID'];
|
||||
categoryName = json['CategoryName'];
|
||||
categoryNameN = json['CategoryNameN'];
|
||||
icon = json['Icon'];
|
||||
bodyImageEN = json['BodyImageEN'];
|
||||
fullImageEN = json['FullImageEN'];
|
||||
bodyImageAR = json['BodyImageAR'];
|
||||
fullmageAR = json['FullmageAR'];
|
||||
isActive = json['IsActive'];
|
||||
isCategoryGroup = json['IsCategoryGroup'];
|
||||
sortOrderAR = json['SortOrderAR'];
|
||||
sortOrderEN = json['SortOrderEN'];
|
||||
clinicName = json['ClinicName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['CategoryID'] = this.categoryID;
|
||||
data['CategoryName'] = this.categoryName;
|
||||
data['CategoryNameN'] = this.categoryNameN;
|
||||
data['Icon'] = this.icon;
|
||||
data['BodyImageEN'] = this.bodyImageEN;
|
||||
data['FullImageEN'] = this.fullImageEN;
|
||||
data['BodyImageAR'] = this.bodyImageAR;
|
||||
data['FullmageAR'] = this.fullmageAR;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['IsCategoryGroup'] = this.isCategoryGroup;
|
||||
data['SortOrderAR'] = this.sortOrderAR;
|
||||
data['SortOrderEN'] = this.sortOrderEN;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
class DiseasesByClinic {
|
||||
int diseasesID;
|
||||
String diseasesEN;
|
||||
String diseasesAR;
|
||||
int diseasesCategoryID;
|
||||
Null diseasesCategoryEN;
|
||||
Null diseasesCategoryAR;
|
||||
String diseases;
|
||||
Null diseasesCategory;
|
||||
|
||||
DiseasesByClinic(
|
||||
{this.diseasesID,
|
||||
this.diseasesEN,
|
||||
this.diseasesAR,
|
||||
this.diseasesCategoryID,
|
||||
this.diseasesCategoryEN,
|
||||
this.diseasesCategoryAR,
|
||||
this.diseases,
|
||||
this.diseasesCategory});
|
||||
|
||||
DiseasesByClinic.fromJson(Map<String, dynamic> json) {
|
||||
diseasesID = json['DiseasesID'];
|
||||
diseasesEN = json['Diseases_EN'];
|
||||
diseasesAR = json['Diseases_AR'];
|
||||
diseasesCategoryID = json['Diseases_CategoryID'];
|
||||
diseasesCategoryEN = json['Diseases_CategoryEN'];
|
||||
diseasesCategoryAR = json['Diseases_CategoryAR'];
|
||||
diseases = json['Diseases'];
|
||||
diseasesCategory = json['Diseases_Category'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['DiseasesID'] = this.diseasesID;
|
||||
data['Diseases_EN'] = this.diseasesEN;
|
||||
data['Diseases_AR'] = this.diseasesAR;
|
||||
data['Diseases_CategoryID'] = this.diseasesCategoryID;
|
||||
data['Diseases_CategoryEN'] = this.diseasesCategoryEN;
|
||||
data['Diseases_CategoryAR'] = this.diseasesCategoryAR;
|
||||
data['Diseases'] = this.diseases;
|
||||
data['Diseases_Category'] = this.diseasesCategory;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
|
||||
class BariatricsService extends BaseService {
|
||||
List<ClinicCategory> clinicCategoryList = [];
|
||||
List<DiseasesByClinic> diseasesList = [];
|
||||
|
||||
Future getClinicCategory() async {
|
||||
hasError = false;
|
||||
Map<String, dynamic> body = Map();
|
||||
var languageID =
|
||||
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
|
||||
|
||||
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
|
||||
|
||||
await baseAppClient.post(GET_CLINIC_CATEGORY,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
clinicCategoryList.clear();
|
||||
if (response['ClinicCategoryList'] != null)
|
||||
response['ClinicCategoryList'].forEach((city) {
|
||||
clinicCategoryList.add(ClinicCategory.fromJson(city));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future getDiseaseByClinicId() async {
|
||||
hasError = false;
|
||||
Map<String, dynamic> body = Map();
|
||||
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
|
||||
|
||||
await baseAppClient.post(GET_DISEASE_BY_CLINIC_ID,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
diseasesList.clear();
|
||||
if (response['DiseasesByClinicList'] != null)
|
||||
response['DiseasesByClinicList'].forEach((city) {
|
||||
diseasesList.add(DiseasesByClinic.fromJson(city));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future searchDoctorsByTime(DiseasesByClinic disease) async {
|
||||
hasError = false;
|
||||
var languageID =
|
||||
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
|
||||
|
||||
Map<String, dynamic> body = Map();
|
||||
body['ClinicID'] = 108; // hint: it is static depend on IONIC project
|
||||
body['ContinueDentalPlan'] = false;
|
||||
body['DiseaseID'] = disease.diseasesID;
|
||||
body['IsGetNearAppointment'] = false;
|
||||
body['IsSearchAppointmnetByClinicID'] = true;
|
||||
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
|
||||
body['Latitude'] = 0;
|
||||
body['License'] = true;
|
||||
body['Longitude'] = 0;
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
|
||||
await baseAppClient.post(SEARCH_DOCTOR_BY_TIME,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
|
||||
class PrescriptionDeliveryService extends BaseService {
|
||||
Future insertDeliveryOrder(
|
||||
{int lineItemNo,
|
||||
double latitude,
|
||||
double longitude,
|
||||
int appointmentNo,
|
||||
int createdBy,
|
||||
int dischargeID}) async {
|
||||
hasError = false;
|
||||
Map<String, dynamic> body = Map();
|
||||
body['LineItemNo'] = lineItemNo;
|
||||
body['Latitude'] = latitude;
|
||||
body['Longitude'] = longitude;
|
||||
body['AppointmentNo'] = appointmentNo;
|
||||
body['CreatedBy'] = createdBy;
|
||||
body['DischargeID'] = dischargeID;
|
||||
await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
var asd="";
|
||||
},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
print(error);
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||||
|
||||
import '../../../../locator.dart';
|
||||
|
||||
class BariatricsViewModel extends BaseViewModel {
|
||||
BariatricsService _service = locator<BariatricsService>();
|
||||
|
||||
List<ClinicCategory> get clinicCategoryList => _service.clinicCategoryList;
|
||||
|
||||
List<DiseasesByClinic> get diseasesList => _service.diseasesList;
|
||||
|
||||
void getClinicCategory() async {
|
||||
setState(ViewState.Busy);
|
||||
await _service.getClinicCategory();
|
||||
if (_service.hasError) {
|
||||
error = _service.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
getDiseaseByClinicId();
|
||||
}
|
||||
}
|
||||
|
||||
void getDiseaseByClinicId() async {
|
||||
setState(ViewState.Busy);
|
||||
await _service.getDiseaseByClinicId();
|
||||
if (_service.hasError) {
|
||||
error = _service.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
Future searchDoctorsByTime(DiseasesByClinic disease) async {
|
||||
setState(ViewState.Busy);
|
||||
await _service.searchDoctorsByTime(disease);
|
||||
if (_service.hasError) {
|
||||
error = _service.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/PrescriptionDeliveryService.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||||
|
||||
import '../../../locator.dart';
|
||||
|
||||
class PrescriptionDeliveryViewModel extends BaseViewModel {
|
||||
CustomerAddressesService _customerAddressesService =
|
||||
locator<CustomerAddressesService>();
|
||||
PharmacyModuleService _pharmacyModuleService =
|
||||
locator<PharmacyModuleService>();
|
||||
PrescriptionDeliveryService _prescriptionDeliveryService =
|
||||
locator<PrescriptionDeliveryService>();
|
||||
|
||||
List<AddressInfo> get addressesList =>
|
||||
_customerAddressesService.addressesList;
|
||||
|
||||
Future getCustomerInfo() async {
|
||||
setState(ViewState.Busy);
|
||||
await _pharmacyModuleService.generatePharmacyToken().then((value) async {
|
||||
await _customerAddressesService.getCustomerInfo();
|
||||
});
|
||||
if (_customerAddressesService.hasError) {
|
||||
error = _customerAddressesService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
await getCustomerAddresses();
|
||||
}
|
||||
}
|
||||
|
||||
Future insertDeliveryOrder(
|
||||
{int lineItemNo,
|
||||
double latitude,
|
||||
double longitude,
|
||||
int appointmentNo,
|
||||
int createdBy,
|
||||
int dischargeID}) async {
|
||||
|
||||
setState(ViewState.BusyLocal);
|
||||
await _prescriptionDeliveryService.insertDeliveryOrder(
|
||||
lineItemNo: lineItemNo,
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
appointmentNo: appointmentNo,
|
||||
createdBy: createdBy,
|
||||
dischargeID: dischargeID
|
||||
);
|
||||
if (_prescriptionDeliveryService.hasError) {
|
||||
error = _prescriptionDeliveryService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
Future getCustomerAddresses() async {
|
||||
setState(ViewState.Busy);
|
||||
await _customerAddressesService.getCustomerAddresses();
|
||||
if (_customerAddressesService.hasError) {
|
||||
error = _customerAddressesService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,190 @@
|
||||
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
// TODO mosa_remark
|
||||
class BariatricsPage extends StatefulWidget {
|
||||
final age;
|
||||
final gender;
|
||||
final double obeseResult;
|
||||
|
||||
BariatricsPage(this.age, this.gender, this.obeseResult);
|
||||
|
||||
@override
|
||||
_BariatricsPageState createState() => _BariatricsPageState();
|
||||
}
|
||||
|
||||
class _BariatricsPageState extends State<BariatricsPage> {
|
||||
DiseasesByClinic _selectedDisease;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectProvider = Provider.of(context);
|
||||
|
||||
return BaseView<BariatricsViewModel>(
|
||||
onModelReady: (model) => model.getClinicCategory(),
|
||||
builder: (_, model, w) =>
|
||||
AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: "${TranslationBase
|
||||
.of(context)
|
||||
.bariatrics}",
|
||||
baseViewModel: model,
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(TranslationBase
|
||||
.of(context)
|
||||
.bariatricsHeaderMsg),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 16.0, vertical: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
...model.diseasesList
|
||||
.map((item) =>
|
||||
RadioListTile(
|
||||
title: Texts("${item.diseases}"),
|
||||
activeColor: Colors.blue.shade700,
|
||||
value: item.diseasesID,
|
||||
groupValue: _selectedDisease != null
|
||||
? _selectedDisease.diseasesID
|
||||
: -1,
|
||||
selected: _selectedDisease != null ? item
|
||||
.diseasesID ==
|
||||
_selectedDisease.diseasesID : false,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
_selectedDisease = item;
|
||||
});
|
||||
},
|
||||
))
|
||||
.toList()
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
_getImageName(widget.gender, widget.obeseResult,
|
||||
projectProvider.isArabic),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: BorderedButton(
|
||||
TranslationBase
|
||||
.of(context)
|
||||
.continues,
|
||||
fontSize: SizeConfig.textMultiplier * 2.1,
|
||||
textColor: Colors.white,
|
||||
vPadding: 8,
|
||||
hPadding: 8,
|
||||
backgroundColor: Theme
|
||||
.of(context)
|
||||
.primaryColor,
|
||||
radius: 8,
|
||||
fontWeight: FontWeight.bold,
|
||||
handler: () async {
|
||||
await model.searchDoctorsByTime(_selectedDisease);
|
||||
if(model.state == ViewState.ErrorLocal){
|
||||
AppToast.showErrorToast(message: model.error);
|
||||
}
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) => BariatricsPage()),
|
||||
// );
|
||||
},
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 16.0, left: 16, right: 16),
|
||||
child: BorderedButton(
|
||||
TranslationBase
|
||||
.of(context)
|
||||
.skip,
|
||||
fontSize: SizeConfig.textMultiplier * 2.1,
|
||||
textColor: Colors.blue,
|
||||
vPadding: 8,
|
||||
hPadding: 8,
|
||||
backgroundColor: Color(0x00000000),
|
||||
radius: 8,
|
||||
hasBorder: true,
|
||||
borderColor: Color(0x00000000),
|
||||
fontWeight: FontWeight.bold,
|
||||
handler: () async {
|
||||
await model.searchDoctorsByTime(_selectedDisease);
|
||||
if(model.state == ViewState.ErrorLocal){
|
||||
AppToast.showErrorToast(message: model.error);
|
||||
}
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(builder: (context) => BariatricsPage()),
|
||||
// );
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getImageName(int gender, double obeseResult, bool isArabic) {
|
||||
String path = "assets/images/BMI/";
|
||||
double result = obeseResult;
|
||||
|
||||
if (result < 18.5 && gender == 1) {
|
||||
path += "bmi_blue_male";
|
||||
} else if (result >= 18.5 && result <= 24.9 && gender == 1) {
|
||||
path += "bmi_green_male";
|
||||
} else if (result >= 25 && result <= 29.9 && gender == 1) {
|
||||
path += "bmi_yellow_male";
|
||||
} else if (result >= 30 && result <= 34.9 && gender == 1) {
|
||||
path += "bmi_orange_male";
|
||||
} else if (result >= 35 && gender == 1) {
|
||||
path += "bmi_red_male";
|
||||
} else if (result < 18.5 && gender == 2) {
|
||||
path += "bmi_blue_female";
|
||||
} else if (result >= 18.5 && result <= 24.9 && gender == 2) {
|
||||
path += "bmi_green_female";
|
||||
} else if (result >= 25 && result <= 29.9 && gender == 2) {
|
||||
path += "bmi_yellow_female";
|
||||
} else if (result >= 30 && result <= 34.9 && gender == 2) {
|
||||
path += "bmi_orange_female";
|
||||
} else if (result >= 35 && gender == 2) {
|
||||
path += "bmi_red_female";
|
||||
} else {
|
||||
path += "default.png";
|
||||
}
|
||||
|
||||
if (isArabic) {
|
||||
path += "_ar.png";
|
||||
} else {
|
||||
path += "_en.png";
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,331 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
||||
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
|
||||
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class CovidPaymentSummary extends StatefulWidget {
|
||||
PatientShareResponse patientShareResponse;
|
||||
|
||||
final String selectedPaymentMethod;
|
||||
MyInAppBrowser browser;
|
||||
AuthenticatedUser authenticatedUser;
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
String transID = "";
|
||||
|
||||
CovidPaymentSummary(
|
||||
{@required this.patientShareResponse, this.selectedPaymentMethod});
|
||||
|
||||
@override
|
||||
_CovidPaymentSummaryState createState() => _CovidPaymentSummaryState();
|
||||
}
|
||||
|
||||
class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).covidTest,
|
||||
isShowAppBar: true,
|
||||
body: SingleChildScrollView(
|
||||
physics: ScrollPhysics(),
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Texts(
|
||||
TranslationBase.of(context).confirmThePayment,
|
||||
textAlign: TextAlign.center,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 24,
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
height: 100.0,
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child:
|
||||
Image.asset(getImagePath(widget.selectedPaymentMethod)),
|
||||
),
|
||||
Texts(
|
||||
'${widget.patientShareResponse.patientShareWithTax} ' + TranslationBase.of(context).sar,
|
||||
fontSize: 26,
|
||||
bold: true,
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(3),
|
||||
child: NewTextFields(
|
||||
hintText: TranslationBase.of(context).fileNumber,
|
||||
initialValue:
|
||||
projectViewModel.user.patientID.toString(),
|
||||
isEnabled: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(3),
|
||||
child: NewTextFields(
|
||||
hintText: TranslationBase.of(context).name,
|
||||
initialValue: projectViewModel.user.firstName,
|
||||
isEnabled: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
NewTextFields(
|
||||
hintText: TranslationBase.of(context).mobileNumber,
|
||||
initialValue: projectViewModel.user.mobileNumber,
|
||||
isEnabled: false,
|
||||
),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
NewTextFields(
|
||||
hintText: TranslationBase.of(context).depositorName,
|
||||
initialValue: projectViewModel.user.firstName +
|
||||
" " +
|
||||
projectViewModel.user.middleName +
|
||||
" " +
|
||||
projectViewModel.user.lastName,
|
||||
isEnabled: false,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.1,
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(12),
|
||||
child: SecondaryButton(
|
||||
textColor: Colors.white,
|
||||
color: Theme.of(context).primaryColor,
|
||||
label: TranslationBase.of(context).confirm.toUpperCase(),
|
||||
onTap: () {
|
||||
startPaymentProcess(projectViewModel.user);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
startPaymentProcess(AuthenticatedUser authenticatedUser) {
|
||||
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
|
||||
appo.projectID = widget.patientShareResponse.projectID;
|
||||
appo.clinicID = widget.patientShareResponse.clinicID;
|
||||
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
|
||||
|
||||
openPayment(
|
||||
widget.selectedPaymentMethod,
|
||||
authenticatedUser,
|
||||
double.parse(
|
||||
widget.patientShareResponse.patientShareWithTax.toString()),
|
||||
widget.patientShareResponse,
|
||||
appo);
|
||||
}
|
||||
|
||||
openPayment(
|
||||
String paymentMethod,
|
||||
AuthenticatedUser authenticatedUser,
|
||||
double amount,
|
||||
PatientShareResponse patientShareResponse,
|
||||
AppoitmentAllHistoryResultList appo) async {
|
||||
if (paymentMethod == "ApplePay") {
|
||||
// await widget.chromeBrowser.open(
|
||||
// url: "https://applepay-datatrans-sample.herokuapp.com/",
|
||||
// options: ChromeSafariBrowserClassOptions(
|
||||
// android: AndroidChromeCustomTabsOptions(
|
||||
// addDefaultShareMenuItem: false),
|
||||
// ios: IOSSafariOptions(barCollapsingEnabled: true)));
|
||||
} else {
|
||||
widget.browser = new MyInAppBrowser(
|
||||
onExitCallback: onBrowserExit,
|
||||
appo: appo,
|
||||
onLoadStartCallback: onBrowserLoadStart);
|
||||
|
||||
widget.browser.openPaymentBrowser(
|
||||
amount,
|
||||
"Appointment check in",
|
||||
Utils.getAppointmentTransID(
|
||||
appo.projectID, appo.clinicID, appo.appointmentNo),
|
||||
appo.projectID.toString(),
|
||||
authenticatedUser.emailAddress,
|
||||
paymentMethod,
|
||||
authenticatedUser.patientType,
|
||||
authenticatedUser.firstName,
|
||||
authenticatedUser.patientID,
|
||||
authenticatedUser,
|
||||
widget.browser,
|
||||
widget.patientShareResponse.isLiveCareAppointment,
|
||||
widget.patientShareResponse.appointmentDate,
|
||||
widget.patientShareResponse.appointmentNo,
|
||||
widget.patientShareResponse.clinicID,
|
||||
widget.patientShareResponse.doctorID);
|
||||
}
|
||||
}
|
||||
|
||||
onBrowserLoadStart(String url) {
|
||||
print("onBrowserLoadStart");
|
||||
print(url);
|
||||
|
||||
MyInAppBrowser.successURLS.forEach((element) {
|
||||
if (url.contains(element)) {
|
||||
if (widget.browser.isOpened()) widget.browser.close();
|
||||
MyInAppBrowser.isPaymentDone = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
MyInAppBrowser.errorURLS.forEach((element) {
|
||||
if (url.contains(element)) {
|
||||
if (widget.browser.isOpened()) widget.browser.close();
|
||||
MyInAppBrowser.isPaymentDone = false;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
|
||||
print("onBrowserExit Called!!!!");
|
||||
if (isPaymentMade) checkPaymentStatus(appo);
|
||||
}
|
||||
|
||||
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
|
||||
GifLoaderDialogUtils.showMyDialog(context);
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.checkPaymentStatus(
|
||||
Utils.getAppointmentTransID(
|
||||
appo.projectID, appo.clinicID, appo.appointmentNo),
|
||||
context)
|
||||
.then((res) {
|
||||
print("Printing Payment Status Reponse!!!!");
|
||||
print(res);
|
||||
String paymentInfo = res['Response_Message'];
|
||||
if (paymentInfo == 'Success') {
|
||||
createAdvancePayment(res, appo);
|
||||
} else {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
AppToast.showErrorToast(message: res['Response_Message']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
AppToast.showErrorToast(message: err);
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
String paymentReference = res['Fort_id'].toString();
|
||||
service
|
||||
.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'],
|
||||
res['Fort_id'], res['PaymentMethod'], context)
|
||||
.then((res) {
|
||||
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
|
||||
addAdvancedNumberRequest(
|
||||
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
|
||||
paymentReference,
|
||||
appo.appointmentNo.toString());
|
||||
}).catchError((err) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
AppToast.showErrorToast(message: err);
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
addAdvancedNumberRequest(
|
||||
String advanceNumber, String paymentReference, String appointmentID) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.addAdvancedNumberRequest(
|
||||
advanceNumber, paymentReference, appointmentID, context)
|
||||
.then((res) {
|
||||
print(res);
|
||||
getAppoQR(context);
|
||||
}).catchError((err) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
AppToast.showErrorToast(message: err);
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
getAppoQR(context) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.generateAppointmentQR(widget.patientShareResponse, context)
|
||||
.then((res) {
|
||||
print(res);
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
navigateToQR(context, res['AppointmentQR']);
|
||||
}).catchError((err) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
AppToast.showErrorToast(message: err);
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
Future navigateToQR(context, String appoQR) async {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => QRCode(
|
||||
patientShareResponse: widget.patientShareResponse,
|
||||
appoQR: appoQR,
|
||||
)));
|
||||
}
|
||||
|
||||
String getImagePath(String paymentMethod) {
|
||||
switch (paymentMethod) {
|
||||
case "MADA":
|
||||
return 'assets/images/new-design/mada.png';
|
||||
break;
|
||||
case "SADAD":
|
||||
return 'assets/images/new-design/sadad.png';
|
||||
break;
|
||||
case "VISA":
|
||||
return 'assets/images/new-design/visa.png';
|
||||
break;
|
||||
case "MASTERCARD":
|
||||
return 'assets/images/new-design/mastercard.png';
|
||||
break;
|
||||
case "Installment":
|
||||
return 'assets/images/new-design/installment.png';
|
||||
break;
|
||||
}
|
||||
|
||||
return 'assets/images/new-design/mada.png';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,257 @@
|
||||
import 'dart:async';
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
|
||||
|
||||
import 'PrescriptionOrderOverveiw.dart';
|
||||
|
||||
class PrescriptionDeliveryAddressPage extends StatefulWidget {
|
||||
final Prescriptions prescriptions;
|
||||
final List<PrescriptionReport> prescriptionReportList;
|
||||
final List<PrescriptionReportEnh> prescriptionReportEnhList;
|
||||
const PrescriptionDeliveryAddressPage({Key key, this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_PrescriptionDeliveryAddressPageState createState() =>
|
||||
_PrescriptionDeliveryAddressPageState();
|
||||
}
|
||||
|
||||
class _PrescriptionDeliveryAddressPageState
|
||||
extends State<PrescriptionDeliveryAddressPage> {
|
||||
AddressInfo _selectedAddress;
|
||||
Completer<GoogleMapController> _controller = Completer();
|
||||
|
||||
CameraPosition _kGooglePlex = CameraPosition(
|
||||
target: LatLng(24.665011045779107, 46.73502189439707),
|
||||
zoom: 14.4746,
|
||||
);
|
||||
Set<Marker> markers = new Set();
|
||||
double latitude = 0;
|
||||
double longitude = 0;
|
||||
|
||||
@override
|
||||
void initState(){
|
||||
super.initState();
|
||||
_getCurrentLocation();
|
||||
}
|
||||
_getCurrentLocation() async {
|
||||
await Geolocator.getLastKnownPosition().then((value) {
|
||||
latitude = value.latitude;
|
||||
latitude = value.longitude;
|
||||
_kGooglePlex = CameraPosition(
|
||||
target: LatLng(latitude, longitude),
|
||||
zoom: 14.4746,
|
||||
);
|
||||
}).catchError((e) {
|
||||
latitude = 24.665011045779107;
|
||||
latitude = 46.73502189439707;
|
||||
});
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return BaseView<PrescriptionDeliveryViewModel>(
|
||||
onModelReady: (model) => model.getCustomerInfo(),
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).shippingAddresss,
|
||||
baseViewModel: model,
|
||||
body: Container(
|
||||
height: MediaQuery.of(context).size.height* 0.65,
|
||||
child: SingleChildScrollView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
confirmSelectLocationDialog(model.addressesList);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
color: Colors.white,
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Text(
|
||||
getAddressName(),
|
||||
),
|
||||
margin: EdgeInsets.only(left: 10, right: 10),
|
||||
),
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 22,
|
||||
color: Colors.grey,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
_selectedAddress == null
|
||||
? Container(
|
||||
child: Image.asset(
|
||||
projectViewModel.isArabic
|
||||
? 'assets/images/pharmacy/shipping_image_ar.png'
|
||||
: 'assets/images/pharmacy/shipping_image.png',
|
||||
height: 300,
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Colors.grey)
|
||||
),
|
||||
height: 200,
|
||||
child: GoogleMap(
|
||||
mapType: MapType.normal,
|
||||
markers: markers,
|
||||
initialCameraPosition: _kGooglePlex,
|
||||
onMapCreated: (GoogleMapController controller) {
|
||||
_controller.complete(controller);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Texts(TranslationBase.of(context).shippingAddresss),
|
||||
SizedBox(height: 10,),
|
||||
Texts('${model.user.firstName} ${model.user.lastName}'),
|
||||
SizedBox(height: 10,),
|
||||
Texts(_selectedAddress.address1),
|
||||
SizedBox(height: 10,),
|
||||
Texts(_selectedAddress.address2),
|
||||
SizedBox(height: 10,),
|
||||
Texts(_selectedAddress.city+" "+_selectedAddress.country),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height * 0.25,
|
||||
color: Colors.grey[100],
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Divider(),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Button(
|
||||
label: TranslationBase.of(context).addNewAddress.toUpperCase(),
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) => LocationPage(latitude: latitude, longitude: longitude,),),
|
||||
);
|
||||
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: Button(
|
||||
label: TranslationBase.of(context).continues.toUpperCase(),
|
||||
disabled: _selectedAddress==null,
|
||||
backgroundColor: _selectedAddress==null?Colors.green[300]: Colors.green[700],
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) =>
|
||||
PrescriptionOrderOverview(latitude: latitude,
|
||||
longitude: longitude,
|
||||
prescriptionReportEnhList: widget.prescriptionReportEnhList,
|
||||
prescriptionReportList:widget.prescriptionReportList,
|
||||
prescriptions: widget.prescriptions,
|
||||
selectedAddress: _selectedAddress,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
))
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void confirmSelectLocationDialog(List<AddressInfo> addresses,) {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: SelectLocationDialog(
|
||||
addresses: addresses,
|
||||
selectedAddress: _selectedAddress,
|
||||
onValueSelected: (value) {
|
||||
setState(() {
|
||||
_selectedAddress = value;
|
||||
List latLongArr = value.latLong.split(',');
|
||||
|
||||
latitude = double.parse(latLongArr[0]);
|
||||
longitude = double.parse(latLongArr[1]);
|
||||
markers = Set();
|
||||
markers.add(
|
||||
Marker(
|
||||
markerId: MarkerId(
|
||||
_selectedAddress.latLong.hashCode.toString(),
|
||||
),
|
||||
position: LatLng(latitude, longitude),
|
||||
),
|
||||
);
|
||||
_kGooglePlex = CameraPosition(
|
||||
target: LatLng(latitude, longitude),
|
||||
zoom: 14.4746,
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
String getAddressName() {
|
||||
if (_selectedAddress != null)
|
||||
return _selectedAddress.address1;
|
||||
else
|
||||
return TranslationBase.of(context).selectAddress;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,203 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PrescriptionOrderOverview extends StatelessWidget {
|
||||
final Prescriptions prescriptions;
|
||||
final List<PrescriptionReport> prescriptionReportList;
|
||||
final List<PrescriptionReportEnh> prescriptionReportEnhList;
|
||||
final AddressInfo selectedAddress;
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
PrescriptionOrderOverview(
|
||||
{Key key,
|
||||
this.prescriptions,
|
||||
this.prescriptionReportList,
|
||||
this.prescriptionReportEnhList, this.selectedAddress, this.latitude, this.longitude});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<PrescriptionDeliveryViewModel>(
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).orderOverview,
|
||||
baseViewModel: model,
|
||||
body: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.8,
|
||||
child: Column(
|
||||
children: [
|
||||
if (!prescriptions.isInOutPatient)
|
||||
...List.generate(
|
||||
prescriptionReportList.length,
|
||||
(index) => Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
|
||||
padding: EdgeInsets.all(8.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
),
|
||||
border:
|
||||
Border.all(color: Colors.grey[200], width: 0.5),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(5)),
|
||||
child: Image.network(
|
||||
prescriptionReportList[index].imageSRCUrl,
|
||||
fit: BoxFit.cover,
|
||||
width: 60,
|
||||
height: 70,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(prescriptionReportList[index]
|
||||
.itemDescription
|
||||
.isNotEmpty
|
||||
? prescriptionReportList[index]
|
||||
.itemDescription
|
||||
: prescriptionReportList[index]
|
||||
.itemDescriptionN)),
|
||||
)),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 18,
|
||||
color: Colors.grey[500],
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
else
|
||||
...List.generate(
|
||||
prescriptionReportEnhList.length,
|
||||
(index) => Container(
|
||||
margin: EdgeInsets.all(8.0),
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
child: Image.network(
|
||||
prescriptionReportEnhList[index].imageSRCUrl,
|
||||
fit: BoxFit.cover,
|
||||
width: 60,
|
||||
height: 70,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Texts(prescriptionReportEnhList[index]
|
||||
.itemDescription),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 18,
|
||||
color: Colors.grey[500],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height * 0.15,
|
||||
color: Colors.grey[100],
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
SizedBox(height: 12,),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
child: SecondaryButton(
|
||||
label: TranslationBase.of(context).submit.toUpperCase(),
|
||||
color: Colors.green[800],
|
||||
onTap: () async {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: ConfirmWithMessageDialog(
|
||||
message: TranslationBase.of(context).confirmPrescription,
|
||||
okTitle: TranslationBase.of(context).ok,
|
||||
onTap: () async {
|
||||
GifLoaderDialogUtils.showMyDialog(context);
|
||||
await model.insertDeliveryOrder(lineItemNo: 0,
|
||||
longitude: longitude,
|
||||
latitude: latitude,appointmentNo: prescriptions.appointmentNo,
|
||||
dischargeID: prescriptions.dischargeNo,createdBy: model.user.patientID)
|
||||
.then((value) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
if (model.state == ViewState.ErrorLocal)
|
||||
showErrorDialog(context,model.error);
|
||||
else
|
||||
{
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
}
|
||||
|
||||
}).catchError((e) {
|
||||
GifLoaderDialogUtils.hideDialog(context);
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
},
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void showErrorDialog(BuildContext context,String error) {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: ConfirmWithMessageDialog(
|
||||
message: TranslationBase.of(context).youAlreadyHaveOrder,
|
||||
okTitle: TranslationBase.of(context).orderOverview,
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||