Merge branch 'master' into enad_pharmacy2
# Conflicts: # lib/config/config.dart # lib/widgets/others/app_scaffold_widget.dartmerge-update-with-lab-changes
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 97 KiB |
|
After Width: | Height: | Size: 19 KiB |
@ -1,310 +0,0 @@
|
||||
PODS:
|
||||
- barcode_scan (0.0.1):
|
||||
- Flutter
|
||||
- MTBBarcodeScanner
|
||||
- SwiftProtobuf
|
||||
- connectivity (0.0.1):
|
||||
- Flutter
|
||||
- Reachability
|
||||
- connectivity_for_web (0.1.0):
|
||||
- Flutter
|
||||
- connectivity_macos (0.0.1):
|
||||
- Flutter
|
||||
- device_info (0.0.1):
|
||||
- Flutter
|
||||
- Firebase/Core (6.23.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseAnalytics (= 6.4.2)
|
||||
- Firebase/CoreOnly (6.23.0):
|
||||
- FirebaseCore (= 6.6.7)
|
||||
- Firebase/Messaging (6.23.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 4.3.1)
|
||||
- firebase_messaging (0.0.1):
|
||||
- Firebase/Core
|
||||
- Firebase/Messaging
|
||||
- Flutter
|
||||
- FirebaseAnalytics (6.4.2):
|
||||
- FirebaseCore (~> 6.6)
|
||||
- FirebaseInstallations (~> 1.2)
|
||||
- GoogleAppMeasurement (= 6.4.2)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 6.0)
|
||||
- GoogleUtilities/Network (~> 6.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 6.0)"
|
||||
- nanopb (= 0.3.9011)
|
||||
- FirebaseAnalyticsInterop (1.5.0)
|
||||
- FirebaseCore (6.6.7):
|
||||
- FirebaseCoreDiagnostics (~> 1.2)
|
||||
- FirebaseCoreDiagnosticsInterop (~> 1.2)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/Logger (~> 6.5)
|
||||
- FirebaseCoreDiagnostics (1.2.4):
|
||||
- FirebaseCoreDiagnosticsInterop (~> 1.2)
|
||||
- GoogleDataTransportCCTSupport (~> 3.0)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/Logger (~> 6.5)
|
||||
- nanopb (~> 0.3.901)
|
||||
- FirebaseCoreDiagnosticsInterop (1.2.0)
|
||||
- FirebaseInstallations (1.2.0):
|
||||
- FirebaseCore (~> 6.6)
|
||||
- GoogleUtilities/Environment (~> 6.6)
|
||||
- GoogleUtilities/UserDefaults (~> 6.6)
|
||||
- PromisesObjC (~> 1.2)
|
||||
- FirebaseInstanceID (4.3.4):
|
||||
- FirebaseCore (~> 6.6)
|
||||
- FirebaseInstallations (~> 1.0)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/UserDefaults (~> 6.5)
|
||||
- FirebaseMessaging (4.3.1):
|
||||
- FirebaseAnalyticsInterop (~> 1.5)
|
||||
- FirebaseCore (~> 6.6)
|
||||
- FirebaseInstanceID (~> 4.3)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.5)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/Reachability (~> 6.5)
|
||||
- GoogleUtilities/UserDefaults (~> 6.5)
|
||||
- Protobuf (>= 3.9.2, ~> 3.9)
|
||||
- Flutter (1.0.0)
|
||||
- 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
|
||||
- GoogleAppMeasurement (6.4.2):
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 6.0)
|
||||
- GoogleUtilities/Network (~> 6.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 6.0)"
|
||||
- nanopb (= 0.3.9011)
|
||||
- GoogleDataTransport (6.0.0)
|
||||
- GoogleDataTransportCCTSupport (3.0.0):
|
||||
- GoogleDataTransport (~> 6.0)
|
||||
- nanopb (~> 0.3.901)
|
||||
- GoogleUtilities/AppDelegateSwizzler (6.6.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network
|
||||
- GoogleUtilities/Environment (6.6.0):
|
||||
- PromisesObjC (~> 1.2)
|
||||
- GoogleUtilities/Logger (6.6.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/MethodSwizzler (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- "GoogleUtilities/NSData+zlib"
|
||||
- GoogleUtilities/Reachability
|
||||
- "GoogleUtilities/NSData+zlib (6.6.0)"
|
||||
- GoogleUtilities/Reachability (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/UserDefaults (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- hexcolor (0.0.1):
|
||||
- Flutter
|
||||
- image_cropper (0.0.2):
|
||||
- Flutter
|
||||
- TOCropViewController (~> 2.5.2)
|
||||
- image_picker (0.0.1):
|
||||
- Flutter
|
||||
- local_auth (0.0.1):
|
||||
- Flutter
|
||||
- manage_calendar_events (0.0.1):
|
||||
- Flutter
|
||||
- map_launcher (0.0.1):
|
||||
- Flutter
|
||||
- MTBBarcodeScanner (5.0.11)
|
||||
- nanopb (0.3.9011):
|
||||
- nanopb/decode (= 0.3.9011)
|
||||
- nanopb/encode (= 0.3.9011)
|
||||
- nanopb/decode (0.3.9011)
|
||||
- nanopb/encode (0.3.9011)
|
||||
- path_provider_linux (0.0.1):
|
||||
- Flutter
|
||||
- "permission_handler (5.0.1+1)":
|
||||
- Flutter
|
||||
- PromisesObjC (1.2.8)
|
||||
- Protobuf (3.11.4)
|
||||
- Reachability (3.2)
|
||||
- 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
|
||||
- SwiftProtobuf (1.10.2)
|
||||
- TOCropViewController (2.5.4)
|
||||
- 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
|
||||
|
||||
DEPENDENCIES:
|
||||
- barcode_scan (from `.symlinks/plugins/barcode_scan/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_info (from `.symlinks/plugins/device_info/ios`)
|
||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- 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`)
|
||||
- hexcolor (from `.symlinks/plugins/hexcolor/ios`)
|
||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
||||
- image_picker (from `.symlinks/plugins/image_picker/ios`)
|
||||
- local_auth (from `.symlinks/plugins/local_auth/ios`)
|
||||
- manage_calendar_events (from `.symlinks/plugins/manage_calendar_events/ios`)
|
||||
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
|
||||
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
|
||||
- permission_handler (from `.symlinks/plugins/permission_handler/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`)
|
||||
- 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`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Firebase
|
||||
- FirebaseAnalytics
|
||||
- FirebaseAnalyticsInterop
|
||||
- FirebaseCore
|
||||
- FirebaseCoreDiagnostics
|
||||
- FirebaseCoreDiagnosticsInterop
|
||||
- FirebaseInstallations
|
||||
- FirebaseInstanceID
|
||||
- FirebaseMessaging
|
||||
- GoogleAppMeasurement
|
||||
- GoogleDataTransport
|
||||
- GoogleDataTransportCCTSupport
|
||||
- GoogleUtilities
|
||||
- MTBBarcodeScanner
|
||||
- nanopb
|
||||
- PromisesObjC
|
||||
- Protobuf
|
||||
- Reachability
|
||||
- SwiftProtobuf
|
||||
- TOCropViewController
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
barcode_scan:
|
||||
:path: ".symlinks/plugins/barcode_scan/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_info:
|
||||
:path: ".symlinks/plugins/device_info/ios"
|
||||
firebase_messaging:
|
||||
:path: ".symlinks/plugins/firebase_messaging/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
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"
|
||||
hexcolor:
|
||||
:path: ".symlinks/plugins/hexcolor/ios"
|
||||
image_cropper:
|
||||
:path: ".symlinks/plugins/image_cropper/ios"
|
||||
image_picker:
|
||||
:path: ".symlinks/plugins/image_picker/ios"
|
||||
local_auth:
|
||||
:path: ".symlinks/plugins/local_auth/ios"
|
||||
manage_calendar_events:
|
||||
:path: ".symlinks/plugins/manage_calendar_events/ios"
|
||||
map_launcher:
|
||||
:path: ".symlinks/plugins/map_launcher/ios"
|
||||
path_provider_linux:
|
||||
:path: ".symlinks/plugins/path_provider_linux/ios"
|
||||
permission_handler:
|
||||
:path: ".symlinks/plugins/permission_handler/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"
|
||||
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"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
|
||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
|
||||
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
|
||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
||||
Firebase: 585ae467b3edda6a5444e788fda6888f024d8d6f
|
||||
firebase_messaging: 21344b3b3a7d9d325d63a70e3750c0c798fe1e03
|
||||
FirebaseAnalytics: 558f7a03d19de451093032c806f39d5f9dff096e
|
||||
FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae
|
||||
FirebaseCore: a2788a0d5f6c1dff17b8f79b4a73654a8d4bfdbd
|
||||
FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159
|
||||
FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
|
||||
FirebaseInstallations: 2119fb3e46b0a88bfdbf12562f855ee3252462fa
|
||||
FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b
|
||||
FirebaseMessaging: 828e66eb357a893e3cebd9ee0f6bc1941447cc94
|
||||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
|
||||
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
|
||||
flutter_inappwebview: 69dfbac46157b336ffbec19ca6dfd4638c7bf189
|
||||
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
|
||||
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
|
||||
GoogleAppMeasurement: 2253e99c1f22638cf234c059144660c338ad76c3
|
||||
GoogleDataTransport: 061fe7d9b476710e3cd8ea51e8e07d8b67c2b420
|
||||
GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5
|
||||
GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1
|
||||
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
|
||||
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
|
||||
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
|
||||
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
|
||||
manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
|
||||
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
|
||||
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
|
||||
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
|
||||
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
|
||||
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
|
||||
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
|
||||
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
|
||||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
|
||||
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
|
||||
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
|
||||
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
|
||||
SwiftProtobuf: bec1ae7d686ff73dd09d79866154f4970b891410
|
||||
TOCropViewController: 2a1ae1242600b1f2d996fd91a5268b2309a33b5c
|
||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
|
||||
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
|
||||
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
|
||||
|
||||
PODFILE CHECKSUM: 2609452b760cd11039b14039a86564367a3d8ab9
|
||||
|
||||
COCOAPODS: 1.9.1
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,13 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
enum Ambulate { Wheelchair, Walker, Stretcher, None }
|
||||
|
||||
extension SelectedAmbulate on Ambulate {
|
||||
String getAmbulateTitle(BuildContext context) {
|
||||
switch (this) {
|
||||
case Ambulate.Wheelchair:
|
||||
return 'Wheelchair';
|
||||
break;
|
||||
case Ambulate.Walker:
|
||||
return 'Walker';
|
||||
break;
|
||||
case Ambulate.Stretcher:
|
||||
return 'Stretcher';
|
||||
break;
|
||||
case Ambulate.None:
|
||||
return 'None';
|
||||
break;
|
||||
}
|
||||
return 'None';
|
||||
}
|
||||
|
||||
int selectAmbulateNumber() {
|
||||
switch (this) {
|
||||
case Ambulate.Wheelchair:
|
||||
return 0;
|
||||
break;
|
||||
case Ambulate.Walker:
|
||||
return 1;
|
||||
break;
|
||||
case Ambulate.Stretcher:
|
||||
return 2;
|
||||
break;
|
||||
case Ambulate.None:
|
||||
return 3;
|
||||
break;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
Ambulate getAmbulateById(int id) {
|
||||
switch (id) {
|
||||
case 0:
|
||||
return Ambulate.Wheelchair;
|
||||
break;
|
||||
case 1:
|
||||
return Ambulate.Walker;
|
||||
break;
|
||||
case 2:
|
||||
return Ambulate.Stretcher;
|
||||
break;
|
||||
case 3:
|
||||
return Ambulate.None;
|
||||
break;
|
||||
}
|
||||
|
||||
return Ambulate.None;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
enum OrderService { AMBULANCE }
|
||||
|
||||
extension SelectedOrderService on OrderService {
|
||||
int getIdOrderService() {
|
||||
switch (this) {
|
||||
case OrderService.AMBULANCE:
|
||||
return 4;
|
||||
break;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
OrderService getOrderServiceById(int id) {
|
||||
switch (id) {
|
||||
case 4:
|
||||
return OrderService.AMBULANCE;
|
||||
break;
|
||||
}
|
||||
|
||||
return OrderService.AMBULANCE;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
class List_BabyInformationModel {
|
||||
int alertBy;
|
||||
int babyID;
|
||||
String babyName;
|
||||
DateTime dOB;
|
||||
int gender;
|
||||
String genderDescription;
|
||||
int patientID;
|
||||
int userID;
|
||||
|
||||
List_BabyInformationModel(
|
||||
{this.alertBy,
|
||||
this.babyID,
|
||||
this.babyName,
|
||||
this.dOB,
|
||||
this.gender,
|
||||
this.genderDescription,
|
||||
this.patientID,
|
||||
this.userID});
|
||||
|
||||
List_BabyInformationModel.fromJson(Map<String, dynamic> json) {
|
||||
alertBy = json['AlertBy'];
|
||||
babyID = json['BabyID'];
|
||||
babyName = json['BabyName'];
|
||||
dOB = DateUtil.convertStringToDate(json['DOB']);
|
||||
gender = json['Gender'];
|
||||
genderDescription = json['GenderDescription'];
|
||||
patientID = json['PatientID'];
|
||||
userID = json['UserID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AlertBy'] = this.alertBy;
|
||||
data['BabyID'] = this.babyID;
|
||||
data['BabyName'] = this.babyName;
|
||||
data['DOB'] = this.dOB;
|
||||
data['Gender'] = this.gender;
|
||||
data['GenderDescription'] = this.genderDescription;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['UserID'] = this.userID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
class CreateNewBaby {
|
||||
String babyName;
|
||||
String gender;
|
||||
String strDOB;
|
||||
int editedBy;
|
||||
int createdBy;
|
||||
bool tempValue;
|
||||
int userID;
|
||||
bool isLogin;
|
||||
int alertBy;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
|
||||
CreateNewBaby(
|
||||
{this.babyName,
|
||||
this.gender,
|
||||
this.strDOB,
|
||||
this.editedBy,
|
||||
this.createdBy,
|
||||
this.tempValue,
|
||||
this.userID,
|
||||
this.isLogin,
|
||||
this.alertBy,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType});
|
||||
|
||||
CreateNewBaby.fromJson(Map<String, dynamic> json) {
|
||||
babyName = json['BabyName'];
|
||||
gender = json['Gender'];
|
||||
strDOB = json['StrDOB'];
|
||||
editedBy = json['EditedBy'];
|
||||
createdBy = json['CreatedBy'];
|
||||
tempValue = json['TempValue'];
|
||||
userID = json['UserID'];
|
||||
isLogin = json['IsLogin'];
|
||||
alertBy = json['AlertBy'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['BabyName'] = this.babyName;
|
||||
data['Gender'] = this.gender;
|
||||
data['StrDOB'] = this.strDOB;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['TempValue'] = this.tempValue;
|
||||
data['UserID'] = this.userID;
|
||||
data['IsLogin'] = this.isLogin;
|
||||
data['AlertBy'] = this.alertBy;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,165 @@
|
||||
class CreateNewUser_New {
|
||||
Null date;
|
||||
int languageID;
|
||||
int serviceName;
|
||||
Null time;
|
||||
Null androidLink;
|
||||
Null authenticationTokenID;
|
||||
Null data;
|
||||
bool dataw;
|
||||
int dietType;
|
||||
Null errorCode;
|
||||
Null errorEndUserMessage;
|
||||
Null errorEndUserMessageN;
|
||||
Null errorMessage;
|
||||
int errorType;
|
||||
int foodCategory;
|
||||
Null iOSLink;
|
||||
bool isAuthenticated;
|
||||
int mealOrderStatus;
|
||||
int mealType;
|
||||
int messageStatus;
|
||||
int numberOfResultRecords;
|
||||
Null patientBlodType;
|
||||
Null successMsg;
|
||||
Null successMsgN;
|
||||
Null htmlResult;
|
||||
bool isHMGPatient;
|
||||
bool isRegister;
|
||||
bool isSendSMS;
|
||||
Null listBabyInformationModel;
|
||||
Null listBabyNeedReminderModel;
|
||||
Null listCreateVaccinationTableModel;
|
||||
Null listHisPatientModel;
|
||||
Null listUserInformationModel;
|
||||
Null listUserInformationModelNew;
|
||||
Null listVaccinationTableModel;
|
||||
Null tokinID;
|
||||
int userID;
|
||||
Null verificationCode;
|
||||
|
||||
CreateNewUser_New(
|
||||
{this.date,
|
||||
this.languageID,
|
||||
this.serviceName,
|
||||
this.time,
|
||||
this.androidLink,
|
||||
this.authenticationTokenID,
|
||||
this.data,
|
||||
this.dataw,
|
||||
this.dietType,
|
||||
this.errorCode,
|
||||
this.errorEndUserMessage,
|
||||
this.errorEndUserMessageN,
|
||||
this.errorMessage,
|
||||
this.errorType,
|
||||
this.foodCategory,
|
||||
this.iOSLink,
|
||||
this.isAuthenticated,
|
||||
this.mealOrderStatus,
|
||||
this.mealType,
|
||||
this.messageStatus,
|
||||
this.numberOfResultRecords,
|
||||
this.patientBlodType,
|
||||
this.successMsg,
|
||||
this.successMsgN,
|
||||
this.htmlResult,
|
||||
this.isHMGPatient,
|
||||
this.isRegister,
|
||||
this.isSendSMS,
|
||||
this.listBabyInformationModel,
|
||||
this.listBabyNeedReminderModel,
|
||||
this.listCreateVaccinationTableModel,
|
||||
this.listHisPatientModel,
|
||||
this.listUserInformationModel,
|
||||
this.listUserInformationModelNew,
|
||||
this.listVaccinationTableModel,
|
||||
this.tokinID,
|
||||
this.userID,
|
||||
this.verificationCode});
|
||||
|
||||
CreateNewUser_New.fromJson(Map<String, dynamic> json) {
|
||||
date = json['Date'];
|
||||
languageID = json['LanguageID'];
|
||||
serviceName = json['ServiceName'];
|
||||
time = json['Time'];
|
||||
androidLink = json['AndroidLink'];
|
||||
authenticationTokenID = json['AuthenticationTokenID'];
|
||||
data = json['Data'];
|
||||
dataw = json['Dataw'];
|
||||
dietType = json['DietType'];
|
||||
errorCode = json['ErrorCode'];
|
||||
errorEndUserMessage = json['ErrorEndUserMessage'];
|
||||
errorEndUserMessageN = json['ErrorEndUserMessageN'];
|
||||
errorMessage = json['ErrorMessage'];
|
||||
errorType = json['ErrorType'];
|
||||
foodCategory = json['FoodCategory'];
|
||||
iOSLink = json['IOSLink'];
|
||||
isAuthenticated = json['IsAuthenticated'];
|
||||
mealOrderStatus = json['MealOrderStatus'];
|
||||
mealType = json['MealType'];
|
||||
messageStatus = json['MessageStatus'];
|
||||
numberOfResultRecords = json['NumberOfResultRecords'];
|
||||
patientBlodType = json['PatientBlodType'];
|
||||
successMsg = json['SuccessMsg'];
|
||||
successMsgN = json['SuccessMsgN'];
|
||||
htmlResult = json['HtmlResult'];
|
||||
isHMGPatient = json['IsHMGPatient'];
|
||||
isRegister = json['IsRegister'];
|
||||
isSendSMS = json['IsSendSMS'];
|
||||
listBabyInformationModel = json['List_BabyInformationModel'];
|
||||
listBabyNeedReminderModel = json['List_BabyNeedReminderModel'];
|
||||
listCreateVaccinationTableModel = json['List_CreateVaccinationTableModel'];
|
||||
listHisPatientModel = json['List_His_PatientModel'];
|
||||
listUserInformationModel = json['List_UserInformationModel'];
|
||||
listUserInformationModelNew = json['List_UserInformationModel_New'];
|
||||
listVaccinationTableModel = json['List_VaccinationTableModel'];
|
||||
tokinID = json['TokinID'];
|
||||
userID = json['UserID'];
|
||||
verificationCode = json['VerificationCode'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Date'] = this.date;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['ServiceName'] = this.serviceName;
|
||||
data['Time'] = this.time;
|
||||
data['AndroidLink'] = this.androidLink;
|
||||
data['AuthenticationTokenID'] = this.authenticationTokenID;
|
||||
data['Data'] = this.data;
|
||||
data['Dataw'] = this.dataw;
|
||||
data['DietType'] = this.dietType;
|
||||
data['ErrorCode'] = this.errorCode;
|
||||
data['ErrorEndUserMessage'] = this.errorEndUserMessage;
|
||||
data['ErrorEndUserMessageN'] = this.errorEndUserMessageN;
|
||||
data['ErrorMessage'] = this.errorMessage;
|
||||
data['ErrorType'] = this.errorType;
|
||||
data['FoodCategory'] = this.foodCategory;
|
||||
data['IOSLink'] = this.iOSLink;
|
||||
data['IsAuthenticated'] = this.isAuthenticated;
|
||||
data['MealOrderStatus'] = this.mealOrderStatus;
|
||||
data['MealType'] = this.mealType;
|
||||
data['MessageStatus'] = this.messageStatus;
|
||||
data['NumberOfResultRecords'] = this.numberOfResultRecords;
|
||||
data['PatientBlodType'] = this.patientBlodType;
|
||||
data['SuccessMsg'] = this.successMsg;
|
||||
data['SuccessMsgN'] = this.successMsgN;
|
||||
data['HtmlResult'] = this.htmlResult;
|
||||
data['IsHMGPatient'] = this.isHMGPatient;
|
||||
data['IsRegister'] = this.isRegister;
|
||||
data['IsSendSMS'] = this.isSendSMS;
|
||||
data['List_BabyInformationModel'] = this.listBabyInformationModel;
|
||||
data['List_BabyNeedReminderModel'] = this.listBabyNeedReminderModel;
|
||||
data['List_CreateVaccinationTableModel'] =
|
||||
this.listCreateVaccinationTableModel;
|
||||
data['List_His_PatientModel'] = this.listHisPatientModel;
|
||||
data['List_UserInformationModel'] = this.listUserInformationModel;
|
||||
data['List_UserInformationModel_New'] = this.listUserInformationModelNew;
|
||||
data['List_VaccinationTableModel'] = this.listVaccinationTableModel;
|
||||
data['TokinID'] = this.tokinID;
|
||||
data['UserID'] = this.userID;
|
||||
data['VerificationCode'] = this.verificationCode;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
class CreateVaccinationTable {
|
||||
String givenAt;
|
||||
String status;
|
||||
String vaccinesDescription;
|
||||
String visit;
|
||||
|
||||
CreateVaccinationTable(
|
||||
{this.givenAt, this.status, this.vaccinesDescription, this.visit});
|
||||
|
||||
CreateVaccinationTable.fromJson(Map<String, dynamic> json) {
|
||||
givenAt = json['GivenAt'];
|
||||
status = json['Status'];
|
||||
vaccinesDescription = json['VaccinesDescription'];
|
||||
visit = json['Visit'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['GivenAt'] = this.givenAt;
|
||||
data['Status'] = this.status;
|
||||
data['VaccinesDescription'] = this.vaccinesDescription;
|
||||
data['Visit'] = this.visit;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
class DeleteBaby {
|
||||
bool isLogin;
|
||||
int babyID;
|
||||
int editedBy;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
|
||||
DeleteBaby(
|
||||
{this.isLogin,
|
||||
this.babyID,
|
||||
this.editedBy,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType});
|
||||
|
||||
DeleteBaby.fromJson(Map<String, dynamic> json) {
|
||||
isLogin = json['IsLogin'];
|
||||
babyID = json['BabyID'];
|
||||
editedBy = json['EditedBy'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['IsLogin'] = this.isLogin;
|
||||
data['BabyID'] = this.babyID;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
class GET_VACCINATIONS_ITEMSMODEL {
|
||||
String dESCRIPTION;
|
||||
String iTEMCODE;
|
||||
|
||||
GET_VACCINATIONS_ITEMSMODEL({this.dESCRIPTION, this.iTEMCODE});
|
||||
|
||||
GET_VACCINATIONS_ITEMSMODEL.fromJson(Map<String, dynamic> json) {
|
||||
dESCRIPTION = json['DESCRIPTION'];
|
||||
iTEMCODE = json['ITEM_CODE'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['DESCRIPTION'] = this.dESCRIPTION;
|
||||
data['ITEM_CODE'] = this.iTEMCODE;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
class List_UserInformationModel {
|
||||
int userID;
|
||||
String mobileNumber;
|
||||
String nationalID;
|
||||
String emailAddress;
|
||||
int patientID;
|
||||
int patientType;
|
||||
bool patientOutSA;
|
||||
int createdBy;
|
||||
int editedBy;
|
||||
|
||||
List_UserInformationModel(
|
||||
{this.userID,
|
||||
this.mobileNumber,
|
||||
this.nationalID,
|
||||
this.emailAddress,
|
||||
this.patientID,
|
||||
this.patientType,
|
||||
this.patientOutSA,
|
||||
this.createdBy,
|
||||
this.editedBy});
|
||||
|
||||
List_UserInformationModel.fromJson(Map<String, dynamic> json) {
|
||||
userID = json['UserID'];
|
||||
mobileNumber = json['MobileNumber'];
|
||||
nationalID = json['NationalID'];
|
||||
emailAddress = json['EmailAddress'];
|
||||
patientID = json['PatientID'];
|
||||
patientType = json['PatientType'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
createdBy = json['CreatedBy'];
|
||||
editedBy = json['EditedBy'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['UserID'] = this.userID;
|
||||
data['MobileNumber'] = this.mobileNumber;
|
||||
data['NationalID'] = this.nationalID;
|
||||
data['EmailAddress'] = this.emailAddress;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
class PatientAllPresOrders {
|
||||
int iD;
|
||||
String patientID;
|
||||
bool patientOutSA;
|
||||
bool isOutPatient;
|
||||
int projectID;
|
||||
int nearestProjectID;
|
||||
double longitude;
|
||||
double latitude;
|
||||
String appointmentNo;
|
||||
String dischargeID;
|
||||
int lineItemNo;
|
||||
int status;
|
||||
String description;
|
||||
String descriptionN;
|
||||
String createdOn;
|
||||
int serviceID;
|
||||
int createdBy;
|
||||
String editedOn;
|
||||
int editedBy;
|
||||
int channel;
|
||||
dynamic clientRequestID;
|
||||
bool returnedToQueue;
|
||||
dynamic pickupDateTime;
|
||||
dynamic pickupLocationName;
|
||||
dynamic dropoffLocationName;
|
||||
int realRRTHaveTransactions;
|
||||
String nearestProjectDescription;
|
||||
String nearestProjectDescriptionN;
|
||||
String projectDescription;
|
||||
String projectDescriptionN;
|
||||
|
||||
PatientAllPresOrders(
|
||||
{this.iD,
|
||||
this.patientID,
|
||||
this.patientOutSA,
|
||||
this.isOutPatient,
|
||||
this.projectID,
|
||||
this.nearestProjectID,
|
||||
this.longitude,
|
||||
this.latitude,
|
||||
this.appointmentNo,
|
||||
this.dischargeID,
|
||||
this.lineItemNo,
|
||||
this.status,
|
||||
this.description,
|
||||
this.descriptionN,
|
||||
this.createdOn,
|
||||
this.serviceID,
|
||||
this.createdBy,
|
||||
this.editedOn,
|
||||
this.editedBy,
|
||||
this.channel,
|
||||
this.clientRequestID,
|
||||
this.returnedToQueue,
|
||||
this.pickupDateTime,
|
||||
this.pickupLocationName,
|
||||
this.dropoffLocationName,
|
||||
this.realRRTHaveTransactions,
|
||||
this.nearestProjectDescription,
|
||||
this.nearestProjectDescriptionN,
|
||||
this.projectDescription,
|
||||
this.projectDescriptionN});
|
||||
|
||||
PatientAllPresOrders.fromJson(Map<String, dynamic> json) {
|
||||
iD = json['ID'];
|
||||
patientID = json['PatientID'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
isOutPatient = json['IsOutPatient'];
|
||||
projectID = json['ProjectID'];
|
||||
nearestProjectID = json['NearestProjectID'];
|
||||
longitude = json['Longitude'];
|
||||
latitude = json['Latitude'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
dischargeID = json['DischargeID'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
status = json['Status'];
|
||||
description = json['Description'];
|
||||
descriptionN = json['DescriptionN'];
|
||||
createdOn = json['CreatedOn'];
|
||||
serviceID = json['ServiceID'];
|
||||
createdBy = json['CreatedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
channel = json['Channel'];
|
||||
clientRequestID = json['ClientRequestID'];
|
||||
returnedToQueue = json['ReturnedToQueue'];
|
||||
pickupDateTime = json['PickupDateTime'];
|
||||
pickupLocationName = json['PickupLocationName'];
|
||||
dropoffLocationName = json['DropoffLocationName'];
|
||||
realRRTHaveTransactions = json['RealRRT_HaveTransactions'];
|
||||
nearestProjectDescription = json['NearestProjectDescription'];
|
||||
nearestProjectDescriptionN = json['NearestProjectDescriptionN'];
|
||||
projectDescription = json['ProjectDescription'];
|
||||
projectDescriptionN = json['ProjectDescriptionN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ID'] = this.iD;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['IsOutPatient'] = this.isOutPatient;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['NearestProjectID'] = this.nearestProjectID;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['DischargeID'] = this.dischargeID;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['Status'] = this.status;
|
||||
data['Description'] = this.description;
|
||||
data['DescriptionN'] = this.descriptionN;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['ServiceID'] = this.serviceID;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['Channel'] = this.channel;
|
||||
data['ClientRequestID'] = this.clientRequestID;
|
||||
data['ReturnedToQueue'] = this.returnedToQueue;
|
||||
data['PickupDateTime'] = this.pickupDateTime;
|
||||
data['PickupLocationName'] = this.pickupLocationName;
|
||||
data['DropoffLocationName'] = this.dropoffLocationName;
|
||||
data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions;
|
||||
data['NearestProjectDescription'] = this.nearestProjectDescription;
|
||||
data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN;
|
||||
data['ProjectDescription'] = this.projectDescription;
|
||||
data['ProjectDescriptionN'] = this.projectDescriptionN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,207 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
|
||||
|
||||
import 'get_all_transportation_method_list_model.dart';
|
||||
|
||||
class PatientER {
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
int orderServiceID;
|
||||
String patientIdentificationID;
|
||||
int direction;
|
||||
bool haveAppointment;
|
||||
int tripType;
|
||||
int pickupUrgency;
|
||||
int pickupSpot;
|
||||
String pickupDateTime;
|
||||
int transportationMethodId;
|
||||
int selectedAmbulate;
|
||||
String requesterNote;
|
||||
int requesterFileNo;
|
||||
String requesterMobileNo;
|
||||
bool requesterIsOutSA;
|
||||
int isOutPatient;
|
||||
String pickupLocationName;
|
||||
String dropoffLocationName;
|
||||
int projectID;
|
||||
int createdBy;
|
||||
int lineItemNo;
|
||||
int cost;
|
||||
double vAT;
|
||||
double totalPrice;
|
||||
String pickupLocationLattitude;
|
||||
String pickupLocationLongitude;
|
||||
String dropoffLocationLattitude;
|
||||
String dropoffLocationLongitude;
|
||||
String latitude;
|
||||
String longitude;
|
||||
String appointmentNo;
|
||||
dynamic appointmentClinicName;
|
||||
dynamic appointmentDoctorName;
|
||||
dynamic appointmentBranch;
|
||||
dynamic appointmentTime;
|
||||
PatientERTransportationMethod patientERTransportationMethod;
|
||||
Ambulate ambulate;
|
||||
PatientER(
|
||||
{this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType,
|
||||
this.orderServiceID = 4,
|
||||
this.patientIdentificationID,
|
||||
this.direction,
|
||||
this.haveAppointment,
|
||||
this.tripType,
|
||||
this.pickupUrgency,
|
||||
this.pickupSpot,
|
||||
this.pickupDateTime,
|
||||
this.transportationMethodId,
|
||||
this.selectedAmbulate,
|
||||
this.requesterNote,
|
||||
this.requesterFileNo,
|
||||
this.requesterMobileNo,
|
||||
this.requesterIsOutSA,
|
||||
this.isOutPatient,
|
||||
this.pickupLocationName,
|
||||
this.dropoffLocationName,
|
||||
this.projectID,
|
||||
this.createdBy,
|
||||
this.lineItemNo,
|
||||
this.cost,
|
||||
this.vAT,
|
||||
this.totalPrice,
|
||||
this.pickupLocationLattitude,
|
||||
this.pickupLocationLongitude,
|
||||
this.dropoffLocationLattitude,
|
||||
this.dropoffLocationLongitude,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.appointmentNo,
|
||||
this.appointmentClinicName,
|
||||
this.appointmentDoctorName,
|
||||
this.appointmentBranch,
|
||||
this.appointmentTime,
|
||||
this.patientERTransportationMethod,
|
||||
this.ambulate});
|
||||
|
||||
PatientER.fromJson(Map<String, dynamic> json) {
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
orderServiceID = json['OrderServiceID'];
|
||||
patientIdentificationID = json['PatientIdentificationID'];
|
||||
direction = json['Direction'];
|
||||
haveAppointment = json['HaveAppointment'];
|
||||
tripType = json['TripType'];
|
||||
pickupUrgency = json['PickupUrgency'];
|
||||
pickupSpot = json['PickupSpot'];
|
||||
pickupDateTime = json['PickupDateTime'];
|
||||
transportationMethodId = json['TransportationMethodId'];
|
||||
selectedAmbulate = json['SelectedAmbulate'];
|
||||
requesterNote = json['RequesterNote'];
|
||||
requesterFileNo = json['RequesterFileNo'];
|
||||
requesterMobileNo = json['RequesterMobileNo'];
|
||||
requesterIsOutSA = json['RequesterIsOutSA'];
|
||||
isOutPatient = json['IsOutPatient'];
|
||||
pickupLocationName = json['PickupLocationName'];
|
||||
dropoffLocationName = json['DropoffLocationName'];
|
||||
projectID = json['ProjectID'];
|
||||
createdBy = json['CreatedBy'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
cost = json['Cost'];
|
||||
vAT = json['VAT'];
|
||||
totalPrice = json['TotalPrice'];
|
||||
pickupLocationLattitude = json['PickupLocationLattitude'];
|
||||
pickupLocationLongitude = json['PickupLocationLongitude'];
|
||||
dropoffLocationLattitude = json['DropoffLocationLattitude'];
|
||||
dropoffLocationLongitude = json['DropoffLocationLongitude'];
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
appointmentClinicName = json['AppointmentClinicName'];
|
||||
appointmentDoctorName = json['AppointmentDoctorName'];
|
||||
appointmentBranch = json['AppointmentBranch'];
|
||||
appointmentTime = json['AppointmentTime'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['OrderServiceID'] = this.orderServiceID;
|
||||
data['PatientIdentificationID'] = this.patientIdentificationID;
|
||||
data['Direction'] = this.direction;
|
||||
data['HaveAppointment'] = this.haveAppointment;
|
||||
data['TripType'] = this.tripType;
|
||||
data['PickupUrgency'] = this.pickupUrgency;
|
||||
data['PickupSpot'] = this.pickupSpot;
|
||||
data['PickupDateTime'] = this.pickupDateTime;
|
||||
data['TransportationMethodId'] = this.transportationMethodId;
|
||||
data['SelectedAmbulate'] = this.selectedAmbulate;
|
||||
data['RequesterNote'] = this.requesterNote;
|
||||
data['RequesterFileNo'] = this.requesterFileNo;
|
||||
data['RequesterMobileNo'] = this.requesterMobileNo;
|
||||
data['RequesterIsOutSA'] = this.requesterIsOutSA;
|
||||
data['IsOutPatient'] = this.isOutPatient;
|
||||
data['PickupLocationName'] = this.pickupLocationName;
|
||||
data['DropoffLocationName'] = this.dropoffLocationName;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['Cost'] = this.cost;
|
||||
data['VAT'] = this.vAT;
|
||||
data['TotalPrice'] = this.totalPrice;
|
||||
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
|
||||
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
|
||||
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
|
||||
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['AppointmentClinicName'] = this.appointmentClinicName;
|
||||
data['AppointmentDoctorName'] = this.appointmentDoctorName;
|
||||
data['AppointmentBranch'] = this.appointmentBranch;
|
||||
data['AppointmentTime'] = this.appointmentTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,204 @@
|
||||
class PickUpRequestPresOrder {
|
||||
int id;
|
||||
int presOrderID;
|
||||
String createDate;
|
||||
String lastEditDate;
|
||||
int createdBy;
|
||||
int lastEditBy;
|
||||
bool isActive;
|
||||
String requestNo;
|
||||
int requesterId;
|
||||
int direction;
|
||||
bool haveAppointment;
|
||||
dynamic appointmentId;
|
||||
int tripType;
|
||||
int pickupUrgency;
|
||||
String pickupDateTime;
|
||||
dynamic pickupLocationId;
|
||||
int pickupSpot;
|
||||
dynamic dropoffLocationId;
|
||||
int transportationMethodId;
|
||||
int cost;
|
||||
double vAT;
|
||||
double totalPrice;
|
||||
int amountCollected;
|
||||
int selectedAmbulate;
|
||||
String requesterNote;
|
||||
int status;
|
||||
int paymentStatus;
|
||||
dynamic rejectReason;
|
||||
int visibility;
|
||||
dynamic durationId;
|
||||
dynamic imageId;
|
||||
String requesterFileNo;
|
||||
String requesterMobileNo;
|
||||
bool requesterIsOutSA;
|
||||
String pickupLocationLongitude;
|
||||
String pickupLocationLattitude;
|
||||
String dropoffLocationLongitude;
|
||||
String dropoffLocationLattitude;
|
||||
dynamic appointmentClinicName;
|
||||
dynamic appointmentDoctorName;
|
||||
dynamic appointmentBranch;
|
||||
dynamic appointmentTime;
|
||||
String pickupLocationName;
|
||||
String dropoffLocationName;
|
||||
String title;
|
||||
String titleAR;
|
||||
String ambulateDescription;
|
||||
String ambulateDescriptionN;
|
||||
|
||||
PickUpRequestPresOrder(
|
||||
{this.id,
|
||||
this.presOrderID,
|
||||
this.createDate,
|
||||
this.lastEditDate,
|
||||
this.createdBy,
|
||||
this.lastEditBy,
|
||||
this.isActive,
|
||||
this.requestNo,
|
||||
this.requesterId,
|
||||
this.direction,
|
||||
this.haveAppointment,
|
||||
this.appointmentId,
|
||||
this.tripType,
|
||||
this.pickupUrgency,
|
||||
this.pickupDateTime,
|
||||
this.pickupLocationId,
|
||||
this.pickupSpot,
|
||||
this.dropoffLocationId,
|
||||
this.transportationMethodId,
|
||||
this.cost,
|
||||
this.vAT,
|
||||
this.totalPrice,
|
||||
this.amountCollected,
|
||||
this.selectedAmbulate,
|
||||
this.requesterNote,
|
||||
this.status,
|
||||
this.paymentStatus,
|
||||
this.rejectReason,
|
||||
this.visibility,
|
||||
this.durationId,
|
||||
this.imageId,
|
||||
this.requesterFileNo,
|
||||
this.requesterMobileNo,
|
||||
this.requesterIsOutSA,
|
||||
this.pickupLocationLongitude,
|
||||
this.pickupLocationLattitude,
|
||||
this.dropoffLocationLongitude,
|
||||
this.dropoffLocationLattitude,
|
||||
this.appointmentClinicName,
|
||||
this.appointmentDoctorName,
|
||||
this.appointmentBranch,
|
||||
this.appointmentTime,
|
||||
this.pickupLocationName,
|
||||
this.dropoffLocationName,
|
||||
this.title,
|
||||
this.titleAR,
|
||||
this.ambulateDescription,
|
||||
this.ambulateDescriptionN});
|
||||
|
||||
PickUpRequestPresOrder.fromJson(Map<String, dynamic> json) {
|
||||
id = json['Id'];
|
||||
presOrderID = json['PresOrderID'];
|
||||
createDate = json['CreateDate'];
|
||||
lastEditDate = json['LastEditDate'];
|
||||
createdBy = json['CreatedBy'];
|
||||
lastEditBy = json['LastEditBy'];
|
||||
isActive = json['IsActive'];
|
||||
requestNo = json['RequestNo'];
|
||||
requesterId = json['RequesterId'];
|
||||
direction = json['Direction'];
|
||||
haveAppointment = json['HaveAppointment'];
|
||||
appointmentId = json['AppointmentId'];
|
||||
tripType = json['TripType'];
|
||||
pickupUrgency = json['PickupUrgency'];
|
||||
pickupDateTime = json['PickupDateTime'];
|
||||
pickupLocationId = json['PickupLocationId'];
|
||||
pickupSpot = json['PickupSpot'];
|
||||
dropoffLocationId = json['DropoffLocationId'];
|
||||
transportationMethodId = json['TransportationMethodId'];
|
||||
cost = json['Cost'];
|
||||
vAT = json['VAT'];
|
||||
totalPrice = json['TotalPrice'];
|
||||
amountCollected = json['AmountCollected'];
|
||||
selectedAmbulate = json['SelectedAmbulate'];
|
||||
requesterNote = json['RequesterNote'];
|
||||
status = json['Status'];
|
||||
paymentStatus = json['PaymentStatus'];
|
||||
rejectReason = json['RejectReason'];
|
||||
visibility = json['Visibility'];
|
||||
durationId = json['DurationId'];
|
||||
imageId = json['ImageId'];
|
||||
requesterFileNo = json['RequesterFileNo'];
|
||||
requesterMobileNo = json['RequesterMobileNo'];
|
||||
requesterIsOutSA = json['RequesterIsOutSA'];
|
||||
pickupLocationLongitude = json['PickupLocationLongitude'];
|
||||
pickupLocationLattitude = json['PickupLocationLattitude'];
|
||||
dropoffLocationLongitude = json['DropoffLocationLongitude'];
|
||||
dropoffLocationLattitude = json['DropoffLocationLattitude'];
|
||||
appointmentClinicName = json['AppointmentClinicName'];
|
||||
appointmentDoctorName = json['AppointmentDoctorName'];
|
||||
appointmentBranch = json['AppointmentBranch'];
|
||||
appointmentTime = json['AppointmentTime'];
|
||||
pickupLocationName = json['PickupLocationName'];
|
||||
dropoffLocationName = json['DropoffLocationName'];
|
||||
title = json['Title'];
|
||||
titleAR = json['TitleAR'];
|
||||
ambulateDescription = json['AmbulateDescription'];
|
||||
ambulateDescriptionN = json['AmbulateDescriptionN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Id'] = this.id;
|
||||
data['PresOrderID'] = this.presOrderID;
|
||||
data['CreateDate'] = this.createDate;
|
||||
data['LastEditDate'] = this.lastEditDate;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['LastEditBy'] = this.lastEditBy;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['RequestNo'] = this.requestNo;
|
||||
data['RequesterId'] = this.requesterId;
|
||||
data['Direction'] = this.direction;
|
||||
data['HaveAppointment'] = this.haveAppointment;
|
||||
data['AppointmentId'] = this.appointmentId;
|
||||
data['TripType'] = this.tripType;
|
||||
data['PickupUrgency'] = this.pickupUrgency;
|
||||
data['PickupDateTime'] = this.pickupDateTime;
|
||||
data['PickupLocationId'] = this.pickupLocationId;
|
||||
data['PickupSpot'] = this.pickupSpot;
|
||||
data['DropoffLocationId'] = this.dropoffLocationId;
|
||||
data['TransportationMethodId'] = this.transportationMethodId;
|
||||
data['Cost'] = this.cost;
|
||||
data['VAT'] = this.vAT;
|
||||
data['TotalPrice'] = this.totalPrice;
|
||||
data['AmountCollected'] = this.amountCollected;
|
||||
data['SelectedAmbulate'] = this.selectedAmbulate;
|
||||
data['RequesterNote'] = this.requesterNote;
|
||||
data['Status'] = this.status;
|
||||
data['PaymentStatus'] = this.paymentStatus;
|
||||
data['RejectReason'] = this.rejectReason;
|
||||
data['Visibility'] = this.visibility;
|
||||
data['DurationId'] = this.durationId;
|
||||
data['ImageId'] = this.imageId;
|
||||
data['RequesterFileNo'] = this.requesterFileNo;
|
||||
data['RequesterMobileNo'] = this.requesterMobileNo;
|
||||
data['RequesterIsOutSA'] = this.requesterIsOutSA;
|
||||
data['PickupLocationLongitude'] = this.pickupLocationLongitude;
|
||||
data['PickupLocationLattitude'] = this.pickupLocationLattitude;
|
||||
data['DropoffLocationLongitude'] = this.dropoffLocationLongitude;
|
||||
data['DropoffLocationLattitude'] = this.dropoffLocationLattitude;
|
||||
data['AppointmentClinicName'] = this.appointmentClinicName;
|
||||
data['AppointmentDoctorName'] = this.appointmentDoctorName;
|
||||
data['AppointmentBranch'] = this.appointmentBranch;
|
||||
data['AppointmentTime'] = this.appointmentTime;
|
||||
data['PickupLocationName'] = this.pickupLocationName;
|
||||
data['DropoffLocationName'] = this.dropoffLocationName;
|
||||
data['Title'] = this.title;
|
||||
data['TitleAR'] = this.titleAR;
|
||||
data['AmbulateDescription'] = this.ambulateDescription;
|
||||
data['AmbulateDescriptionN'] = this.ambulateDescriptionN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class CreteNewBabyService extends BaseService {
|
||||
List<CreateNewBaby> createNewBabyModelList = List();
|
||||
List<List_UserInformationModel> userModelList = List();
|
||||
List<CreateNewUser_New> newUserModelList = List();
|
||||
|
||||
|
||||
|
||||
Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
|
||||
hasError = false;
|
||||
await getUser();
|
||||
Map<String, dynamic> body = Map.from(newChild.toJson());
|
||||
body['CreatedBy'] = 102;
|
||||
body['EditedBy'] = 102;
|
||||
body['UserID'] = userID;
|
||||
body['AlertBy'] = 2;
|
||||
body['EmailAddress'] = user.emailAddress;
|
||||
body['IsLogin'] = true;
|
||||
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
body['MobileNumber'] = user.mobileNumber;
|
||||
body['NationalID'] = user.nationalityID;
|
||||
body['ZipCode'] = user.zipCode;
|
||||
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
|
||||
await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
var asd ="";
|
||||
},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class ChildVaccinesService extends BaseService {
|
||||
List<List_BabyInformationModel> babyInformationModelList = List();
|
||||
List<List_UserInformationModel> userInformationModelList = List();
|
||||
int userID = 0;
|
||||
|
||||
Future getAllBabyInformationOrders() async {
|
||||
Map<String, dynamic> body = Map();
|
||||
hasError = false;
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
body['IsLogin'] = true;
|
||||
body['UserID'] = userID;
|
||||
await baseAppClient.post(GET_BABY_BY_USER_ID,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
babyInformationModelList.clear();
|
||||
response['List_BabyInformationModel'].forEach((vital) {
|
||||
babyInformationModelList.add(List_BabyInformationModel.fromJson(vital));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future getNewUserOrders() async {
|
||||
Map<String, dynamic> body = Map();
|
||||
hasError = false;
|
||||
await getUser();
|
||||
body['CreatedBy'] = 102;
|
||||
body['EditedBy'] = 102;
|
||||
body['UserID'] = userID;
|
||||
body['AlertBy'] = 2;
|
||||
body['EmailAddress'] = user.emailAddress;
|
||||
body['IsLogin'] = true;
|
||||
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
body['MobileNumber'] = user.mobileNumber;
|
||||
body['NationalID'] = user.nationalityID;
|
||||
body['ZipCode'] = user.zipCode;
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
|
||||
await baseAppClient.post(GET_NEW_USER_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
userID = response['UserID'];
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
|
||||
|
||||
class DeleteBabyService extends BaseService{
|
||||
|
||||
List<CreateNewBaby> createNewBabyModelList = List();
|
||||
List<List_UserInformationModel> userModelList = List();
|
||||
List<CreateNewUser_New> newUserModelList = List();
|
||||
|
||||
List<DeleteBaby> deleteBabyModelList= List();
|
||||
|
||||
|
||||
Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async {
|
||||
hasError = false;
|
||||
await getUser();
|
||||
Map<String, dynamic> body = Map.from(deleteChild.toJson());
|
||||
// body['CreatedBy'] = 102;
|
||||
body['EditedBy'] = 102;
|
||||
//body['BabyID'] = babyID;
|
||||
//body['BabyID'] = createNewBabyModelList ;
|
||||
// body['AlertBy'] = 2;
|
||||
// body['EmailAddress'] = user.emailAddress;
|
||||
body['IsLogin'] = true;
|
||||
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
body['MobileNumber'] = user.mobileNumber;
|
||||
body['NationalID'] = user.nationalityID;
|
||||
body['ZipCode'] = user.zipCode;
|
||||
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
|
||||
await baseAppClient.post(DELETE_CHILD_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
var asd ="";
|
||||
},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
// Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
|
||||
// hasError = false;
|
||||
// await getUser();
|
||||
// Map<String, dynamic> body = Map.from(newChild.toJson());
|
||||
// body['CreatedBy'] = 102;
|
||||
// body['EditedBy'] = 102;
|
||||
// body['UserID'] = userID;
|
||||
// body['AlertBy'] = 2;
|
||||
// body['EmailAddress'] = user.emailAddress;
|
||||
// body['IsLogin'] = true;
|
||||
// body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
// body['MobileNumber'] = user.mobileNumber;
|
||||
// body['NationalID'] = user.nationalityID;
|
||||
// body['ZipCode'] = user.zipCode;
|
||||
//
|
||||
// body['isDentalAllowedBackend'] = false;
|
||||
//
|
||||
// await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
||||
// onSuccess: (dynamic response, int statusCode) {
|
||||
// var asd ="";
|
||||
// },
|
||||
// onFailure: (String error, int statusCode) {
|
||||
// hasError = true;
|
||||
// super.error = error;
|
||||
// }, body: body);
|
||||
// }
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_itemsmodel.dart';
|
||||
|
||||
import '../base_service.dart';
|
||||
|
||||
class GetVccinationsItemsService extends BaseService {
|
||||
List<GET_VACCINATIONS_ITEMSMODEL> getVaccinationsItemModelList = List();
|
||||
Map<String, dynamic> body = Map();
|
||||
|
||||
|
||||
|
||||
Future getaccinationsitemOrders() async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(GET_TABLE_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
getVaccinationsItemModelList.clear();
|
||||
response['List_CreateVaccinationTableModel'].forEach((vital) {
|
||||
getVaccinationsItemModelList.add(
|
||||
GET_VACCINATIONS_ITEMSMODEL.fromJson(vital));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class UserInformationService extends BaseService {
|
||||
List<List_UserInformationModel> userInformationModelList = List();
|
||||
Map<String, dynamic> body = Map();
|
||||
|
||||
Future getUserInformationOrders() async {
|
||||
hasError = false;
|
||||
await getUser();
|
||||
body['CreatedBy'] = 102;
|
||||
body['EditedBy'] = 102;
|
||||
body['EmailAddress'] = user.emailAddress;
|
||||
body['IsLogin'] = true;
|
||||
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
body['MobileNumber'] = user.mobileNumber;
|
||||
body['NationalID'] = user.nationalityID;
|
||||
body['ZipCode'] = user.zipCode;
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
|
||||
await baseAppClient.post(GET_USERINFORMATION_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
userInformationModelList.clear();
|
||||
|
||||
response['List_UserInformationModel_New'].forEach((vital) {
|
||||
userInformationModelList.add(List_UserInformationModel.fromJson(vital));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class VaccinationTableService extends BaseService {
|
||||
List<CreateVaccinationTable> createVaccinationTableModelList = List();
|
||||
Map<String, dynamic> body = Map();
|
||||
|
||||
|
||||
|
||||
Future getCreateVaccinationTableOrders() async {
|
||||
hasError = false;
|
||||
await getUser();
|
||||
body['BabyName']="fffffffffff eeeeeeeeeeeeee";
|
||||
body['DOB'] = "/Date(1585774800000+0300)/";
|
||||
body['EmailAddress'] = user.emailAddress;
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
body['SendEmail'] = false;
|
||||
body['IsLogin'] =true;
|
||||
|
||||
|
||||
|
||||
|
||||
await baseAppClient.post(GET_TABLE_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
createVaccinationTableModelList.clear();
|
||||
response['List_CreateVaccinationTableModel'].forEach((vital) {
|
||||
createVaccinationTableModelList.add(
|
||||
CreateVaccinationTable.fromJson(vital));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,25 +1,76 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
class AmService extends BaseService {
|
||||
List<PatientER_RRT_GetAllTransportationMethodListModel> AmModelList = List();
|
||||
Map<String, dynamic> body = Map();
|
||||
List<PatientERTransportationMethod> amModelList = List();
|
||||
List<PatientAllPresOrders> patientAllPresOrdersList = List();
|
||||
bool hasPendingOrder = false;
|
||||
int pendingOrderID = 0;
|
||||
String pendingOrderStatus = "";
|
||||
String pendingOrderStatusAR = "";
|
||||
PickUpRequestPresOrder pickUpRequestPresOrder;
|
||||
|
||||
Future getAllTransportationOrders() async {
|
||||
hasError = false;
|
||||
|
||||
Map<String, dynamic> body = Map();
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
body['IdentificationNo'] = user.patientIdentificationNo;
|
||||
await baseAppClient.post(GET_AMBULANCE_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
AmModelList.clear();
|
||||
response['AmModelList'].forEach((vital) {
|
||||
AmModelList.add(
|
||||
PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital));
|
||||
amModelList.clear();
|
||||
response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
|
||||
amModelList.add(PatientERTransportationMethod.fromJson(item));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future getPatientAllPresOrdersList() async {
|
||||
hasError = false;
|
||||
hasPendingOrder = false;
|
||||
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
patientAllPresOrdersList.clear();
|
||||
response['PatientER_GetPatientAllPresOrdersList'].forEach((item) {
|
||||
if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) {
|
||||
var order = PatientAllPresOrders.fromJson(item);
|
||||
patientAllPresOrdersList.add(order);
|
||||
if (order.status == 1) {
|
||||
hasPendingOrder = true;
|
||||
pendingOrderID = order.iD;
|
||||
pendingOrderStatus = order.description;
|
||||
pendingOrderStatusAR = order.descriptionN;
|
||||
}
|
||||
}
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: Map());
|
||||
}
|
||||
|
||||
Future getOrderDetails() async {
|
||||
hasError = false;
|
||||
hasPendingOrder = false;
|
||||
Map<String, dynamic> body = Map();
|
||||
body['PresOrderID'] = pendingOrderID;
|
||||
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
patientAllPresOrdersList.clear();
|
||||
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList']
|
||||
.forEach((item) {
|
||||
pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item);
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: Map());
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
|
||||
|
||||
import '../../../locator.dart';
|
||||
import '../base_view_model.dart';
|
||||
|
||||
|
||||
class AddNewChildViewModel extends BaseViewModel {
|
||||
|
||||
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
|
||||
ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>();
|
||||
// DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
|
||||
bool isAdded = false;
|
||||
///create new baby
|
||||
createNewBabyOrders({ CreateNewBaby newChild}) async {
|
||||
setState(ViewState.Busy);
|
||||
await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID);
|
||||
if (_creteNewBabyService.hasError) {
|
||||
error = _creteNewBabyService.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
isAdded = true;
|
||||
setState(ViewState.Idle);
|
||||
await _childVaccinesService.getAllBabyInformationOrders();
|
||||
if (_childVaccinesService.hasError) {
|
||||
error = _childVaccinesService.error;
|
||||
setState(ViewState.Error);
|
||||
} else{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
|
||||
//========
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart';
|
||||
|
||||
import '../../../locator.dart';
|
||||
import '../base_view_model.dart';
|
||||
|
||||
class ChildVaccinesViewModel extends BaseViewModel{
|
||||
ChildVaccinesService _childVaccinesService = locator<ChildVaccinesService>();
|
||||
|
||||
List<List_BabyInformationModel> get babyInformationModelList=> _childVaccinesService.babyInformationModelList;
|
||||
|
||||
|
||||
//===========
|
||||
CreteNewBabyService _creteNewBabyService = locator<CreteNewBabyService>();
|
||||
|
||||
DeleteBabyService _deleteBabyService = locator<DeleteBabyService>();
|
||||
bool isAdded = false;
|
||||
bool isDeleted = false;
|
||||
//============
|
||||
|
||||
|
||||
getNewUserOrders() async {
|
||||
setState(ViewState.Busy);
|
||||
await _childVaccinesService.getNewUserOrders();
|
||||
if (_childVaccinesService.hasError) {
|
||||
error = _childVaccinesService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
getBabyInformatioRequestOrders();
|
||||
}
|
||||
|
||||
getBabyInformatioRequestOrders() async {
|
||||
await _childVaccinesService.getAllBabyInformationOrders();
|
||||
if (_childVaccinesService.hasError) {
|
||||
error = _childVaccinesService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
///delete baby
|
||||
deleteBabyOrders({ DeleteBaby newChild}) async {
|
||||
setState(ViewState.Busy);
|
||||
//await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID);
|
||||
await _deleteBabyService.getDeleteBabyOrder(deleteChild: newChild,babyID: newChild.babyID);
|
||||
//getDeleteBabyOrder(deleteChild: newChild,);
|
||||
// getDeleteBabyOrder
|
||||
if (_creteNewBabyService.hasError) {
|
||||
error = _creteNewBabyService.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
isDeleted = true;
|
||||
setState(ViewState.Idle);
|
||||
await _childVaccinesService.getAllBabyInformationOrders();
|
||||
if (_childVaccinesService.hasError) {
|
||||
error = _childVaccinesService.error;
|
||||
setState(ViewState.Error);
|
||||
} else{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/user_information_service.dart';
|
||||
import '../../../locator.dart';
|
||||
import '../base_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
|
||||
class UserInformationViewModel extends BaseViewModel {
|
||||
UserInformationService _userInformationService =
|
||||
locator<UserInformationService>();
|
||||
|
||||
List<List_UserInformationModel> get userInformationModelList =>
|
||||
_userInformationService.userInformationModelList;
|
||||
|
||||
getUserInformationRequestOrders() async {
|
||||
setState(ViewState.Busy);
|
||||
await _userInformationService.getUserInformationOrders();
|
||||
if (_userInformationService.hasError) {
|
||||
error = _userInformationService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/childvaccines/vaccination_table_service.dart';
|
||||
|
||||
import '../../../locator.dart';
|
||||
import '../base_view_model.dart';
|
||||
|
||||
|
||||
class VaccinationTableViewModel extends BaseViewModel{
|
||||
|
||||
VaccinationTableService _creteVaccinationTableService = locator<VaccinationTableService>();
|
||||
|
||||
// String get creteVaccinationTableContent => _creteVaccinationTableService.userAgreementContent;
|
||||
//String get userAgreementContent => _creteNewBabyService.v//_reportsService.userAgreementContent;
|
||||
List<CreateVaccinationTable> get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList;//.createNewBabyModelList;
|
||||
getCreateVaccinationTable() async {
|
||||
setState(ViewState.Busy);
|
||||
|
||||
await _creteVaccinationTableService.getCreateVaccinationTableOrders();//getCreateNewBabyOrders();
|
||||
|
||||
if ( _creteVaccinationTableService.hasError) {
|
||||
error = _creteVaccinationTableService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,32 +1,82 @@
|
||||
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/er/am_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/hospital_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import '../base_view_model.dart';
|
||||
import '../../../locator.dart';
|
||||
|
||||
class AmRequestViewModel extends BaseViewModel{
|
||||
class AmRequestViewModel extends BaseViewModel {
|
||||
AmService _amService = locator<AmService>();
|
||||
HospitalService _hospitalService = locator<HospitalService>();
|
||||
MedicalService _medicalService = locator<MedicalService>();
|
||||
|
||||
List<PatientERTransportationMethod> get amRequestModeList =>
|
||||
_amService.amModelList;
|
||||
|
||||
AmService _amService = locator<AmService>();
|
||||
List<PatientAllPresOrders> get patientAllPresOrdersList =>
|
||||
_amService.patientAllPresOrdersList;
|
||||
|
||||
List<PatientER_RRT_GetAllTransportationMethodListModel> get AmRequestModeList=>
|
||||
_amService.AmModelList;
|
||||
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
|
||||
_medicalService.appoitmentAllHistoryResultList;
|
||||
|
||||
getAmRequestOrders({int id, int projectID}) async {
|
||||
setState(ViewState.Busy);
|
||||
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
|
||||
|
||||
bool get hasPendingOrder =>_amService.hasPendingOrder;
|
||||
|
||||
await _amService.getAllTransportationOrders();
|
||||
Future getAppointmentHistory() async {
|
||||
setState(ViewState.BusyLocal);
|
||||
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
|
||||
if (_medicalService.hasError) {
|
||||
error = _medicalService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
if ( _amService.hasError) {
|
||||
error = _amService.error;
|
||||
Future getAmRequestOrders() async {
|
||||
setState(ViewState.Busy);
|
||||
await _amService.getAllTransportationOrders();
|
||||
if (_amService.hasError) {
|
||||
error = _amService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
getHospitals();
|
||||
}
|
||||
|
||||
Future getHospitals() async {
|
||||
setState(ViewState.Busy);
|
||||
await _hospitalService.getHospitals();
|
||||
if (_hospitalService.hasError) {
|
||||
error = _hospitalService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
getPatientAllPresOrdersList();
|
||||
}
|
||||
|
||||
Future getPatientAllPresOrdersList() async {
|
||||
setState(ViewState.Busy);
|
||||
await _amService.getPatientAllPresOrdersList();
|
||||
if (_hospitalService.hasError) {
|
||||
error = _hospitalService.error;
|
||||
setState(ViewState.Error);
|
||||
} else if (_amService.hasPendingOrder) {
|
||||
getOrderDetails();
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
|
||||
}
|
||||
Future getOrderDetails() async {
|
||||
setState(ViewState.Busy);
|
||||
await _amService.getOrderDetails();
|
||||
if (_hospitalService.hasError) {
|
||||
error = _hospitalService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
class CovidPaymentInfoResponse {
|
||||
dynamic propertyChanged;
|
||||
dynamic cashPriceField;
|
||||
dynamic cashPriceTaxField;
|
||||
dynamic cashPriceWithTaxField;
|
||||
dynamic companyIdField;
|
||||
String companyNameField;
|
||||
dynamic companyShareWithTaxField;
|
||||
dynamic errCodeField;
|
||||
dynamic groupIDField;
|
||||
dynamic insurancePolicyNoField;
|
||||
String messageField;
|
||||
dynamic patientCardIDField;
|
||||
dynamic patientShareField;
|
||||
dynamic patientShareWithTaxField;
|
||||
dynamic patientTaxAmountField;
|
||||
dynamic policyIdField;
|
||||
dynamic policyNameField;
|
||||
String procedureNameField;
|
||||
dynamic setupIDField;
|
||||
dynamic statusCodeField;
|
||||
dynamic subPolicyNoField;
|
||||
|
||||
CovidPaymentInfoResponse(
|
||||
{this.propertyChanged,
|
||||
this.cashPriceField,
|
||||
this.cashPriceTaxField,
|
||||
this.cashPriceWithTaxField,
|
||||
this.companyIdField,
|
||||
this.companyNameField,
|
||||
this.companyShareWithTaxField,
|
||||
this.errCodeField,
|
||||
this.groupIDField,
|
||||
this.insurancePolicyNoField,
|
||||
this.messageField,
|
||||
this.patientCardIDField,
|
||||
this.patientShareField,
|
||||
this.patientShareWithTaxField,
|
||||
this.patientTaxAmountField,
|
||||
this.policyIdField,
|
||||
this.policyNameField,
|
||||
this.procedureNameField,
|
||||
this.setupIDField,
|
||||
this.statusCodeField,
|
||||
this.subPolicyNoField});
|
||||
|
||||
CovidPaymentInfoResponse.fromJson(Map<String, dynamic> json) {
|
||||
propertyChanged = json['PropertyChanged'];
|
||||
cashPriceField = json['cashPriceField'];
|
||||
cashPriceTaxField = json['cashPriceTaxField'];
|
||||
cashPriceWithTaxField = json['cashPriceWithTaxField'];
|
||||
companyIdField = json['companyIdField'];
|
||||
companyNameField = json['companyNameField'];
|
||||
companyShareWithTaxField = json['companyShareWithTaxField'];
|
||||
errCodeField = json['errCodeField'];
|
||||
groupIDField = json['groupIDField'];
|
||||
insurancePolicyNoField = json['insurancePolicyNoField'];
|
||||
messageField = json['messageField'];
|
||||
patientCardIDField = json['patientCardIDField'];
|
||||
patientShareField = json['patientShareField'];
|
||||
patientShareWithTaxField = json['patientShareWithTaxField'];
|
||||
patientTaxAmountField = json['patientTaxAmountField'];
|
||||
policyIdField = json['policyIdField'];
|
||||
policyNameField = json['policyNameField'];
|
||||
procedureNameField = json['procedureNameField'];
|
||||
setupIDField = json['setupIDField'];
|
||||
statusCodeField = json['statusCodeField'];
|
||||
subPolicyNoField = json['subPolicyNoField'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PropertyChanged'] = this.propertyChanged;
|
||||
data['cashPriceField'] = this.cashPriceField;
|
||||
data['cashPriceTaxField'] = this.cashPriceTaxField;
|
||||
data['cashPriceWithTaxField'] = this.cashPriceWithTaxField;
|
||||
data['companyIdField'] = this.companyIdField;
|
||||
data['companyNameField'] = this.companyNameField;
|
||||
data['companyShareWithTaxField'] = this.companyShareWithTaxField;
|
||||
data['errCodeField'] = this.errCodeField;
|
||||
data['groupIDField'] = this.groupIDField;
|
||||
data['insurancePolicyNoField'] = this.insurancePolicyNoField;
|
||||
data['messageField'] = this.messageField;
|
||||
data['patientCardIDField'] = this.patientCardIDField;
|
||||
data['patientShareField'] = this.patientShareField;
|
||||
data['patientShareWithTaxField'] = this.patientShareWithTaxField;
|
||||
data['patientTaxAmountField'] = this.patientTaxAmountField;
|
||||
data['policyIdField'] = this.policyIdField;
|
||||
data['policyNameField'] = this.policyNameField;
|
||||
data['procedureNameField'] = this.procedureNameField;
|
||||
data['setupIDField'] = this.setupIDField;
|
||||
data['statusCodeField'] = this.statusCodeField;
|
||||
data['subPolicyNoField'] = this.subPolicyNoField;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
class DriveThroughTestingCenterModel {
|
||||
int rowID;
|
||||
int iD;
|
||||
int projectID;
|
||||
String setupID;
|
||||
double longitude;
|
||||
double latitude;
|
||||
int numberOfTracks;
|
||||
bool isActive;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
dynamic editedBy;
|
||||
dynamic editedON;
|
||||
dynamic projectName;
|
||||
dynamic projectNameN;
|
||||
|
||||
DriveThroughTestingCenterModel(
|
||||
{this.rowID,
|
||||
this.iD,
|
||||
this.projectID,
|
||||
this.setupID,
|
||||
this.longitude,
|
||||
this.latitude,
|
||||
this.numberOfTracks,
|
||||
this.isActive,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedBy,
|
||||
this.editedON,
|
||||
this.projectName,
|
||||
this.projectNameN});
|
||||
|
||||
DriveThroughTestingCenterModel.fromJson(Map<String, dynamic> json) {
|
||||
rowID = json['RowID'];
|
||||
iD = json['ID'];
|
||||
projectID = json['ProjectID'];
|
||||
setupID = json['SetupID'];
|
||||
longitude = json['Longitude'];
|
||||
latitude = json['Latitude'];
|
||||
numberOfTracks = json['NumberOfTracks'];
|
||||
isActive = json['IsActive'];
|
||||
createdBy = json['CreatedBy'];
|
||||
createdOn = json['CreatedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedON = json['EditedON'];
|
||||
projectName = json['ProjectName'];
|
||||
projectNameN = json['ProjectNameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['RowID'] = this.rowID;
|
||||
data['ID'] = this.iD;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['NumberOfTracks'] = this.numberOfTracks;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['CreatedBy'] = this.createdBy;
|
||||
data['CreatedOn'] = this.createdOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['EditedON'] = this.editedON;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['ProjectNameN'] = this.projectNameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
class LiveCareScheduleClinicsListResponse {
|
||||
List<ClinicsHaveScheduleList> clinicsHaveScheduleList;
|
||||
|
||||
LiveCareScheduleClinicsListResponse({this.clinicsHaveScheduleList});
|
||||
|
||||
LiveCareScheduleClinicsListResponse.fromJson(Map<String, dynamic> json) {
|
||||
if (json['ClinicsHaveScheduleList'] != null) {
|
||||
clinicsHaveScheduleList = new List<ClinicsHaveScheduleList>();
|
||||
json['ClinicsHaveScheduleList'].forEach((v) {
|
||||
clinicsHaveScheduleList.add(new ClinicsHaveScheduleList.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.clinicsHaveScheduleList != null) {
|
||||
data['ClinicsHaveScheduleList'] =
|
||||
this.clinicsHaveScheduleList.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ClinicsHaveScheduleList {
|
||||
int clinicID;
|
||||
int serviceID;
|
||||
int projectID;
|
||||
String clinicDesc;
|
||||
String clinicDescN;
|
||||
String projectDesc;
|
||||
String projectDescN;
|
||||
|
||||
ClinicsHaveScheduleList(
|
||||
{this.clinicID,
|
||||
this.serviceID,
|
||||
this.projectID,
|
||||
this.clinicDesc,
|
||||
this.clinicDescN,
|
||||
this.projectDesc,
|
||||
this.projectDescN});
|
||||
|
||||
ClinicsHaveScheduleList.fromJson(Map<String, dynamic> json) {
|
||||
clinicID = json['ClinicID'];
|
||||
serviceID = json['ServiceID'];
|
||||
projectID = json['ProjectID'];
|
||||
clinicDesc = json['ClinicDesc'];
|
||||
clinicDescN = json['ClinicDescN'];
|
||||
projectDesc = json['ProjectDesc'];
|
||||
projectDescN = json['ProjectDescN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ServiceID'] = this.serviceID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ClinicDesc'] = this.clinicDesc;
|
||||
data['ClinicDescN'] = this.clinicDescN;
|
||||
data['ProjectDesc'] = this.projectDesc;
|
||||
data['ProjectDescN'] = this.projectDescN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
class insertVIDARequest {
|
||||
int patientID;
|
||||
int acceptedBy;
|
||||
int appointmentNo;
|
||||
String deviceToken;
|
||||
double latitude;
|
||||
double longitude;
|
||||
int serviceID;
|
||||
int projectID;
|
||||
int clinicID;
|
||||
String deviceType;
|
||||
String voipToken;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
|
||||
insertVIDARequest(
|
||||
{this.patientID,
|
||||
this.acceptedBy,
|
||||
this.appointmentNo,
|
||||
this.deviceToken,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.serviceID,
|
||||
this.projectID,
|
||||
this.clinicID,
|
||||
this.deviceType,
|
||||
this.voipToken,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID});
|
||||
|
||||
insertVIDARequest.fromJson(Map<String, dynamic> json) {
|
||||
patientID = json['PatientID'];
|
||||
acceptedBy = json['AcceptedBy'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
deviceToken = json['DeviceToken'];
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
serviceID = json['ServiceID'];
|
||||
projectID = json['ProjectID'];
|
||||
clinicID = json['ClinicID'];
|
||||
deviceType = json['DeviceType'];
|
||||
voipToken = json['VoipToken'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['PatientID'] = this.patientID;
|
||||
data['AcceptedBy'] = this.acceptedBy;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['DeviceToken'] = this.deviceToken;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['ServiceID'] = this.serviceID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['DeviceType'] = this.deviceType;
|
||||
data['VoipToken'] = this.voipToken;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,522 @@
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dart:math';
|
||||
|
||||
import 'result_page.dart';
|
||||
|
||||
const activeCardColor = Color(0xff70777A);
|
||||
const inactiveCardColor = Color(0xffFAFAFd);
|
||||
|
||||
class BMICalculator extends StatefulWidget {
|
||||
@override
|
||||
_BMICalculatorState createState() => _BMICalculatorState();
|
||||
}
|
||||
|
||||
class _BMICalculatorState extends State<BMICalculator> {
|
||||
TextEditingController textController = new TextEditingController();
|
||||
String textResult;
|
||||
String msg;
|
||||
double bmiResult;
|
||||
int height = 150;
|
||||
int weight = 40;
|
||||
Color cmCard = activeCardColor;
|
||||
Color ftCard = inactiveCardColor;
|
||||
Color lbCard = inactiveCardColor;
|
||||
Color kgCard = activeCardColor;
|
||||
void updateColor(int type) {
|
||||
//MG/DLT card
|
||||
if (type == 1) {
|
||||
if (cmCard == inactiveCardColor) {
|
||||
cmCard = activeCardColor;
|
||||
ftCard = inactiveCardColor;
|
||||
} else {
|
||||
cmCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
if (ftCard == inactiveCardColor) {
|
||||
ftCard = activeCardColor;
|
||||
cmCard = inactiveCardColor;
|
||||
} else {
|
||||
ftCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void updateColorWeight(int type) {
|
||||
//MG/DLT card
|
||||
if (type == 1) {
|
||||
if (kgCard == inactiveCardColor) {
|
||||
kgCard = activeCardColor;
|
||||
lbCard = inactiveCardColor;
|
||||
} else {
|
||||
kgCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
if (lbCard == inactiveCardColor) {
|
||||
lbCard = activeCardColor;
|
||||
kgCard = inactiveCardColor;
|
||||
} else {
|
||||
lbCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double convertToCm(double number) {
|
||||
return number * 30.48;
|
||||
}
|
||||
|
||||
double convertToKg(double number) {
|
||||
return number / 2.205;
|
||||
}
|
||||
|
||||
double calculateBMI() {
|
||||
if (ftCard == activeCardColor) {
|
||||
convertToCm(height.toDouble());
|
||||
}
|
||||
bmiResult = weight / pow(height / 100, 2);
|
||||
|
||||
return bmiResult;
|
||||
}
|
||||
|
||||
void showTextResult() {
|
||||
if (bmiResult >= 30) {
|
||||
textResult = 'Obese';
|
||||
} else if (bmiResult < 30 && bmiResult >= 25) {
|
||||
textResult = 'OverWeight';
|
||||
} else if (bmiResult < 25 && bmiResult >= 18.5) {
|
||||
textResult = 'Healthy';
|
||||
} else if (bmiResult < 18.5) {
|
||||
textResult = 'UnderWeight';
|
||||
}
|
||||
}
|
||||
|
||||
void showMsg() {
|
||||
if (bmiResult >= 30) {
|
||||
msg =
|
||||
'A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.';
|
||||
} else if (bmiResult < 30 && bmiResult >= 25) {
|
||||
msg =
|
||||
'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ';
|
||||
} else if (bmiResult < 25 && bmiResult >= 18.5) {
|
||||
msg =
|
||||
'A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.';
|
||||
} else if (bmiResult < 18.5) {
|
||||
msg =
|
||||
'A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.';
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
textController.text = '0'; // Setting the initial value for the field.
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'BMI Calculator',
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
width: 350.0,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15.0),
|
||||
child: Text(
|
||||
'Calculate the BMI value and weight\n status to identify the healthy weight .\n Not appropriate for children and women\n who are pregnant or breastfeeding',
|
||||
style: TextStyle(fontSize: 18.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 200.0,
|
||||
width: 350.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Texts('Height'),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.0, horizontal: 8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 60.0,
|
||||
foregroundDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.0),
|
||||
border: Border.all(
|
||||
color: Colors.blueGrey,
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text(height.toString()),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 38.0,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (height < 250) height++;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (height > 120) height--;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Slider(
|
||||
value: height.toDouble(),
|
||||
min: 120,
|
||||
max: 250,
|
||||
onChanged: (double newValue) {
|
||||
setState(() {
|
||||
height = newValue.round();
|
||||
});
|
||||
},
|
||||
activeColor: Color(0xffC5272D),
|
||||
inactiveColor: Color(0xffF3C5C6),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Texts('Select Unit'),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColor(1);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
color: cmCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 0.0, horizontal: 18.0),
|
||||
child: Center(child: Texts('CM')),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColor(2);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
color: ftCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Center(child: Texts('FT')),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25.0,
|
||||
),
|
||||
Container(
|
||||
height: 200.0,
|
||||
width: 350.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Texts('Weight'),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.0, horizontal: 8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 60.0,
|
||||
foregroundDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.0),
|
||||
border: Border.all(
|
||||
color: Colors.blueGrey,
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text(weight.toString()),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 38.0,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (weight < 250) weight++;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (weight > 40) weight--;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Slider(
|
||||
value: weight.toDouble(),
|
||||
min: 40,
|
||||
max: 250,
|
||||
onChanged: (double newValue) {
|
||||
setState(() {
|
||||
weight = newValue.round();
|
||||
});
|
||||
},
|
||||
activeColor: Color(0xffC5272D),
|
||||
inactiveColor: Color(0xffF3C5C6),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Texts('Select Unit'),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColorWeight(1);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
color: kgCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 0.0, horizontal: 18.0),
|
||||
child: Center(child: Texts('KG')),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColorWeight(2);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
color: lbCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Center(child: Texts('LB')),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25.0,
|
||||
),
|
||||
Container(
|
||||
height: 100.0,
|
||||
width: 350.0,
|
||||
child: Button(
|
||||
label: 'CALCULATE',
|
||||
onTap: () {
|
||||
setState(() {
|
||||
calculateBMI();
|
||||
showTextResult();
|
||||
showMsg();
|
||||
{
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ResultPage(
|
||||
finalResult: bmiResult,
|
||||
textResult: textResult,
|
||||
msg: msg,
|
||||
)),
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:percent_indicator/percent_indicator.dart';
|
||||
|
||||
class ResultPage extends StatelessWidget {
|
||||
final double finalResult;
|
||||
final String textResult;
|
||||
final String msg;
|
||||
|
||||
ResultPage({this.finalResult, this.textResult, this.msg});
|
||||
Color inductorColor;
|
||||
double percent;
|
||||
|
||||
Color colorInductor() {
|
||||
if (finalResult >= 30) {
|
||||
inductorColor = Color(0xffC70D00);
|
||||
} else if (finalResult < 30 && finalResult >= 25) {
|
||||
inductorColor = Color(0xffC25400);
|
||||
} else if (finalResult < 25 && finalResult >= 18.5) {
|
||||
inductorColor = Color(0xff36D600);
|
||||
} else if (finalResult < 18.5) {
|
||||
inductorColor = Color(0xff1BE0EE);
|
||||
}
|
||||
return inductorColor;
|
||||
}
|
||||
|
||||
double percentInductor() {
|
||||
if (finalResult >= 30) {
|
||||
percent = 1.0;
|
||||
} else if (finalResult < 30 && finalResult >= 25) {
|
||||
percent = 0.73;
|
||||
} else if (finalResult < 25 && finalResult >= 18.5) {
|
||||
percent = 0.5;
|
||||
} else if (finalResult < 18.5) {
|
||||
percent = 0.25;
|
||||
}
|
||||
return percent;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: "BMI Calculator",
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
SizedBox(
|
||||
// height: 40.0,
|
||||
),
|
||||
Center(
|
||||
child: CircularPercentIndicator(
|
||||
radius: 220.0,
|
||||
lineWidth: 20.0,
|
||||
percent: percentInductor(),
|
||||
center: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
finalResult.toStringAsFixed(1),
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Text(
|
||||
textResult,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
progressColor: colorInductor(),
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 120,
|
||||
width: 280.0,
|
||||
child: Texts(msg),
|
||||
),
|
||||
Container(
|
||||
width: 350,
|
||||
child: Button(
|
||||
label: 'See List Of Doctors',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||
|
||||
class BmrResultPage extends StatelessWidget {
|
||||
final double bmrResult;
|
||||
final double calories;
|
||||
BmrResultPage({this.bmrResult, this.calories});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'BMR Calculator',
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularPercentIndicator(
|
||||
radius: 220.0,
|
||||
lineWidth: 20.0,
|
||||
percent: ((this.bmrResult > 3500) ? 100 : this.bmrResult / 3500),
|
||||
center: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
bmrResult.toStringAsFixed(1),
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Text(
|
||||
'Calories/Day',
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
progressColor: Color(0xff3C3939),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 120,
|
||||
width: 280.0,
|
||||
child: Texts(
|
||||
'This means the body will burn ( ${bmrResult.toStringAsFixed(1)} ) calories each day, if engaged in no activity for the entire day.. Note: Daily calorie requirement is ( ${calories.toStringAsFixed(1)} ) calories, to maintain the current weight.'),
|
||||
),
|
||||
Container(
|
||||
width: 350,
|
||||
child: Button(
|
||||
label: 'See List Of Doctors',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||
|
||||
class FatResult extends StatelessWidget {
|
||||
final double bodyFat;
|
||||
final double fat;
|
||||
final String textResult;
|
||||
|
||||
FatResult({this.bodyFat, this.fat, this.textResult = ''});
|
||||
Color inductorColor;
|
||||
Color colorInductor() {
|
||||
if (bodyFat >= 17) {
|
||||
inductorColor = Color(0xffC70D00);
|
||||
} else if (bodyFat < 20 && bodyFat >= 24) {
|
||||
inductorColor = Color(0xffC25400);
|
||||
} else if (bodyFat < 24 && bodyFat >= 31) {
|
||||
inductorColor = Color(0xff36D600);
|
||||
} else if (bodyFat > 45) {
|
||||
inductorColor = Color(0xff1BE0EE);
|
||||
}
|
||||
return inductorColor;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'Body Fat',
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
SizedBox(
|
||||
// height: 40.0,
|
||||
),
|
||||
Center(
|
||||
child: CircularPercentIndicator(
|
||||
radius: 220.0,
|
||||
lineWidth: 20.0,
|
||||
percent: ((fat > 70) ? 100 : fat / 100),
|
||||
center: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
fat.toStringAsFixed(1) + '%',
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
progressColor: inductorColor,
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 120,
|
||||
width: 280.0,
|
||||
child: Texts(textResult),
|
||||
),
|
||||
Container(
|
||||
width: 350,
|
||||
child: Button(
|
||||
label: 'See List Of Doctors',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,677 @@
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'calorie_result_page.dart';
|
||||
|
||||
const activeCardColorGender = Color(0xffC5272D);
|
||||
const inactiveCardColorGender = Color(0xffFAFAFd);
|
||||
const activeCardColor = Color(0xff70777A);
|
||||
const inactiveCardColor = Color(0xffFAFAFd);
|
||||
|
||||
class CalorieCalculator extends StatefulWidget {
|
||||
@override
|
||||
_CalorieCalculatorState createState() => _CalorieCalculatorState();
|
||||
}
|
||||
|
||||
class _CalorieCalculatorState extends State<CalorieCalculator> {
|
||||
bool isMale = false;
|
||||
Color maleCard = activeCardColorGender;
|
||||
Color femaleCard = inactiveCardColorGender;
|
||||
Color kgCard = activeCardColor;
|
||||
Color lbCard = inactiveCardColor;
|
||||
Color cmCard = activeCardColor;
|
||||
Color ftCard = inactiveCardColor;
|
||||
int age = 0;
|
||||
int height = 0;
|
||||
int weight = 0;
|
||||
double calories;
|
||||
String dropdownValue;
|
||||
void updateColor(int type) {
|
||||
//MG/DLT card
|
||||
if (type == 1) {
|
||||
if (maleCard == inactiveCardColorGender) {
|
||||
maleCard = activeCardColorGender;
|
||||
femaleCard = inactiveCardColorGender;
|
||||
} else {
|
||||
maleCard = inactiveCardColorGender;
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
if (femaleCard == inactiveCardColorGender) {
|
||||
femaleCard = activeCardColorGender;
|
||||
maleCard = inactiveCardColorGender;
|
||||
} else {
|
||||
femaleCard = inactiveCardColorGender;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void updateColorWeight(int type) {
|
||||
//MG/DLT card
|
||||
if (type == 1) {
|
||||
if (kgCard == inactiveCardColor) {
|
||||
kgCard = activeCardColor;
|
||||
lbCard = inactiveCardColor;
|
||||
} else {
|
||||
kgCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
if (lbCard == inactiveCardColor) {
|
||||
lbCard = activeCardColor;
|
||||
kgCard = inactiveCardColor;
|
||||
} else {
|
||||
lbCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void updateColorHeight(int type) {
|
||||
//MG/DLT card
|
||||
if (type == 1) {
|
||||
if (cmCard == inactiveCardColor) {
|
||||
cmCard = activeCardColor;
|
||||
ftCard = inactiveCardColor;
|
||||
} else {
|
||||
cmCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
if (type == 2) {
|
||||
if (ftCard == inactiveCardColor) {
|
||||
ftCard = activeCardColor;
|
||||
cmCard = inactiveCardColor;
|
||||
} else {
|
||||
ftCard = inactiveCardColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void calculateCalories() {
|
||||
if (isMale == true) {
|
||||
calories = 66.5 + (13.75 * weight) + (5.003 * height) - (6.755 * age);
|
||||
} else if (isMale == false) {
|
||||
calories =
|
||||
655.0955 + (9.5634 * weight) + (1.850 * height) - (4.676 * age);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'Calorie Calculator',
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 25.0, vertical: 15.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
height: 890.0,
|
||||
child: Column(
|
||||
//mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Texts(
|
||||
'Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity rate',
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 10.0, vertical: 15.0),
|
||||
child: Texts('Gender'),
|
||||
),
|
||||
Container(
|
||||
width: 350,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(35.0),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: Colors.black45,
|
||||
)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColor(1);
|
||||
isMale = false;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 170.0,
|
||||
decoration: BoxDecoration(
|
||||
color: maleCard,
|
||||
borderRadius: BorderRadius.circular(35.0),
|
||||
),
|
||||
child: Center(child: Texts('FEMALE')),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColor(2);
|
||||
isMale = true;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 170.0,
|
||||
decoration: BoxDecoration(
|
||||
color: femaleCard,
|
||||
borderRadius: BorderRadius.circular(35.0),
|
||||
),
|
||||
child: Center(child: Texts('MALE')),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.0,
|
||||
),
|
||||
Texts(
|
||||
'The Age ( 11 - 120 ) yrs',
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 340.0,
|
||||
height: 60.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.0, horizontal: 8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 60.0,
|
||||
foregroundDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.0),
|
||||
border: Border.all(
|
||||
color: Colors.blueGrey,
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text(age.toString()),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 38.0,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (age < 120) age++;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (age > 0) age--;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
value: age.toDouble(),
|
||||
min: 0,
|
||||
max: 120,
|
||||
onChanged: (double newValue) {
|
||||
setState(() {
|
||||
age = newValue.round();
|
||||
});
|
||||
},
|
||||
activeColor: Color(0xffC5272D),
|
||||
inactiveColor: Color(0xffF3C5C6),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Texts(
|
||||
'Height',
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 340.0,
|
||||
height: 60.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.0, horizontal: 8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 60.0,
|
||||
foregroundDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.0),
|
||||
border: Border.all(
|
||||
color: Colors.blueGrey,
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text(height.toString()),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 38.0,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (height < 250) height++;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (height > 0) height--;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
value: height.toDouble(),
|
||||
min: 0,
|
||||
max: 250,
|
||||
onChanged: (double newValue) {
|
||||
setState(() {
|
||||
height = newValue.round();
|
||||
});
|
||||
},
|
||||
activeColor: Color(0xffC5272D),
|
||||
inactiveColor: Color(0xffF3C5C6),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Texts('Select Unit'),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColorHeight(1);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
color: cmCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 0.0, horizontal: 18.0),
|
||||
child: Center(child: Texts('CM')),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColorHeight(2);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
color: ftCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Center(child: Texts('Ft')),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Texts(
|
||||
'Weight',
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 340.0,
|
||||
height: 60.0,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.0, horizontal: 8.0),
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 60.0,
|
||||
foregroundDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.0),
|
||||
border: Border.all(
|
||||
color: Colors.blueGrey,
|
||||
width: 2.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text(weight.toString()),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 38.0,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_up,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (weight < 250) weight++;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
Icons.arrow_drop_down,
|
||||
size: 18.0,
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (weight > 0) weight--;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Slider(
|
||||
value: weight.toDouble(),
|
||||
min: 0,
|
||||
max: 250,
|
||||
onChanged: (double newValue) {
|
||||
setState(() {
|
||||
weight = newValue.round();
|
||||
});
|
||||
},
|
||||
activeColor: Color(0xffC5272D),
|
||||
inactiveColor: Color(0xffF3C5C6),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Texts('Select Unit'),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColorWeight(1);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
color: kgCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 0.0, horizontal: 18.0),
|
||||
child: Center(child: Texts('KG')),
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
updateColorWeight(2);
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
width: 150.0,
|
||||
decoration: BoxDecoration(
|
||||
color: lbCard,
|
||||
borderRadius: BorderRadius.circular(3.0),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
spreadRadius: 3,
|
||||
blurRadius: 7,
|
||||
offset:
|
||||
Offset(0, 3), // changes position of shadow
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Center(child: Texts('LB')),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Texts('Activity level'),
|
||||
Container(
|
||||
width: 300,
|
||||
child: DropdownButton<String>(
|
||||
value: dropdownValue,
|
||||
icon: Icon(Icons.arrow_downward),
|
||||
iconSize: 24,
|
||||
elevation: 16,
|
||||
style: TextStyle(color: Colors.black87),
|
||||
underline: Container(
|
||||
height: 2,
|
||||
color: Colors.black54,
|
||||
),
|
||||
onChanged: (String newValue) {
|
||||
setState(() {
|
||||
dropdownValue = newValue;
|
||||
});
|
||||
},
|
||||
items: <String>[
|
||||
'Almost Inactive(Little or no exercises)',
|
||||
'Lighty Active (1-3) days per week',
|
||||
'very Active(6-7) days per week',
|
||||
'Super Active(very hard exercises)'
|
||||
].map<DropdownMenuItem<String>>((String value) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(value),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25.0,
|
||||
),
|
||||
Container(
|
||||
height: 100.0,
|
||||
width: 350.0,
|
||||
child: Button(
|
||||
label: 'CALCULATE',
|
||||
onTap: () {
|
||||
setState(() {
|
||||
calculateCalories();
|
||||
print(calories);
|
||||
{
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => CalorieResultPage(
|
||||
calorie: calories,
|
||||
)),
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||
|
||||
class CalorieResultPage extends StatelessWidget {
|
||||
final double calorie;
|
||||
|
||||
CalorieResultPage({this.calorie});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: 'Calorie Calculator',
|
||||
isShowAppBar: true,
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularPercentIndicator(
|
||||
radius: 220.0,
|
||||
lineWidth: 20.0,
|
||||
percent: ((this.calorie > 3500) ? 100 : this.calorie / 3500),
|
||||
center: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
calorie.toStringAsFixed(1),
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Texts('Calories'),
|
||||
],
|
||||
),
|
||||
progressColor: Color(0xff3C3939),
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child:
|
||||
Texts('Daily intake is ${calorie.toStringAsFixed(1)} calories'),
|
||||
),
|
||||
Container(
|
||||
width: 350,
|
||||
child: Button(
|
||||
label: 'See List Of Doctors',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||