Merge branch 'development' into Haroon

# Conflicts:
#	lib/config/localized_values.dart
merge-update-with-lab-changes
haroon amjad 5 years ago
commit b6c617888b

@ -1,461 +1,25 @@
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: 5a17be3f8af73a757fa4439c77cf6ab2db29a6e7
PODFILE CHECKSUM: d94bd40f28772938199c67fcced06ffe96096c14
COCOAPODS: 1.10.0
COCOAPODS: 1.10.1

@ -219,8 +219,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
125A739F71A29FBAE7B4D5AC /* [CP] Embed Pods Frameworks */,
CBB18A5CEEEB971DCFC36E00 /* [CP] Copy Pods Resources */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -284,23 +283,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
125A739F71A29FBAE7B4D5AC /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
299B8FE131E5BAE7FA7E2FC9 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -351,21 +333,21 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
CBB18A5CEEEB971DCFC36E00 /* [CP] Copy Pods Resources */ = {
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@ -496,7 +478,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.smartphone;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@ -635,7 +617,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.smartphone;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -668,7 +650,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_BUNDLE_IDENTIFIER = com.hmg.smartphone;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;

@ -308,8 +308,11 @@ const INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
const GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
// H2O
const H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New";
const H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New";
const H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress";
const H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity";
const H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity";
//E_Referral Services
const GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes";
@ -323,16 +326,17 @@ const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals";
// const GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/";
// pharmacy
const PHARMACY_VERIFY_CUSTOMER = "epharmacy/api/VerifyCustomer";
const PHARMACY_GET_COUNTRY = "epharmacy/api/countries";
const PHARMACY_AUTORZIE_CUSTOMER = "epharmacy/api/AutorizeCustomer";
const PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer";
const PHARMACY_GET_COUNTRY = "countries";
const PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer";
const GET_PHARMACY_BANNER = "epharmacy/api/promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "epharmacy/api/topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "epharmacy/api/bestsellerproducts";
const GET_PHARMACY_PRODUCTs_BY_IDS = "epharmacy/api/productsbyids/";
const GET_PHARMACY_PRODUCTs_BY_SKU = "epharmacy/api/productbysku/";
const GET_CUSTOMERS_ADDRESSES = "epharmacy/api/Customers/";
const SUBSCRIBE_PRODUCT = "epharmacy/api/subscribe?";
const GET_PHARMACY_BANNER = "promotionbanners";
const GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer";
const GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts";
const GET_PHARMACY_PRODUCTs_BY_IDS = "productsbyids/";
const GET_PHARMACY_PRODUCTs_BY_SKU = "productbysku/";
const GET_CUSTOMERS_ADDRESSES = "Customers/";
const SUBSCRIBE_PRODUCT = "subscribe?";
const GET_ORDER = "orders?";
const GET_ORDER_DETAILS = "orders/";
const ADD_CUSTOMER_ADDRESS = "epharmacy/api/addcustomeraddress";
@ -341,10 +345,10 @@ const DELETE_CUSTOMER_ADDRESS = "epharmacy/api/deletecustomeraddress";
const GET_ADDRESS = "Customers/";
const GET_Cancel_ORDER = "cancelorder/";
const WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8";
const GET_SHOPPING_CART = "epharmacy/api/shopping_cart_items/";
const GET_SHIPPING_OPTIONS = "epharmacy/api/get_shipping_option/";
const GET_SHOPPING_CART = "shopping_cart_items/";
const GET_SHIPPING_OPTIONS = "get_shipping_option/";
const DELETE_SHOPPING_CART = "epharmacy/api/delete_shopping_cart_items/";
const DELETE_SHOPPING_CART_ALL = "epharmacy/api/delete_shopping_cart_item_by_customer/";
const DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/";
const ORDER_SHOPPING_CART = "epharmacy/api/orders";
const GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation";
const GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping";
@ -388,26 +392,26 @@ const GET_CUSTOMER_INFO = "https://mdlaboratories.com/exacartapi/api/VerifyCusto
//Pharmacy
const GET_PHARMACY_CATEGORISE = 'epharmacy/api/categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
const GET_OFFERS_CATEGORISE = 'epharmacy/api/discountcategories';
const GET_OFFERS_PRODUCTS = 'epharmacy/api/offerproducts/';
const GET_CATEGORISE_PARENT = 'epharmacy/api/categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';
const GET_PARENT_PRODUCTS = 'epharmacy/api/products?categoryid=';
const GET_SUB_CATEGORISE = 'epharmacy/api/categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';
const GET_SUB_PRODUCTS = 'epharmacy/api/products?categoryid=';
const GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0';
const GET_OFFERS_CATEGORISE = 'discountcategories';
const GET_OFFERS_PRODUCTS = 'offerproducts/';
const GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';
const GET_PARENT_PRODUCTS = 'products?categoryid=';
const GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=';
const GET_SUB_PRODUCTS = 'products?categoryid=';
const GET_FINAL_PRODUCTS =
'epharmacy/api/products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
'products?fields=id,reviews,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&CategoryId=';
const TIMER_MIN = 10;
const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw";
const GET_BRANDS_LIST = 'epharmacy/api/categoryManufacturer?categoryids=';
const GET_BRANDS_LIST = 'categoryManufacturer?categoryids=';
const GET_SEARCH_PRODUCTS =
'epharmacy/api/searchproducts?fields=id,discount_ids,reviews,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&search_key=';
'searchproducts?fields=id,discount_ids,reviews,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage&search_key=';
const SCAN_QR_CODE = 'epharmacy/api/productbysku/';
const SCAN_QR_CODE = 'productbysku/';
class AppGlobal {
static var context;

File diff suppressed because it is too large Load Diff

@ -26,3 +26,4 @@ const WEATHER = 'weather';
const BLOOD_TYPE = 'blood-type';
const NOTIFICATION_COUNT = 'notification-count';
const PHARMACY_SELECTED_ADDRESS = 'selected-address';
const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';

@ -0,0 +1,104 @@
class UserDetailModel {
int userID;
int patientID;
int patientType;
bool patientOutSA;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
String identificationNo;
String mobile;
String emailID;
String zipCode;
String dOB;
String gender;
int activityID;
String createdDate;
double height;
double weight;
bool isHeightInCM;
bool isWeightInKG;
bool isNotificationON;
UserDetailModel(
{this.userID,
this.patientID,
this.patientType,
this.patientOutSA,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.identificationNo,
this.mobile,
this.emailID,
this.zipCode,
this.dOB,
this.gender,
this.activityID,
this.createdDate,
this.height,
this.weight,
this.isHeightInCM,
this.isWeightInKG,
this.isNotificationON});
UserDetailModel.fromJson(Map<String, dynamic> json) {
userID = json['UserID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
patientOutSA = json['PatientOutSA'];
firstName = json['FirstName'];
middleName = json['MiddleName'];
lastName = json['LastName'];
firstNameN = json['FirstNameN'];
middleNameN = json['MiddleNameN'];
lastNameN = json['LastNameN'];
identificationNo = json['IdentificationNo'];
mobile = json['Mobile'];
emailID = json['EmailID'];
zipCode = json['ZipCode'];
dOB = json['DOB'];
gender = json['Gender'];
activityID = json['ActivityID'];
createdDate = json['CreatedDate'];
height = json['Height'];
weight = json['Weight'];
isHeightInCM = json['IsHeightInCM'];
isWeightInKG = json['IsWeightInKG'];
isNotificationON = json['IsNotificationON'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['UserID'] = this.userID;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['PatientOutSA'] = this.patientOutSA;
data['FirstName'] = this.firstName;
data['MiddleName'] = this.middleName;
data['LastName'] = this.lastName;
data['FirstNameN'] = this.firstNameN;
data['MiddleNameN'] = this.middleNameN;
data['LastNameN'] = this.lastNameN;
data['IdentificationNo'] = this.identificationNo;
data['Mobile'] = this.mobile;
data['EmailID'] = this.emailID;
data['ZipCode'] = this.zipCode;
data['DOB'] = this.dOB;
data['Gender'] = this.gender;
data['ActivityID'] = this.activityID;
data['CreatedDate'] = this.createdDate;
data['Height'] = this.height;
data['Weight'] = this.weight;
data['IsHeightInCM'] = this.isHeightInCM;
data['IsWeightInKG'] = this.isWeightInKG;
data['IsNotificationON'] = this.isNotificationON;
return data;
}
}

@ -0,0 +1,124 @@
class UserDetailRequestModel {
String activityID;
int channel;
int deviceTypeID;
String dOB;
String email;
String firstName;
String gender;
String generalid;
double height;
String identificationNo;
String iPAdress;
bool isDentalAllowedBackend;
bool isHeightInCM;
bool isNotificationOn;
bool isWeightInKG;
int languageID;
String lastName;
String middleName;
String mobileNumber;
int patientID;
int patientOutSA;
int patientType;
int patientTypeID;
String sessionID;
String tokenID;
double versionID;
double weight;
String zipCode;
UserDetailRequestModel(
{this.activityID,
this.channel,
this.deviceTypeID,
this.dOB,
this.email,
this.firstName,
this.gender,
this.generalid,
this.height,
this.identificationNo,
this.iPAdress,
this.isDentalAllowedBackend,
this.isHeightInCM,
this.isNotificationOn,
this.isWeightInKG,
this.languageID,
this.lastName,
this.middleName,
this.mobileNumber,
this.patientID,
this.patientOutSA,
this.patientType,
this.patientTypeID,
this.sessionID,
this.tokenID,
this.versionID,
this.weight,
this.zipCode});
UserDetailRequestModel.fromJson(Map<String, dynamic> json) {
activityID = json['ActivityID'];
channel = json['Channel'];
deviceTypeID = json['DeviceTypeID'];
dOB = json['DOB'];
email = json['Email'];
firstName = json['FirstName'];
gender = json['Gender'];
generalid = json['generalid'];
height = json['Height'];
identificationNo = json['IdentificationNo'];
iPAdress = json['IPAdress'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
isHeightInCM = json['IsHeightInCM'];
isNotificationOn = json['isNotificationOn'];
isWeightInKG = json['IsWeightInKG'];
languageID = json['LanguageID'];
lastName = json['LastName'];
middleName = json['MiddleName'];
mobileNumber = json['MobileNumber'];
patientID = json['PatientID'];
patientOutSA = json['PatientOutSA'];
patientType = json['PatientType'];
patientTypeID = json['PatientTypeID'];
sessionID = json['SessionID'];
tokenID = json['TokenID'];
versionID = json['VersionID'];
weight = json['Weight'];
zipCode = json['ZipCode'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ActivityID'] = this.activityID;
data['Channel'] = this.channel;
data['DeviceTypeID'] = this.deviceTypeID;
data['DOB'] = this.dOB;
data['Email'] = this.email;
data['FirstName'] = this.firstName;
data['Gender'] = this.gender;
data['generalid'] = this.generalid;
data['Height'] = this.height;
data['IdentificationNo'] = this.identificationNo;
data['IPAdress'] = this.iPAdress;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['IsHeightInCM'] = this.isHeightInCM;
data['isNotificationOn'] = this.isNotificationOn;
data['IsWeightInKG'] = this.isWeightInKG;
data['LanguageID'] = this.languageID;
data['LastName'] = this.lastName;
data['MiddleName'] = this.middleName;
data['MobileNumber'] = this.mobileNumber;
data['PatientID'] = this.patientID;
data['PatientOutSA'] = this.patientOutSA;
data['PatientType'] = this.patientType;
data['PatientTypeID'] = this.patientTypeID;
data['SessionID'] = this.sessionID;
data['TokenID'] = this.tokenID;
data['VersionID'] = this.versionID;
data['Weight'] = this.weight;
data['ZipCode'] = this.zipCode;
return data;
}
}

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart';
@ -10,8 +12,66 @@ class H2OService extends BaseService {
List<UserProgressForTodayDataModel> userProgressForTodayDataList = List();
List<UserProgressForWeekDataModel> userProgressForWeekDataList = List();
List<UserProgressForMonthDataModel> userProgressForMonthDataList = List();
UserProgressRequestModel userProgressRequestModel =
UserProgressRequestModel();
UserProgressRequestModel userProgressRequestModel = UserProgressRequestModel();
UserDetailModel userDetailModel = UserDetailModel();
Future getUserDetail() async {
userProgressRequestModel.progress = 1;
userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1);
userProgressRequestModel.identificationNo = user.patientIdentificationNo;
hasError = false;
await baseAppClient.post(H2O_GET_USER_DETAIL, onSuccess: (dynamic response, int statusCode) {
userDetailModel = UserDetailModel.fromJson(response["UserDetailData_New"]);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: userProgressRequestModel.toJson());
}
Future updateUserDetail(UserDetailModel userDetail) async {
userProgressRequestModel.progress = 1;
userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1);
userProgressRequestModel.identificationNo = user.patientIdentificationNo;
UserDetailRequestModel _requestModel = UserDetailRequestModel();
_requestModel.activityID = userDetail.activityID.toString();
_requestModel.channel = userProgressRequestModel.channel;
_requestModel.dOB = userDetail.dOB;
_requestModel.deviceTypeID = userProgressRequestModel.deviceTypeID;
_requestModel.email = userDetail.emailID;
_requestModel.firstName = userDetail.firstName;
_requestModel.gender = userDetail.gender;
_requestModel.height = userDetail.height;
_requestModel.iPAdress = userProgressRequestModel.iPAdress;
_requestModel.identificationNo = userProgressRequestModel.identificationNo;
_requestModel.isHeightInCM = userDetail.isHeightInCM;
_requestModel.isWeightInKG = userDetail.isWeightInKG;
_requestModel.languageID = userProgressRequestModel.languageID;
_requestModel.mobileNumber = userProgressRequestModel.mobileNumber;
_requestModel.patientID = userProgressRequestModel.patientID;
_requestModel.patientOutSA = userProgressRequestModel.patientOutSA;
_requestModel.patientType = userProgressRequestModel.patientType;
_requestModel.patientTypeID = userProgressRequestModel.patientOutSA;
_requestModel.sessionID = userProgressRequestModel.sessionID;
_requestModel.tokenID = userProgressRequestModel.tokenID;
_requestModel.versionID = userProgressRequestModel.versionID;
_requestModel.zipCode = userDetail.zipCode;
_requestModel.weight = userDetail.weight;
_requestModel.generalid = userProgressRequestModel.generalid;
_requestModel.isDentalAllowedBackend = userProgressRequestModel.isDentalAllowedBackend;
_requestModel.isNotificationOn = userDetail.isNotificationON;
hasError = false;
await baseAppClient.post(H2O_UPDATE_USER_DETAIL, onSuccess: (dynamic response, int statusCode) {
userDetailModel = userDetail;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestModel.toJson());
}
Future getUserProgressForTodayData() async {
userProgressRequestModel.progress = 1;
@ -19,12 +79,10 @@ class H2OService extends BaseService {
userProgressRequestModel.identificationNo = user.patientIdentificationNo;
hasError = false;
await baseAppClient.post(H2O_GET_USER_PROGRESS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(H2O_GET_USER_PROGRESS, onSuccess: (dynamic response, int statusCode) {
userProgressForTodayDataList.clear();
response['UserProgressForTodayData'].forEach((progressData) {
userProgressForTodayDataList
.add(UserProgressForTodayDataModel.fromJson(progressData));
userProgressForTodayDataList.add(UserProgressForTodayDataModel.fromJson(progressData));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -38,16 +96,15 @@ class H2OService extends BaseService {
userProgressRequestModel.identificationNo = super.user.patientIdentificationNo;
hasError = false;
await baseAppClient.post(H2O_GET_USER_PROGRESS,
onSuccess: (dynamic response, int statusCode) {
userProgressForTodayDataList.clear();
response['UserProgressForWeekData'].forEach((hospital) {
userProgressForWeekDataList.add(UserProgressForWeekDataModel.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: userProgressRequestModel.toJson());
await baseAppClient.post(H2O_GET_USER_PROGRESS, onSuccess: (dynamic response, int statusCode) {
userProgressForWeekDataList.clear();
response['UserProgressForWeekData'].forEach((hospital) {
userProgressForWeekDataList.add(UserProgressForWeekDataModel.fromJson(hospital));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: userProgressRequestModel.toJson());
}
Future getUserProgressForMonthData() async {
@ -56,8 +113,7 @@ class H2OService extends BaseService {
userProgressRequestModel.identificationNo = super.user.patientIdentificationNo;
hasError = false;
await baseAppClient.post(H2O_GET_USER_PROGRESS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(H2O_GET_USER_PROGRESS, onSuccess: (dynamic response, int statusCode) {
userProgressForMonthDataList.clear();
response['UserProgressForMonthData'].forEach((hospital) {
userProgressForMonthDataList.add(UserProgressForMonthDataModel.fromJson(hospital));
@ -68,22 +124,33 @@ class H2OService extends BaseService {
}, body: userProgressRequestModel.toJson());
}
Future insertUserActivity(InsertUserActivityRequestModel insertUserActivityRequestModel) async {
hasError = false;
await baseAppClient.post(H2O_INSERT_USER_ACTIVITY, onSuccess: (dynamic response, int statusCode) {
userProgressForTodayDataList.clear();
response['UserProgressForTodayData'].forEach((progressData) {
userProgressForTodayDataList.add(UserProgressForTodayDataModel.fromJson(progressData));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: insertUserActivityRequestModel.toJson());
}
Future undoUserActivity() async {
userProgressRequestModel.progress = 1;
userProgressRequestModel.mobileNumber = user.mobileNumber.substring(1);
userProgressRequestModel.identificationNo = user.patientIdentificationNo;
hasError = false;
await baseAppClient.post(H2O_INSERT_USER_ACTIVITY,
onSuccess: (dynamic response, int statusCode) {
userProgressForTodayDataList.clear();
response['UserProgressForTodayData'].forEach((progressData) {
userProgressForTodayDataList
.add(UserProgressForTodayDataModel.fromJson(progressData));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: insertUserActivityRequestModel.toJson());
await baseAppClient.post(H2O_UNDO_USER_ACTIVITY, onSuccess: (dynamic response, int statusCode) {
userProgressForTodayDataList.clear();
response['UserProgressForTodayData'].forEach((progressData) {
userProgressForTodayDataList.add(UserProgressForTodayDataModel.fromJson(progressData));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: userProgressRequestModel.toJson());
}
}

@ -43,7 +43,7 @@ class CustomerAddressesService extends BaseService {
'fields':'addresses'
};
hasError = false;
await baseAppClient.get("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}",
await baseAppClient.getPharmacy("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}",
onSuccess: (dynamic response, int statusCode) {
addressesList.clear();
response["customers"][0]["addresses"].forEach((data) {
@ -63,7 +63,7 @@ class CustomerAddressesService extends BaseService {
};
hasError = false;
await baseAppClient.get(GET_CUSTOMER_INFO,
await baseAppClient.getPharmacy(GET_CUSTOMER_INFO,
onSuccess: (dynamic response, int statusCode) {
customerInfo= CustomerInfo.fromJson(response);
}, onFailure: (String error, int statusCode) {

@ -195,7 +195,7 @@ class BaseAppClient {
get(String endPoint,
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
Map<String, String> queryParams,
Map<String, dynamic> queryParams,
bool isExternal = false}) async {
String url;
if (isExternal) {
@ -236,19 +236,41 @@ class BaseAppClient {
{Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure,
bool isAllowAny = false,
Map<String, String> queryParams}) async {
String url = PHARMACY_BASE_URL + endPoint;
bool isExternal = false,
Map<String, dynamic> queryParams}) async {
String url;
if (isExternal) {
url = endPoint;
} else {
url = PHARMACY_BASE_URL + endPoint;
}
if (queryParams != null) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
}
print("URL : $url");
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
var user = await sharedPref.getObject(USER_PROFILE);
Map test = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': token,
'Mobilenumber': user['MobileNumber'].toString(),
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
};
if (await Utils.checkConnection()) {
final response = await http.get(url.trim(), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
'Accept': 'application/json',
'Authorization': token,
'Mobilenumber': user['MobileNumber'].toString(),
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
});
final int statusCode = response.statusCode;
print("statusCode :$statusCode");

@ -21,7 +21,7 @@ class OffersCategoriseService extends BaseService {
Future getOffersCategorise() async {
hasError = false;
_offersList.clear();
await baseAppClient.get(
await baseAppClient.getPharmacy(
GET_OFFERS_CATEGORISE,
onSuccess: (dynamic response, int statusCode) {
response['categories'].forEach((item) {
@ -40,7 +40,7 @@ class OffersCategoriseService extends BaseService {
_offerProducts.clear();
String endPoint =
id != null ? GET_OFFERS_PRODUCTS + "$id" : GET_OFFERS_PRODUCTS + "1";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {

@ -21,7 +21,7 @@ class OrderPreviewService extends BaseService {
Map<String, String> queryParams = {'fields': 'addresses'};
hasError = false;
try {
await baseAppClient.get("$GET_CUSTOMERS_ADDRESSES$customerId",
await baseAppClient.getPharmacy("$GET_CUSTOMERS_ADDRESSES$customerId",
onSuccess: (dynamic response, int statusCode) {
addresses.clear();
response['customers'][0]['addresses'].forEach((item) {
@ -42,7 +42,7 @@ class OrderPreviewService extends BaseService {
dynamic localRes;
hasError = false;
try {
await baseAppClient.get("$GET_SHIPPING_OPTIONS$customerId/${selectedAddress.id}",
await baseAppClient.getPharmacy("$GET_SHIPPING_OPTIONS$customerId/${selectedAddress.id}",
onSuccess: (dynamic response, int statusCode) {
localRes = response['shipping_option'][0];
}, onFailure: (String error, int statusCode) {
@ -61,7 +61,7 @@ class OrderPreviewService extends BaseService {
dynamic localRes;
hasError = false;
try {
await baseAppClient.get("$GET_SHOPPING_CART$customerId",
await baseAppClient.getPharmacy("$GET_SHOPPING_CART$customerId",
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
@ -125,7 +125,7 @@ class OrderPreviewService extends BaseService {
super.error = "";
dynamic localRes;
await baseAppClient.get("$DELETE_SHOPPING_CART_ALL$customerId/ShoppingCart",
await baseAppClient.getPharmacy("$DELETE_SHOPPING_CART_ALL$customerId/ShoppingCart",
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {

@ -22,7 +22,7 @@ class PharmacyModuleService extends BaseService {
Map<String, String> queryParams = {'FileNumber': data['PatientID'].toString()};
hasError = false;
try {
await baseAppClient.get(PHARMACY_VERIFY_CUSTOMER, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(PHARMACY_VERIFY_CUSTOMER, onSuccess: (dynamic response, int statusCode) {
if (response['UserName'] != null) {
sharedPref.setString(PHARMACY_CUSTOMER_ID, response['CustomerId'].toString());
print(response);
@ -54,8 +54,29 @@ class PharmacyModuleService extends BaseService {
};
hasError = false;
try {
await baseAppClient.get(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.get(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async{
if (!response['IsRegistered']) {}
await generatePharmacyToken();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, queryParams: queryParams);
} catch (error) {
throw error;
}
}
Future generatePharmacyToken() async {
Map<String, String> queryParams = {
'Filenumber':user.patientID.toString(),
'MobileNumber':user.mobileNumber,
};
hasError = false;
try {
await baseAppClient.get(PHARMACY_AUTORZIE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async{
if (response['Status'] == 200) {
await sharedPref.setString(PHARMACY_AUTORZIE_TOKEN, response['token'].toString());
}
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -68,7 +89,7 @@ class PharmacyModuleService extends BaseService {
Future getBannerListList() async {
hasError = false;
try {
await baseAppClient.get(GET_PHARMACY_BANNER, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(GET_PHARMACY_BANNER, onSuccess: (dynamic response, int statusCode) {
bannerItems.clear();
response['images'].forEach((item) {
bannerItems.add(PharmacyImageObject.fromJson(item));
@ -85,7 +106,7 @@ class PharmacyModuleService extends BaseService {
Future getTopManufacturerList() async {
Map<String, String> queryParams = {'page': '1', 'limit': '8'};
try {
await baseAppClient.get(GET_PHARMACY_TOP_MANUFACTURER, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, onSuccess: (dynamic response, int statusCode) {
manufacturerList.clear();
response['manufacturer'].forEach((item) {
Manufacturer manufacturer = Manufacturer.fromJson(item);
@ -108,7 +129,7 @@ class PharmacyModuleService extends BaseService {
'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews',
};
try {
await baseAppClient.get(GET_PHARMACY_BEST_SELLER_PRODUCT, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(GET_PHARMACY_BEST_SELLER_PRODUCT, onSuccess: (dynamic response, int statusCode) {
bestSellerProducts.clear();
response['products'].forEach((item) {
bestSellerProducts.add(PharmacyProduct.fromJson(item));
@ -127,7 +148,7 @@ class PharmacyModuleService extends BaseService {
if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != null) {
lastVisited = await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS);
try {
await baseAppClient.get("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", onSuccess: (dynamic response, int statusCode) {
lastVisitedProducts.clear();
response['products'].forEach((item) {
lastVisitedProducts.add(PharmacyProduct.fromJson(item));

@ -21,7 +21,7 @@ class PrescriptionService extends BaseService {
hasError = false;
url = PRESCRIPTION;
print("Print PRESCRIPTION url" + url);
await baseAppClient.get(url,
await baseAppClient.post(url,
onSuccess: (dynamic response, int statusCode) {
_prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((item) {

@ -56,7 +56,7 @@ class PharmacyCategoriseService extends BaseService {
Future getCategorise() async {
hasError = false;
_categoriseList.clear();
await baseAppClient.get(
await baseAppClient.getPharmacy(
GET_PHARMACY_CATEGORISE,
onSuccess: (dynamic response, int statusCode) {
response['categories'].forEach((item) {
@ -74,7 +74,7 @@ class PharmacyCategoriseService extends BaseService {
hasError = false;
_scanList.clear();
String endPoint = id != null ? SCAN_QR_CODE + "$id" : SCAN_QR_CODE + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {
@ -94,7 +94,7 @@ class PharmacyCategoriseService extends BaseService {
String endPoint = productName != null
? GET_SEARCH_PRODUCTS + "$productName" + '&language_id=1'
: GET_SEARCH_PRODUCTS + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {
@ -111,7 +111,7 @@ class PharmacyCategoriseService extends BaseService {
Future getBrands() async {
hasError = false;
_brandsList.clear();
await baseAppClient.get(
await baseAppClient.getPharmacy(
GET_BRANDS_LIST,
onSuccess: (dynamic response, int statusCode) {
response['manufacturer'].forEach((item) {
@ -130,7 +130,7 @@ class PharmacyCategoriseService extends BaseService {
_parentCategoriseList.clear();
String endPoint =
id != null ? GET_CATEGORISE_PARENT + "$id" : GET_CATEGORISE_PARENT + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['categories'].forEach((item) {
@ -150,7 +150,7 @@ class PharmacyCategoriseService extends BaseService {
String endPoint = id != null
? GET_PARENT_PRODUCTS + "$id" + '&page=1&limit=50'
: GET_PARENT_PRODUCTS + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {
@ -170,7 +170,7 @@ class PharmacyCategoriseService extends BaseService {
String endPoint =
id != null ? GET_SUB_CATEGORISE + "$id" : GET_SUB_CATEGORISE + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['categories'].forEach((item) {
@ -190,7 +190,7 @@ class PharmacyCategoriseService extends BaseService {
String endPoint = id != null
? GET_SUB_PRODUCTS + "$id" + '&page=1&limit=50'
: GET_SUB_PRODUCTS + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {
@ -209,7 +209,7 @@ class PharmacyCategoriseService extends BaseService {
_finalProducts.clear();
String endPoint =
id != null ? GET_FINAL_PRODUCTS + "$id" : GET_FINAL_PRODUCTS + "";
await baseAppClient.get(
await baseAppClient.getPharmacy(
endPoint,
onSuccess: (dynamic response, int statusCode) {
response['products'].forEach((item) {

@ -1,26 +1,54 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../locator.dart';
class H2OViewModel extends BaseViewModel {
H2OService _h2OService = locator<H2OService>();
List<charts.Series> userProgressForWeekDataSeries;
List<charts.Series> userProgressForMonthDataSeries;
UserDetailModel get userDetail => _h2OService.userDetailModel;
UserProgressForTodayDataModel get userProgressData {
if (_h2OService.userProgressForTodayDataList.length != 0)
return _h2OService.userProgressForTodayDataList[0];
return null;
if (_h2OService.userProgressForTodayDataList.length != 0) return _h2OService.userProgressForTodayDataList[0];
return null;
}
Future getUserDetail() async {
// if(_h2OService.userProgressForTodayDataList.length==0){
setState(ViewState.Busy);
await _h2OService.getUserDetail();
if (_h2OService.hasError) {
error = _h2OService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
Future updateUserDetail(UserDetailModel userDetailModel, Function(bool) onResponse) async {
setState(ViewState.Busy);
await _h2OService.updateUserDetail(userDetailModel);
if (_h2OService.hasError) {
error = _h2OService.error;
setState(ViewState.Error);
onResponse(false);
} else {
_h2OService.userDetailModel = userDetailModel;
setState(ViewState.Idle);
onResponse(true);
}
}
Future getUserProgressForTodayData() async {
// if(_h2OService.userProgressForTodayDataList.length==0){
@ -58,13 +86,9 @@ class H2OViewModel extends BaseViewModel {
}
}
List<charts.Series<ChartSeries,
String>> createUserProgressForWeekDataSeries() {
List<ChartSeries> globalData = [
];
_h2OService.userProgressForWeekDataList.forEach((
UserProgressForWeekDataModel data) {
List<charts.Series<ChartSeries, String>> createUserProgressForWeekDataSeries() {
List<ChartSeries> globalData = [];
_h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) {
globalData.add(new ChartSeries(data.dayName, data.percentageConsumed));
});
return [
@ -77,12 +101,9 @@ class H2OViewModel extends BaseViewModel {
];
}
List<charts.Series<ChartSeries,
String>> createUserProgressForMonthDataSeries() {
List<ChartSeries> globalData = [
];
_h2OService.userProgressForMonthDataList.forEach((
UserProgressForMonthDataModel data) {
List<charts.Series<ChartSeries, String>> createUserProgressForMonthDataSeries() {
List<ChartSeries> globalData = [];
_h2OService.userProgressForMonthDataList.forEach((UserProgressForMonthDataModel data) {
globalData.add(new ChartSeries(data.monthName, data.percentageConsumed));
});
return [
@ -95,14 +116,10 @@ class H2OViewModel extends BaseViewModel {
];
}
Future insertUserActivity(
InsertUserActivityRequestModel insertUserActivityRequestModel) async {
Future insertUserActivity(InsertUserActivityRequestModel insertUserActivityRequestModel) async {
setState(ViewState.BusyLocal);
insertUserActivityRequestModel.mobileNumber =
user.mobileNumber.substring(1);
insertUserActivityRequestModel.identificationNo =
user.patientIdentificationNo;
insertUserActivityRequestModel.mobileNumber = user.mobileNumber.substring(1);
insertUserActivityRequestModel.identificationNo = user.patientIdentificationNo;
await _h2OService.insertUserActivity(insertUserActivityRequestModel);
if (_h2OService.hasError) {
@ -113,9 +130,18 @@ class H2OViewModel extends BaseViewModel {
}
}
Future undoUserActivity() async {
setState(ViewState.BusyLocal);
await _h2OService.undoUserActivity();
if (_h2OService.hasError) {
error = _h2OService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
}
/// Sample ordinal data type.
class ChartSeries {
final String y;

@ -51,6 +51,27 @@ class PharmacyModuleViewModel extends BaseViewModel {
}
}
Future createUser() async {
setState(ViewState.Busy);
await _pharmacyService.createUser();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future generatePharmacyToken() async {
setState(ViewState.Busy);
await _pharmacyService.generatePharmacyToken();
if (_pharmacyService.hasError) {
error = _pharmacyService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
Future getBannerList() async {
setState(ViewState.Busy);
await _pharmacyService.getBannerListList();

@ -16,30 +16,22 @@ import 'base_view_model.dart';
class PharmacyCategoriseViewModel extends BaseViewModel {
bool hasError = false;
PharmacyCategoriseService _pharmacyCategoriseService =
locator<PharmacyCategoriseService>();
PharmacyCategoriseService _pharmacyCategoriseService = locator<PharmacyCategoriseService>();
List<PharmacyCategorise> get categorise =>
_pharmacyCategoriseService.categoriseList;
List<PharmacyCategorise> get categorise => _pharmacyCategoriseService.categoriseList;
List<CategoriseParentModel> get categoriseParent =>
_pharmacyCategoriseService.parentCategoriseList;
List<CategoriseParentModel> get categoriseParent => _pharmacyCategoriseService.parentCategoriseList;
List<ParentProductsModel> get parentProducts =>
_pharmacyCategoriseService.parentProductsList;
List<ParentProductsModel> get parentProducts => _pharmacyCategoriseService.parentProductsList;
List<SubCategoriesModel> get subCategorise =>
_pharmacyCategoriseService.subCategoriseList;
List<SubCategoriesModel> get subCategorise => _pharmacyCategoriseService.subCategoriseList;
List<SubProductsModel> get subProducts =>
_pharmacyCategoriseService.subProductsList;
List<SubProductsModel> get subProducts => _pharmacyCategoriseService.subProductsList;
List<FinalProductsModel> get finalProducts =>
_pharmacyCategoriseService.finalProducts;
List<FinalProductsModel> get finalProducts => _pharmacyCategoriseService.finalProducts;
List<BrandsModel> get brandsList => _pharmacyCategoriseService.brandsList;
List<SearchProductsModel> get searchList =>
_pharmacyCategoriseService.searchList;
List<SearchProductsModel> get searchList => _pharmacyCategoriseService.searchList;
List<ScanQrModel> get scanList => _pharmacyCategoriseService.scanList;

@ -37,6 +37,8 @@ import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'h2o/h2o_page.dart';
class AllHabibMedicalService extends StatefulWidget {
//TODO
final Function goToMyProfile;
@ -56,12 +58,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value))
});
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
});
super.initState();
}
@ -100,8 +98,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.healthWeatherIndicators,
TranslationBase.of(context).healthWeatherIndicators,
color: Colors.white,
fontWeight: FontWeight.w600,
),
@ -134,11 +131,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
width: 60,
height: 60,
),
Directionality(
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white))
],
),
Texts(
@ -158,8 +151,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context);
widget.goToMyProfile();
},
imageLocation:
'assets/images/new-design/my_file_bottom_bar.png',
imageLocation: 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile,
),
ServicesContainer(
@ -181,8 +173,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
),
),
imageLocation:
'assets/images/new-design/booking_icon_active.png',
imageLocation: 'assets/images/new-design/booking_icon_active.png',
title: TranslationBase.of(context).bookAppo,
),
ServicesContainer(
@ -192,8 +183,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: PaymentService(),
),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService,
),
ServicesContainer(
@ -201,8 +191,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context,
FadePage(),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest,
),
ServicesContainer(
@ -235,17 +224,13 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
imageLocation: 'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
FadePage(page: authUser.patientID == null ? EReferralIndexPage() : EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: TranslationBase.of(context).ereferral,
@ -257,20 +242,18 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(),
),
),
imageLocation:
'assets/images/new-design/family_menu_icon_red.png',
imageLocation: 'assets/images/new-design/family_menu_icon_red.png',
title: TranslationBase.of(context).myFamily,
),
if(projectViewModel.havePrivilege(35))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
if (projectViewModel.havePrivilege(35))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
title: TranslationBase.of(context).childVaccine,
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: TranslationBase.of(context).childVaccine,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -278,27 +261,26 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ToDo(isShowAppBar: true),
),
),
imageLocation:
'assets/images/new-design/upcoming_icon_bottom_bar.png',
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
if(projectViewModel.havePrivilege(42))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle),
if(projectViewModel.havePrivilege(36))
if (projectViewModel.havePrivilege(42))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: TranslationBase.of(context).bloodD,
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: TranslationBase.of(context).bloodD,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -306,8 +288,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
imageLocation: 'assets/images/new-design/health_calculator_icon.png',
title: TranslationBase.of(context).calculators,
),
ServicesContainer(
@ -317,30 +298,30 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
imageLocation: 'assets/images/new-design/health_convertor_icon.png',
title: TranslationBase.of(context).converters,
),
if(projectViewModel.havePrivilege(38))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: H2OPageIndexPage(),
),
if (projectViewModel.havePrivilege(38))
ServicesContainer(
onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push(
// context,
// FadePage(
// page: H2OPageIndexPage(),
// ),
// ),
imageLocation: 'assets/images/new-design/water_icon.png',
title: TranslationBase.of(context).h2o,
),
imageLocation: 'assets/images/new-design/water_icon.png',
title: 'H2O',
),
if(projectViewModel.havePrivilege(41))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
if (projectViewModel.havePrivilege(41))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -348,15 +329,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ParkingPage(),
),
),
imageLocation:
'assets/images/new-design/parking_system_icon.png',
imageLocation: 'assets/images/new-design/parking_system_icon.png',
title: TranslationBase.of(context).parking,
),
ServicesContainer(
onTap: () => launch(
"https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation: 'assets/images/new-design/virtual_tour_icon.png',
title: TranslationBase.of(context).vTour,
),
ServicesContainer(
@ -364,12 +342,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
)));
},
imageLocation:
'assets/images/new-design/twitter_dashboard_icon.png',
imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png',
title: TranslationBase.of(context).latestNews,
),
ServicesContainer(
@ -392,8 +368,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -407,8 +382,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
});
} else {
setState(() {
weather =
data != null ? data['Temperature'].toString() + '\u2103' : '--';
weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
});
}
}

@ -12,9 +12,7 @@ class ConfirmAddAmountDialog extends StatefulWidget {
final String unit;
final H2OViewModel model;
ConfirmAddAmountDialog(
{Key key, this.model,this.amount,this.unit ="ml"});
ConfirmAddAmountDialog({Key key, this.model, this.amount, this.unit = "ml"});
@override
_ConfirmAddAmountDialogState createState() => _ConfirmAddAmountDialogState();
@ -29,10 +27,12 @@ class _ConfirmAddAmountDialogState extends State<ConfirmAddAmountDialog> {
@override
Widget build(BuildContext context) {
return SimpleDialog(
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
contentPadding: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 8.0),
titlePadding: EdgeInsets.fromLTRB(24.0, 16.0, 24.0, 8.0),
title: Center(
child: Texts(
"Confirm",
TranslationBase.of(context).confirm,
textAlign: TextAlign.center,
color: Colors.black,
),
),
@ -42,12 +42,13 @@ class _ConfirmAddAmountDialogState extends State<ConfirmAddAmountDialog> {
Divider(),
Center(
child: Texts(
"Are you sure you want to Add ${widget.amount} ${widget.unit} ?",
"${TranslationBase.of(context).areyousure} ${widget.amount} ${widget.unit} ?",
textAlign: TextAlign.center,
color: Colors.grey,
),
),
SizedBox(
height: 5.0,
height: 16.0,
),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -79,8 +80,8 @@ class _ConfirmAddAmountDialogState extends State<ConfirmAddAmountDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () async{
InsertUserActivityRequestModel insertUserActivityRequestModel= InsertUserActivityRequestModel(quantityIntake:widget.amount );
onTap: () async {
InsertUserActivityRequestModel insertUserActivityRequestModel = InsertUserActivityRequestModel(quantityIntake: widget.amount);
await widget.model.insertUserActivity(insertUserActivityRequestModel);
Navigator.pop(context);
},
@ -88,20 +89,17 @@ class _ConfirmAddAmountDialogState extends State<ConfirmAddAmountDialog> {
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
TranslationBase.of(context).ok.toUpperCase(),
fontWeight: FontWeight.w400,
)),
),
),
),
],
)
),
],
)
],
);
}
}

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
@ -5,25 +7,32 @@ import 'package:flutter/material.dart';
// ignore: must_be_immutable
class SelectAmountDialog extends StatefulWidget {
List<AmountModel> searchAmount = [
AmountModel(name: "l",nameAr:"لتر",value: 1),
AmountModel(name: "ml",nameAr:"مم لتر",value: 2),
];
final Function(AmountModel) onValueSelected;
AmountModel selectedAmount;
SelectAmountDialog(
{Key key, this.onValueSelected, this.selectedAmount});
SelectAmountDialog({Key key, this.onValueSelected, this.selectedAmount});
@override
_SelectAmountDialogState createState() => _SelectAmountDialogState();
}
class _SelectAmountDialogState extends State<SelectAmountDialog> {
List<AmountModel> searchAmount = [
AmountModel(name: "l", nameAr: "لتر", value: 1),
AmountModel(name: "ml", nameAr: "مم لتر", value: 2),
];
@override
void initState() {
super.initState();
widget.selectedAmount = widget.selectedAmount ?? widget.searchAmount[0];
widget.selectedAmount = widget.selectedAmount ?? searchAmount[0];
getLanguage();
}
String languageID = "en";
void getLanguage() async {
languageID = await sharedPref.getString(APP_LANGUAGE);
setState(() {});
}
@override
@ -32,11 +41,14 @@ class _SelectAmountDialogState extends State<SelectAmountDialog> {
children: [
Column(
children: [
Texts("Select the preferred unit", fontSize: 20,),
Texts(
TranslationBase.of(context).preferredunit,
fontSize: 20,
),
Divider(),
...List.generate(
widget.searchAmount.length,
(index) => Column(
searchAmount.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
@ -49,13 +61,13 @@ class _SelectAmountDialogState extends State<SelectAmountDialog> {
child: InkWell(
onTap: () {
setState(() {
widget.selectedAmount = widget.searchAmount[index];
widget.selectedAmount = searchAmount[index];
});
},
child: ListTile(
title: Text(widget.searchAmount[index].name),
title: Text(languageID == "ar" ? searchAmount[index].nameAr : searchAmount[index].name),
leading: Radio(
value: widget.searchAmount[index],
value: searchAmount[index],
groupValue: widget.selectedAmount,
activeColor: Colors.red[800],
onChanged: (value) {
@ -116,9 +128,9 @@ class _SelectAmountDialogState extends State<SelectAmountDialog> {
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
),
),
),
@ -130,6 +142,7 @@ class _SelectAmountDialogState extends State<SelectAmountDialog> {
);
}
}
class AmountModel {
String name;
String nameAr;
@ -151,7 +164,3 @@ class AmountModel {
return data;
}
}

@ -0,0 +1,101 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
class CommonRadioButtonDialog extends StatefulWidget {
final List<String> list;
final String title;
final int selectedIndex;
final Function(int) onSelect;
CommonRadioButtonDialog({Key key, this.title = "", this.selectedIndex = 0, this.list, this.onSelect}) : super(key: key);
@override
_CommonRadioButtonDialogState createState() {
return _CommonRadioButtonDialogState();
}
}
class _CommonRadioButtonDialogState extends State<CommonRadioButtonDialog> {
int _selectedIndex = 0;
@override
void initState() {
super.initState();
_selectedIndex = widget.selectedIndex;
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Dialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
elevation: 0,
backgroundColor: Colors.white,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: widget.title == "" ? 24 : 50,
alignment: Alignment.center,
child: Text(
widget.title,
style: TextStyle(color: Colors.black87, fontSize: 18, fontWeight: FontWeight.w500),
),
),
Divider(height: 1, color: Colors.black38),
ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.only(top: 4, bottom: 4),
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return RadioListTile(
value: index,
dense: true,
activeColor: Colors.black54,
groupValue: _selectedIndex,
onChanged: (_index) => setState(() => _selectedIndex = _index),
title: Text(
widget.list[index],
style: TextStyle(fontWeight: FontWeight.w500),
),
);
},
itemCount: widget.list?.length ?? 0,
),
Divider(height: 1, color: Colors.black38),
Container(
height: 50,
alignment: Alignment.center,
child: Row(
children: [
Expanded(
child: FlatButton(
child: Text(
TranslationBase.of(context).cancel,
style: TextStyle(color: Colors.redAccent, fontSize: 16, fontWeight: FontWeight.w500),
),
onPressed: () => Navigator.pop(context),
),
),
Expanded(
child: FlatButton(
child: Text(
TranslationBase.of(context).ok,
style: TextStyle(color: Colors.black87, fontSize: 16, fontWeight: FontWeight.w500),
),
onPressed: () => widget.onSelect(_selectedIndex),
),
)
],
),
),
],
),
);
}
}

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.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/others/app_scaffold_widget.dart';
@ -36,7 +37,7 @@ class _AddCustomAmountState extends State<AddCustomAmount> {
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: "Enter amount",
appBarTitle:TranslationBase.of(context).customLabel,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
@ -51,7 +52,7 @@ class _AddCustomAmountState extends State<AddCustomAmount> {
height: 12,
),
NewTextFields(
hintText: "Enter the amount of water:",
hintText: TranslationBase.of(context).h2oAmountOfWater,
// type: "Number",
controller: _nameTextController,
),
@ -81,7 +82,7 @@ class _AddCustomAmountState extends State<AddCustomAmount> {
),
SecondaryButton(
textColor: Colors.white,
label: "OK",
label: TranslationBase.of(context).ok,
onTap: () async {
Navigator.of(context).pop();
showConfirmMessage (int.parse(_nameTextController.text), widget.model);
@ -120,7 +121,7 @@ void confirmAmountTypeDialog() {
if (selectedAmount != null)
return selectedAmount.name;
else
return "Select unit";
return TranslationBase.of(context).selectUnit;
}

@ -0,0 +1,463 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'Dialog/setting_page_radio_button_list_dialog.dart';
class H2oSetting extends StatefulWidget {
final UserDetailModel userDetailModel;
final H2OViewModel viewModel;
H2oSetting({Key key, this.userDetailModel, this.viewModel}) : super(key: key);
@override
_H2oSettingState createState() {
return _H2oSettingState();
}
}
class _H2oSettingState extends State<H2oSetting> {
TextEditingController _nameController = TextEditingController();
TextEditingController _heightController = TextEditingController();
TextEditingController _weightController = TextEditingController();
bool _isUnitML = false;
bool _isGenderMale = false;
bool _isHeightCM = false;
bool _isWeightKG = false;
double _heightValue = 1;
double _weightValue = 1;
List<String> _activityLevelListEng = [];
List<String> _remindedTimeListEng = [];
int _selectedActiveLevel = 1;
int _selectedRemindedTime = 0;
DateTime _dobDate = DateTime.now();
DateTime _tempDate = DateTime.now();
UserDetailModel _userDetailModel;
@override
void initState() {
super.initState();
_userDetailModel = widget.userDetailModel;
_heightValue = _userDetailModel.height;
_weightValue = _userDetailModel.weight;
_heightController.text = _heightValue.toStringAsFixed(0);
_weightController.text = _weightValue.toStringAsFixed(0);
_nameController.text = _userDetailModel.firstName;
_isWeightKG = _userDetailModel.isWeightInKG;
_isHeightCM = _userDetailModel.isHeightInCM;
_isGenderMale = _userDetailModel.gender == "M" ? true : false;
_dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB);
_selectedActiveLevel = _userDetailModel.activityID ?? 1;
}
@override
void didChangeDependencies() {
// TODO: implement didChangeDependencies
super.didChangeDependencies();
_activityLevelListEng = [
TranslationBase.of(context).notActive,
TranslationBase.of(context).lightActive,
TranslationBase.of(context).modActive,
TranslationBase.of(context).active
];
_remindedTimeListEng = [
"1 ${TranslationBase.of(context).time}",
"2 ${TranslationBase.of(context).times}",
"3 ${TranslationBase.of(context).times}",
"4 ${TranslationBase.of(context).times}"
];
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).h2o,
showHomeAppBarIcon: false,
body: SingleChildScrollView(
padding: EdgeInsets.fromLTRB(8, 8, 8, 80),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
controller: _nameController,
decoration: InputDecoration(
labelText: TranslationBase.of(context).enterNameHere,
labelStyle: TextStyle(color: Colors.black87),
fillColor: Colors.white,
filled: true,
border: UnderlineInputBorder(
borderSide: BorderSide(
width: 0,
style: BorderStyle.none,
),
borderRadius: BorderRadius.circular(6.0),
),
),
),
SizedBox(height: 8),
Text(TranslationBase.of(context).preferredunit),
SizedBox(height: 8),
_commonButtonsRow(TranslationBase.of(context).ml, TranslationBase.of(context).l, _isUnitML, (value) {
if (_isUnitML != value) {
setState(() {
_isUnitML = value;
});
}
}),
Padding(
padding: EdgeInsets.only(top: 8.0, bottom: 8.0),
child: Divider(height: 1.5, color: Colors.black54),
),
Text(TranslationBase.of(context).gender),
SizedBox(height: 8),
_commonButtonsRow(TranslationBase.of(context).male, TranslationBase.of(context).female, _isGenderMale, (value) {
if (_isGenderMale != value) {
setState(() {
_isGenderMale = value;
});
}
}),
Padding(
padding: EdgeInsets.only(top: 8.0, bottom: 8.0),
child: Divider(height: 1.5, color: Colors.black54),
),
Text(TranslationBase.of(context).height),
_commonSlidersRow(_heightController, 1, 270, _heightValue, (text) {
_heightController.text = text;
}, (value) {
setState(() {
_heightValue = value;
});
}),
SizedBox(height: 8),
Text(TranslationBase.of(context).heightUnit),
SizedBox(height: 8),
_commonButtonsRow(TranslationBase.of(context).cm, TranslationBase.of(context).ft, _isHeightCM, (value) {
if (_isHeightCM != value) {
setState(() {
_isHeightCM = value;
});
}
}),
SizedBox(height: 8),
_commonSlidersRow(_weightController, 1, 250, _weightValue, (text) {
_weightController.text = text;
}, (value) {
setState(() {
_weightValue = value;
});
}),
SizedBox(height: 8),
Text(TranslationBase.of(context).weightUnit),
SizedBox(height: 8),
_commonButtonsRow(TranslationBase.of(context).kg, TranslationBase.of(context).lb, _isWeightKG, (value) {
if (_isWeightKG != value) {
setState(() {
_isWeightKG = value;
});
}
}),
Padding(
padding: EdgeInsets.only(top: 8.0, bottom: 8.0),
child: Divider(height: 1.5, color: Colors.black54),
),
Container(
padding: EdgeInsets.all(8),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("${TranslationBase.of(context).birth_date}:"),
SizedBox(height: 8),
InkWell(
onTap: () {
showModalBottomSheet(
context: context,
builder: (context) {
return Container(
height: 250,
padding: EdgeInsets.all(8),
child: Column(children: [
Container(
height: 40,
alignment: Alignment.centerRight,
child: Row(mainAxisSize: MainAxisSize.min, children: [
InkWell(
onTap: () => Navigator.pop(context),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
child: Text(TranslationBase.of(context).cancel),
),
),
SizedBox(width: 8),
InkWell(
onTap: () {
Navigator.pop(context);
setState(() {
_dobDate = _tempDate;
});
},
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.fromLTRB(8, 4, 8, 4),
child: Text(TranslationBase.of(context).ok),
),
)
]),
),
Expanded(
child: Container(
width: MediaQuery.of(context).size.width,
child: CupertinoDatePicker(
initialDateTime: _dobDate,
mode: CupertinoDatePickerMode.date,
onDateTimeChanged: (_date) {
_tempDate = _date;
},
),
),
)
]),
);
});
}, // implement cupertino dialog to select date
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Text(DateUtil.getFormattedDate(_dobDate, "yyyy-MM-dd")), Icon(Icons.arrow_drop_down_outlined)]),
)
],
),
),
SizedBox(height: 8),
_commonDialogSelectorRow(TranslationBase.of(context).activityLevel, _activityLevelListEng[_selectedActiveLevel - 1], () {
showDialog(
context: context,
child: CommonRadioButtonDialog(
list: _activityLevelListEng,
title: TranslationBase.of(context).activityLevel,
onSelect: (index) {
Navigator.pop(context);
setState(() {
_selectedActiveLevel = index + 1;
});
},
selectedIndex: _selectedActiveLevel - 1,
),
);
}),
SizedBox(height: 8),
_commonDialogSelectorRow(TranslationBase.of(context).reminderLabel, _remindedTimeListEng[_selectedRemindedTime], () {
showDialog(
context: context,
child: CommonRadioButtonDialog(
list: _remindedTimeListEng,
onSelect: (index) {
Navigator.pop(context);
setState(() {
_selectedRemindedTime = index;
});
},
selectedIndex: _selectedRemindedTime,
),
);
}),
SizedBox(height: 16),
SizedBox(
height: 50,
width: MediaQuery.of(context).size.width,
child: FlatButton(
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
onPressed: _updateUserDetails,
child: Text(
TranslationBase.of(context).save,
style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.w600),
),
),
)
],
),
),
);
}
Widget _commonButtonsRow(String rightText, String leftText, bool checkParam, Function(bool) callBack) {
return Row(children: [
Expanded(
child: SizedBox(
height: 40,
child: RaisedButton(
color: checkParam ? Theme.of(context).appBarTheme.color : Colors.white,
child: Text(
rightText,
style: TextStyle(color: checkParam ? Colors.white : Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w600),
),
onPressed: () => callBack(true),
),
),
),
SizedBox(width: 12),
Expanded(
child: SizedBox(
height: 40,
child: RaisedButton(
color: !checkParam ? Theme.of(context).appBarTheme.color : Colors.white,
child: Text(
leftText,
style: TextStyle(color: !checkParam ? Colors.white : Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w600),
),
onPressed: () => callBack(false),
),
),
),
]);
}
Widget _commonSlidersRow(
_controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
return Container(
margin: EdgeInsets.only(top: 6),
padding: EdgeInsets.all(6),
color: Colors.white,
height: 50,
child: Row(
children: [
SizedBox(
width: 75,
child: TextField(
controller: _controller,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
onChanged: (value) {
double _value = double.parse(value);
if (_value > _maxValue) {
onTextValueChange(_maxValue.toStringAsFixed(0));
onValueChange(_maxValue);
return;
} else if (_value < _minValue) {
onTextValueChange(_minValue.toStringAsFixed(0));
onValueChange(_minValue);
return;
} else if (_value >= _minValue && _value <= _maxValue) {
onValueChange(_value);
return;
}
},
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
],
decoration: InputDecoration(
contentPadding: EdgeInsets.only(left: 4, right: 4),
fillColor: Colors.white,
filled: true,
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: Colors.grey,
style: BorderStyle.solid,
),
borderRadius: BorderRadius.circular(6.0),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: Colors.grey,
style: BorderStyle.solid,
),
borderRadius: BorderRadius.circular(6.0),
),
),
),
),
Expanded(
flex: 6,
child: Slider(
min: _minValue,
max: _maxValue,
activeColor: Colors.redAccent,
inactiveColor: Colors.redAccent.withOpacity(.3),
value: _valueOrg,
onChanged: (value) {
onTextValueChange(value.toStringAsFixed(0));
onValueChange(value);
},
),
)
],
),
);
}
Widget _commonDialogSelectorRow(String title, String selectedText, VoidCallback onPressed) {
return Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [
Text(title),
SizedBox(height: 8),
InkWell(
onTap: onPressed,
child: Container(
height: 50,
padding: EdgeInsets.all(8),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Text(selectedText), Icon(Icons.arrow_drop_down_outlined)],
),
),
)
]);
}
void _updateUserDetails() async {
_userDetailModel.height = _heightValue;
_userDetailModel.weight = _weightValue;
_userDetailModel.firstName = _nameController.text;
_userDetailModel.isWeightInKG = _isWeightKG;
_userDetailModel.isHeightInCM = _isHeightCM;
_userDetailModel.gender = _isGenderMale ? "M" : "F";
var tempDate = DateUtil.convertDateToString(_dobDate);
if (!tempDate.endsWith("/")) {
tempDate = tempDate + "/";
}
_userDetailModel.dOB = tempDate;
_userDetailModel.activityID = _selectedActiveLevel;
GifLoaderDialogUtils.showMyDialog(context);
await widget.viewModel.updateUserDetail(_userDetailModel, (tag) {
if (tag) {
AppToast.showSuccessToast(message: TranslationBase.of(context).success);
}
GifLoaderDialogUtils.hideDialog(context);
});
Navigator.pop(context);
}
}

@ -1,12 +1,15 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -34,9 +37,26 @@ class _H2OPageState extends State<H2OPage>
@override
Widget build(BuildContext context) {
return BaseView<H2OViewModel>(
onModelReady: (model) => model.getUserDetail(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: "Water Tracker",
appBarTitle: TranslationBase.of(context).waterTracker,
showHomeAppBarIcon: false,
baseViewModel: model,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
),
],
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -50,9 +70,7 @@ class _H2OPageState extends State<H2OPage>
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8),
height: 70.0,
),
),
@ -60,48 +78,46 @@ class _H2OPageState extends State<H2OPage>
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9,
alignment: Alignment.center,
// margin: EdgeInsets.only(top: 10.0),
// width: MediaQuery.of(context).size.width * 0.9,
child: Center(
child: TabBar(
isScrollable: false,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.28,
child: Center(
child: Texts(
"Today"),
),
child: TabBar(
isScrollable: false,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 10.0, right: 13.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.28,
child: Center(
child: Texts(TranslationBase.of(context).today),
),
Container(
width: MediaQuery.of(context).size.width * 0.28,
child: Center(
child: Texts("Week"),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.28,
child: Center(
child: Texts(TranslationBase.of(context).week),
),
Container(
width: MediaQuery.of(context).size.width * 0.28,
child: Center(
child: Texts("Month"),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.28,
child: Center(
child: Texts(TranslationBase.of(context).month),
),
],
),
),
],
),
),
),
],
),
),
backgroundColor: Colors.white,
body: Column(
children: <Widget>[
Expanded(

@ -1,11 +1,13 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MonthPage extends StatelessWidget {
@override
@ -14,12 +16,39 @@ class MonthPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForMonthData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
appBarTitle: "Water Tracker",
baseViewModel:model ,
body: SingleChildScrollView(
padding: EdgeInsets.symmetric(vertical: 12),
child: AppBarChart(
seriesList: model.userProgressForMonthDataSeries),
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(
padding: EdgeInsets.all(8.0),
child: ListView(
children: [
Center(
child: Text(
TranslationBase.of(context).waterConsumedInMonth,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0, color: Colors.black87),
),
),
SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 10,
width: 40,
color: Colors.blue,
),
SizedBox(width: 8),
Text(
TranslationBase.of(context).waterConsumedInMonth,
style: TextStyle(fontSize: 12.0),
),
],
),
// SizedBox(height: 8),
AppBarChart(seriesList: model.userProgressForMonthDataSeries),
],
),
),
),
);

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -14,7 +15,7 @@ class TodayPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForTodayData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
appBarTitle: "Water Tracker",
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: SingleChildScrollView(
padding: EdgeInsets.symmetric(vertical: 12),
@ -36,13 +37,14 @@ class TodayPage extends StatelessWidget {
//,
center: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
height: 40,
),
// SizedBox(
// height: 40,
// ),
Text(
"Consumed",
style: TextStyle(fontSize: 20.0),
TranslationBase.of(context).consumed,
style: TextStyle(fontSize: 16.0),
),
SizedBox(
height: 4,
@ -50,13 +52,8 @@ class TodayPage extends StatelessWidget {
Text(
model.userProgressData == null
? "0.0"
: model.userProgressData.quantityConsumed
.toString() +
'ml',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20.0,
color: HexColor("#60BCF9")),
: model.userProgressData.quantityConsumed.toString() + TranslationBase.of(context).ml,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0, color: HexColor("#60BCF9")),
),
SizedBox(
height: 4,
@ -70,8 +67,8 @@ class TodayPage extends StatelessWidget {
height: 4,
),
Text(
"Remaining",
style: TextStyle(fontSize: 20.0),
TranslationBase.of(context).remaining,
style: TextStyle(fontSize: 16.0),
),
SizedBox(
height: 4,
@ -79,18 +76,11 @@ class TodayPage extends StatelessWidget {
Text(
model.userProgressData == null
? "0.0"
: (model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed) <
0
? "0 ml"
: (model.userProgressData.quantityLimit -
model.userProgressData
.quantityConsumed)
.toString() +
' ml',
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 18.0),
: (model.userProgressData.quantityLimit - model.userProgressData.quantityConsumed) < 0
? "0 ${TranslationBase.of(context).ml}"
: (model.userProgressData.quantityLimit - model.userProgressData.quantityConsumed).toString() +
' ${TranslationBase.of(context).ml}',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),
),
],
),
@ -104,42 +94,32 @@ class TodayPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Container(
margin: EdgeInsets.only(left: 20),
height: 30,
width: 70,
decoration: BoxDecoration(
color: HexColor("#D1E3F6"),
borderRadius:
BorderRadius.all(Radius.circular(30))),
),
Container(
margin: EdgeInsets.only(bottom: 16),
height: 30,
width: 70,
decoration: BoxDecoration(color: HexColor("#D1E3F6"), borderRadius: BorderRadius.all(Radius.circular(30))),
),
Text(
"Remaining % ",
style: TextStyle(fontSize: 20.0),
"${TranslationBase.of(context).remaining} %",
style: TextStyle(fontSize: 16.0),
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Container(
margin: EdgeInsets.only(left: 20),
height: 30,
width: 70,
decoration: BoxDecoration(
color: HexColor("#60BCF9"),
borderRadius:
BorderRadius.all(Radius.circular(30))),
),
Container(
margin: EdgeInsets.only(bottom: 16),
height: 30,
width: 70,
decoration: BoxDecoration(color: HexColor("#60BCF9"), borderRadius: BorderRadius.all(Radius.circular(30))),
),
Text(
"Consumed % ",
style: TextStyle(fontSize: 20.0),
"${TranslationBase.of(context).consumed} %",
style: TextStyle(fontSize: 16.0),
)
],
)

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -15,16 +16,41 @@ class WeekPage extends StatelessWidget {
onModelReady: (model) => model.getUserProgressForWeekData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
appBarTitle: "Water Tracker",
appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: SingleChildScrollView(
padding: EdgeInsets.symmetric(vertical: 12),
child: AppBarChart(seriesList: model.userProgressForWeekDataSeries),
body: Padding(
padding: EdgeInsets.all(8.0),
child: ListView(
children: [
Center(
child: Text(
TranslationBase.of(context).waterConsumedInWeek,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0, color: Colors.black87),
),
),
SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 10,
width: 40,
color: Colors.blue,
),
SizedBox(width: 8),
Text(
TranslationBase.of(context).waterConsumedInWeek,
style: TextStyle(fontSize: 12.0),
),
],
),
// SizedBox(height: 8),
AppBarChart(seriesList: model.userProgressForWeekDataSeries),
],
),
),
),
);
}
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -12,13 +13,7 @@ import 'package:flutter/material.dart';
import '../add_custom_amount.dart';
class H20FloatingActionButton extends StatefulWidget {
const H20FloatingActionButton({
Key key,
@required AnimationController controller,
@required this.model
}) :
super(key: key);
const H20FloatingActionButton({Key key, @required AnimationController controller, @required this.model}) : super(key: key);
final H2OViewModel model;
@ -26,7 +21,7 @@ class H20FloatingActionButton extends StatefulWidget {
_H20FloatingActionButtonState createState() => _H20FloatingActionButtonState();
}
class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with TickerProviderStateMixin {
class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with TickerProviderStateMixin {
AnimationController _controller;
@override
void initState() {
@ -37,15 +32,20 @@ class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with
super.initState();
}
void showConfirmMessage(int amount, H2OViewModel model) {
showDialog(
context: context,
child: ConfirmAddAmountDialog(
model: model,
amount: amount,
),
);
}
@override
Widget build(BuildContext context) {
void showConfirmMessage(int amount, H2OViewModel model) {
showDialog(context: context, child: ConfirmAddAmountDialog(model: model,amount:amount,));
}
return Container(
margin: EdgeInsets.only(left: 20),
margin: EdgeInsets.only(left: 20, right: 20),
child: new Column(mainAxisSize: MainAxisSize.min, children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
@ -55,21 +55,21 @@ class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with
children: [
ActionButton(
controller: _controller,
text: "600ml",
text: "600${TranslationBase.of(context).ml}",
onTap: () {
showConfirmMessage(600, widget.model);
},
),
ActionButton(
controller: _controller,
text: "330ml",
text: "330${TranslationBase.of(context).ml}",
onTap: () {
showConfirmMessage(330, widget.model);
},
),
ActionButton(
controller: _controller,
text: "200ml",
text: "200${TranslationBase.of(context).ml}",
onTap: () {
showConfirmMessage(200, widget.model);
},
@ -87,11 +87,9 @@ class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with
animation: _controller,
builder: (BuildContext context, Widget child) {
return new Transform(
transform: new Matrix4.rotationZ(
_controller.value * 0.5 * math.pi),
transform: new Matrix4.rotationZ(_controller.value * 0.5 * math.pi),
alignment: FractionalOffset.center,
child: new Icon(
_controller.isDismissed ? Icons.add : Icons.close),
child: new Icon(_controller.isDismissed ? Icons.add : Icons.close),
);
},
),
@ -104,21 +102,21 @@ class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with
},
),
new Container(
margin: EdgeInsets.only(left: 8, bottom: 4),
alignment: FractionalOffset.topCenter,
child: new ScaleTransition(
scale: new CurvedAnimation(
parent: _controller,
curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0,
curve: Curves.easeOut),
curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
),
child: new FloatingActionButton(
backgroundColor: Colors.white,
heroTag: null,
mini: true,
// mini: true,
child: Text(
"Custom",
TranslationBase.of(context).custom,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14.0, color: Colors.grey),
style: TextStyle(fontSize: 12, color: Colors.grey),
),
onPressed: () {
Navigator.push(
@ -134,23 +132,23 @@ class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with
),
),
new Container(
margin: EdgeInsets.only(left: 8, bottom: 4),
alignment: FractionalOffset.topCenter,
child: new ScaleTransition(
scale: new CurvedAnimation(
parent: _controller,
curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0,
curve: Curves.easeOut),
curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
),
child: new FloatingActionButton(
backgroundColor: Colors.white,
heroTag: null,
mini: true,
//mini: true,
child: Text(
"Undo",
TranslationBase.of(context).undo,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14.0, color: Colors.grey),
style: TextStyle(fontSize: 12.0, color: Colors.grey),
),
onPressed: () {},
onPressed: undoVolume,
),
),
),
@ -159,14 +157,16 @@ class _H20FloatingActionButtonState extends State<H20FloatingActionButton> with
]),
);
}
void undoVolume() async {
GifLoaderDialogUtils.showMyDialog(context);
await widget.model.undoUserActivity();
GifLoaderDialogUtils.hideDialog(context);
}
}
class ActionButton extends StatelessWidget {
const ActionButton(
{Key key,
@required AnimationController controller,
@required this.text,
this.onTap})
const ActionButton({Key key, @required AnimationController controller, @required this.text, this.onTap})
: _controller = controller,
super(key: key);
@ -177,6 +177,7 @@ class ActionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 4, bottom: 8),
alignment: FractionalOffset.topCenter,
child: new ScaleTransition(
scale: new CurvedAnimation(
@ -184,16 +185,15 @@ class ActionButton extends StatelessWidget {
curve: new Interval(0.0, 1.0 - 0 / 6 / 2.0, curve: Curves.easeOut),
),
child: new FloatingActionButton(
heroTag: null,
backgroundColor: Colors.white,
mini: true,
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14.0, color: Colors.grey),
),
onPressed: onTap
),
heroTag: null,
backgroundColor: Colors.white,
//mini: true,
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 12.0, color: Colors.grey),
),
onPressed: onTap),
),
);
}

@ -29,7 +29,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
//import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart';

@ -8,13 +8,13 @@ import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobi
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmSMSDialog extends StatefulWidget {
final String phoneNumber;
@ -112,32 +112,31 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
height: 40,
color: Theme.of(context).primaryColor,
child: Stack(
children: [
Center(
child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
),
),
Positioned(child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
child: Texts(
'SMS',
color: Colors.white,
textAlign: TextAlign.center,
),
),
left: projectViewModel.isArabic? 2:0,
right: projectViewModel.isArabic? 0:2,
Positioned(
child: Container(
child: InkWell(
onTap: () => Navigator.pop(context),
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.white),
child: Icon(
Icons.clear,
color: Colors.grey[900],
)),
),
),
left: projectViewModel.isArabic ? 2 : 0,
right: projectViewModel.isArabic ? 0 : 2,
)
],
),
),
Image.asset(
@ -335,14 +334,13 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
void submit(MyBalanceViewModel model) {
if (verifyAccountForm.currentState.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
final activationCode =
digit1.text + digit2.text + digit3.text + digit4.text;
model
.checkActivationCodeForAdvancePayment(activationCode: activationCode)
.then((value) {})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.pop(context, true);
});
}

@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplai
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo;
@ -59,12 +59,14 @@ class _DentalComplaintsState extends State<DentalComplaints> {
}
getChiefComplaintsList() {
GifLoaderDialogUtils.showMyDialog(context);
getLanguageID();
ClinicListService service = new ClinicListService();
service
.getChiefComplaintsList(
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalChiefComplain']);
setState(() {
@ -75,8 +77,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
});
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -10,11 +10,11 @@ import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsLis
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
@ -235,6 +235,7 @@ class _QRCodeState extends State<QRCode> {
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service
.sendAppointmentQREmail(
widget.authUser.emailAddress,
@ -247,15 +248,14 @@ class _QRCodeState extends State<QRCode> {
widget.patientShareResponse.doctorSpeciality),
context)
.then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context);
}).catchError((err) {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6));
});
},
cancelFunction: () => {});
dialog.showAlertDialog(context);

@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class SearchByClinic extends StatefulWidget {
final List clnicIds;

@ -4,7 +4,6 @@ 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:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../SearchResults.dart';

@ -3,8 +3,8 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
// ignore: must_be_immutable
class DentalComplaintCard extends StatefulWidget {
@ -70,11 +70,13 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
service
.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
widget.listDentalChiefComplain.projectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['List_DentalDoctorChiefComplaintMapping']);
setState(() {
@ -114,9 +116,9 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToSearchResults(

@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../DoctorProfile.dart';

@ -16,7 +16,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:table_calendar/table_calendar.dart';
class CovidTimeSlots extends StatefulWidget {
@ -179,8 +178,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
children: <Widget>[
Container(
margin: EdgeInsets.all(10.0),
child: Text(
TranslationBase.of(context).selectAppo,
child: Text(TranslationBase.of(context).selectAppo,
style:
TextStyle(color: Colors.black, fontSize: 16.0)),
),
@ -493,10 +491,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(res);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully");
// Future.delayed(new Duration(milliseconds: 1800), () {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID,
docObject.projectID, docObject);
// });
} else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
@ -522,9 +518,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}
}).catchError((err) {
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo,
@ -543,8 +539,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID,
@ -553,17 +548,14 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
service
.getPatientShare(appointmentNo, clinicID, projectID, context)
.then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
navigateToPaymentAlert();
});
GifLoaderDialogUtils.hideDialog(context);
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
navigateToPaymentAlert();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
navigateToPaymentAlert() {
@ -576,12 +568,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
getCovidFreeSlots(BuildContext context, int projectID) {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
service.getCovidFreeSlots(context, projectID).then((res) {
print(res['COVID19_FreeTimeSlots']);
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['COVID19_FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['COVID19_FreeTimeSlots'];
print(res['COVID19_FreeTimeSlots'].length);
_getJSONSlots().then((value) => {
setState(() => {
widget.selectedClinicID =
@ -599,7 +591,6 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}
}).catchError((err) {
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class CovidDrivethruLocation extends StatefulWidget {
@override
@ -272,30 +271,29 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service
.getCovidPaymentInformation(context, int.parse(projectID))
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(
res['COVID19_PatientShare']);
print(covidPaymentInfoResponse.procedureNameField);
});
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
} else {}
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
)));
});
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -58,6 +59,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
ProjectViewModel projectViewModel;
AuthenticatedUser user;
VitalSignService _vitalSignService = locator<VitalSignService>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
var isVaiable = false;
@override
void initState() {
@ -728,6 +731,12 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
authenticatedUserObject.user;
Provider.of<ProjectViewModel>(context, listen: false)
.setUser(authenticatedUserObject.user);
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if(pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -180,7 +180,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
try {
String barcode = result;
GifLoaderDialogUtils.showMyDialog(context);
await BaseAppClient().get("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
await BaseAppClient().getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
onSuccess: (dynamic response, int statusCode) {
print(response);
var product = PharmacyProduct.fromJson(response["products"][0]);

@ -5,11 +5,11 @@ import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.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/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCareHistoryCard extends StatefulWidget {
ErRequestHistoryList erRequestHistoryList;
@ -178,6 +178,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
sendInvoiceEmail(context) {
ConfirmDialog.closeAlertDialog(context);
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.sendLiveCareInvoiceEmail(
widget.erRequestHistoryList.appointmentNo.toString(),
@ -189,8 +190,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
}).catchError((err) {
AppToast.showErrorToast(message: err);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
getAuthenticatedUser() async {

@ -3,9 +3,9 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryR
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class LiveCarePendingRequest extends StatefulWidget {
ErRequestHistoryList pendingERRequestHistoryList;
@ -149,19 +149,17 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
cancelLiveCareRequest() {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context)
.then((res) {
AppToast.showSuccessToast(
message: "LiveCare request cancelled successfully");
})
.catchError((err) {
print(err);
})
.showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6))
.then((value) {
widget.getLiveCareHistory();
});
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(
message: "LiveCare request cancelled successfully");
widget.getLiveCareHistory();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
}

@ -2,8 +2,8 @@ import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsRespon
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'ClinicTimingsDialog.dart';
@ -90,9 +90,11 @@ class _State extends State<ClinicCard> {
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
clinicsServiceTimingsResponse =
@ -129,8 +131,8 @@ class _State extends State<ClinicCard> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
@ -45,6 +46,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
var sharedPref = new AppSharedPreferences();
bool authenticated;
final authService = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
int mobileNumber;
String errorMsg = '';
SelectDeviceIMEIRES user;
@ -592,6 +594,13 @@ class _ConfirmLogin extends State<ConfirmLogin> {
Provider.of<ProjectViewModel>(context, listen: false)
.setUser(authenticatedUserObject.user);
getToDoCount();
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if(pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
@ -48,6 +49,7 @@ class _Login extends State<Login> {
var sharedPref = new AppSharedPreferences();
bool isLoading = false;
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@ -256,6 +258,12 @@ class _Login extends State<Login> {
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if(pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -12,7 +12,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
class AskDoctorPage extends StatelessWidget {
@override

@ -20,7 +20,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart';

@ -3,9 +3,9 @@ import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class SmartWatchInstructions extends StatefulWidget {
@ -796,7 +796,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
getLastPatientRecord(BuildContext context) {
SmartWatchIntegrationService service = new SmartWatchIntegrationService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLastPatientRecord(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
print(res['Med_GetPatientLastRecordList']);
setState(() {
@ -807,9 +809,9 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
});
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
_openHealthDataList() {

@ -16,7 +16,7 @@ class PharmacyAddressService extends BaseService {
hasError = false;
Addresses selectedAddress;
try {
await baseAppClient.get("$GET_CUSTOMERS_ADDRESSES$customerId",
await baseAppClient.getPharmacy("$GET_CUSTOMERS_ADDRESSES$customerId",
onSuccess: (dynamic response, int statusCode) async {
addresses.clear();
var savedAddress =
@ -45,7 +45,7 @@ class PharmacyAddressService extends BaseService {
Future getCountries(String countryName) async {
hasError = false;
try {
await baseAppClient.get("$PHARMACY_GET_COUNTRY",
await baseAppClient.getPharmacy("$PHARMACY_GET_COUNTRY",
onSuccess: (dynamic response, int statusCode) {
// countries.clear();
response['countries'].forEach((item) {

@ -104,7 +104,7 @@ class ProductDetailService extends BaseService {
Future notifyMe(customerId, itemID) async {
hasError = false;
await baseAppClient.get(SUBSCRIBE_PRODUCT + "SinceId=$customerId&ProductId=$itemID", onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(SUBSCRIBE_PRODUCT + "SinceId=$customerId&ProductId=$itemID", onSuccess: (dynamic response, int statusCode) {
AppToast.showSuccessToast(message: 'You will be notified when product available');
}, onFailure: (String error, int statusCode) {
hasError = true;

File diff suppressed because it is too large Load Diff

@ -13,30 +13,38 @@ class AppBarChart extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
height: 400,
margin: EdgeInsets.only(top: 60),
//margin: EdgeInsets.only(top: 60),
child: charts.BarChart(
seriesList,
// animate: animate,
domainAxis: charts.OrdinalAxisSpec(
renderSpec: charts.GridlineRendererSpec(
labelAnchor: charts.TickLabelAnchor.after,
labelRotation: -30,
labelOffsetFromAxisPx: 30,
labelOffsetFromTickPx: 15,
labelJustification: charts.TickLabelJustification.inside,
),
),
/// Customize the primary measure axis using a small tick renderer.
/// Use String instead of num for ordinal domain axis
/// (typically bar charts).
primaryMeasureAxis: new charts.NumericAxisSpec(
renderSpec: new charts.GridlineRendererSpec(
// Display the measure axis labels below the gridline.
//
// 'Before' & 'after' follow the axis value direction.
// Vertical axes draw 'before' below & 'after' above the tick.
// Horizontal axes draw 'before' left & 'after' right the tick.
labelAnchor: charts.TickLabelAnchor.before,
// Display the measure axis labels below the gridline.
//
// 'Before' & 'after' follow the axis value direction.
// Vertical axes draw 'before' below & 'after' above the tick.
// Horizontal axes draw 'before' left & 'after' right the tick.
labelAnchor: charts.TickLabelAnchor.before,
// Left justify the text in the axis.
//
// Note: outside means that the secondary measure axis would right
// justify.
labelJustification:
charts.TickLabelJustification.outside,
)),
// Left justify the text in the axis.
//
// Note: outside means that the secondary measure axis would right
// justify.
labelJustification: charts.TickLabelJustification.outside,
)),
),
);
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -43,6 +44,7 @@ class _AppDrawerState extends State<AppDrawer> {
ProjectViewModel projectProvider;
var sharedPref = new AppSharedPreferences();
var familyFileProvider = FamilyFilesProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
AuthenticatedUser user;
AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject =
@ -593,6 +595,11 @@ class _AppDrawerState extends State<AppDrawer> {
authenticatedUserObject.user;
Provider.of<ProjectViewModel>(context, listen: false)
.setUser(authenticatedUserObject.user);
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if(pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -44,78 +44,89 @@ class AppScaffold extends StatelessWidget {
final List<String> infoList;
final Color backgroundColor;
final double preferredSize;
final bool showHomeAppBarIcon;
final List<Widget> appBarIcons;
final List<ImagesInfo> imagesInfo;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
AppScaffold(
{@required this.body,
this.appBarTitle = '',
this.isLoading = false,
this.isShowAppBar = false,
this.hasAppBarParam,
this.bottomSheet,
this.baseViewModel,
this.floatingActionButton,
this.isPharmacy = false,
this.title,
this.description,
this.isShowDecPage = true,
this.isBottomBar,
this.backgroundColor,
this.preferredSize = 0.0,
this.appBarIcons,
this.infoList, this.imagesInfo});
this.appBarTitle = '',
this.isLoading = false,
this.isShowAppBar = false,
this.hasAppBarParam,
this.bottomSheet,
this.baseViewModel,
this.floatingActionButton,
this.isPharmacy = false,
this.title,
this.description,
this.isShowDecPage = true,
this.isBottomBar,
this.backgroundColor,
this.preferredSize = 0.0,
this.showHomeAppBarIcon = true,
this.appBarIcons,
this.infoList,
this.imagesInfo});
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
return Scaffold(
backgroundColor:
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar? AppBarWidget(
appBarTitle:appBarTitle,
appBarIcons:appBarIcons,
isPharmacy: isPharmacy,
isShowDecPage: isShowDecPage,
):null,
backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
appBar: isShowAppBar
? AppBarWidget(
appBarTitle: appBarTitle,
appBarIcons: appBarIcons,
showHomeAppBarIcon: showHomeAppBarIcon,
isPharmacy: isPharmacy,
isShowDecPage: isShowDecPage,
)
: null,
bottomSheet: bottomSheet,
body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage)
isShowDecPage)
? NotAutPage(
title: title ?? appBarTitle,
description: description,
infoList: infoList,
imagesInfo: imagesInfo,
)
title: title ?? appBarTitle,
description: description,
infoList: infoList,
imagesInfo: imagesInfo,
)
: baseViewModel != null
? NetworkBaseView(
child: body,
baseViewModel: baseViewModel,
)
: body,
? NetworkBaseView(
child: body,
baseViewModel: baseViewModel,
)
: body,
floatingActionButton: floatingActionButton,
);
}
buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
}
class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
final AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
final String appBarTitle;
final bool showHomeAppBarIcon;
final List<Widget> appBarIcons;
final bool isPharmacy;
final bool isShowDecPage;
AppBarWidget({this.appBarTitle, this.appBarIcons,
this.isPharmacy = true, this.isShowDecPage = true});
AppBarWidget(
{this.appBarTitle,
this.showHomeAppBarIcon,
this.appBarIcons,
this.isPharmacy = true,
this.isShowDecPage = true});
@override
Widget build(BuildContext context) {
@ -127,10 +138,9 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
return AppBar(
elevation: 0,
backgroundColor:
isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color,
isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color,
textTheme: TextTheme(
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Text(
authenticatedUserObject.isLogin || !isShowDecPage
@ -139,8 +149,7 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontFamily:
projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
@ -150,27 +159,25 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget {
actions: <Widget>[
isPharmacy
? IconButton(
icon: Icon(Icons.shopping_cart),
icon: Icon(Icons.shopping_cart),
color: Colors.white,
onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/'));
})
: Container(),
if (showHomeAppBarIcon)
IconButton(
icon: Icon(FontAwesomeIcons.home),
color: Colors.white,
onPressed: () {
Navigator.of(context)
.popUntil(ModalRoute.withName('/'));
})
: Container(),
IconButton(
icon: Icon(FontAwesomeIcons.home),
color: Colors.white,
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
},
),
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
},
),
if (appBarIcons != null) ...appBarIcons
],
);
}

@ -1,53 +1,41 @@
import 'dart:collection';
import 'dart:convert';
import 'dart:math';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/ErService/NearestEr.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_admissions_page.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.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/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_recognition_result.dart';
import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart';
import 'dart:math';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
class BottomBarSearch extends StatefulWidget {
@override
@ -76,6 +64,7 @@ class _SearchBot extends State<BottomBarSearch> {
bool _isInit = true;
TextEditingController searchController = TextEditingController();
@override
void initState() {
requestPermissions();
@ -432,10 +421,12 @@ class _SearchBot extends State<BottomBarSearch> {
List<String> arr = [];
List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getDoctorsList(clinicId, projectId, false, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -483,9 +474,9 @@ class _SearchBot extends State<BottomBarSearch> {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToDoctorProfile(context, docObject, docProfile,

@ -40,6 +40,7 @@ import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.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/widgets/robo-search/robosearch.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -54,8 +55,6 @@ import 'package:speech_to_text/speech_to_text.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:flutter/cupertino.dart';
import 'package:smart_progress_bar/smart_progress_bar.dart';
import 'package:url_launcher/url_launcher.dart';
class FloatingSearchButton extends StatefulWidget {
@ -734,10 +733,12 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
List<String> arr = [];
List<String> arrDistance = [];
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.getDoctorsList(clinicId, projectId, isNearest, context,
doctorId: doctorId, doctorName: doctorName)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['SearchDoctorsByTime_IsVoiceCommandList'] != null &&
@ -785,9 +786,9 @@ class _FloatingSearchButton extends State<FloatingSearchButton>
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
}).showProgressBar(
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
});
}
Future navigateToDoctorProfile(context, docObject, docProfile,

@ -111,8 +111,6 @@ dependencies:
#Circular progress bar for reverse timer
circular_countdown_timer: ^0.0.5
smart_progress_bar: ^0.1.6
#Just Audio to play ringing for incoming video call
just_audio: ^0.3.4

Loading…
Cancel
Save