diff --git a/assets/images/dashboard_icon/discharge_patient.svg b/assets/images/dashboard_icon/discharge_patient.svg new file mode 100644 index 00000000..68186c51 --- /dev/null +++ b/assets/images/dashboard_icon/discharge_patient.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/dashboard_icon/home_icon.svg b/assets/images/dashboard_icon/home_icon.svg new file mode 100644 index 00000000..32597a47 --- /dev/null +++ b/assets/images/dashboard_icon/home_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/dashboard_icon/home_icon_active.svg b/assets/images/dashboard_icon/home_icon_active.svg new file mode 100644 index 00000000..31b47d99 --- /dev/null +++ b/assets/images/dashboard_icon/home_icon_active.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/dashboard_icon/in_patient_white.svg b/assets/images/dashboard_icon/in_patient_white.svg new file mode 100644 index 00000000..d648f62c --- /dev/null +++ b/assets/images/dashboard_icon/in_patient_white.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/dashboard_icon/lab_results.svg b/assets/images/dashboard_icon/lab_results.svg new file mode 100644 index 00000000..353c6a19 --- /dev/null +++ b/assets/images/dashboard_icon/lab_results.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/dashboard_icon/menu_icon.svg b/assets/images/dashboard_icon/menu_icon.svg new file mode 100644 index 00000000..0a62759b --- /dev/null +++ b/assets/images/dashboard_icon/menu_icon.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/dashboard_icon/menu_icon_active.svg b/assets/images/dashboard_icon/menu_icon_active.svg new file mode 100644 index 00000000..b565b40a --- /dev/null +++ b/assets/images/dashboard_icon/menu_icon_active.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/dashboard_icon/message_icon.svg b/assets/images/dashboard_icon/message_icon.svg new file mode 100644 index 00000000..d200320b --- /dev/null +++ b/assets/images/dashboard_icon/message_icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/dashboard_icon/message_icon_active.svg b/assets/images/dashboard_icon/message_icon_active.svg new file mode 100644 index 00000000..87759ec7 --- /dev/null +++ b/assets/images/dashboard_icon/message_icon_active.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/dashboard_icon/operations.svg b/assets/images/dashboard_icon/operations.svg new file mode 100644 index 00000000..1dc283cc --- /dev/null +++ b/assets/images/dashboard_icon/operations.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/assets/images/dashboard_icon/out_patient.svg b/assets/images/dashboard_icon/out_patient.svg new file mode 100644 index 00000000..bc0a7a9b --- /dev/null +++ b/assets/images/dashboard_icon/out_patient.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/dashboard_icon/patient.svg b/assets/images/dashboard_icon/patient.svg new file mode 100644 index 00000000..40082dcc --- /dev/null +++ b/assets/images/dashboard_icon/patient.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/dashboard_icon/qr-code.svg b/assets/images/dashboard_icon/qr-code.svg new file mode 100644 index 00000000..a85e6e63 --- /dev/null +++ b/assets/images/dashboard_icon/qr-code.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/dashboard_icon/radiology.svg b/assets/images/dashboard_icon/radiology.svg new file mode 100644 index 00000000..e8e45723 --- /dev/null +++ b/assets/images/dashboard_icon/radiology.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/dashboard_icon/referral.svg b/assets/images/dashboard_icon/referral.svg new file mode 100644 index 00000000..bdf4d096 --- /dev/null +++ b/assets/images/dashboard_icon/referral.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/images/dashboard_icon/scdedule_icon_active.svg b/assets/images/dashboard_icon/scdedule_icon_active.svg new file mode 100644 index 00000000..5c3fc7ae --- /dev/null +++ b/assets/images/dashboard_icon/scdedule_icon_active.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/dashboard_icon/schedule_icon.svg b/assets/images/dashboard_icon/schedule_icon.svg new file mode 100644 index 00000000..10b78b14 --- /dev/null +++ b/assets/images/dashboard_icon/schedule_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/dashboard_icon/search_patient.svg b/assets/images/dashboard_icon/search_patient.svg new file mode 100644 index 00000000..92c1ca4b --- /dev/null +++ b/assets/images/dashboard_icon/search_patient.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fonts/DoctorApp.ttf b/fonts/DoctorApp.ttf index 5992d28b..b7fa0f30 100644 Binary files a/fonts/DoctorApp.ttf and b/fonts/DoctorApp.ttf differ diff --git a/icons_app/config.json b/icons_app/config.json index 6893355b..d863816c 100644 --- a/icons_app/config.json +++ b/icons_app/config.json @@ -34,20 +34,6 @@ "male" ] }, - { - "uid": "0bbb324cc39e62b3a4e05639a4f4008f", - "css": "home_icon", - "code": 59394, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M973.1 435L973.1 435 565 27A92 92 0 0 0 434.9 27L27.2 434.7 26.8 435.1A92 92 0 0 0 88 591.9C88.9 591.9 89.9 591.9 90.8 591.9H107.1V892.1A107.9 107.9 0 0 0 214.8 999.9H374.4A29.3 29.3 0 0 0 403.7 970.6V735.3A49.2 49.2 0 0 1 452.9 686.2H547A49.2 49.2 0 0 1 596.2 735.3V970.7A29.3 29.3 0 0 0 625.5 1000H785.1A107.9 107.9 0 0 0 892.8 892.3V592H907.8A92.1 92.1 0 0 0 973 434.9ZM931.6 523.7A33.4 33.4 0 0 1 907.9 533.5H863.5A29.3 29.3 0 0 0 834.2 562.8V892.3A49.2 49.2 0 0 1 785.1 941.4H654.9V735.3A107.9 107.9 0 0 0 547 627.5H452.9A107.9 107.9 0 0 0 345.1 735.2V941.3H215A49.2 49.2 0 0 1 165.8 892.1V562.8A29.3 29.3 0 0 0 136.5 533.5H92.8L91.4 533.5A33.4 33.4 0 0 1 68.4 476.4H68.4L476.3 68.4A33.4 33.4 0 0 1 523.6 68.4L931.4 476.2 931.6 476.4A33.4 33.4 0 0 1 931.6 523.7ZM931.6 523.7", - "width": 1000 - }, - "search": [ - "home_icon" - ] - }, { "uid": "06d6838cdcf6af812f2eb51e0269afc0", "css": "home_icon_active", @@ -145,6 +131,62 @@ "search": [ "schedule_icon" ] + }, + { + "uid": "5a324eddf382f5a1167d7d40325f82c8", + "css": "reject_icon", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M681 626.7L554.3 500 681 373.3A38.5 38.5 0 0 0 626.7 318.9L500 445.7 373.3 319A38.5 38.5 0 1 0 318.9 373.3L445.7 500 318.9 626.8A37.2 37.2 0 0 0 318.9 681.1 38.2 38.2 0 0 0 373.3 681.1L500 554.4 626.7 681.1A38.5 38.5 0 0 0 681.1 681.1 38.2 38.2 0 0 0 681 626.7ZM500 67.3A432.5 432.5 0 1 1 194 194 429.8 429.8 0 0 1 500 67.3M500 0A500 500 0 1 0 1000 500 500 500 0 0 0 500 0Z", + "width": 1000 + }, + "search": [ + "reject_icon" + ] + }, + { + "uid": "2742f64b5e69cc4f39a2dcc5a081ad03", + "css": "approved_icon", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M756.3 348.3L714 304.8A9.1 9.1 0 0 0 707.2 302H707.2A8.7 8.7 0 0 0 700.5 304.8L407.2 600.3 300.5 493.5A9.3 9.3 0 0 0 287.1 493.5L244.2 536.3A9.6 9.6 0 0 0 244.2 550L378.8 684.5A42.6 42.6 0 0 0 406.9 698.2 44.6 44.6 0 0 0 434.8 685H435L756.5 362A10.3 10.3 0 0 0 756.3 348.3ZM500 67.3A432.5 432.5 0 1 1 194 194 429.8 429.8 0 0 1 500 67.3M500 0A499.9 499.9 0 1 0 999.9 500 499.9 499.9 0 0 0 500 0Z", + "width": 1000 + }, + "search": [ + "approved_icon" + ] + }, + { + "uid": "148de09f7fd22c378cdfdbaacaa8e205", + "css": "pending_icon", + "code": 59404, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M809.8 932H797.3C781.5 932 768.2 929.8 766.5 914V913.7C731 583.9 523.3 577.6 523.3 499.9S731.1 415.9 766.5 86V85.9C768.2 70.1 781.5 68 797.3 68H809.8A34.8 34.8 0 0 0 844.7 35.7 34 34 0 0 0 810.7 0H35A34.8 34.8 0 0 0 0 32.3 34 34 0 0 0 34 68H47.2C63 68 76.3 70.2 78.1 85.9V86.2C113.7 416 321.5 422.3 321.5 500S113.7 584 78.3 913.8V914C76.6 929.8 63.3 932 47.5 932H35A34.8 34.8 0 0 0 0.1 964.3 34 34 0 0 0 34.1 1000H810.7A33.9 33.9 0 0 0 844.7 964.3 34.8 34.8 0 0 0 809.8 932ZM197.4 848.9C267 655.2 390.6 678.7 390.6 602.3V467.5C390.6 420.4 301.2 387.6 245.4 311.1A19 19 0 0 1 261.2 281H583.8A18.9 18.9 0 0 1 600 310.6C545.2 387.3 454.2 420.4 454.2 467.4V602.4C454.2 678.1 572.9 657.5 647.8 849 654.7 866.3 649.5 887.8 631.2 887.8H214.1C195.4 887.8 191.1 866.5 197.4 849Z", + "width": 845 + }, + "search": [ + "pending_icon" + ] + }, + { + "uid": "0bbb324cc39e62b3a4e05639a4f4008f", + "css": "home_icon", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M973.1 435L973.1 435 565 27A92 92 0 0 0 434.9 27L27.2 434.7 26.8 435.1A92 92 0 0 0 88 591.9C88.9 591.9 89.9 591.9 90.8 591.9H107.1V892.1A107.9 107.9 0 0 0 214.8 999.9H374.4A29.3 29.3 0 0 0 403.7 970.6V735.3A49.2 49.2 0 0 1 452.9 686.2H547A49.2 49.2 0 0 1 596.2 735.3V970.7A29.3 29.3 0 0 0 625.5 1000H785.1A107.9 107.9 0 0 0 892.8 892.3V592H907.8A92.1 92.1 0 0 0 973 434.9ZM931.6 523.7A33.4 33.4 0 0 1 907.9 533.5H863.5A29.3 29.3 0 0 0 834.2 562.8V892.3A49.2 49.2 0 0 1 785.1 941.4H654.9V735.3A107.9 107.9 0 0 0 547 627.5H452.9A107.9 107.9 0 0 0 345.1 735.2V941.3H215A49.2 49.2 0 0 1 165.8 892.1V562.8A29.3 29.3 0 0 0 136.5 533.5H92.8L91.4 533.5A33.4 33.4 0 0 1 68.4 476.4H68.4L476.3 68.4A33.4 33.4 0 0 1 523.6 68.4L931.4 476.2 931.6 476.4A33.4 33.4 0 0 1 931.6 523.7ZM931.6 523.7", + "width": 1000 + }, + "search": [ + "home_icon" + ] } ] } \ No newline at end of file diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee8..e8efba11 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee8..399e9340 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 00000000..b30a428b --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,90 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def parse_KV_file(file, separator='=') + file_abs_path = File.expand_path(file) + if !File.exists? file_abs_path + return []; + end + generated_key_values = {} + skip_line_start_symbols = ["#", "/"] + File.foreach(file_abs_path) do |line| + next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } + plugin = line.split(pattern=separator) + if plugin.length == 2 + podname = plugin[0].strip() + path = plugin[1].strip() + podpath = File.expand_path("#{path}", file_abs_path) + generated_key_values[podname] = podpath + else + puts "Invalid plugin specification: #{line}" + end + end + generated_key_values +end + +target 'Runner' do + use_frameworks! + use_modular_headers! + + # Flutter Pod + + copied_flutter_dir = File.join(__dir__, 'Flutter') + copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') + copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') + unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) + # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. + # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. + # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. + + generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') + unless File.exist?(generated_xcode_build_settings_path) + raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) + cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; + + unless File.exist?(copied_framework_path) + FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) + end + unless File.exist?(copied_podspec_path) + FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) + end + end + + # Keep pod path relative so it can be checked into Podfile.lock. + pod 'Flutter', :path => 'Flutter' + + # Plugin Pods + + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock + # referring to absolute paths on developers' machines. + system('rm -rf .symlinks') + system('mkdir -p .symlinks/plugins') + plugin_pods = parse_KV_file('../.flutter-plugins') + plugin_pods.each do |name, path| + symlink = File.join('.symlinks', 'plugins', name) + File.symlink(path, symlink) + pod name, :path => File.join(symlink, 'ios') + end +end + +# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. +install! 'cocoapods', :disable_input_output_paths => true + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['ENABLE_BITCODE'] = 'NO' + end + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 00000000..392290a0 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,127 @@ +PODS: + - barcode_scan (0.0.1): + - Flutter + - MTBBarcodeScanner + - SwiftProtobuf + - connectivity (0.0.1): + - Flutter + - Reachability + - connectivity_macos (0.0.1): + - Flutter + - device_info (0.0.1): + - Flutter + - Flutter (1.0.0) + - flutter_flexible_toast (0.0.1): + - Flutter + - flutter_plugin_android_lifecycle (0.0.1): + - Flutter + - hexcolor (0.0.1): + - Flutter + - imei_plugin (0.0.1): + - Flutter + - local_auth (0.0.1): + - Flutter + - MTBBarcodeScanner (5.0.11) + - "permission_handler (5.0.0+hotfix.5)": + - Flutter + - Reachability (3.2) + - shared_preferences (0.0.1): + - Flutter + - shared_preferences_macos (0.0.1): + - Flutter + - shared_preferences_web (0.0.1): + - Flutter + - SwiftProtobuf (1.9.0) + - url_launcher (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_macos (from `.symlinks/plugins/connectivity_macos/ios`) + - device_info (from `.symlinks/plugins/device_info/ios`) + - Flutter (from `Flutter`) + - flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`) + - flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`) + - hexcolor (from `.symlinks/plugins/hexcolor/ios`) + - imei_plugin (from `.symlinks/plugins/imei_plugin/ios`) + - local_auth (from `.symlinks/plugins/local_auth/ios`) + - permission_handler (from `.symlinks/plugins/permission_handler/ios`) + - shared_preferences (from `.symlinks/plugins/shared_preferences/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_macos (from `.symlinks/plugins/url_launcher_macos/ios`) + - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) + +SPEC REPOS: + https://cdn.cocoapods.org/: + - MTBBarcodeScanner + - Reachability + - SwiftProtobuf + +EXTERNAL SOURCES: + barcode_scan: + :path: ".symlinks/plugins/barcode_scan/ios" + connectivity: + :path: ".symlinks/plugins/connectivity/ios" + connectivity_macos: + :path: ".symlinks/plugins/connectivity_macos/ios" + device_info: + :path: ".symlinks/plugins/device_info/ios" + Flutter: + :path: Flutter + flutter_flexible_toast: + :path: ".symlinks/plugins/flutter_flexible_toast/ios" + flutter_plugin_android_lifecycle: + :path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" + hexcolor: + :path: ".symlinks/plugins/hexcolor/ios" + imei_plugin: + :path: ".symlinks/plugins/imei_plugin/ios" + local_auth: + :path: ".symlinks/plugins/local_auth/ios" + permission_handler: + :path: ".symlinks/plugins/permission_handler/ios" + shared_preferences: + :path: ".symlinks/plugins/shared_preferences/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_macos: + :path: ".symlinks/plugins/url_launcher_macos/ios" + url_launcher_web: + :path: ".symlinks/plugins/url_launcher_web/ios" + +SPEC CHECKSUMS: + barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479 + connectivity: 6e94255659cc86dcbef1d452ad3e0491bb1b3e75 + connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191 + device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 + Flutter: 0e3d915762c693b495b44d77113d4970485de6ec + flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143 + flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 + hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89 + imei_plugin: cb1af7c223ac2d82dcd1457a7137d93d65d2a3cd + local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd + MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb + permission_handler: 6226fcb78b97c7c7458a95c7346a11d5184fec12 + Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 + shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d + shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 + shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 + SwiftProtobuf: ecbec1be9036d15655f6b3443a1c4ea693c97932 + url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef + url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 + url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c + +PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83 + +COCOAPODS: 1.9.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index bfb59352..8548667e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -9,14 +9,11 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + B650DC3076E9D70CB188286A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -26,8 +23,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -38,18 +33,20 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 75DD06875D42C7903A76DF9F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9D4B7DB43C6A6C849D2387CE /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + E698D7B14B12DF768FE47A1A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,20 +54,27 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + B650DC3076E9D70CB188286A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 7D66D387293CE5376A07EC5F /* Pods */ = { + isa = PBXGroup; + children = ( + E698D7B14B12DF768FE47A1A /* Pods-Runner.debug.xcconfig */, + 75DD06875D42C7903A76DF9F /* Pods-Runner.release.xcconfig */, + 9D4B7DB43C6A6C849D2387CE /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -84,6 +88,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 7D66D387293CE5376A07EC5F /* Pods */, + F984EB986238F1809678CD84 /* Frameworks */, ); sourceTree = ""; }; @@ -118,6 +124,14 @@ name = "Supporting Files"; sourceTree = ""; }; + F984EB986238F1809678CD84 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 93A5F83B23AB032D1E096663 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -125,12 +139,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 986D76F6694E0D6D8C5CDAAB /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 08568E6EE9BA48E55B7C3865 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -152,6 +168,7 @@ TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = 3A359E86ZF; LastSwiftMigration = 1100; }; }; @@ -189,6 +206,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 08568E6EE9BA48E55B7C3865 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -201,7 +233,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -217,6 +249,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + 986D76F6694E0D6D8C5CDAAB /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -309,6 +363,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -320,8 +375,8 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.doctorAppFlutter; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp; + PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -443,6 +498,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -454,8 +510,8 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.doctorAppFlutter; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp; + PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -470,6 +526,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -481,8 +538,8 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.doctorAppFlutter; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = com.hmg.doctorApp; + PRODUCT_NAME = Runner; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140cf..fb2dffc4 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 31708450..4c18587e 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - doctor_app_flutter + Doctor App CFBundlePackageType APPL CFBundleShortVersionString @@ -22,12 +22,14 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + NSCameraUsageDescription + Camera permission is required for barcode scanning. + NSFaceIDUsageDescription + Why is my app authenticating using face id? UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main - NSFaceIDUsageDescription - Why is my app authenticating using face id? UISupportedInterfaceOrientations UIInterfaceOrientationPortrait @@ -43,7 +45,5 @@ UIViewControllerBasedStatusBarAppearance - NSCameraUsageDescription - Camera permission is required for barcode scanning. diff --git a/lib/client/app_client.dart b/lib/client/app_client.dart new file mode 100644 index 00000000..68c4fb8b --- /dev/null +++ b/lib/client/app_client.dart @@ -0,0 +1,18 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/interceptor/http_interceptor.dart'; +import 'package:http/http.dart'; + +// OWNER : Ibrahim albitar +// DATE : 22-04-2020 +// DESCRIPTION : Custom App client to pin base url for all srvices + +class AppClient { + + static Client client = HttpInterceptor().getClient(); + + static Future post(dynamic path, {dynamic body}) async { + String _fullUrl = BASE_URL + path; + final response = await client.post(_fullUrl, body: body); + return response; + } +} \ No newline at end of file diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 93ca0690..27fcb103 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -3,14 +3,9 @@ import 'dart:convert'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor_profile_model.dart'; -import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; -import 'package:http_interceptor/http_methods.dart'; -import 'package:http_interceptor/models/request_data.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); Helpers helpers = new Helpers(); @@ -38,9 +33,6 @@ class BaseAppClient { Function(String error, int statusCode) onFailure, }) async { String url = BASE_URL + endPoint; - RequestData data = RequestData(body: body,baseUrl: url,method: Method.POST); - - try { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); String token = await sharedPref.getString(TOKEN); @@ -64,7 +56,7 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); - if (await Helpers.checkConnection()) { + if (await Helpers.checkConnection()) { final response = await http.post(url, body: json.encode(body), headers: { @@ -77,7 +69,8 @@ class BaseAppClient { } else { var parsed = json.decode(response.body.toString()); if (!parsed['IsAuthenticated']) { - Navigator.of(AppGlobal.CONTEX).pushNamed(LOGIN); + await helpers.logout(); + helpers.showErrorToast('Your session expired Please login agian'); } else if (parsed['MessageStatus'] == 1) { onSuccess(parsed, statusCode); diff --git a/lib/config/config.dart b/lib/config/config.dart index 5f902f2f..2bd1256d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -1,14 +1,17 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; -const ONLY_LETTERS = "[a-zA-Z]"; +const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL = 'https://hmgwebservices.com/Services/'; //const BASE_URL = 'https://uat.hmgwebservices.com/Services/'; const PHARMACY_ITEMS_URL = "Lists.svc/REST/GetPharmcyItems_Region"; const PHARMACY_LIST_URL = "Patients.svc/REST/GetPharmcyList"; -const PATIENT_PROGRESS_NOTE_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; -const PATIENT_INSURANCE_APPROVALS_URL = "DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; -const PATIENT_ORDERS_URL = "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; +const PATIENT_PROGRESS_NOTE_URL = + "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; +const PATIENT_INSURANCE_APPROVALS_URL = + "DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; +const PATIENT_ORDERS_URL = + "DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_REFER_TO_DOCTOR_URL = "DoctorApplication.svc/REST/ReferToDoctor"; const PATIENT_GET_DOCTOR_BY_CLINIC_URL = "DoctorApplication.svc/REST/GetDoctorsByClinicID"; const PATIENT_GET_LIST_REFERAL_URL = "Lists.svc/REST/GetList_STPReferralFrequency"; @@ -21,9 +24,9 @@ const GET_PATIENT_LAB_OREDERS = const GET_PRESCRIPTION = 'Patients.svc/REST/GetPrescriptionApptList'; const GET_RADIOLOGY = 'DoctorApplication.svc/REST/GetPatientRadResult'; -var selectedPatientType = 0; +var selectedPatientType = 0; -//*********change value to decode json from Dropdown ************1 +//*********change value to decode json from Dropdown ************ var SERVICES_PATIANT = [ "GetMyOutPatient", "GetMyInPatient", @@ -63,12 +66,11 @@ const IP_ADDRESS = '11.11.11.11'; const VERSION_ID = 1.2; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; -const IS_LOGIN_FOR_DOCTOR_APP = true; +const IS_LOGIN_FOR_DOCTOR_APP = true; const PATIENT_OUT_SA = false; /// Timer Info -const TIMER_MIN =10; +const TIMER_MIN = 10; class AppGlobal{ static var CONTEX; } - diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 38212262..675d846f 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -4,35 +4,42 @@ const Map> localizedValues = { 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, 'lanEnglish': {'en': 'English', 'ar': 'English'}, 'lanArabic': {'en': 'العربية', 'ar': 'العربية'}, - 'doctorReply':{'en': 'Doctor Reply', 'ar': 'رد الطبيب'}, - 'time' :{'en': 'Time','ar':'الوقت'}, - 'fileNo' :{'en':'File No', 'ar':'رقم الملف'}, - 'mobileNo' :{'en':'Mobile No', 'ar':'رقم الموبايل'}, - 'messagesScreenToolbarTitle' : {'en': 'Messages','ar': 'الرسائل' }, - 'mySchedule' : {'en': 'My Schedule', 'ar' : 'جدولي'}, - 'errorNoSchedule' :{'en': 'You don\'t have any Schedule' , 'ar': 'ليس لديك أي جدول زمني'}, - 'verify': {'en': 'Verify', 'ar' : 'تحقق'}, - 'referralDoctor':{'en': 'Referral Doctor', 'ar' : 'الطبيب المُحول إليه'}, - 'referringClinic':{'en': 'Referring Clinic', 'ar' : 'العيادة المُحول إليها'}, - 'frequency':{'en': 'Frequency', 'ar' : 'نوع التحويلا'}, - 'priority':{'en': 'Priority', 'ar' : 'الأولوية'}, - 'maxResponseTime':{'en': 'Max Response Time', 'ar' : 'الوقت الأقصى للرد'}, - 'clinicDetailsandRemarks':{'en': 'Clinic Details and Remarks', 'ar' : 'ملاحضات وتفاصيل العيادة'}, - 'answerSuggestions':{'en': 'Answer/Suggestions', 'ar' : 'ملاحضات وتفاصيل العيادة'}, - 'outPatients':{'en': 'Out-Patients', 'ar' : 'ةالمريض الخارجي'}, - 'searchPatient':{'en': 'Search Patient', 'ar' : 'البحث عن مريض'}, - 'labResult':{'en': 'Lab Result', 'ar' : 'نتيجة المختبر'}, - 'todayStatistics':{'en': 'Today Statistics', 'ar' : 'إحصائيات اليوم'}, - 'arrived':{'en': 'Arrived', 'ar' : 'وصل'}, - 'er':{'en': 'ER', 'ar' : 'حالة طوارئ'}, - 'walkIn':{'en': 'Walk-in', 'ar' : 'ادخل'}, - 'notArrived':{'en': 'Not Arrived', 'ar' : 'لم يصل'}, - 'radiology':{'en': 'Radiology', 'ar' : 'الأشعة'}, - 'referral':{'en': 'Referral', 'ar' : 'االإحالة'}, - 'inPatient':{'en': 'In-Patient', 'ar' : 'االمريض الداخلي'}, - 'operations':{'en': 'Operations', 'ar' : 'عمليات'}, - 'patientServices':{'en': 'Patient Services', 'ar' : 'خدمات المرضى'}, - - - + 'doctorReply': {'en': 'Doctor Reply', 'ar': 'رد الطبيب'}, + 'time': {'en': 'Time', 'ar': 'الوقت'}, + 'fileNo': {'en': 'File No', 'ar': 'رقم الملف'}, + 'mobileNo': {'en': 'Mobile No', 'ar': 'رقم الموبايل'}, + 'messagesScreenToolbarTitle': {'en': 'Messages', 'ar': 'الرسائل'}, + 'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'}, + 'errorNoSchedule': { + 'en': 'You don\'t have any Schedule', + 'ar': 'ليس لديك أي جدول زمني' + }, + 'verify': {'en': 'Verify', 'ar': 'تحقق'}, + 'referralDoctor': {'en': 'Referral Doctor', 'ar': 'الطبيب المُحول إليه'}, + 'referringClinic': {'en': 'Referring Clinic', 'ar': 'العيادة المُحول إليها'}, + 'frequency': {'en': 'Frequency', 'ar': 'نوع التحويلا'}, + 'priority': {'en': 'Priority', 'ar': 'الأولوية'}, + 'maxResponseTime': {'en': 'Max Response Time', 'ar': 'الوقت الأقصى للرد'}, + 'clinicDetailsandRemarks': { + 'en': 'Clinic Details and Remarks', + 'ar': 'ملاحضات وتفاصيل العيادة' + }, + 'answerSuggestions': { + 'en': 'Answer/Suggestions', + 'ar': 'ملاحضات وتفاصيل العيادة' + }, + 'outPatients': {'en': 'Out-Patients', 'ar': 'ةالمريض الخارجي'}, + 'searchPatient': {'en': 'Search Patient', 'ar': 'البحث عن مريض'}, + 'labResult': {'en': 'Lab Result', 'ar': 'نتيجة المختبر'}, + 'todayStatistics': {'en': 'Today Statistics', 'ar': 'إحصائيات اليوم'}, + 'arrived': {'en': 'Arrived', 'ar': 'وصل'}, + 'er': {'en': 'ER', 'ar': 'حالة طوارئ'}, + 'walkIn': {'en': 'Walk-in', 'ar': 'ادخل'}, + 'notArrived': {'en': 'Not Arrived', 'ar': 'لم يصل'}, + 'radiology': {'en': 'Radiology', 'ar': 'الأشعة'}, + 'referral': {'en': 'Referral', 'ar': 'االإحالة'}, + 'inPatient': {'en': 'In-Patient', 'ar': 'االمريض الداخلي'}, + 'operations': {'en': 'Operations', 'ar': 'عمليات'}, + 'patientServices': {'en': 'Patient Services', 'ar': 'خدمات المرضى'}, + 'familyMedicine': {'en': 'Family Medicine Clinic', 'ar': 'عيادة طب الأسرة'} }; diff --git a/lib/interceptor/http_interceptor.dart b/lib/interceptor/http_interceptor.dart new file mode 100644 index 00000000..4d0f9c33 --- /dev/null +++ b/lib/interceptor/http_interceptor.dart @@ -0,0 +1,65 @@ +import 'dart:convert'; + +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/providers/auth_provider.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:http/http.dart'; +import 'package:http_interceptor/http_interceptor.dart'; + +import '../providers/auth_provider.dart'; +import '../util/dr_app_shared_pref.dart'; + +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); +List publicUrls = [ + LOGIN_URL, + SELECT_DEVICE_IMEI, + MEMBER_CHECK_ACTIVATION_CODE_NEW, + SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE +]; + +class HttpInterceptor extends InterceptorContract { + + Client getClient(){ + return HttpClientWithInterceptor.build(interceptors: [this]); +} + + Future interceptRequest({RequestData data}) async { + print('RequestData ${data.body}'); + print('RequestData ${data.url}'); + try { + data.headers["Content-Type"] = "application/json"; + data.headers["Accept"] = "application/json"; + // if (publicUrls.contains(data.url)) { + // var loggedUserInfo = await sharedPref.getObj('loggedUser'); + // var token = await sharedPref.getString(TOKEN); + // // print("token"+token); + // // print('loggedUserInfo${loggedUserInfo["LogInTokenID"]}'); + // // // the sevices handel the token in differat name so I ask to be change + // // // we must change the imple + // var body = json.decode(data.body); + // body['LogInTokenID']=token; + // data.body = json.encode(body); + + // // data.body['LogInTokenID'] = ''; + // } else { + // if (data.body['LogInTokenID']) { + // data.body['LogInTokenID'] = ''; + // } + // if (data.body['TokenID']) { + // data.body['TokenID'] = ''; + // } + // } + } catch (e) { + print(e); + } + + // print('data.body${data.body}'); + return data; + } + + @override + Future interceptResponse({ResponseData data}) async { + // print('ResponseData ${data.body}'); + return data; + } +} diff --git a/lib/landing_page.dart b/lib/landing_page.dart index a9f844f8..174a38ab 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -51,14 +51,7 @@ class _LandingPageState extends State { }, ), centerTitle: true, - actions: [ - ProfileImageWidget( - height: 50, - width: 50, - url: - "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", - ) - ], + ), drawer: Theme( data: Theme.of(context).copyWith( diff --git a/lib/lookups/hospital_lookup.dart b/lib/lookups/hospital_lookup.dart index 7e99a42b..69882802 100644 --- a/lib/lookups/hospital_lookup.dart +++ b/lib/lookups/hospital_lookup.dart @@ -1,218 +1,222 @@ - List ListProject= [ - { - "Desciption": "Dubai Hospital", - "DesciptionN": null, - "ID": 2, - "LegalName": "Dr. Sulaiman Al Habib Hospital FZ - LLC ", - "LegalNameN": "مستشفى الدكتور سليمان الحبيب منطقة حرة - ذ.م.م", - "Name": "Dubai Hospital", - "NameN": null, - "PhoneNumber": "+97144297777", - "SetupID": "505005", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "25.231273", - "Longitude": "55.320942", - "MainProjectID": 2, - "ProjectOutSA": true, - "UsingInDoctorApp": true - }, - { - "Desciption": "SZR Center", - "DesciptionN": null, - "ID": 3, - "LegalName": "Dr. Sulaiman Al Habib Hospital SZR - LLC ", - "LegalNameN": "مستشفى الدكتور سليمان الحبيب طريق الشيخ زايد", - "Name": "SZR Medical Center", - "NameN": null, - "PhoneNumber": "+97144297777", - "SetupID": "505005", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "25.154501", - "Longitude": "55.226000", - "MainProjectID": 3, - "ProjectOutSA": true, - "UsingInDoctorApp": true - }, - { - "Desciption": "Home Health Care (HHC)", - "DesciptionN": null, - "ID": 95, - "LegalName": "", - "LegalNameN": "", - "Name": "Home Health Care (HHC)", - "NameN": null, - "PhoneNumber": "+966114622224", - "SetupID": "91877 ", - "DistanceInKilometers": 0, - "IsActive": false, - "Latitude": "24.704242", - "Longitude": "46.675823", - "MainProjectID": 12, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Olaya Hospital", - "DesciptionN": null, - "ID": 12, - "LegalName": "from Sehat Al Olaya Medical Complex Company", - "LegalNameN": "شركة مجمع صحة العليا الطبي ", - "Name": "Olaya Hospital", - "NameN": null, - "PhoneNumber": "+966114622224", - "SetupID": "91877 ", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "24.704242", - "Longitude": "46.675823", - "MainProjectID": 12, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Ajaji Dental Clinic (AMS)", - "DesciptionN": null, - "ID": 99, - "LegalName": "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company", - "LegalNameN": "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان", - "Name": "Ajaji Dental Clinic (AMS)", - "NameN": null, - "PhoneNumber": "+966115259999", - "SetupID": "010266", - "DistanceInKilometers": 0, - "IsActive": false, - "Latitude": "24.722136", - "Longitude": "46.774303", - "MainProjectID": 15, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Ajaji Dental Clinic (AMS)", - "DesciptionN": null, - "ID": 100, - "LegalName": "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company", - "LegalNameN": "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان", - "Name": "Ajaji Dental Clinic (AMS) Malaz", - "NameN": null, - "PhoneNumber": "+966115259999", - "SetupID": "010266", - "DistanceInKilometers": 0, - "IsActive": false, - "Latitude": "24.722136", - "Longitude": "46.774303", - "MainProjectID": 15, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Arryan Hospital", - "DesciptionN": null, - "ID": 15, - "LegalName": "Al Rayan Hospital for Healthcare Company ", - "LegalNameN": "شركة مستشفى الريان للرعاية الطبية", - "Name": "Arryan Hospital", - "NameN": null, - "PhoneNumber": "+966114909999", - "SetupID": "010266", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "24.722136", - "Longitude": "46.774303", - "MainProjectID": 15, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "MD Lab", - "DesciptionN": null, - "ID": 150, - "LegalName": "", - "LegalNameN": "", - "Name": "MD Lab", - "NameN": null, - "PhoneNumber": "+966114774700", - "SetupID": "010266", - "DistanceInKilometers": 0, - "IsActive": false, - "Latitude": "24.722136", - "Longitude": "46.774303", - "MainProjectID": 15, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Takhassusi Hospital", - "DesciptionN": null, - "ID": 16, - "LegalName": "Western Specialist Hospital for Medical Care", - "LegalNameN": "شركة مستشفى الغرب التخصصي للرعاية الطبية ", - "Name": "Takhassusi Hospital", - "NameN": null, - "PhoneNumber": "+966112833333", - "SetupID": "102000", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "24.719364", - "Longitude": "46.657567", - "MainProjectID": 16, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Suwaidi Hospital", - "DesciptionN": null, - "ID": 17, - "LegalName": "Sehat Al Suwaidi Medical Company", - "LegalNameN": "شركة صحة السويدي الطبية", - "Name": "Suwaidi Hospital", - "NameN": null, - "PhoneNumber": "+966114754444", - "SetupID": "010266", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "24.567525", - "Longitude": " 46.641019", - "MainProjectID": 17, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Al Qassim Hospital\r\n", - "DesciptionN": null, - "ID": 21, - "LegalName": "Buraidah Al Takhassusi Hospital for Healthcare Company", - "LegalNameN": "شركة مستشفى بريدة التخصصي للرعاية الطبية ", - "Name": "Al Qassim Hospital", - "NameN": null, - "PhoneNumber": "+966163166666", - "SetupID": "051431", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "26.360724", - "Longitude": "43.945774", - "MainProjectID": 21, - "ProjectOutSA": false, - "UsingInDoctorApp": true - }, - { - "Desciption": "Khobar Hospital", - "DesciptionN": null, - "ID": 60, - "LegalName": "Khobar Hospital", - "LegalNameN": "مستشفى الخبر", - "Name": "Khobar Hospital", - "NameN": null, - "PhoneNumber": "+966138711111", - "SetupID": "034423", - "DistanceInKilometers": 0, - "IsActive": true, - "Latitude": "26.3107804", - "Longitude": "50.2108347", - "MainProjectID": 60, - "ProjectOutSA": false, - "UsingInDoctorApp": true - } - ]; \ No newline at end of file +List ListProject = [ + { + "Desciption": "Dubai Hospital", + "DesciptionN": null, + "ID": 2, + "LegalName": "Dr. Sulaiman Al Habib Hospital FZ - LLC ", + "LegalNameN": "مستشفى الدكتور سليمان الحبيب منطقة حرة - ذ.م.م", + "Name": "Dubai Hospital", + "NameN": null, + "PhoneNumber": "+97144297777", + "SetupID": "505005", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "25.231273", + "Longitude": "55.320942", + "MainProjectID": 2, + "ProjectOutSA": true, + "UsingInDoctorApp": true + }, + { + "Desciption": "SZR Center", + "DesciptionN": null, + "ID": 3, + "LegalName": "Dr. Sulaiman Al Habib Hospital SZR - LLC ", + "LegalNameN": "مستشفى الدكتور سليمان الحبيب طريق الشيخ زايد", + "Name": "SZR Medical Center", + "NameN": null, + "PhoneNumber": "+97144297777", + "SetupID": "505005", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "25.154501", + "Longitude": "55.226000", + "MainProjectID": 3, + "ProjectOutSA": true, + "UsingInDoctorApp": true + }, + { + "Desciption": "Home Health Care (HHC)", + "DesciptionN": null, + "ID": 95, + "LegalName": "", + "LegalNameN": "", + "Name": "Home Health Care (HHC)", + "NameN": null, + "PhoneNumber": "+966114622224", + "SetupID": "91877 ", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.704242", + "Longitude": "46.675823", + "MainProjectID": 12, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Olaya Hospital", + "DesciptionN": null, + "ID": 12, + "LegalName": "from Sehat Al Olaya Medical Complex Company", + "LegalNameN": "شركة مجمع صحة العليا الطبي ", + "Name": "Olaya Hospital", + "NameN": null, + "PhoneNumber": "+966114622224", + "SetupID": "91877 ", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.704242", + "Longitude": "46.675823", + "MainProjectID": 12, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Ajaji Dental Clinic (AMS)", + "DesciptionN": null, + "ID": 99, + "LegalName": + "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company", + "LegalNameN": + "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان", + "Name": "Ajaji Dental Clinic (AMS)", + "NameN": null, + "PhoneNumber": "+966115259999", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Ajaji Dental Clinic (AMS)", + "DesciptionN": null, + "ID": 100, + "LegalName": + "from Dr. Abdulaziz A. Al - Ajaji Dental Clinics Complex Company", + "LegalNameN": + "شركة مجمع عيادات الدكتور عبدالعزيز ابرهيم العجاجي لطب الاسنان", + "Name": "Ajaji Dental Clinic (AMS) Malaz", + "NameN": null, + "PhoneNumber": "+966115259999", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Arryan Hospital", + "DesciptionN": null, + "ID": 15, + "LegalName": "Al Rayan Hospital for Healthcare Company ", + "LegalNameN": "شركة مستشفى الريان للرعاية الطبية", + "Name": "Arryan Hospital", + "NameN": null, + "PhoneNumber": "+966114909999", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "MD Lab", + "DesciptionN": null, + "ID": 150, + "LegalName": "", + "LegalNameN": "", + "Name": "MD Lab", + "NameN": null, + "PhoneNumber": "+966114774700", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "MainProjectID": 15, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Takhassusi Hospital", + "DesciptionN": null, + "ID": 16, + "LegalName": "Western Specialist Hospital for Medical Care", + "LegalNameN": "شركة مستشفى الغرب التخصصي للرعاية الطبية ", + "Name": "Takhassusi Hospital", + "NameN": null, + "PhoneNumber": "+966112833333", + "SetupID": "102000", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.719364", + "Longitude": "46.657567", + "MainProjectID": 16, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Suwaidi Hospital", + "DesciptionN": null, + "ID": 17, + "LegalName": "Sehat Al Suwaidi Medical Company", + "LegalNameN": "شركة صحة السويدي الطبية", + "Name": "Suwaidi Hospital", + "NameN": null, + "PhoneNumber": "+966114754444", + "SetupID": "010266", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "MainProjectID": 17, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Al Qassim Hospital\r\n", + "DesciptionN": null, + "ID": 21, + "LegalName": "Buraidah Al Takhassusi Hospital for Healthcare Company", + "LegalNameN": "شركة مستشفى بريدة التخصصي للرعاية الطبية ", + "Name": "Al Qassim Hospital", + "NameN": null, + "PhoneNumber": "+966163166666", + "SetupID": "051431", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "26.360724", + "Longitude": "43.945774", + "MainProjectID": 21, + "ProjectOutSA": false, + "UsingInDoctorApp": true + }, + { + "Desciption": "Khobar Hospital", + "DesciptionN": null, + "ID": 60, + "LegalName": "Khobar Hospital", + "LegalNameN": "مستشفى الخبر", + "Name": "Khobar Hospital", + "NameN": null, + "PhoneNumber": "+966138711111", + "SetupID": "034423", + "DistanceInKilometers": 0, + "IsActive": true, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "MainProjectID": 60, + "ProjectOutSA": false, + "UsingInDoctorApp": true + } +]; diff --git a/lib/lookups/patient_lookup.dart b/lib/lookups/patient_lookup.dart index 451e694b..0d58a407 100644 --- a/lib/lookups/patient_lookup.dart +++ b/lib/lookups/patient_lookup.dart @@ -1,26 +1,17 @@ +const PATIENT_TYPE = const [ + {"text": "outPatiant", "val": "0"}, + {"text": "InPatiant", "val": "1"}, + {"text": "Discharge", "val": "2"}, + {"text": "Referrd", "val": "3"}, + {"text": "Referral Discharge", "val": "4"}, + {"text": "Tomorrow Patient", "val": "5"}, + {"text": "Referral", "val": "6"}, +]; - const PATIENT_TYPE = const [ - {"text": "outPatiant", "val": "0"}, - {"text": "InPatiant", "val": "1"}, - {"text": "Discharge", "val": "2"}, - {"text": "Referrd", "val": "3"}, - {"text": "Referral Discharge", "val": "4"}, - {"text": "Tomorrow Patient", "val": "5"}, - {"text": "Referral", "val": "6"}, - - - - - ]; - - - - const LOCATIONS = const[ - {"text": "In Sudia Arabia", "val": "1"}, - {"text": "Out Sudia Arabia", "val": "2"}, - ]; - - +const LOCATIONS = const [ + {"text": "In Sudia Arabia", "val": "1"}, + {"text": "Out Sudia Arabia", "val": "2"}, +]; enum vitalSignDetails { bodyMeasurements, @@ -30,4 +21,4 @@ enum vitalSignDetails { bloodPressure, oxygenation, painScale -} \ No newline at end of file +} diff --git a/lib/models/patient/refer_to_doctor_request.dart b/lib/models/patient/refer_to_doctor_request.dart index 11229596..28eb488b 100644 --- a/lib/models/patient/refer_to_doctor_request.dart +++ b/lib/models/patient/refer_to_doctor_request.dart @@ -1,3 +1,5 @@ +import 'package:flutter/cupertino.dart'; + class ReferToDoctorRequest { /* @@ -64,27 +66,27 @@ class ReferToDoctorRequest { */ ReferToDoctorRequest( - {this.projectID, - this.admissionNo, - this.roomID = "ISO-6", - this.referralClinic, - this.referralDoctor , - this.createdBy, - this.editedBy , - this.patientID, - this.patientTypeID = 1, - this.referringClinic, - this.referringDoctor, - this.referringDoctorRemarks, - this.priority , - this.frequency, - this.extension, + {@required this.projectID, + @required this.admissionNo, + @required this.roomID , + @required this.referralClinic, + @required this.referralDoctor , + @required this.createdBy, + @required this.editedBy , + @required this.patientID, + @required this.patientTypeID, + @required this.referringClinic, + @required this.referringDoctor, + @required this.referringDoctorRemarks, + @required this.priority , + @required this.frequency, + @required this.extension, this.languageID = 2, this.stamp = "2020-06-03T11:26:42.358Z", this.iPAdress = "11.11.11.11", this.versionID = 1.2, this.channel = 9, - this.tokenID, + @required this.tokenID, this.sessionID = "JBXRsDl37L", this.isLoginForDoctorApp = true, this.patientOutSA = false}); diff --git a/lib/presentation/doctor_app_icons.dart b/lib/presentation/doctor_app_icons.dart index c4430db3..76aefa45 100644 --- a/lib/presentation/doctor_app_icons.dart +++ b/lib/presentation/doctor_app_icons.dart @@ -31,4 +31,7 @@ class DoctorApp { static const IconData message_icon_active = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData scdedule_icon_active = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData schedule_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData reject_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData approved_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData pending_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/providers/auth_provider.dart b/lib/providers/auth_provider.dart index f362442d..e79192ae 100644 --- a/lib/providers/auth_provider.dart +++ b/lib/providers/auth_provider.dart @@ -22,19 +22,19 @@ class AuthProvider with ChangeNotifier { await BaseAppClient.post(LOGIN_URL, onSuccess: (dynamic response, int statusCode) { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: { - "UserID": userInfo.UserID, - "Password": userInfo.Password, - "ProjectID": userInfo.ProjectID, - "LanguageID": userInfo.LanguageID, - "IPAdress": userInfo.IPAdress, - "VersionID": userInfo.VersionID, - "Channel": userInfo.Channel, - "SessionID": userInfo.SessionID - }); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: { + "UserID": userInfo.UserID, + "Password": userInfo.Password, + "ProjectID": userInfo.ProjectID, + "LanguageID": userInfo.LanguageID, + "IPAdress": userInfo.IPAdress, + "VersionID": userInfo.VersionID, + "Channel": userInfo.Channel, + "SessionID": userInfo.SessionID + }); return Future.value(localRes); } catch (error) { @@ -49,10 +49,10 @@ class AuthProvider with ChangeNotifier { await BaseAppClient.post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: imei); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: imei); return Future.value(localRes); } catch (error) { print(error); @@ -65,10 +65,10 @@ class AuthProvider with ChangeNotifier { dynamic localRes; await BaseAppClient.post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: imei); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: imei); return Future.value(localRes); } catch (error) { print(error); @@ -82,10 +82,10 @@ class AuthProvider with ChangeNotifier { var localRes; await BaseAppClient.post(SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE, onSuccess: (dynamic response, int statusCode) { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: activationCodeModel); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: activationCodeModel); return Future.value(localRes); } catch (error) { print(error); @@ -98,10 +98,10 @@ class AuthProvider with ChangeNotifier { dynamic localRes; await BaseAppClient.post(MEMBER_CHECK_ACTIVATION_CODE_NEW, onSuccess: (dynamic response, int statusCode) { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: activationCodeModel); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: activationCodeModel); return Future.value(localRes); } catch (error) { print(error); @@ -109,8 +109,8 @@ class AuthProvider with ChangeNotifier { } } - /* - *@author: Elham Rababah + /* + *@author: Elham Rababah *@Date:17/5/2020 *@param: docInfo *@return:Future @@ -121,10 +121,10 @@ class AuthProvider with ChangeNotifier { dynamic localRes; await BaseAppClient.post(GET_DOC_PROFILES, onSuccess: (dynamic response, int statusCode) { - localRes = response; - }, onFailure: (String error, int statusCode) { - throw error; - }, body: docInfo); + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: docInfo); return Future.value(localRes); } catch (error) { print(error); diff --git a/lib/providers/hospital_provider.dart b/lib/providers/hospital_provider.dart index e2561632..547bffe2 100644 --- a/lib/providers/hospital_provider.dart +++ b/lib/providers/hospital_provider.dart @@ -25,7 +25,7 @@ class HospitalProvider with ChangeNotifier { throw error; }, body: info); - return Future.value(localRes); + return Future.value(localRes); } } diff --git a/lib/providers/medicine_provider.dart b/lib/providers/medicine_provider.dart index 1f432531..a0d8f4ed 100644 --- a/lib/providers/medicine_provider.dart +++ b/lib/providers/medicine_provider.dart @@ -1,39 +1,57 @@ -import 'package:doctor_app_flutter/client/base_app_client.dart'; +import 'dart:convert'; + +import 'package:doctor_app_flutter/client/app_client.dart'; import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/pharmacies_List_request_model.dart'; import 'package:doctor_app_flutter/models/pharmacies_items_request_model.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; +import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:flutter/cupertino.dart'; -import '.../../../util/dr_app_shared_pref.dart'; - class MedicineProvider with ChangeNotifier { DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - + var pharmacyItemsList = []; var pharmaciesList = []; bool isFinished = true; bool hasError = false; String errorMsg = ''; - PharmaciesItemsRequestModel _itemsRequestModel = - PharmaciesItemsRequestModel(); + PharmaciesItemsRequestModel _itemsRequestModel =PharmaciesItemsRequestModel(); PharmaciesListRequestModel _listRequestModel = PharmaciesListRequestModel(); Future getMedicineItem(String itemName) async { resetDefaultValues(); try { - _itemsRequestModel.pHRItemName = itemName; - await BaseAppClient.post(PHARMACY_ITEMS_URL, - onSuccess: (dynamic response, int statusCode) { - pharmacyItemsList = response['ListPharmcy_Region']; - hasError = false; + if (await Helpers.checkConnection()) { + _itemsRequestModel.pHRItemName = itemName; + + final response = await AppClient.post(PHARMACY_ITEMS_URL, + body: json.encode(_itemsRequestModel.toJson())); + final int statusCode = response.statusCode; isFinished = true; - errorMsg = "Done"; - }, onFailure: (String error, int statusCode) { + if (statusCode < 200 || statusCode >= 400 || json == null) { + isFinished = true; + hasError = true; + errorMsg = 'Error While Fetching data'; + } else { + var parsed = json.decode(response.body.toString()); + if (parsed['MessageStatus'] == 1) { + pharmacyItemsList = parsed['ListPharmcy_Region']; + hasError = false; + isFinished = true; + errorMsg = "Done"; + } else { + hasError = true; + errorMsg = parsed['ErrorMessage'] ?? parsed['ErrorEndUserMessage']; + } + } + } else { isFinished = true; hasError = true; - errorMsg = error; - }, body: _itemsRequestModel.toJson()); + errorMsg = 'Please Check The Internet Connection'; + } notifyListeners(); } catch (error) { throw error; @@ -43,20 +61,37 @@ class MedicineProvider with ChangeNotifier { } Future getPharmaciesList(int itemId) async { + String token = await sharedPref.getString(TOKEN); resetDefaultValues(); try { - _listRequestModel.itemID = itemId; - await BaseAppClient.post(PHARMACY_LIST_URL, - onSuccess: (dynamic response, int statusCode) { - pharmaciesList = response['PharmList']; - hasError = false; + if (await Helpers.checkConnection()) { + _listRequestModel.itemID = itemId; + _listRequestModel.tokenID = token; + final response = await AppClient.post(PHARMACY_LIST_URL, + body: json.encode(_listRequestModel.toJson())); + final int statusCode = response.statusCode; isFinished = true; - errorMsg = "Done"; - }, onFailure: (String error, int statusCode) { + if (statusCode < 200 || statusCode >= 400 || json == null) { + isFinished = true; + hasError = true; + errorMsg = 'Error While Fetching data'; + } else { + var parsed = json.decode(response.body.toString()); + if (parsed['MessageStatus'] == 1) { + pharmaciesList = parsed['PharmList']; + hasError = false; + isFinished = true; + errorMsg = "Done"; + } else { + hasError = true; + errorMsg = parsed['ErrorMessage'] ?? parsed['ErrorEndUserMessage']; + } + } + } else { isFinished = true; hasError = true; - errorMsg = error; - }, body: _listRequestModel.toJson()); + errorMsg = 'Please Check The Internet Connection'; + } notifyListeners(); } catch (error) { throw error; diff --git a/lib/providers/patients_provider.dart b/lib/providers/patients_provider.dart index 3aebd306..6da89e74 100644 --- a/lib/providers/patients_provider.dart +++ b/lib/providers/patients_provider.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; + +import 'package:doctor_app_flutter/client/app_client.dart'; import 'package:doctor_app_flutter/client/base_app_client.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/models/doctor_profile_model.dart'; @@ -13,6 +16,7 @@ import 'package:doctor_app_flutter/models/patient/prescription_res_model.dart'; import 'package:doctor_app_flutter/models/patient/radiology_res_model.dart'; import 'package:doctor_app_flutter/models/patient/refer_to_doctor_request.dart'; import 'package:doctor_app_flutter/models/prescription_report.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:flutter/cupertino.dart'; import '../config/config.dart'; @@ -25,6 +29,7 @@ import '../models/patient/vital_sign_res_model.dart'; import '../util/helpers.dart'; Helpers helpers = Helpers(); +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class PatientsProvider with ChangeNotifier { bool isLoading = false; @@ -53,16 +58,16 @@ class PatientsProvider with ChangeNotifier { var referalFrequancyList = []; DoctorsByClinicIdRequest _doctorsByClinicIdRequest = - DoctorsByClinicIdRequest(); + DoctorsByClinicIdRequest(); STPReferralFrequencyRequest _referralFrequencyRequest = - STPReferralFrequencyRequest(); + STPReferralFrequencyRequest(); ClinicByProjectIdRequest _clinicByProjectIdRequest = - ClinicByProjectIdRequest(); + ClinicByProjectIdRequest(); ReferToDoctorRequest _referToDoctorRequest = ReferToDoctorRequest(); PatiantInformtion _selectedPatient; - Future getPatientList(PatientModel patient, patientType) async { + Future getPatientList(PatientModel patient, patientType) async { int val = int.parse(patientType); try { @@ -72,28 +77,28 @@ class PatientsProvider with ChangeNotifier { localRes = response; }, onFailure: (String error, int statusCode) { throw error; - }, body: { - "ProjectID": patient.ProjectID, - "ClinicID": patient.ClinicID, - "DoctorID": patient.DoctorID, - "FirstName": patient.FirstName, - "MiddleName": patient.MiddleName, - "LastName": patient.LastName, - "PatientMobileNumber": patient.PatientMobileNumber, - "PatientIdentificationID": patient.PatientIdentificationID, - "PatientID": patient.PatientID, - "From": patient.From, - "To": patient.To, - "LanguageID": patient.LanguageID, - "stamp": patient.stamp, - "IPAdress": patient.IPAdress, - "VersionID": patient.VersionID, - "Channel": patient.Channel, - "TokenID": patient.TokenID, - "SessionID": patient.SessionID, - "IsLoginForDoctorApp": patient.IsLoginForDoctorApp, - "PatientOutSA": patient.PatientOutSA - }); + }, body: { + "ProjectID": patient.ProjectID, + "ClinicID": patient.ClinicID, + "DoctorID": patient.DoctorID, + "FirstName": patient.FirstName, + "MiddleName": patient.MiddleName, + "LastName": patient.LastName, + "PatientMobileNumber": patient.PatientMobileNumber, + "PatientIdentificationID": patient.PatientIdentificationID, + "PatientID": patient.PatientID, + "From": patient.From, + "To": patient.To, + "LanguageID": patient.LanguageID, + "stamp": patient.stamp, + "IPAdress": patient.IPAdress, + "VersionID": patient.VersionID, + "Channel": patient.Channel, + "TokenID": patient.TokenID, + "SessionID": patient.SessionID, + "IsLoginForDoctorApp": patient.IsLoginForDoctorApp, + "PatientOutSA": patient.PatientOutSA + }); return Future.value(localRes); } catch (error) { @@ -122,36 +127,36 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(GET_PATIENT_VITAL_SIGN, onSuccess: (dynamic response, int statusCode) { - patientVitalSignList = []; - response['List_DoctorPatientVitalSign'].forEach((v) { - patientVitalSignList.add(new VitalSignResModel.fromJson(v)); - }); - - if (patientVitalSignList.length > 0) { - List patientVitalSignOrderdSubListTemp = []; - patientVitalSignOrderdSubListTemp = patientVitalSignList; - patientVitalSignOrderdSubListTemp - .sort((VitalSignResModel a, VitalSignResModel b) { - return b.vitalSignDate.microsecondsSinceEpoch - - a.vitalSignDate.microsecondsSinceEpoch; - }); - patientVitalSignOrderdSubList.clear(); - int length = patientVitalSignOrderdSubListTemp.length >= 20 - ? 20 - : patientVitalSignOrderdSubListTemp.length; - for (int x = 0; x < length; x++) { - patientVitalSignOrderdSubList - .add(patientVitalSignOrderdSubListTemp[x]); - } - } - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: patient); + patientVitalSignList = []; + response['List_DoctorPatientVitalSign'].forEach((v) { + patientVitalSignList.add(new VitalSignResModel.fromJson(v)); + }); + + if (patientVitalSignList.length > 0) { + List patientVitalSignOrderdSubListTemp = []; + patientVitalSignOrderdSubListTemp = patientVitalSignList; + patientVitalSignOrderdSubListTemp + .sort((VitalSignResModel a, VitalSignResModel b) { + return b.vitalSignDate.microsecondsSinceEpoch - + a.vitalSignDate.microsecondsSinceEpoch; + }); + patientVitalSignOrderdSubList.clear(); + int length = patientVitalSignOrderdSubListTemp.length >= 20 + ? 20 + : patientVitalSignOrderdSubListTemp.length; + for (int x = 0; x < length; x++) { + patientVitalSignOrderdSubList + .add(patientVitalSignOrderdSubListTemp[x]); + } + } + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: patient); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -172,18 +177,18 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(GET_PATIENT_LAB_OREDERS, onSuccess: (dynamic response, int statusCode) { - patientLabResultOrdersList = []; - response['List_GetLabOreders'].forEach((v) { - patientLabResultOrdersList.add(new LabOrdersResModel.fromJson(v)); - }); - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: patient); + patientLabResultOrdersList = []; + response['List_GetLabOreders'].forEach((v) { + patientLabResultOrdersList.add(new LabOrdersResModel.fromJson(v)); + }); + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: patient); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -201,18 +206,18 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(GET_PRESCRIPTION, onSuccess: (dynamic response, int statusCode) { - patientPrescriptionsList = []; - response['PatientPrescriptionList'].forEach((v) { - patientPrescriptionsList.add(new PrescriptionResModel.fromJson(v)); - }); - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: patient); + patientPrescriptionsList = []; + response['PatientPrescriptionList'].forEach((v) { + patientPrescriptionsList.add(new PrescriptionResModel.fromJson(v)); + }); + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: patient); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -233,13 +238,13 @@ class PatientsProvider with ChangeNotifier { await BaseAppClient.post( 'DoctorApplication.svc/REST/GetPrescriptionReportForInPatient', onSuccess: (dynamic response, int statusCode) { - response['List_PrescriptionReportForInPatient'].forEach((v) { - prescriptionReportForInPatientList - .add(PrescriptionReportForInPatient.fromJson(v)); - }); - isError = false; - isLoading = false; - }, onFailure: (String error, int statusCode) { + response['List_PrescriptionReportForInPatient'].forEach((v) { + prescriptionReportForInPatientList + .add(PrescriptionReportForInPatient.fromJson(v)); + }); + isError = false; + isLoading = false; + }, onFailure: (String error, int statusCode) { isError = true; isLoading = false; this.error = error; @@ -258,16 +263,16 @@ class PatientsProvider with ChangeNotifier { notifyListeners(); await BaseAppClient.post('Patients.svc/REST/GetPrescriptionReport', onSuccess: (dynamic response, int statusCode) { - response['ListPRM'].forEach((v) { - prescriptionReport.add(PrescriptionReport.fromJson(v)); - }); - isError = false; - isLoading = false; - }, onFailure: (String error, int statusCode) { - isError = true; - isLoading = false; - this.error = error; - }, body: prescriptionReqModel); + response['ListPRM'].forEach((v) { + prescriptionReport.add(PrescriptionReport.fromJson(v)); + }); + isError = false; + isLoading = false; + }, onFailure: (String error, int statusCode) { + isError = true; + isLoading = false; + this.error = error; + }, body: prescriptionReqModel); notifyListeners(); } @@ -298,18 +303,18 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(GET_RADIOLOGY, onSuccess: (dynamic response, int statusCode) { - patientRadiologyList = []; - response['List_GetRadOreders'].forEach((v) { - patientRadiologyList.add(new RadiologyResModel.fromJson(v)); - }); - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: patient); + patientRadiologyList = []; + response['List_GetRadOreders'].forEach((v) { + patientRadiologyList.add(new RadiologyResModel.fromJson(v)); + }); + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: patient); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -327,16 +332,16 @@ class PatientsProvider with ChangeNotifier { requestLabResult.patientTypeID = labOrdersResModel.patientType; await BaseAppClient.post('DoctorApplication.svc/REST/GetPatientLabResults', onSuccess: (dynamic response, int statusCode) { - isError = false; - isLoading = false; - response['List_GetLabNormal'].forEach((v) { - labResultList.add(new LabResult.fromJson(v)); - }); - }, onFailure: (String error, int statusCode) { - isError = true; - isLoading = false; - this.error = error; - }, body: requestLabResult.toJson()); + isError = false; + isLoading = false; + response['List_GetLabNormal'].forEach((v) { + labResultList.add(new LabResult.fromJson(v)); + }); + }, onFailure: (String error, int statusCode) { + isError = true; + isLoading = false; + this.error = error; + }, body: requestLabResult.toJson()); notifyListeners(); } @@ -345,15 +350,15 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(PATIENT_INSURANCE_APPROVALS_URL, onSuccess: (dynamic response, int statusCode) { - insuranceApporvalsList = response['List_ApprovalMain_InPatient']; - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: patient); + insuranceApporvalsList = response['List_ApprovalMain_InPatient']; + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: patient); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -369,15 +374,15 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(PATIENT_PROGRESS_NOTE_URL, onSuccess: (dynamic response, int statusCode) { - patientProgressNoteList = response['List_GetPregressNoteForInPatient']; - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: patient); + patientProgressNoteList = response['List_GetPregressNoteForInPatient']; + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: patient); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -394,15 +399,15 @@ class PatientsProvider with ChangeNotifier { _doctorsByClinicIdRequest.clinicID = clinicId; await BaseAppClient.post(PATIENT_GET_DOCTOR_BY_CLINIC_URL, onSuccess: (dynamic response, int statusCode) { - doctorsList = response['List_Doctors_All']; - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: _doctorsByClinicIdRequest.toJson()); + doctorsList = response['List_Doctors_All']; + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: _doctorsByClinicIdRequest.toJson()); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -411,7 +416,7 @@ class PatientsProvider with ChangeNotifier { List getDoctorNameList() { var doctorNamelist = - doctorsList.map((value) => value['DoctorName'].toString()).toList(); + doctorsList.map((value) => value['DoctorName'].toString()).toList(); return doctorNamelist; } @@ -424,15 +429,15 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(PATIENT_GET_CLINIC_BY_PROJECT_URL, onSuccess: (dynamic response, int statusCode) { - clinicsList = response['List_Clinic_All']; - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: _clinicByProjectIdRequest.toJson()); + clinicsList = response['List_Clinic_All']; + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: _clinicByProjectIdRequest.toJson()); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -455,15 +460,15 @@ class PatientsProvider with ChangeNotifier { try { await BaseAppClient.post(PATIENT_GET_LIST_REFERAL_URL, onSuccess: (dynamic response, int statusCode) { - referalFrequancyList = response['list_STPReferralFrequency']; - isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { - isLoading = false; - isError = true; - this.error = error; - }, body: _referralFrequencyRequest.toJson()); + referalFrequancyList = response['list_STPReferralFrequency']; + isLoading = false; + isError = false; + this.error = ''; + }, onFailure: (String error, int statusCode) { + isLoading = false; + isError = true; + this.error = error; + }, body: _referralFrequencyRequest.toJson()); notifyListeners(); } catch (err) { handelCatchErrorCase(err); @@ -481,48 +486,69 @@ class PatientsProvider with ChangeNotifier { *@Date:3/6/2020 *@desc: referToDoctor */ - referToDoctor( - int selectedDoctorID, - int selectedClinicID, - String selectedReferralFrequancyID, - int admissionNo, - String extension, - String doctorRemark) async { - String token = await sharedPref.getString(TOKEN); - int projectID = await sharedPref.getInt(PROJECT_ID); - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); - int doctorID = doctorProfile.doctorID; - int clinicId = doctorProfile.clinicID; + referToDoctor(context, + {String selectedDoctorID, + String selectedClinicID, + int admissionNo, + String extension, + String priority, + String frequency, + String referringDoctorRemarks, + int patientID, + int patientTypeID, + String roomID, + int projectID}) async { setBasicData(); try { - // _referToDoctorRequest.tokenID = token; - // _referToDoctorRequest.admissionNo = admissionNo; - // _referToDoctorRequest.projectID = projectID; - // _referToDoctorRequest.tokenID = token; - // _referToDoctorRequest.extension = extension; - // _referToDoctorRequest.frequency = selectedReferralFrequancyID; - // _referToDoctorRequest.patientID = - // _referToDoctorRequest.priority = - // _referToDoctorRequest.referralClinic = - // _referToDoctorRequest.referralDoctor = - // _referToDoctorRequest.referringDoctorRemarks = - // _referToDoctorRequest.roomID = - // _referToDoctorRequest.referringClinic = - // _referToDoctorRequest.referringDoctor = - - await BaseAppClient.post(PATIENT_REFER_TO_DOCTOR_URL, - onSuccess: (dynamic response, int statusCode) { - patientProgressNoteList = response['List_GetPregressNoteForInPatient']; + if (await Helpers.checkConnection()) { + String token = await sharedPref.getString(TOKEN); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = + new DoctorProfileModel.fromJson(profile); + int doctorID = doctorProfile.doctorID; + int clinicId = doctorProfile.clinicID; + _referToDoctorRequest = ReferToDoctorRequest( + projectID: projectID, + admissionNo: admissionNo, + roomID: roomID, + referralClinic: selectedClinicID.toString(), + referralDoctor: selectedDoctorID.toString(), + createdBy: doctorID, + editedBy: doctorID, + patientID: patientID, + patientTypeID: patientTypeID, + referringClinic: clinicId, + referringDoctor: doctorID, + referringDoctorRemarks: referringDoctorRemarks, + priority: priority, + frequency: frequency, + extension: extension, + tokenID: token); + + final response = await AppClient.post(PATIENT_REFER_TO_DOCTOR_URL, + body: json.encode(_referToDoctorRequest)); + final int statusCode = response.statusCode; isLoading = false; - isError = false; - this.error = ''; - }, onFailure: (String error, int statusCode) { + + if (statusCode < 200 || statusCode >= 400 || json == null) { + isError = true; + error = 'Error While Fetching data'; + } else { + var res = json.decode(response.body); + print('$res'); + if (res['MessageStatus'] == 1) { + print('Done : \n $res'); + Navigator.pop(context); + } else { + isError = true; + error = res['ErrorMessage'] ?? res['ErrorEndUserMessage']; + } + } + } else { isLoading = false; isError = true; - this.error = error; - }, body: _referralFrequencyRequest.toJson()); - + error = 'Please Check The Internet Connection'; + } notifyListeners(); } catch (err) { handelCatchErrorCase(err); diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index 80d9332d..27afd2ee 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -24,7 +24,7 @@ class QrReaderScreen extends StatefulWidget { } class _QrReaderScreenState extends State { -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); bool isLoading = false; bool isError = false; @@ -73,9 +73,9 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); height: 7, ), AppText( - 'scan Qr code to retrieve patient profile', - fontSize: 14, - fontWeight: FontWeight.w400, + 'scan Qr code to retrieve patient profile', + fontSize: 14, + fontWeight: FontWeight.w400, textAlign: TextAlign.center ), SizedBox( @@ -124,15 +124,15 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); /// var result = await BarcodeScanner.scan(); /// int patientID = get from qr result var result = await BarcodeScanner.scan(); - // if (result.rawContent == "") { - List listOfParams = result.rawContent.split(','); - String patientType = "1"; - setState(() { - isLoading = true; - isError = false; - patientList = []; - }); - String token = await sharedPref.getString(TOKEN); + // if (result.rawContent == "") { + List listOfParams = result.rawContent.split(','); + String patientType = "1"; + setState(() { + isLoading = true; + isError = false; + patientList = []; + }); + String token = await sharedPref.getString(TOKEN); // Map profile = await sharedPref.getObj(DOCTOR_PROFILE); // DoctorProfileModel doctorProfile = new DoctorProfileModel.fromJson(profile); // patient.PatientID = 8808; @@ -141,64 +141,64 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); // patient.setClinicID = doctorProfile.clinicID; // patient.setProjectID = doctorProfile.projectID; // Provider.of(context, listen: false); - patient.PatientID = 8808; - patient.TokenID = token; - Provider.of(context, listen: false) - .getPatientList(patient, "1") - .then((response) { - if (response['MessageStatus'] == 1) { - switch (patientType) { - case "0": - if (response['List_MyOutPatient'] != null) { - setState(() { - patientList = ModelResponse.fromJson(response['List_MyOutPatient']).list; - isLoading = false; - }); - Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { - "patient": patientList[0], - }); - } else { - setState(() { - isError = true; - isLoading = false; - }); - DrAppToastMsg.showErrorToast('No patient'); - } + patient.PatientID = 8808; + patient.TokenID = token; + Provider.of(context, listen: false) + .getPatientList(patient, "1") + .then((response) { + if (response['MessageStatus'] == 1) { + switch (patientType) { + case "0": + if (response['List_MyOutPatient'] != null) { + setState(() { + patientList = ModelResponse.fromJson(response['List_MyOutPatient']).list; + isLoading = false; + }); + Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patientList[0], + }); + } else { + setState(() { + isError = true; + isLoading = false; + }); + DrAppToastMsg.showErrorToast('No patient'); + } + break; + case "1": + if (response['List_MyInPatient'] != null) { + setState(() { + patientList = ModelResponse.fromJson(response['List_MyInPatient']).list; + isLoading = false; + error = ""; + }); + Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { + "patient": patientList[0], + }); + } else { + setState(() { + isError = true; + isLoading = false; + }); + DrAppToastMsg.showErrorToast('No patient'); break; - case "1": - if (response['List_MyInPatient'] != null) { - setState(() { - patientList = ModelResponse.fromJson(response['List_MyInPatient']).list; - isLoading = false; - error = ""; - }); - Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { - "patient": patientList[0], - }); - } else { - setState(() { - isError = true; - isLoading = false; - }); - DrAppToastMsg.showErrorToast('No patient'); - break; - } - } - } else { - setState(() { - isLoading = false; - isError = true; - }); - DrAppToastMsg.showErrorToast(response['ErrorEndUserMessage'] ?? response['ErrorMessage']); - + } } - }).catchError((error){ + } else { setState(() { isLoading = false; + isError = true; }); - helpers.showErrorToast(error); - //DrAppToastMsg.showErrorToast(error); + DrAppToastMsg.showErrorToast(response['ErrorEndUserMessage'] ?? response['ErrorMessage']); + + } + }).catchError((error){ + setState(() { + isLoading = false; }); - } - // } + helpers.showErrorToast(error); + //DrAppToastMsg.showErrorToast(error); + }); + } +// } } diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 2d43a048..38c81cc3 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -41,10 +41,10 @@ class _LoginsreenState extends State { }); } -/* - *@author: Elham Rababah - *@Date:19/4/2020 - *@param: isLoading +/* + *@author: Elham Rababah + *@Date:19/4/2020 + *@param: isLoading *@return: *@desc: Change Isloading attribute in order to show or hide loader */ @@ -56,7 +56,7 @@ class _LoginsreenState extends State { @override Widget build(BuildContext context) { - AppGlobal.CONTEX = context; + getSharedPref(); return AppScaffold( isLoading: _isLoading, @@ -80,24 +80,24 @@ class _LoginsreenState extends State { children: [ (platformImei == null) ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.knownUser), - LoginForm( - changeLoadingStata: - changeLoadingStata, - ), - ], - ) + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.knownUser), + LoginForm( + changeLoadingStata: + changeLoadingStata, + ), + ], + ) : Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.unknownUser), - KnownUserLogin(), - ], - ), + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AuthHeader(loginType.unknownUser), + KnownUserLogin(), + ], + ), ])); } } diff --git a/lib/screens/dashboard_screen.dart b/lib/screens/dashboard_screen.dart index a00471df..d5a3dbaa 100644 --- a/lib/screens/dashboard_screen.dart +++ b/lib/screens/dashboard_screen.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/providers/hospital_provider.dart'; import 'package:doctor_app_flutter/providers/referral_patient_provider.dart'; import 'package:doctor_app_flutter/providers/referred_patient_provider.dart'; +import 'package:doctor_app_flutter/screens/QR_reader_screen.dart'; import 'package:doctor_app_flutter/screens/medicine/medicine_search_screen.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; @@ -26,7 +27,7 @@ class DashboardScreen extends StatefulWidget { DashboardScreen({Key key, this.title}) : super(key: key); final String title; - + final String iconURL = 'assets/images/dashboard_icon/'; @override _DashboardScreenState createState() => _DashboardScreenState(); } @@ -42,21 +43,37 @@ class _DashboardScreenState extends State { child: Scaffold( body: SingleChildScrollView( child: SizedBox( - height: MediaQuery.of(context).size.height*1.09, - // height: MediaQuery.of(context).size.height * 0.2, - // width: SizeConfig.screenWidth * 0.9, + height: MediaQuery.of(context).size.height * 1.09, child: Column( children: [ - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.all(10), - child: AppText( - TranslationBase.of(context).todayStatistics, - fontWeight: FontWeight.bold, - ), - alignment: Alignment.centerLeft, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).familyMedicine, + fontWeight: FontWeight.bold, + fontSize: SizeConfig.textMultiplier * 2.5, + ), + alignment: Alignment.centerLeft, + ), + Container( + margin: EdgeInsets.only(left: 10, top: 10, right: 10), + child: Icon( + Icons.settings, + size: SizeConfig.textMultiplier * 2.5, + )) + ]), + Container( + margin: EdgeInsets.only(left: 10, top: 5), + child: AppText( + TranslationBase.of(context).todayStatistics, + fontWeight: FontWeight.bold, ), + alignment: Alignment.centerLeft, ), Expanded( flex: 3, @@ -67,7 +84,7 @@ class _DashboardScreenState extends State { flex: 2, child: RoundedContainer( child: CircularPercentIndicator( - radius: 115.0, + radius: 100, animation: true, animationDuration: 1200, lineWidth: 7.0, @@ -80,7 +97,7 @@ class _DashboardScreenState extends State { fontSize: SizeConfig.textMultiplier * 4), AppText(TranslationBase.of(context).outPatients, fontWeight: FontWeight.normal, - fontSize: SizeConfig.textMultiplier * 1.2, + fontSize: SizeConfig.textMultiplier * 1.1, color: Colors.grey[800]), ], ), @@ -101,16 +118,17 @@ class _DashboardScreenState extends State { flex: 1, child: Column( crossAxisAlignment: - CrossAxisAlignment.stretch, + CrossAxisAlignment.stretch, children: [ Expanded( child: DashboardItemTexts( - TranslationBase.of(context).arrived, + TranslationBase.of(context).arrived, "23", )), Expanded( child: DashboardItemTexts( - TranslationBase.of(context).notArrived, + TranslationBase.of(context) + .notArrived, "23", ), ), @@ -119,18 +137,17 @@ class _DashboardScreenState extends State { ), Expanded( child: Column( - crossAxisAlignment: + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Expanded( child: DashboardItemTexts( - TranslationBase.of(context).er, + TranslationBase.of(context).er, "23", )), Expanded( child: DashboardItemTexts( - - TranslationBase.of(context).walkIn, + TranslationBase.of(context).walkIn, "23", )), ], @@ -149,7 +166,7 @@ class _DashboardScreenState extends State { Expanded( flex: 2, child: new DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'lab_results.svg', "08", TranslationBase.of(context).labResult, backgroundColor: Colors.black45, @@ -161,7 +178,7 @@ class _DashboardScreenState extends State { Expanded( flex: 2, child: new DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'radiology.svg', "10", TranslationBase.of(context).radiology, backgroundColor: Colors.black45, @@ -172,7 +189,7 @@ class _DashboardScreenState extends State { Expanded( flex: 2, child: new DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'referral.svg', "05", TranslationBase.of(context).referral, backgroundColor: Colors.black45, @@ -191,17 +208,17 @@ class _DashboardScreenState extends State { Expanded( flex: 2, child: new DashboardItemIconText( - DoctorApp.home_icon, - "23", - TranslationBase.of(context).inPatient, - showBorder: true, - backgroundColor: Colors.red[900], - ), + widget.iconURL + 'in_patient_white.svg', + "23", + "In-Patient", + showBorder: true, + backgroundColor: Colors.red[900], + iconColor: Colors.white), ), Expanded( flex: 2, child: new DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'operations.svg', "23", TranslationBase.of(context).operations, showBorder: true, @@ -224,13 +241,12 @@ class _DashboardScreenState extends State { Expanded( flex: 2, child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Expanded( flex: 2, child: InkWell( child: DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'search_patient.svg', "", TranslationBase.of(context).searchPatient, showBorder: true, @@ -238,7 +254,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 16, + titleFontSize: SizeConfig.textMultiplier * 2, ), onTap: () { Navigator.of(context).pushNamed(PATIENT_SEARCH); @@ -260,7 +276,7 @@ class _DashboardScreenState extends State { ); }, child: DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'message_icon.svg', "", TranslationBase.of(context).doctorReply, showBorder: true, @@ -268,7 +284,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 16, + titleFontSize: SizeConfig.textMultiplier * 2, ), ), ), @@ -284,7 +300,7 @@ class _DashboardScreenState extends State { flex: 1, child: InkWell( child: DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'search_patient.svg', "", "Search Medicine", showBorder: true, @@ -292,7 +308,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 14, + titleFontSize: SizeConfig.textMultiplier * 2, ), onTap: () { Navigator.push( @@ -322,7 +338,7 @@ class _DashboardScreenState extends State { ); }, child: DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'referral.svg', "", "My Referral Patient", showBorder: true, @@ -330,7 +346,7 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 14, + titleFontSize: SizeConfig.textMultiplier * 2, ), ), ), @@ -357,7 +373,7 @@ class _DashboardScreenState extends State { ); }, child: DashboardItemIconText( - DoctorApp.home_icon, + widget.iconURL + 'referral.svg', "", "My Referred Patient", showBorder: true, @@ -365,11 +381,29 @@ class _DashboardScreenState extends State { valueFontColor: Colors.black, titleFontColor: Colors.black, iconColor: Colors.black, - titleFontSize: 14, + titleFontSize: SizeConfig.textMultiplier * 2, + ), + ), + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.of(context).pushNamed(QR_READER); + }, + child: DashboardItemIconText( + widget.iconURL + 'qr-code.svg', + "", + "QR Reader", + showBorder: true, + backgroundColor: Colors.white, + valueFontColor: Colors.black, + titleFontColor: Colors.black, + iconColor: Colors.black, + titleFontSize: SizeConfig.textMultiplier * 2, ), ), ), - Expanded(flex: 1, child: Container()) ], )), ], diff --git a/lib/screens/doctor/my_schedule_screen.dart b/lib/screens/doctor/my_schedule_screen.dart index cd0f94a3..36b449a7 100644 --- a/lib/screens/doctor/my_schedule_screen.dart +++ b/lib/screens/doctor/my_schedule_screen.dart @@ -6,8 +6,6 @@ import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indei import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../../config/size_config.dart'; -import '../../widgets/shared/app_scaffold_widget.dart'; class MyScheduleScreen extends StatelessWidget { ScheduleProvider scheduleProvider; @@ -15,8 +13,7 @@ class MyScheduleScreen extends StatelessWidget { @override Widget build(BuildContext context) { scheduleProvider = Provider.of(context); - return AppScaffold( - appBarTitle: TranslationBase.of(context).mySchedule, + return Scaffold( body: scheduleProvider.isLoading ? DrAppCircularProgressIndeicator() : scheduleProvider.isError diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 1add0181..368a4bd1 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -11,7 +11,6 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../util/extenstions.dart'; @@ -46,7 +45,6 @@ class _MedicineSearchState extends State { @override Widget build(BuildContext context) { - return AppScaffold( appBarTitle: "Search Medicine", body: Column( @@ -61,17 +59,15 @@ class _MedicineSearchState extends State { hintText: 'Search Medicine Name Here..', controller: myController, onSaved: (value) {}, - // validator: (value) { - // return TextValidator().validateName(value); - // }, inputFormatter: ONLY_LETTERS), ), Container( - margin: EdgeInsets.only(bottom: 5, - left: 10, - right: 10, - top: 0), + margin: EdgeInsets.only( + bottom: SizeConfig.heightMultiplier * 1, + right: SizeConfig.heightMultiplier * 2, + left: SizeConfig.heightMultiplier * 2, + top: SizeConfig.heightMultiplier * 1), child: Wrap( alignment: WrapAlignment.center, children: [ @@ -91,15 +87,18 @@ class _MedicineSearchState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - "You find " + (data == null ? "0": data.length.toString())+" items in search", + "You find " + + (data == null ? "0" : data.length.toString()) + + " items in search", fontWeight: FontWeight.bold, - margin: 5,), + margin: 5, + ), ], ), ), Expanded( child: Container( - width: SizeConfig.screenWidth * 0.80, + width: SizeConfig.screenWidth * 0.90, child: !_medicineProvider.isFinished ? DrAppCircularProgressIndeicator() : _medicineProvider.hasError @@ -109,32 +108,33 @@ class _MedicineSearchState extends State { style: TextStyle( color: Theme.of(context).errorColor), ), - ):ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: data == null ? 0 : data.length, - itemBuilder: (BuildContext context, int index) { - - return InkWell( - child: MedicineItemWidget( - label: data[index]["ItemDescription"], - url: data[index]["ProductImageBase64"], - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => MedicineProvider(), - child: PharmaciesListScreen( - itemID: data[index]["ItemID"]), - ), + ) + : ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: data == null ? 0 : data.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: data[index]["ItemDescription"], + url: data[index]["ProductImageBase64"], + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + ChangeNotifierProvider( + create: (_) => MedicineProvider(), + child: PharmaciesListScreen( + itemID: data[index]["ItemID"], url: data[index]["ProductImageBase64"]), + ), + ), + ); + }, + ); + }, ), - ); - }, - ); - }, - ), ), ), ], diff --git a/lib/screens/medicine/pharmacies_list_screen.dart b/lib/screens/medicine/pharmacies_list_screen.dart index 4c682cea..60f24862 100644 --- a/lib/screens/medicine/pharmacies_list_screen.dart +++ b/lib/screens/medicine/pharmacies_list_screen.dart @@ -1,11 +1,10 @@ -import 'package:doctor_app_flutter/config/config.dart'; +import 'dart:convert'; +import 'dart:typed_data'; + import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/models/pharmacies_List_request_model.dart'; import 'package:doctor_app_flutter/providers/medicine_provider.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; @@ -20,8 +19,11 @@ DrAppSharedPreferances sharedPref = DrAppSharedPreferances(); class PharmaciesListScreen extends StatefulWidget { final int itemID; + final String url; + // In the constructor, require a item id. - PharmaciesListScreen({Key key, @required this.itemID}) : super(key: key); + PharmaciesListScreen({Key key, @required this.itemID, this.url}) + : super(key: key); @override _PharmaciesListState createState() => _PharmaciesListState(); @@ -61,44 +63,77 @@ class _PharmaciesListState extends State { TextStyle(color: Theme.of(context).errorColor), ), ) - : Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - AppText( - "Description", - margin: 10, - fontWeight: FontWeight.bold, - ), - AppText( - _data[0]["ItemDescription"], - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 10, - ), - AppText( - "Price", - margin: 10, - fontWeight: FontWeight.bold, - ), - AppText( - _data[0]["SellingPrice"].toString(), - marginLeft: 10, - marginTop: 0, - marginRight: 10, - marginBottom: 10, - ), - ], - )), + : StreamBuilder( + stream: null, + builder: (context, snapshot) { + return Row( + children: [ + Expanded( + flex: 1, + child: ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(7)), + child: Image.memory( + dataFromBase64String(widget.url), + height: SizeConfig.imageSizeMultiplier * 21, + width: SizeConfig.imageSizeMultiplier * 20, + fit: BoxFit.cover, + ), + ), + ), + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.stretch, + children: [ + AppText( + "Description", + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 2, + fontWeight: FontWeight.bold, + ), + AppText( + _data[0]["ItemDescription"], + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 10, + ), + AppText( + "Price", + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 2, + fontWeight: FontWeight.bold, + ), + AppText( + _data[0]["SellingPrice"].toString(), + marginLeft: 10, + marginTop: 0, + marginRight: 10, + marginBottom: 10, + ), + ], + ), + ) + ], + ); + })), Container( - margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), + margin: EdgeInsets.only(top:SizeConfig.widthMultiplier * 2, + bottom: SizeConfig.widthMultiplier * 2, + right: SizeConfig.widthMultiplier * 4, + left: SizeConfig.widthMultiplier * 4,), child: Align( alignment: Alignment.centerLeft, child: AppText( "You can Find it in", fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 3, ))), Expanded( child: Container( @@ -114,7 +149,8 @@ class _PharmaciesListState extends State { Expanded( flex: 1, child: ClipRRect( - borderRadius:BorderRadius.all(Radius.circular(7)), + borderRadius: + BorderRadius.all(Radius.circular(7)), child: Image.network( _data[index]["ProjectImageURL"], height: SizeConfig.imageSizeMultiplier * 15, @@ -138,25 +174,36 @@ class _PharmaciesListState extends State { crossAxisAlignment: WrapCrossAlignment.end, children: [ Padding( - padding: EdgeInsets.all(5), - child: InkWell(child: Icon(Icons.call, color: Colors.red,),onTap: ()=>launch( - "tel://" + _data[index]["PhoneNumber"]),), - ), -Padding( - padding: EdgeInsets.all(5), - child: InkWell(child: Icon(Icons.pin_drop, color: Colors.red,),onTap: () { - MapsLauncher.launchCoordinates( - double.parse(_data[index]["Latitude"]), - double.parse(_data[index]["Longitude"]), - _data[index]["LocationDescription"]); - },), - ), + padding: EdgeInsets.all(5), + child: InkWell( + child: Icon( + Icons.call, + color: Colors.red, + ), + onTap: () => launch( + "tel://" + _data[index]["PhoneNumber"]), + ), + ), + Padding( + padding: EdgeInsets.all(5), + child: InkWell( + child: Icon( + Icons.pin_drop, + color: Colors.red, + ), + onTap: () { + MapsLauncher.launchCoordinates( + double.parse( + _data[index]["Latitude"]), + double.parse( + _data[index]["Longitude"]), + _data[index]["LocationDescription"]); + }, + ), + ), ], - ), ), - - ], ), ); @@ -170,9 +217,20 @@ Padding( _medicineProvider.getPharmaciesList(widget.itemID).then((result) { this.setState(() { _data = _medicineProvider.pharmaciesList; - //if(_data == null || _data.length == 0) }); }); return true; } + + Image imageFromBase64String(String base64String) { + return Image.memory(base64Decode(base64String)); + } + + Uint8List dataFromBase64String(String base64String) { + return base64Decode(base64String); + } + + String base64String(Uint8List data) { + return base64Encode(data); + } } diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index dffe342c..2e80a1b1 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -134,11 +134,21 @@ class _PatientSearchScreenState extends State { SizedBox( height: 5, ), - RoundedContainer( - margin: 0, - showBorder: true, - raduis: 30, - borderColor: Color(0xff707070), + Container( + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 1.0, + style: BorderStyle.solid, + color: Color(0xff707070)), + borderRadius: + BorderRadius.all(Radius.circular(5.0)), + ), + ), + // margin: 0, + // showBorder: true, + // raduis: 30, + // borderColor: Color(0xff707070), width: double.infinity, child: Padding( padding: EdgeInsets.only( @@ -313,11 +323,21 @@ class _PatientSearchScreenState extends State { SizedBox( height: 10, ), - RoundedContainer( - margin: 0, - showBorder: true, - raduis: 30, - borderColor: Color(0xff707070), + Container( + // margin: 0, + // showBorder: true, + // raduis: 30, + // borderColor: Color(0xff707070), + decoration: ShapeDecoration( + shape: RoundedRectangleBorder( + side: BorderSide( + width: 1.0, + style: BorderStyle.solid, + color: Color(0xff707070)), + borderRadius: + BorderRadius.all(Radius.circular(5.0)), + ), + ), width: double.infinity, child: Padding( padding: EdgeInsets.only( diff --git a/lib/screens/patients/patients_list_screen.dart b/lib/screens/patients/patients_list_screen.dart index 150de5df..6d0b97a8 100644 --- a/lib/screens/patients/patients_list_screen.dart +++ b/lib/screens/patients/patients_list_screen.dart @@ -33,10 +33,6 @@ class _PatientsListScreenState extends State { print(res); }).catchError((error) { print(error); - setState(() { - _isLoading = false; - _hasError = error; - }); }); } _isInit = false; diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 7076cc09..68114a3d 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -104,8 +104,7 @@ class _PatientsScreenState extends State { }).catchError((error) { setState(() { _isError = true; - _isLoading = false; - this.error = error; + this.error = helpers.generateContactAdminMsg(error); }); }); } @@ -316,7 +315,7 @@ class _PatientsScreenState extends State { child: Center( child: Padding( padding: const EdgeInsets.fromLTRB( - 0, 0, 0, 0),//250 + 0, 0, 0, 0), //250 child: DrAppCircularProgressIndeicator(), )), @@ -375,7 +374,7 @@ class _PatientsScreenState extends State { widget: Column( children: [ Container( - // decoration: myBoxDecoration(), + // decoration: myBoxDecoration(), child: Row( children: [ Column( @@ -387,36 +386,28 @@ class _PatientsScreenState extends State { "Male" ? [ SvgPicture.asset( - url + - avatarMale, - height: - 80.0, - width: - 80.0, - semanticsLabel: - 'Male Logo') + url + avatarMale, + height: 80.0, + width: 80.0, + semanticsLabel: 'Male Logo') ] : [ SvgPicture.asset( - url + - avatarFemale, - height: - 80.0, - width: - 80.0, - semanticsLabel: - 'Female Logo') + url + avatarFemale, + height: 80.0, + width: 80.0, + semanticsLabel: 'Female Logo') ], - ), SizedBox( - width: 10, - ), + width: 10, + ), Column( crossAxisAlignment: CrossAxisAlignment .start, - children: [ + children: < + Widget>[ AppText( item.firstName + " " + @@ -428,7 +419,8 @@ class _PatientsScreenState extends State { FontWeight .bold, backGroundcolor: - Colors.white, + Colors + .white, ), SizedBox( height: 8, @@ -444,7 +436,8 @@ class _PatientsScreenState extends State { FontWeight .bold, backGroundcolor: - Colors.white, + Colors + .white, ), // SizedBox( @@ -461,19 +454,18 @@ class _PatientsScreenState extends State { FontWeight .bold, backGroundcolor: - Colors.white, + Colors + .white, ), SizedBox( height: 8, ), - SERVICES_PATIANT2[int - .parse( - patientType)] == + SERVICES_PATIANT2[ + int.parse(patientType)] == "List_MyOutPatient" ? Row( mainAxisAlignment: - MainAxisAlignment - .spaceBetween, + MainAxisAlignment.spaceBetween, children: < Widget>[ Container( @@ -483,22 +475,16 @@ class _PatientsScreenState extends State { 80, decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(50), - color: - Hexcolor("#20A169"), + borderRadius: BorderRadius.circular(50), + color: Hexcolor("#20A169"), ), child: AppText( item.startTime, - color: - Colors.white, - fontSize: - 2 * SizeConfig.textMultiplier, - textAlign: - TextAlign.center, - fontWeight: - FontWeight.bold, + color: Colors.white, + fontSize: 2 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, ), ), SizedBox( @@ -508,50 +494,44 @@ class _PatientsScreenState extends State { Container( child: AppText( - convertDateFormat2(item - .appointmentDate - .toString()), - fontSize: - 2.0 * SizeConfig.textMultiplier, - fontWeight: - FontWeight.bold, + convertDateFormat2(item.appointmentDate.toString()), + fontSize: 2.0 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), ) ], ) : AppText( item.nationalityName, - fontSize: 2.5 * - SizeConfig - .textMultiplier, + fontSize: + 2.5 * + SizeConfig.textMultiplier, ), ], ), - // Divider(color: Colors.grey) + // Divider(color: Colors.grey) ], ), ), - // Divider(color: Colors.grey) + // Divider(color: Colors.grey) ], ), ), onTap: () { - Navigator.of(context).pushNamed( - PATIENTS_PROFILE, - arguments: { + Navigator.of(context) + .pushNamed( + PATIENTS_PROFILE, + arguments: { "patient": item }); }, ), ); - - }).toList(), + }).toList(), ), ), ], - ), - ) ], ), @@ -588,8 +568,7 @@ class _PatientsScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: _locations.map((item) { bool _isActive = _locations[_activeLocation] == item ? true : false; - return Column(mainAxisSize: MainAxisSize.min, - children: [ + return Column(mainAxisSize: MainAxisSize.min, children: [ InkWell( child: Center( child: Container( @@ -602,18 +581,17 @@ class _PatientsScreenState extends State { child: Center( child: Text( item, - style: TextStyle( - fontSize: 12, - color: _isActive - ? Colors.white - : Colors.black, //Colors.black, - // backgroundColor:_isActive - // ? Hexcolor("#B8382B") - // : Colors.white,//sideColor, - - fontWeight: FontWeight.bold, - ), + fontSize: 12, + color: _isActive + ? Colors.white + : Colors.black, //Colors.black, + // backgroundColor:_isActive + // ? Hexcolor("#B8382B") + // : Colors.white,//sideColor, + + fontWeight: FontWeight.bold, + ), ), )), ), @@ -624,7 +602,6 @@ class _PatientsScreenState extends State { setState(() { _activeLocation = _locations.indexOf(item); - }); }), _isActive @@ -644,17 +621,14 @@ class _PatientsScreenState extends State { } myBoxDecoration() { - return BoxDecoration( border: Border( - - - bottom: BorderSide( // <--- top side + bottom: BorderSide( + // <--- top side color: Colors.grey, width: 1.0, ), ), ); - } } diff --git a/lib/screens/patients/profile/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart index bb88321d..2bb59318 100644 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ b/lib/screens/patients/profile/insurance_approvals_screen.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.dart'; +import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; @@ -116,29 +117,46 @@ class _InsuranceApprovalsState extends State { ExpansionTile( title: Row( children: [ - Icon( - approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? Icons.check_circle_outline - : approvalsList[index][ + Column( + children: [ + Icon( + approvalsList[index][ "ApprovalStatusDescption"] .toString() - .contains("Cancelled") - ? Icons.highlight_off - : Icons.history, - color: approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? Colors.green - : approvalsList[index][ + .contains("Approved") + ? DoctorApp.approved_icon + : approvalsList[index][ + "ApprovalStatusDescption"] + .toString() + .contains("Cancelled") + ? DoctorApp.reject_icon + : DoctorApp.pending_icon, + color: approvalsList[index][ "ApprovalStatusDescption"] .toString() - .contains("Cancelled") - ? Colors.red - : Colors.yellow, + .contains("Approved") + ? Colors.green + : approvalsList[index][ + "ApprovalStatusDescption"] + .toString() + .contains("Cancelled") + ? Colors.red + : Colors.yellow, + ), + AppText(approvalsList[index]["ApprovalStatusDescption"], + fontSize: SizeConfig.textMultiplier * 1.5, + color: approvalsList[index][ + "ApprovalStatusDescption"] + .toString() + .contains("Approved") + ? Colors.green + : approvalsList[index][ + "ApprovalStatusDescption"] + .toString() + .contains("Cancelled") + ? Colors.red + : Colors.yellow,) + ], ), Expanded( child: Column( @@ -186,15 +204,8 @@ class _InsuranceApprovalsState extends State { backgroundColor: Color(PRIMARY_COLOR), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - children: [ - AppText( - "Approval No:", - color: Colors.white, - fontSize: 16, - margin: 10, - ), AppText( approvalsList[index] ["ApprovalNo"] @@ -203,10 +214,21 @@ class _InsuranceApprovalsState extends State { fontSize: 19, fontWeight: FontWeight.bold, - margin: 5, + marginTop: 10, + marginLeft: 10, + marginRight: 10, + marginBottom: 2, + ), + + AppText( + "Approval No:", + color: Colors.white, + fontSize: 16, + marginTop: 2, + marginLeft: 10, + marginBottom: 15, + marginRight: 10, ), - ], - ), Row( children: [ Expanded( diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart index 07f0ff88..f9d8be44 100644 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ b/lib/screens/patients/profile/progress_note_screen.dart @@ -20,7 +20,7 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); /* *@author: ibrahim albitar *@Date:15/5/2020 - *@param: + *@param: ' *@return: *@desc: */ @@ -182,7 +182,7 @@ class _ProgressNoteState extends State { if (strExist) { filteredNotesList = null; - filteredNotesList = notesList + filteredNotesList = patientsProv.patientProgressNoteList .where((note) => note["DoctorName"].toString().contains(str.toUpperCase())) .toList(); diff --git a/lib/screens/patients/profile/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart index 5d232d3a..4b47956c 100644 --- a/lib/screens/patients/profile/radiology/radiology_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_screen.dart @@ -79,112 +79,112 @@ class _RadiologyScreenState extends State { body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError - ? DrAppEmbeddedError(error: patientsProv.error) - : patientsProv.patientRadiologyList.length == 0 - ? DrAppEmbeddedError(error: 'You don\'t have any Vital Sign') - : Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: Container( - margin: EdgeInsets.symmetric(vertical: 10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(20.0), - ), - ), - child: ListView.builder( - itemCount: patientsProv.patientRadiologyList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => RadiologyReportScreen(reportData: patientsProv.patientRadiologyList[index].reportData,)),); - }, - child: Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), - border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), + ? DrAppEmbeddedError(error: patientsProv.error) + : patientsProv.patientRadiologyList.length == 0 + ? DrAppEmbeddedError(error: 'You don\'t have any Vital Sign') + : Container( + margin: EdgeInsets.fromLTRB( + SizeConfig.realScreenWidth * 0.05, + 0, + SizeConfig.realScreenWidth * 0.05, + 0), + child: Container( + margin: EdgeInsets.symmetric(vertical: 10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(20.0), + ), + ), + child: ListView.builder( + itemCount: patientsProv.patientRadiologyList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => RadiologyReportScreen(reportData: patientsProv.patientRadiologyList[index].reportData,)),); + }, + child: Container( + padding: EdgeInsets.all(10), + margin: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(10)), + border: Border( + bottom: BorderSide( + color: Colors.grey, width: 0.5), + top: BorderSide( + color: Colors.grey, width: 0.5), + left: BorderSide( + color: Colors.grey, width: 0.5), + right: BorderSide( + color: Colors.grey, width: 0.5), + ), + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + LargeAvatar( + url: patientsProv + .patientRadiologyList[index] + .doctorImageURL, + ), + Expanded( + child: Padding( + padding: + const EdgeInsets.fromLTRB( + 8, 0, 0, 0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + '${patientsProv.patientRadiologyList[index].doctorName}', + fontSize: 2.5 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight.bold), + SizedBox( + height: 8, + ), + AppText( + 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', + fontSize: 2 * + SizeConfig + .textMultiplier, + ), + SizedBox( + height: 8, ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - LargeAvatar( - url: patientsProv - .patientRadiologyList[index] - .doctorImageURL, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.fromLTRB( - 8, 0, 0, 0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - '${patientsProv.patientRadiologyList[index].doctorName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold), - SizedBox( - height: 8, - ), - AppText( - 'Invoice No:${patientsProv.patientRadiologyList[index].invoiceNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${patientsProv.patientRadiologyList[index].clinicName}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Theme.of(context) - .primaryColor, - ), - SizedBox( - height: 8, - ), - ], - ), - ), - ) - ], - ), - ], - ), + AppText( + ' ${patientsProv.patientRadiologyList[index].clinicName}', + fontSize: 2 * + SizeConfig + .textMultiplier, + color: Theme.of(context) + .primaryColor, + ), + SizedBox( + height: 8, + ), + ], ), - ); - }), - ), + ), + ) + ], + ), + ], ), + ), + ); + }), + ), + ), ); } } diff --git a/lib/screens/patients/profile/refer_patient_screen.dart b/lib/screens/patients/profile/refer_patient_screen.dart index 1781867c..24146ca5 100644 --- a/lib/screens/patients/profile/refer_patient_screen.dart +++ b/lib/screens/patients/profile/refer_patient_screen.dart @@ -1,6 +1,13 @@ +import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import '../../../config/size_config.dart'; import '../../../providers/patients_provider.dart'; @@ -27,26 +34,29 @@ class ReferPatientScreen extends StatefulWidget { class _ReferPatientState extends State { PatientsProvider patientsProv; var doctorsList; - var clinicsList; - var referralFrequancyList; - final _controller = TextEditingController(); + final _remarksController = TextEditingController(); + final _extController = TextEditingController(); var _isInit = true; + var clinicId; + var doctorId; + var freqId; + String _selectedClinic; String _selectedDoctor; String _selectedReferralFrequancy; + List _priorities = ['Very Urgent', 'Urgent', 'Routine']; + int _activePriority = 2; + @override void didChangeDependencies() { super.didChangeDependencies(); if (_isInit) { + doctorsList = null; patientsProv = Provider.of(context); patientsProv.getClinicsList(); - patientsProv.getReferralFrequancyList(); - setState(() { - clinicsList = patientsProv.clinicsList; - referralFrequancyList = patientsProv.referalFrequancyList; - }); + patientsProv.getReferralFrequancyList(); } _isInit = false; } @@ -54,214 +64,413 @@ class _ReferPatientState extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: "Progress Note", + appBarTitle: "Refer Patient", body: patientsProv.isLoading ? DrAppCircularProgressIndeicator() : patientsProv.isError ? DrAppEmbeddedError(error: patientsProv.error) - : clinicsList == null + : patientsProv.clinicsList == null ? DrAppEmbeddedError( - error: 'You don\'t have any Progress Note') - : Column( - children: [ - RoundedContainer( - margin: 0, - showBorder: true, - raduis: 30, - borderColor: Color(0xff707070), - width: double.infinity, - child: Padding( - padding: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 0.9, - bottom: SizeConfig.widthMultiplier * 0.9, - right: SizeConfig.widthMultiplier * 3, - left: SizeConfig.widthMultiplier * 3), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - // add Expanded to have your dropdown button fill remaining space - child: DropdownButton( - isExpanded: true, - value: _selectedClinic, - iconSize: 40, - elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return patientsProv + error: 'Something Wrong!') + : SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + "Clinic", + fontSize: 18, + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, + ), + RoundedContainer( + margin: 10, + showBorder: true, + raduis: 30, + borderColor: Color(0xff707070), + width: double.infinity, + child: Padding( + padding: EdgeInsets.only( + top: SizeConfig.widthMultiplier * 0.9, + bottom: SizeConfig.widthMultiplier * 0.9, + right: SizeConfig.widthMultiplier * 3, + left: SizeConfig.widthMultiplier * 3), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + // add Expanded to have your dropdown button fill remaining space + child: DropdownButton( + isExpanded: true, + value: _selectedClinic, + iconSize: 40, + elevation: 16, + selectedItemBuilder: + (BuildContext context) { + return patientsProv + .getClinicNameList() + .map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + AppText( + item, + fontSize: + SizeConfig.textMultiplier * + 2.1, + ), + ], + ); + }).toList(); + }, + onChanged: (newValue) => { + setState(() { + _selectedDoctor = null; + _selectedClinic = newValue; + var clinicInfo = patientsProv.clinicsList.where((i) => + i['ClinicDescription'] + .toString() + .contains(_selectedClinic)).toList(); + + clinicId = + clinicInfo[0]['ClinicID'].toString(); + + patientsProv.getDoctorsList(clinicId); + }) + }, + items: patientsProv .getClinicNameList() .map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - AppText( - item, - fontSize: - SizeConfig.textMultiplier * - 2.1, - ), - ], + return DropdownMenuItem( + value: item.toString(), + child: Text( + item, + textAlign: TextAlign.end, + ), ); - }).toList(); - }, - onChanged: (newValue) => { - setState(() { - _selectedDoctor = null; - _selectedClinic = newValue; - var clinicInfo = - clinicsList.singleWhere((i) => - i['ClinicDescription'] - .toString() - .contains(_selectedClinic)); - var clinicId = - clinicInfo['ClinicID'].toString(); - patientsProv.getDoctorsList(clinicId); - }) - }, - items: patientsProv - .getClinicNameList() - .map((item) { - return DropdownMenuItem( - value: item.toString(), - child: Text( - item, - textAlign: TextAlign.end, - ), - ); - }).toList(), + }).toList(), + ), ), - ), - ], + ], + ), ), ), - ), - //--------------------------------------------------------------------// - RoundedContainer( - margin: 0, - showBorder: true, - raduis: 30, - borderColor: Color(0xff707070), - width: double.infinity, - child: Padding( - padding: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 0.9, - bottom: SizeConfig.widthMultiplier * 0.9, - right: SizeConfig.widthMultiplier * 3, - left: SizeConfig.widthMultiplier * 3), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - // add Expanded to have your dropdown button fill remaining space - child: DropdownButton( - isExpanded: true, - value: _selectedDoctor, - iconSize: 40, - elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return patientsProv + //--------------------------------------------------------------------// + AppText( + "Doctor", + fontSize: 18, + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, + ), + + RoundedContainer( + margin: 10, + showBorder: true, + raduis: 30, + borderColor: Color(0xff707070), + width: double.infinity, + child: Padding( + padding: EdgeInsets.only( + top: SizeConfig.widthMultiplier * 0.9, + bottom: SizeConfig.widthMultiplier * 0.9, + right: SizeConfig.widthMultiplier * 3, + left: SizeConfig.widthMultiplier * 3), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + // add Expanded to have your dropdown button fill remaining space + child: DropdownButton( + isExpanded: true, + value: _selectedDoctor, + iconSize: 40, + elevation: 16, + selectedItemBuilder: + (BuildContext context) { + return patientsProv + .getDoctorNameList() + .map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + AppText( + item, + fontSize: + SizeConfig.textMultiplier * + 2.1, + ), + ], + ); + }).toList(); + }, + onChanged: (newValue) => { + setState(() { + _selectedDoctor = newValue; + doctorsList = patientsProv.doctorsList; + + var doctorInfo = + doctorsList.where((i) => + i['DoctorName'] + .toString() + .contains(_selectedDoctor)).toList(); + doctorId = doctorInfo[0]['DoctorID'].toString(); + + }) + }, + items: patientsProv .getDoctorNameList() .map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - AppText( - item, - fontSize: - SizeConfig.textMultiplier * - 2.1, - ), - ], + return DropdownMenuItem( + value: item.toString(), + child: Text( + item, + textAlign: TextAlign.end, + ), ); - }).toList(); - }, - onChanged: (newValue) => { - setState(() { - _selectedDoctor = newValue; - }) - }, - items: patientsProv - .getDoctorNameList() - .map((item) { - return DropdownMenuItem( - value: item.toString(), - child: Text( - item, - textAlign: TextAlign.end, - ), - ); - }).toList(), + }).toList(), + ), ), - ), - ], + ], + ), ), + ), //-----------------------------/// + AppText( + "Ext#", + fontSize: 18, + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: AppTextFormField( + hintText: "Ext#", + controller: _extController, + inputFormatter: ONLY_NUMBERS, + textInputType: TextInputType.number, + onChanged: (value) => {}, + ), + ), + AppText( + "Priority", + fontSize: 18, + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, + ), + + priorityBar(context), + + AppText( + "Replay Before: " + getPriority(), + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, + ), + + AppText( + "Referral Frequency", + fontSize: 18, + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, ), - ), //-----------------------------/// - RoundedContainer( - margin: 0, - showBorder: true, - raduis: 30, - borderColor: Color(0xff707070), - width: double.infinity, - child: Padding( - padding: EdgeInsets.only( - top: SizeConfig.widthMultiplier * 0.9, - bottom: SizeConfig.widthMultiplier * 0.9, - right: SizeConfig.widthMultiplier * 3, - left: SizeConfig.widthMultiplier * 3), - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - // add Expanded to have your dropdown button fill remaining space - child: DropdownButton( - isExpanded: true, - value: _selectedReferralFrequancy, - iconSize: 40, - elevation: 16, - selectedItemBuilder: - (BuildContext context) { - return patientsProv + RoundedContainer( + margin: 10, + showBorder: true, + raduis: 30, + borderColor: Color(0xff707070), + width: double.infinity, + child: Padding( + padding: EdgeInsets.only( + top: SizeConfig.widthMultiplier * 0.9, + bottom: SizeConfig.widthMultiplier * 0.9, + right: SizeConfig.widthMultiplier * 3, + left: SizeConfig.widthMultiplier * 3), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + // add Expanded to have your dropdown button fill remaining space + child: DropdownButton( + isExpanded: true, + value: _selectedReferralFrequancy, + iconSize: 40, + elevation: 16, + selectedItemBuilder: + (BuildContext context) { + return patientsProv + .getReferralNamesList() + .map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + AppText( + item, + fontSize: + SizeConfig.textMultiplier * + 2.1, + ), + ], + ); + }).toList(); + }, + onChanged: (newValue) => { + setState(() { + _selectedReferralFrequancy = newValue; + var freqInfo = + patientsProv.referalFrequancyList.singleWhere((i) => + i['Description'] + .toString() + .contains(_selectedReferralFrequancy)); + freqId = + freqInfo['ParameterCode'].toString(); + }) + }, + items: patientsProv .getReferralNamesList() .map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - AppText( - item, - fontSize: - SizeConfig.textMultiplier * - 2.1, - ), - ], + return DropdownMenuItem( + value: item.toString(), + child: Text( + item, + textAlign: TextAlign.end, + ), ); - }).toList(); - }, - onChanged: (newValue) => { - setState(() { - _selectedReferralFrequancy = newValue; - }) - }, - items: patientsProv - .getReferralNamesList() - .map((item) { - return DropdownMenuItem( - value: item.toString(), - child: Text( - item, - textAlign: TextAlign.end, - ), - ); - }).toList(), + }).toList(), + ), ), - ), - ], + ], + ), + ), + ), + AppText( + "Clinical Details and Remarks", + fontSize: 18, + fontWeight: FontWeight.bold, + marginLeft: 15, + marginTop: 15, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: AppTextFormField( + hintText: "Remarks", + controller: _remarksController, + inputFormatter: ONLY_LETTERS, + textInputType: TextInputType.text, + onChanged: (value) => {}, ), ), + Padding( + padding: const EdgeInsets.all(20.0), + child: AppButton(title: "Send", color: Color(PRIMARY_COLOR),onPressed: ()=>{ + referToDoctor(context) + },), + ) + ], + ), + ), + ); + } + + Widget priorityBar(BuildContext _context) { + return Container( + height: MediaQuery.of(context).size.height * 0.065, + width: SizeConfig.screenWidth * 0.9, + margin: EdgeInsets.only(top: 10), + decoration: BoxDecoration( + color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: _priorities.map((item) { + bool _isActive = _priorities[_activePriority] == item ? true : false; + return Column(mainAxisSize: MainAxisSize.min, children: [ + InkWell( + child: Center( + child: Container( + height: 40, + width: 90, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + color: _isActive ? Hexcolor("#B8382B") : Colors.white, + ), + child: Center( + child: Text( + item, + style: TextStyle( + fontSize: 12, + color: _isActive + ? Colors.white + : Colors.black, //Colors.black, + // backgroundColor:_isActive + // ? Hexcolor("#B8382B") + // : Colors.white,//sideColor, + + fontWeight: FontWeight.bold, + ), ), - ], - ), + )), + ), + onTap: () { + print(_priorities.indexOf(item)); + setState(() { + _activePriority = _priorities.indexOf(item); + }); + }), + _isActive + ? Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white), + alignment: Alignment.center, + height: 3, + width: 90, + ) + : Container() + ]); + }).toList(), + ), ); } + + String getPriority() { + DateTime date = DateTime.now(); + switch (_activePriority) { + case 0: + date = date.add(new Duration(hours: 3)); + break; + case 1: + date = date.add(new Duration(hours: 6)); + break; + case 2: + date = date.add(new Duration(days: 1)); + break; + } + var format = DateFormat('yyyy/mm/dd HH:mm a'); + var time = format.format(date); + print(time); + return time; + } + + void referToDoctor(context){ + final routeArgs = ModalRoute.of(context).settings.arguments as Map; + PatiantInformtion patient = routeArgs['patient']; + patientsProv.referToDoctor(context, + extension: _extController.value.text, + admissionNo:int.parse( patient.admissionNo), + referringDoctorRemarks: _remarksController.value.text, + frequency: freqId, + patientID: patient.patientId, + patientTypeID: patient.patientType, + priority: (_activePriority + 1).toString(), + roomID: patient.roomId, + selectedClinicID: clinicId.toString(), + selectedDoctorID: doctorId.toString(), + projectID: patient.projectId + ); + } } diff --git a/lib/util/dr_app_shared_pref.dart b/lib/util/dr_app_shared_pref.dart index f75c171e..54c8cc45 100644 --- a/lib/util/dr_app_shared_pref.dart +++ b/lib/util/dr_app_shared_pref.dart @@ -82,4 +82,14 @@ class DrAppSharedPreferances { } return json.decode(string); } + + clear() async { + final SharedPreferences prefs = await _prefs; + prefs.clear(); + } + + remove(String key) async { + final SharedPreferences prefs = await _prefs; + prefs.remove(key); + } } diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index e05f0d74..ebcf817c 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -1,12 +1,16 @@ import 'package:doctor_app_flutter/models/list_doctor_working_hours_table_model.dart'; +import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:doctor_app_flutter/config/config.dart'; import '../config/size_config.dart'; import '../util/dr_app_toast_msg.dart'; import 'package:connectivity/connectivity.dart'; +DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); /* *@author: Elham Rababah @@ -48,10 +52,6 @@ class Helpers { onPressed: () { Navigator.pop(context); }, - // padding: const EdgeInsets.symmetric( - // horizontal: 16.0, - // vertical: 5.0, - // ), ), CupertinoButton( child: Text( @@ -97,7 +97,7 @@ class Helpers { children: items.map((item) { return Text( '${item["$decKey"]}', - style: TextStyle(fontSize: SizeConfig.textMultiplier * 3), + style: TextStyle(fontSize: SizeConfig.textMultiplier * 2), ); }).toList(), @@ -164,14 +164,15 @@ class Helpers { ), ); } - /* + + /* *@author: Amjad Amireh *@Date:5/5/2020 *@param: checkDate *@return: DateTime *@desc: convert String to DateTime */ -static String checkDate(String dateString) { + static String checkDate(String dateString) { DateTime checkedTime = DateTime.parse(dateString); DateTime currentTime = DateTime.now(); @@ -257,6 +258,7 @@ static String checkDate(String dateString) { return "Sunday"; } } + /* *@author: Mohammad Aljammal *@Date:26/5/2020 @@ -275,6 +277,7 @@ static String checkDate(String dateString) { else return ""; } + /* *@author: Mohammad Aljammal *@Date:26/5/2020 @@ -301,13 +304,14 @@ static String checkDate(String dateString) { *@return: List *@desc: convert workingHours string to List */ - static List getWorkingHours(String workingHours ){ - List myWorkingHours =[]; + static List getWorkingHours(String workingHours) { + List myWorkingHours = []; List listOfHours = workingHours.split('a'); listOfHours.forEach((element) { WorkingHours workingHours = WorkingHours(); - var from = element.substring(element.indexOf('m ') + 2 , element.indexOf('To')-2); + var from = element.substring( + element.indexOf('m ') + 2, element.indexOf('To') - 2); workingHours.from = from.trim(); var to = element.substring(element.indexOf('To') + 2); workingHours.to = to.trim(); @@ -316,9 +320,6 @@ static String checkDate(String dateString) { return myWorkingHours; } - - - /* *@author: Elham Rababah *@Date:12/5/2020 @@ -333,4 +334,13 @@ static String checkDate(String dateString) { } return localMsg; } + + clearSharedPref() async { + await sharedPref.clear(); + } + + logout() async { + await clearSharedPref(); + Navigator.of(AppGlobal.CONTEX).pushReplacementNamed(LOGIN); + } } diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index c62f9cb7..acbff5ce 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -13,9 +13,8 @@ class TranslationBase { return Localizations.of(context, TranslationBase); } - - - String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get dashboardScreenToolbarTitle => + localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode]; @@ -33,25 +32,35 @@ class TranslationBase { String get mobileNo => localizedValues['mobileNo'][locale.languageCode]; - String get messagesScreenToolbarTitle => localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; + String get messagesScreenToolbarTitle => + localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; String get mySchedule => localizedValues['mySchedule'][locale.languageCode]; - String get errorNoSchedule => localizedValues['errorNoSchedule'][locale.languageCode]; - + String get errorNoSchedule => + localizedValues['errorNoSchedule'][locale.languageCode]; String get verify => localizedValues['verify'][locale.languageCode]; - String get referralDoctor => localizedValues['referralDoctor'][locale.languageCode]; - String get referringClinic => localizedValues['referringClinic'][locale.languageCode]; + String get referralDoctor => + localizedValues['referralDoctor'][locale.languageCode]; + String get referringClinic => + localizedValues['referringClinic'][locale.languageCode]; String get frequency => localizedValues['frequency'][locale.languageCode]; String get priority => localizedValues['priority'][locale.languageCode]; - String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; - String get clinicDetailsandRemarks=> localizedValues['clinicDetailsandRemarks'][locale.languageCode]; - String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; + String get maxResponseTime => + localizedValues['maxResponseTime'][locale.languageCode]; + String get clinicDetailsandRemarks => + localizedValues['clinicDetailsandRemarks'][locale.languageCode]; + String get answerSuggestions => + localizedValues['answerSuggestions'][locale.languageCode]; String get outPatients => localizedValues['outPatients'][locale.languageCode]; - String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; + String get searchPatient => + localizedValues['searchPatient'][locale.languageCode]; String get labResult => localizedValues['labResult'][locale.languageCode]; - String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; + String get todayStatistics => + localizedValues['todayStatistics'][locale.languageCode]; + String get familyMedicine => + localizedValues['familyMedicine'][locale.languageCode]; String get arrived => localizedValues['arrived'][locale.languageCode]; String get er => localizedValues['er'][locale.languageCode]; String get walkIn => localizedValues['walkIn'][locale.languageCode]; @@ -60,8 +69,8 @@ class TranslationBase { String get referral => localizedValues['referral'][locale.languageCode]; String get inPatient => localizedValues['inPatient'][locale.languageCode]; String get operations => localizedValues['inPatient'][locale.languageCode]; - String get patientServices => localizedValues['patientServices'][locale.languageCode]; - + String get patientServices => + localizedValues['patientServices'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index ba6c9a02..ce6d8a95 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -54,17 +54,15 @@ class _LoginFormState extends State { void initState() { super.initState(); initPlatformState(); - - } @override void didChangeDependencies() { super.didChangeDependencies(); if (_isInit) { - if (projectsList.length == 0) { - getProjectsList(); - } + if (projectsList.length == 0) { + getProjectsList(); + } } _isInit = false; } @@ -99,8 +97,9 @@ class _LoginFormState extends State { userInfo.UserID = value.trim(); }, onFieldSubmitted: (_) { - FocusScope.of(context).requestFocus(focusPass); + FocusScope.of(context).nextFocus(); }, + autofocus: false, ), buildSizedBox(), TextFormField( @@ -119,7 +118,7 @@ class _LoginFormState extends State { userInfo.Password = value; }, onFieldSubmitted: (_) { - FocusScope.of(context).requestFocus(focusProject); + FocusScope.of(context).nextFocus(); helpers.showCupertinoPicker( context, projectsList, 'Name', onSelectProject); }, @@ -144,22 +143,8 @@ class _LoginFormState extends State { }), buildSizedBox(), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.end, children: [ - Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Checkbox( - value: true, - activeColor: Theme.of(context).primaryColor, - onChanged: (bool newValue) {}), - Text("Remember me", - style: TextStyle( - fontSize: 2 * SizeConfig.textMultiplier)), - ], - ), - ), RaisedButton( onPressed: () { login(context, authProv, widget.changeLoadingStata); @@ -204,17 +189,26 @@ class _LoginFormState extends State { */ InputDecoration buildInputDecoration(BuildContext context, hint, asset) { return InputDecoration( - prefixIcon: Image.asset(asset), - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), - borderSide: BorderSide(color: Hexcolor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).primaryColor), - )); + prefixIcon: Image.asset(asset), + hintText: hint, + hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(20)), + borderSide: BorderSide(color: Hexcolor('#CCCCCC')), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + ); } SizedBox buildSizedBox() { @@ -224,6 +218,11 @@ class _LoginFormState extends State { } login(context, AuthProvider authProv, Function changeLoadingStata) { + FocusScopeNode currentFocus = FocusScope.of(context); + + // if (!currentFocus.hasPrimaryFocus) { + // currentFocus.unfocus(); + // } changeLoadingStata(true); if (loginFormKey.currentState.validate()) { loginFormKey.currentState.save(); @@ -237,7 +236,7 @@ class _LoginFormState extends State { sharedPref.setString(TOKEN, res['LogInTokenID']); print("token" + res['LogInTokenID']); - Navigator.of(context).pushNamed(VERIFICATION_METHODS); + Navigator.of(context).pushReplacementNamed(VERIFICATION_METHODS); } else { // handel error // widget.showCenterShortLoadingToast("watting"); @@ -247,7 +246,7 @@ class _LoginFormState extends State { }).catchError((err) { print('$err'); changeLoadingStata(false); - helpers.showErrorToast(); + helpers.showErrorToast(err); }); } else { changeLoadingStata(false); @@ -295,7 +294,7 @@ class _LoginFormState extends State { // Platform messages may fail, so we use a try/catch PlatformException. try { platformImei = - await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false); + await ImeiPlugin.getImei(shouldShowRequestPermissionRationale: false); idunique = await ImeiPlugin.getId(); } on PlatformException { platformImei = 'Failed to get platform version.'; diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index c72b0c10..611bd315 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -191,20 +191,13 @@ class _VerifyAccountState extends State { validator: validateCodeDigit)) ], ), - // buildSizedBox(40), buildSizedBox(20), buildText(), - // buildSizedBox(10.0), - // Text() - buildSizedBox(40), - - // buildSizedBox(), RaisedButton( onPressed: () { verifyAccount( authProv, widget.changeLoadingStata); - // Navigator.of(context).pushNamed(HOME); }, elevation: 0.0, child: Container( @@ -264,16 +257,25 @@ class _VerifyAccountState extends State { */ InputDecoration buildInputDecoration(BuildContext context) { return InputDecoration( - // ts/images/password_icon.png - contentPadding: EdgeInsets.only(top: 30, bottom: 30), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Theme.of(context).primaryColor), - )); + // ts/images/password_icon.png + contentPadding: EdgeInsets.only(top: 30, bottom: 30), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10)), + borderSide: BorderSide(color: Colors.black), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + borderSide: BorderSide(color: Theme.of(context).errorColor), + ), + ); } /* @@ -284,6 +286,16 @@ class _VerifyAccountState extends State { *@desc: buildText */ RichText buildText() { + String medthodName; + switch (model['OTP_SendType']) { + case 1: + medthodName = 'SMS'; + break; + case 2: + medthodName = 'WhatsApp'; + break; + default: + } var text = RichText( text: new TextSpan( style: new TextStyle( @@ -293,7 +305,7 @@ class _VerifyAccountState extends State { new TextSpan( text: 'Login Code ', style: TextStyle(fontWeight: FontWeight.w700)), - new TextSpan(text: 'By SMS, Please enter the code') + new TextSpan(text: 'By ${medthodName}, Please enter the code') ])); return text; } @@ -322,7 +334,7 @@ class _VerifyAccountState extends State { verifyAccountFormValue['digit4']; print(activationCode); int projectID = await sharedPref.getInt(PROJECT_ID); - Map model = { + Map model = { "activationCode": activationCode, "DoctorID": _loggedUser['DoctorID'], "LogInTokenID": _loggedUser['LogInTokenID'], @@ -381,7 +393,7 @@ class _VerifyAccountState extends State { Map profile, Function changeLoadingStata) { changeLoadingStata(false); sharedPref.setObj(DOCTOR_PROFILE, profile); - Navigator.of(context).pushNamed(HOME); + Navigator.of(context).pushReplacementNamed(HOME); } Future _asyncSimpleDialog( diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index af72b092..8c996556 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -50,7 +50,7 @@ class _VerificationMethodsState extends State { super.didChangeDependencies(); final routeArgs = ModalRoute.of(context).settings.arguments as Map; verificationMethod = - routeArgs != null ? routeArgs['verificationMethod'] : null; + routeArgs != null ? routeArgs['verificationMethod'] : null; } @override @@ -101,17 +101,17 @@ class _VerificationMethodsState extends State { child: buildFingerprintMethod( context, authProv), replacement: - buildWhatsAppMethod(context, authProv), + buildWhatsAppMethod(context, authProv), ), Visibility( visible: hideSilentMethods() ? false : true, child: buildFaceIDMethod(context, authProv), replacement: - buildSMSMethod(context, authProv), + buildSMSMethod(context, authProv), ), Visibility( visible: - hideSilentMethods() ? false : true, + hideSilentMethods() ? false : true, child: buildWhatsAppMethod( context, authProv)), Visibility( @@ -126,8 +126,8 @@ class _VerificationMethodsState extends State { // height: 500, ), SizedBox( - // height: 20, - ) + // height: 20, + ) ], ), ); @@ -136,7 +136,7 @@ class _VerificationMethodsState extends State { }); } - /* + /* *@author: Elham Rababah *@Date:28/5/2020 *@param: BuildContext context, AuthProvider authProv @@ -149,7 +149,7 @@ class _VerificationMethodsState extends State { sendActivationCodeByOtpNotificationType(1, authProv); }); } - /* + /* *@author: Elham Rababah *@Date:28/5/2020 *@param: BuildContext context, AuthProvider authProv @@ -159,9 +159,9 @@ class _VerificationMethodsState extends State { Center buildWhatsAppMethod(BuildContext context, AuthProvider authProv) { return buildVerificationMethod( context, 'assets/images/verification_whatsapp_icon.png', 'WhatsApp', - () { - sendActivationCodeByOtpNotificationType(2, authProv); - }); + () { + sendActivationCodeByOtpNotificationType(2, authProv); + }); } /* *@author: Elham Rababah @@ -186,8 +186,8 @@ class _VerificationMethodsState extends State { Center buildFingerprintMethod(BuildContext context, AuthProvider authProv) { return buildVerificationMethod(context, 'assets/images/verification_fingerprint_icon.png', 'Fingerprint', () { - sendActivationCodeByOtpNotificationType(4, authProv); - }); + sendActivationCodeByOtpNotificationType(4, authProv); + }); } /* @@ -212,7 +212,7 @@ class _VerificationMethodsState extends State { width: 1, color: Hexcolor( '#CCCCCC') // <--- border width here - ), + ), borderRadius: BorderRadius.all(Radius.circular(10))), child: Column( children: [ @@ -251,6 +251,7 @@ class _VerificationMethodsState extends State { *@desc: send Activation Code By Otp Notification Type */ sendActivationCodeByOtpNotificationType(oTPSendType, AuthProvider authProv) { + // TODO : build enum for verfication method if (oTPSendType == 1 || oTPSendType == 2) { widget.changeLoadingStata(true); @@ -270,7 +271,7 @@ class _VerificationMethodsState extends State { widget.changeLoadingStata(false); if (res['MessageStatus'] == 1) { - Navigator.of(context).pushNamed(VERIFY_ACCOUNT, arguments: {'model':model}); + Navigator.of(context).pushReplacementNamed(VERIFY_ACCOUNT, arguments: {'model':model}); } else { print(res['ErrorEndUserMessage']); helpers.showErrorToast(res['ErrorEndUserMessage']); diff --git a/lib/widgets/dashboard/dashboard_item_icons_texts.dart b/lib/widgets/dashboard/dashboard_item_icons_texts.dart index fc9e27c4..12fd9a40 100644 --- a/lib/widgets/dashboard/dashboard_item_icons_texts.dart +++ b/lib/widgets/dashboard/dashboard_item_icons_texts.dart @@ -1,11 +1,14 @@ import 'dart:ffi'; +import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:flutter_svg/svg.dart'; + import '../shared/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import '../shared/app_texts_widget.dart'; class DashboardItemIconText extends StatefulWidget { - final IconData icon; + final String icon; final String value; final String label; final Color backgroundColor; @@ -43,16 +46,16 @@ class _DashboardItemTextsState extends State { Align( alignment: FractionalOffset.topLeft, child: Container( - margin: EdgeInsets.all(10), - child: Icon( - widget.icon, - color: widget.iconColor, - ), - )), + padding: EdgeInsets.all(10), + child: SvgPicture.asset( + widget.icon, + color: widget.iconColor, + width: SizeConfig.widthMultiplier * 7, + ))), Align( alignment: FractionalOffset.bottomRight, child: Container( - margin: EdgeInsets.all(10), + padding: EdgeInsets.all(10), child: Column( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end, diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index 5ec30858..6fc9ec66 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/list_gt_my_pationents_question_model.dart'; +import 'package:doctor_app_flutter/presentation/doctor_app_icons.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; @@ -42,7 +43,28 @@ class _DoctorReplyWidgetState extends State { child: Row( children: [ SizedBox(width: 5,), - LargeAvatar(name: widget.reply.patientName,url: '',), + //LargeAvatar(icon: widget.reply.gender == 0 ? DoctorApp.male : DoctorApp.femaleicon ,), + Container( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment(-1, -1), + end: Alignment(1, 1), + colors: [ + Colors.grey[100], + Colors.grey[200], + ]), + boxShadow: [ + BoxShadow( + color: Color.fromRGBO(0, 0, 0, 0.08), + offset: Offset(0.0, 5.0), + blurRadius: 16.0) + ], + borderRadius: BorderRadius.all(Radius.circular(50.0)), + ), + width: 80, + height: 80, + child: Icon(widget.reply.gender == 1 ? DoctorApp.male : DoctorApp.femaleicon,size: 80,)), + SizedBox(width: 15,), Expanded( child: Container( diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index 67db51fa..f30de7cb 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -56,9 +56,9 @@ class _MyReferralPatientWidgetState extends State { fontSize: 2.5 * SizeConfig.textMultiplier, fontWeight: FontWeight.bold, ), - Icon(_showDetails - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down), + Icon(_showDetails + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down), ], ), @@ -66,253 +66,253 @@ class _MyReferralPatientWidgetState extends State { !_showDetails ? Container() : AnimatedContainer( - duration: Duration(milliseconds: 200), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 5,), - Divider(color: Color(0xFF000000),height: 0.5,), - Table( - border: TableBorder.symmetric(inside: BorderSide(width: 0.5),), + duration: Duration(milliseconds: 200), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 5,), + Divider(color: Color(0xFF000000),height: 0.5,), + Table( + border: TableBorder.symmetric(inside: BorderSide(width: 0.5),), + children: [ + TableRow( children: [ - TableRow( - children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'File No', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - '${widget.myReferralPatientModel.referringDoctor}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'File No', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), - ), - Container( - margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Referring Doctor', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - widget.myReferralPatientModel - .referringClinicDescription, - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + SizedBox(height: 5,), + AppText( + '${widget.myReferralPatientModel.referringDoctor}', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Referring Doctor', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), - ), - ] + SizedBox(height: 5,), + AppText( + widget.myReferralPatientModel + .referringClinicDescription, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), ), - TableRow( - children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Referring Clinic', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - '${widget.myReferralPatientModel.referringClinicDescription}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), + ] + ), + TableRow( + children: [ + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + 'Referring Clinic', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), - Container( - margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Frequency', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - widget.myReferralPatientModel - .frequencyDescription, - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), + SizedBox(height: 5,), + AppText( + '${widget.myReferralPatientModel.referringClinicDescription}', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, ) - ] + ], + ), ), - TableRow( - children: [ - Container( - margin: EdgeInsets.all(2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Priority', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - '${widget.myReferralPatientModel.priorityDescription}', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], + Container( + margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + 'Frequency', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), + SizedBox(height: 5,), + AppText( + widget.myReferralPatientModel + .frequencyDescription, + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), + ) + ] + ), + TableRow( + children: [ + Container( + margin: EdgeInsets.all(2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + 'Priority', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), - Container( - margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), - padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - 'Max Response Time', - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - ), - SizedBox(height: 5,), - AppText( - Helpers.getDateFormatted(widget - .myReferralPatientModel - .mAXResponseTime), - fontSize: - 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w300, - ) - ], - ), + SizedBox(height: 5,), + AppText( + '${widget.myReferralPatientModel.priorityDescription}', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + AppText( + 'Max Response Time', + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + ), + SizedBox(height: 5,), + AppText( + Helpers.getDateFormatted(widget + .myReferralPatientModel + .mAXResponseTime), + fontSize: + 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.w300, ) ], ), + ) + ], + ), - ], - ), - Divider(color: Color(0xFF000000),height: 0.5,), - SizedBox( - height: 5, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - 'Clinic Details and Remarks', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, - textAlign: TextAlign.start,), - Texts( - '${widget.myReferralPatientModel.referringDoctorRemarks}', - style: "bodyText1", - readMore: true, - textAlign: TextAlign.start, - maxLength: 100) - ], - ), - SizedBox( - height: 5, - ), - AppText( - 'Answer/Suggestions', - fontSize: 1.7 * SizeConfig.textMultiplier, - fontWeight: FontWeight.bold, + ], + ), + Divider(color: Color(0xFF000000),height: 0.5,), + SizedBox( + height: 5, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + 'Clinic Details and Remarks', + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + textAlign: TextAlign.start,), + Texts( + '${widget.myReferralPatientModel.referringDoctorRemarks}', + style: "bodyText1", + readMore: true, textAlign: TextAlign.start, - ), - SizedBox( - height: 5, - ), - Form( - key: _formKey, - child: TextFields( - maxLines: 2, - minLines: 2, - hintText: 'Answer the patient', - fontWeight: FontWeight.normal, - initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '', - readOnly: _isLoading, - validator: (value) { - if (value.isEmpty) - return "please enter answer"; - else - return null; - }, - ), - ), - SizedBox(height: 10.0), - SizedBox(height: 10.0), - Container( - width: double.infinity, - margin: EdgeInsets.only(left: 10,right: 10), - child: Button( - onTap: () async { - final form = _formKey.currentState; - if (form.validate()) { - setState(() { - _isLoading = true; - }); - try { - await Provider.of(context, listen: false).replay(answerController.text.toString(), widget.myReferralPatientModel); - setState(() { - _isLoading = false; - }); - DrAppToastMsg.showSuccesToast('Reply Successfully'); + maxLength: 100) + ], + ), + SizedBox( + height: 5, + ), + AppText( + 'Answer/Suggestions', + fontSize: 1.7 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, + textAlign: TextAlign.start, + ), + SizedBox( + height: 5, + ), + Form( + key: _formKey, + child: TextFields( + maxLines: 2, + minLines: 2, + hintText: 'Answer the patient', + fontWeight: FontWeight.normal, + initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '', + readOnly: _isLoading, + validator: (value) { + if (value.isEmpty) + return "please enter answer"; + else + return null; + }, + ), + ), + SizedBox(height: 10.0), + SizedBox(height: 10.0), + Container( + width: double.infinity, + margin: EdgeInsets.only(left: 10,right: 10), + child: Button( + onTap: () async { + final form = _formKey.currentState; + if (form.validate()) { + setState(() { + _isLoading = true; + }); + try { + await Provider.of(context, listen: false).replay(answerController.text.toString(), widget.myReferralPatientModel); + setState(() { + _isLoading = false; + }); + DrAppToastMsg.showSuccesToast('Reply Successfully'); - } catch (e) { - setState(() { - _isLoading = false; - }); - DrAppToastMsg.showErrorToast(e); - } - } - }, - title: 'Reply', - loading: _isLoading, - ), - ) - ], + } catch (e) { + setState(() { + _isLoading = false; + }); + DrAppToastMsg.showErrorToast(e); + } + } + }, + title: 'Reply', + loading: _isLoading, ), ) + ], + ), + ) ], ), ), diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index c37d09ad..48f70d7c 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -45,6 +45,7 @@ class MyScheduleWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText('From',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,), + SizedBox(height: 5,), AppText(work.from,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,) ], ), @@ -56,6 +57,7 @@ class MyScheduleWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText('To',fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.bold,), + SizedBox(height: 5,), AppText(work.to,fontSize: 2.2 * SizeConfig.textMultiplier,fontWeight: FontWeight.w300,) ], ), diff --git a/lib/widgets/home/home_item.dart b/lib/widgets/home/home_item.dart index 59e606d8..0de07d7b 100644 --- a/lib/widgets/home/home_item.dart +++ b/lib/widgets/home/home_item.dart @@ -6,7 +6,7 @@ class HomeItem extends StatelessWidget { final String image; final String link; - HomeItem(this.id, this.title, this.image,this.link); + HomeItem(this.id, this.title, this.image, this.link); @override Widget build(BuildContext context) { return InkWell( @@ -22,21 +22,21 @@ class HomeItem extends StatelessWidget { child: Column( children: [ Container( - // decoration: BoxDecoration(color:Colors.red), - width: 10000, - height: 60, + // decoration: BoxDecoration(color:Colors.red), + width: 10000, + height: 60, child: CircleAvatar( - backgroundColor: Colors.white, - child: Container( - child: Image.asset( - image, - // width 50, - scale: 0.6, - color: Theme.of(context).primaryColor, - fit: BoxFit.cover, - ), - ), - )), + backgroundColor: Colors.white, + child: Container( + child: Image.asset( + image, + // width 50, + scale: 0.6, + color: Theme.of(context).primaryColor, + fit: BoxFit.cover, + ), + ), + )), Text( title, style: TextStyle(fontSize: 16), diff --git a/lib/widgets/medicine/medicine_item_widget.dart b/lib/widgets/medicine/medicine_item_widget.dart index 1d606793..ad15ddab 100644 --- a/lib/widgets/medicine/medicine_item_widget.dart +++ b/lib/widgets/medicine/medicine_item_widget.dart @@ -1,10 +1,6 @@ import 'dart:convert'; import 'dart:typed_data'; - -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; - import '../shared/rounded_container_widget.dart'; import '../shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -18,58 +14,73 @@ import 'package:flutter/material.dart'; */ class MedicineItemWidget extends StatefulWidget { + final String label; + final Color backgroundColor; + final bool showBorder; + final Color borderColor; + final String url; -final String label; -final Color backgroundColor; -final bool showBorder; -final Color borderColor; -final String url; - -MedicineItemWidget({ @required this.label, this.backgroundColor = Colors.white, this.showBorder = false, this.borderColor = Colors.white, this.url}); + MedicineItemWidget( + {@required this.label, + this.backgroundColor = Colors.white, + this.showBorder = false, + this.borderColor = Colors.white, + this.url}); @override _MedicineItemWidgetState createState() => _MedicineItemWidgetState(); } class _MedicineItemWidgetState extends State { - @override + @override Widget build(BuildContext context) { return new RoundedContainer( height: SizeConfig.heightMultiplier * 8, - child:Padding( + child: Padding( padding: const EdgeInsets.all(5.0), child: Row( crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.start, children: [ - if(widget.url != null) Container( - height: 39, - width: 39, - child: ClipRRect( - borderRadius:BorderRadius.all(Radius.circular(7)), - child: Image.memory( - dataFromBase64String(widget.url), - height: SizeConfig.imageSizeMultiplier * 15, - width: SizeConfig.imageSizeMultiplier * 15, - fit: BoxFit.cover, - ), - ), + if (widget.url != null) + Container( + height: 39, + width: 39, + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(7)), + child: Image.memory( + dataFromBase64String(widget.url), + height: SizeConfig.imageSizeMultiplier * 15, + width: SizeConfig.imageSizeMultiplier * 15, + fit: BoxFit.cover, + ), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.all(5), + child: Align( + alignment: Alignment.centerLeft, + child: AppText(widget.label)))) + ], ), - Expanded(child: Padding( padding: EdgeInsets.all(5), child: Align( alignment: Alignment.centerLeft, child: AppText(widget.label)))) - ],), ), - backgroundColor: widget.backgroundColor, showBorder: widget.showBorder, borderColor: widget.borderColor, margin: 4, raduis: 10,); + backgroundColor: widget.backgroundColor, + showBorder: widget.showBorder, + borderColor: widget.borderColor, + margin: 4, + raduis: 10, + ); } Image imageFromBase64String(String base64String) { - return Image.memory(base64Decode(base64String)); -} + return Image.memory(base64Decode(base64String)); + } -Uint8List dataFromBase64String(String base64String) { - return base64Decode(base64String); -} + Uint8List dataFromBase64String(String base64String) { + return base64Decode(base64String); + } -String base64String(Uint8List data) { - return base64Encode(data); + String base64String(Uint8List data) { + return base64Encode(data); + } } - -} \ No newline at end of file diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index 8b6fc5a8..be66e88e 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -50,7 +50,7 @@ class _DynamicElementsState extends State { AppTextFormField( textInputType: TextInputType.number, hintText: 'From', - controller: _fromDateController, //_fromDateController, + controller: _fromDateController, inputFormatter: ONLY_DATE, onTap: () { @@ -83,7 +83,7 @@ class _DynamicElementsState extends State { AppTextFormField( textInputType: TextInputType.number, hintText: 'TO', - controller: _fromDateController, //_toDateController, + controller: _toDateController, onTap: () { _presentDatePicker('_selectedToDate'); }, diff --git a/lib/widgets/patients/profile/large_avatar.dart b/lib/widgets/patients/profile/large_avatar.dart index 3b70f393..d18fdf3d 100644 --- a/lib/widgets/patients/profile/large_avatar.dart +++ b/lib/widgets/patients/profile/large_avatar.dart @@ -35,19 +35,19 @@ class LargeAvatar extends StatelessWidget { ), ), ); - } else if (name != null || name.isNotEmpty) { + } else if (name == null || name.isEmpty) { return Center( child: AppText( - name[0].toUpperCase(), + 'DR', color: Colors.white, - fontSize: 18, - fontWeight: FontWeight.bold, )); } else { return Center( child: AppText( - 'DR', + name[0].toUpperCase(), color: Colors.white, + fontSize: 18, + fontWeight: FontWeight.bold, )); } } diff --git a/lib/widgets/patients/profile/patient_profile_widget.dart b/lib/widgets/patients/profile/patient_profile_widget.dart index 171d1256..0ef50d81 100644 --- a/lib/widgets/patients/profile/patient_profile_widget.dart +++ b/lib/widgets/patients/profile/patient_profile_widget.dart @@ -32,46 +32,61 @@ class PatientProfileWidget extends StatelessWidget { // ProfileStatusInfoWidget() // ]); - return Container( - child: Column(children: [ - Expanded( - flex: 1, - child: - Row(mainAxisAlignment: MainAxisAlignment.center, children: [ - Column(children: [ - Container( - padding: EdgeInsets.only(top: 20), - child: ProfileImageWidget( - url: - "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", - name: patient.firstName + ' ' + patient.lastName, - fontsize: 24.0, - color: Colors.black, - ), + return CustomScrollView(primary: false, slivers: [ + SliverList( + delegate: SliverChildListDelegate( + [ + Expanded( + flex: 1, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Column(children: [ + Container( + padding: EdgeInsets.only(top: 20), + child: ProfileImageWidget( + url: + "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + name: patient.firstName + ' ' + patient.lastName, + fontsize: 24.0, + color: Colors.black, + ), + ), + Container( + child: Column( + children: [ + AppText( + 'File No: ' + patient.patientId.toString(), + fontWeight: FontWeight.normal, + fontSize: 16, + ), + AppText( + patient.genderDescription.toString() + + ', ' + + patient.age, + fontWeight: FontWeight.normal, + fontSize: 16, + ) + ], + ), + ) + ]), + ]), ), - Container( - child: Column( - children: [ - AppText( - 'File No: ' + patient.patientId.toString(), - fontWeight: FontWeight.normal, - fontSize: 16, - ), - AppText( - patient.genderDescription.toString() + ', ' + patient.age, - fontWeight: FontWeight.normal, - fontSize: 16, - ) - ], - ), - ) - ]), - ]), + ], + ), ), - Expanded( - flex: 2, - child: ProfileMedicalInfoWidget(patient: patient), - ) - ])); + SliverPadding( + padding: const EdgeInsets.fromLTRB(20, 30, 15, 10), + sliver: ProfileMedicalInfoWidget()) + ]); + + // Container( + // child: Column(children: [ + // Expanded( + // flex: 2, + // child: , + // ) + // ])); } } diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index 28868afb..bc92db90 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -23,65 +23,69 @@ class ProfileMedicalInfoWidget extends StatelessWidget { Widget build(BuildContext context) { // final double contWidth = SizeConfig.realScreenWidth * 0.70; // final double contHeight = SizeConfig.screenHeight * 0.30; - return CustomScrollView(primary: false, slivers: [ - SliverPadding( - padding: const EdgeInsets.fromLTRB(20, 30, 15, 10), - sliver: SliverGrid.count( - crossAxisSpacing: 10, - mainAxisSpacing: 20, - crossAxisCount: 2, - childAspectRatio: 1.5, - children: [ - PatientProfileButton( - key: key, - patient: patient, - name: 'Vital Sign', - route: VITAL_SIGN_DETAILS, - icon: 'heartbeat.png'), - PatientProfileButton( - key: key, - patient: patient, - route: LAB_ORDERS, - name: 'Lab Order', - icon: 'lab.png'), - PatientProfileButton( - key: key, - patient: patient, - route: PRESCRIPTIONS, - name: 'Prescription', - icon: 'note.png'), - PatientProfileButton( - key: key, - patient: patient, - route: RADIOLOGY, - name: 'Radiology', - icon: 'radiology-1.png'), - PatientProfileButton( - key: key, - patient: patient, - route: PROGRESS_NOTE, - name: 'Progress Notes', - icon: 'heartbeat.png'), - PatientProfileButton( - key: key, - patient: patient, - route: PATIENT_INSURANCE_APPROVALS, - name: 'Insurance Aprovals', - icon: 'lab.png'), - PatientProfileButton( - key: key, - patient: patient, - route: REFER_PATIENT, - name: 'Refer Patient', - icon: 'note.png'), - PatientProfileButton( - key: key, - patient: patient, - route: PATIENT_ORDERS, - name: 'Orders', - icon: 'radiology-1.png'), - ])) - ]); + return SliverGrid.count( + crossAxisSpacing: 10, + mainAxisSpacing: 20, + crossAxisCount: 2, + childAspectRatio: 1.5, + children: [ + PatientProfileButton( + key: key, + patient: patient, + name: 'Vital Sign', + route: VITAL_SIGN_DETAILS, + icon: 'heartbeat.png'), + PatientProfileButton( + key: key, + patient: patient, + route: LAB_ORDERS, + name: 'Lab Order', + icon: 'lab.png'), + PatientProfileButton( + key: key, + patient: patient, + route: PRESCRIPTIONS, + name: 'Prescription', + icon: 'note.png'), + PatientProfileButton( + key: key, + patient: patient, + route: RADIOLOGY, + name: 'Radiology', + icon: 'radiology-1.png'), + Visibility( + visible: selectedPatientType != 0 && selectedPatientType != 5, + child: PatientProfileButton( + key: key, + patient: patient, + route: PROGRESS_NOTE, + name: 'Progress Notes', + icon: 'heartbeat.png')), + PatientProfileButton( + key: key, + patient: patient, + route: PATIENT_INSURANCE_APPROVALS, + name: 'Insurance Aprovals', + icon: 'lab.png'), + Visibility( + visible: selectedPatientType != 0 && + selectedPatientType != 5 && + selectedPatientType != 2, + child: PatientProfileButton( + key: key, + patient: patient, + route: REFER_PATIENT, + name: 'Refer Patient', + icon: 'note.png')), + Visibility( + visible: selectedPatientType != 0 && selectedPatientType != 5, + child: PatientProfileButton( + key: key, + patient: patient, + route: PATIENT_ORDERS, + name: 'Orders', + icon: 'radiology-1.png')), + ]); // child: ListView( // children: [ // Padding( @@ -289,21 +293,18 @@ class PatientProfileButton extends StatelessWidget { child: Column(children: [ Expanded( flex: 1, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - padding: EdgeInsets.all(5), - child: new AppText( - this.name, - color: Colors.red, - fontWeight: FontWeight.w600, - textAlign: TextAlign.left, - fontSize: 16, - ), - ) - ], - ), + child: Expanded( + child: Container( + alignment: Alignment.topLeft, + padding: EdgeInsets.all(5), + child: new AppText( + this.name, + color: Colors.red, + fontWeight: FontWeight.w600, + textAlign: TextAlign.left, + fontSize: SizeConfig.textMultiplier * 2, + ), + )), ), Expanded( flex: 1, diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 53228c97..919dc939 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -89,35 +89,24 @@ class _AppDrawerState extends State { }, ), ), - InkWell( - child: DrawerItem("My Schedule", Icons.table_chart), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => ChangeNotifierProvider( - create: (_) => ScheduleProvider(), - child: MyScheduleScreen(), - ), - ), - ); - }, - ), InkWell( child: DrawerItem("Settings", Icons.settings), onTap: () { + Navigator.pop(context); Navigator.of(context).pushNamed(SETTINGS); }, ), InkWell( child: DrawerItem("QR Reader", Icons.search), onTap: () { + Navigator.pop(context); Navigator.of(context).pushNamed(QR_READER); }, ), InkWell( child: DrawerItem("lOGOUT", Icons.exit_to_app), onTap: () { + Navigator.pop(context); Navigator.of(context).pushNamed(LOGIN); }, ), diff --git a/lib/widgets/shared/app_expandable_notifier.dart b/lib/widgets/shared/app_expandable_notifier.dart index ca3edd09..4ae87e8a 100644 --- a/lib/widgets/shared/app_expandable_notifier.dart +++ b/lib/widgets/shared/app_expandable_notifier.dart @@ -30,6 +30,7 @@ class AppExpandableNotifier extends StatelessWidget { padding: EdgeInsets.all(10), child: Text( "See Graph Details", + style: TextStyle(fontWeight: FontWeight.bold), )), collapsed: Text(''), expanded: bodyWid, diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 1e6da3fc..263e3848 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -1,13 +1,8 @@ import 'package:doctor_app_flutter/routes.dart'; -import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; - -import '../../config/size_config.dart'; import '../../presentation/doctor_app_icons.dart'; -import '../../widgets/shared/app_drawer_widget.dart'; import '../../widgets/shared/app_loader_widget.dart'; -import '../../widgets/shared/custom_shape_clipper.dart'; class AppScaffold extends StatelessWidget { String appBarTitle; @@ -37,12 +32,11 @@ class AppScaffold extends StatelessWidget { }), centerTitle: true, actions: [ - ProfileImageWidget( - height: 50, - width: 50, - url: - "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", - ) + IconButton( + icon: Icon(DoctorApp.home_icon_active), + color: Colors.white, //Colors.black, + onPressed: () => Navigator.pushReplacementNamed(context, HOME), + ), ], ) : null, diff --git a/lib/widgets/shared/app_texts_widget.dart b/lib/widgets/shared/app_texts_widget.dart index abbd1c18..e52dab51 100644 --- a/lib/widgets/shared/app_texts_widget.dart +++ b/lib/widgets/shared/app_texts_widget.dart @@ -33,8 +33,7 @@ class AppText extends StatefulWidget { this.marginLeft = 0, this.visibility = true, this.textAlign, - this.backGroundcolor=Colors.white - }); + this.backGroundcolor = Colors.white}); @override _AppTextState createState() => _AppTextState(); @@ -56,13 +55,15 @@ class _AppTextState extends State { child: Text( widget.data, textAlign: widget.textAlign, + overflow: TextOverflow.clip, style: TextStyle( - color: widget.color, - fontWeight: widget.fontWeight, - fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2), - fontFamily: widget.fontFamily, - // backgroundColor:widget.backGroundcolor - ), + color: widget.color, + fontWeight: widget.fontWeight, + fontSize: widget.fontSize ?? (SizeConfig.textMultiplier * 2), + fontFamily: widget.fontFamily, + + // backgroundColor:widget.backGroundcolor + ), ), ), ); diff --git a/lib/widgets/shared/errors/dr_app_embedded_error.dart b/lib/widgets/shared/errors/dr_app_embedded_error.dart index 6bac4a2c..de9fd698 100644 --- a/lib/widgets/shared/errors/dr_app_embedded_error.dart +++ b/lib/widgets/shared/errors/dr_app_embedded_error.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import '../app_texts_widget.dart'; + /* *@author: Elham Rababah *@Date:12/5/2020 @@ -18,10 +20,11 @@ class DrAppEmbeddedError extends StatelessWidget { @override Widget build(BuildContext context) { return Center( - child: Text( + child: AppText( error, - style: TextStyle(color: Theme.of(context).errorColor), + color: Theme.of(context).errorColor, textAlign: TextAlign.center, + margin: 10, ), ); } diff --git a/pubspec.yaml b/pubspec.yaml index 9ed6b4ef..0ed049f9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: flutter_localizations: sdk: flutter flutter_device_type: ^0.2.0 - intl: ^0.16.1 + intl: ^0.16.0 http: ^0.12.0+4 provider: ^4.0.5+1 shared_preferences: ^0.5.6+3 @@ -39,15 +39,12 @@ dependencies: eva_icons_flutter: ^2.0.0 expandable: ^4.1.4 - # Qr code Scanner barcode_scan: ^3.0.1 # permissions permission_handler: ^5.0.0+hotfix.3 device_info: ^0.4.2+4 - - # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 @@ -61,23 +58,20 @@ dev_dependencies: build_runner: any build_web_compilers: any - # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: assets: - - assets/images/ - + - assets/images/ + - assets/images/dashboard_icon/ # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see @@ -97,14 +91,14 @@ flutter: - asset: assets/fonts/Work_Sans/WorkSans-Regular.ttf - asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf weight: 700 - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - - family: DoctorApp + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + - family: DoctorApp fonts: - - asset: fonts/DoctorApp.ttf + - asset: fonts/DoctorApp.ttf # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages diff --git a/ssh_key b/ssh_key new file mode 100644 index 00000000..b2bfd464 --- /dev/null +++ b/ssh_key @@ -0,0 +1,8 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABDdAHzw+C +qTVdRkviTeVAj7AAAAEAAAAAEAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIGnX/M1OFtZvGTEI +h5/B9u+eQwjzRJpanfljungMbc+VAAAAkPGJXHVNFeKLXK+aQFiTKx8EU48dQGLBQVIq4G +1SOgNvOaK2UfnQwSbZzhMAOmA1RCUbpQH9cGr9B/uSI88sdghcTEkNgVAtVF/NHNeKMahf +3hdVQ7ER6Au4FEIhpvUTzF+0G+8QBTabpNQx3UdLUxFAOulX6nIYG2phQIS08V/DdS70IG +luo6vY2w/qnXDsWQ== +-----END OPENSSH PRIVATE KEY----- diff --git a/ssh_key.pub b/ssh_key.pub new file mode 100644 index 00000000..1d1ef8f5 --- /dev/null +++ b/ssh_key.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGnX/M1OFtZvGTEIh5/B9u+eQwjzRJpanfljungMbc+V sultan