diff --git a/GoogleService-Info.plist b/GoogleService-Info.plist
deleted file mode 100644
index 0c093a2a..00000000
--- a/GoogleService-Info.plist
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- CLIENT_ID
- 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com
- REVERSED_CLIENT_ID
- com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r
- API_KEY
- AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs
- GCM_SENDER_ID
- 864393916058
- PLIST_VERSION
- 1
- BUNDLE_ID
- com.cloud.diplomaticquarterapp
- PROJECT_ID
- diplomaticquarter-d2385
- STORAGE_BUCKET
- diplomaticquarter-d2385.appspot.com
- IS_ADS_ENABLED
-
- IS_ANALYTICS_ENABLED
-
- IS_APPINVITE_ENABLED
-
- IS_GCM_ENABLED
-
- IS_SIGNIN_ENABLED
-
- GOOGLE_APP_ID
- 1:864393916058:ios:13f787bbfe6051f8b97923
- DATABASE_URL
- https://diplomaticquarter-d2385.firebaseio.com
-
-
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 11e99a2a..d88df7fe 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -39,7 +39,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.cloud.diplomaticquarterapp"
+// applicationId "com.cloud.diplomaticquarterapp"
+ applicationId "com.ejada.hmg"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
diff --git a/android/app/google-services.json b/android/app/google-services.json
old mode 100644
new mode 100755
index a4655794..dd4038cf
--- a/android/app/google-services.json
+++ b/android/app/google-services.json
@@ -1,37 +1,39 @@
{
"project_info": {
- "project_number": "864393916058",
- "firebase_url": "https://diplomaticquarter-d2385.firebaseio.com",
- "project_id": "diplomaticquarter-d2385",
- "storage_bucket": "diplomaticquarter-d2385.appspot.com"
+ "project_number": "815750722565",
+ "firebase_url": "https://api-project-815750722565.firebaseio.com",
+ "project_id": "api-project-815750722565",
+ "storage_bucket": "api-project-815750722565.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923",
+ "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"android_client_info": {
- "package_name": "com.cloud.diplomaticquarterapp"
+ "package_name": "com.ejada.hmg"
}
},
"oauth_client": [
{
- "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
+ "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
- "current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM"
+ "current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
}
],
"services": {
+ "analytics_service": {
+ "status": 1
+ },
"appinvite_service": {
- "other_platform_oauth_client": [
- {
- "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com",
- "client_type": 3
- }
- ]
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
}
}
}
diff --git a/android/app/gradle/wrapper/gradle-wrapper.properties b/android/app/gradle/wrapper/gradle-wrapper.properties
index 8fc3bbec..a2c20300 100644
--- a/android/app/gradle/wrapper/gradle-wrapper.properties
+++ b/android/app/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+#distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1a3d4cfe..1238814b 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -34,7 +34,7 @@
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
- android:label="diplomaticquarterapp">
+ android:label="Dr. Alhabib">
+
+
+
+
+
+
+
diff --git a/google-services.json b/google-services_DQ.json
similarity index 100%
rename from google-services.json
rename to google-services_DQ.json
diff --git a/google-services_HMG.json b/google-services_HMG.json
new file mode 100755
index 00000000..dd4038cf
--- /dev/null
+++ b/google-services_HMG.json
@@ -0,0 +1,42 @@
+{
+ "project_info": {
+ "project_number": "815750722565",
+ "firebase_url": "https://api-project-815750722565.firebaseio.com",
+ "project_id": "api-project-815750722565",
+ "storage_bucket": "api-project-815750722565.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
+ "android_client_info": {
+ "package_name": "com.ejada.hmg"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw"
+ }
+ ],
+ "services": {
+ "analytics_service": {
+ "status": 1
+ },
+ "appinvite_service": {
+ "status": 1,
+ "other_platform_oauth_client": []
+ },
+ "ads_service": {
+ "status": 2
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/hms-plugins/flutter-hms-location/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/hms-plugins/flutter-hms-location/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
new file mode 100644
index 00000000..975e9019
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
@@ -0,0 +1,25 @@
+package io.flutter.plugins;
+
+import io.flutter.plugin.common.PluginRegistry;
+import com.huawei.hms.flutter.location.LocationPlugin;
+
+/**
+ * Generated file. Do not edit.
+ */
+public final class GeneratedPluginRegistrant {
+ public static void registerWith(PluginRegistry registry) {
+ if (alreadyRegisteredWith(registry)) {
+ return;
+ }
+ LocationPlugin.registerWith(registry.registrarFor("com.huawei.hms.flutter.location.LocationPlugin"));
+ }
+
+ private static boolean alreadyRegisteredWith(PluginRegistry registry) {
+ final String key = GeneratedPluginRegistrant.class.getCanonicalName();
+ if (registry.hasPlugin(key)) {
+ return true;
+ }
+ registry.registrarFor(key);
+ return false;
+ }
+}
diff --git a/hms-plugins/flutter-hms-location/android/local.properties b/hms-plugins/flutter-hms-location/android/local.properties
new file mode 100644
index 00000000..c6cb6fc0
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/android/local.properties
@@ -0,0 +1,2 @@
+sdk.dir=C:\\Users\\sultan.khan\\AppData\\Local\\Android\\Sdk
+flutter.sdk=C:\\Program Files\\flutter
\ No newline at end of file
diff --git a/hms-plugins/flutter-hms-location/ios/Flutter/Generated.xcconfig b/hms-plugins/flutter-hms-location/ios/Flutter/Generated.xcconfig
new file mode 100644
index 00000000..4527e66e
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Flutter/Generated.xcconfig
@@ -0,0 +1,14 @@
+// This is a generated file; do not edit or check into version control.
+FLUTTER_ROOT=C:\Program Files\flutter
+FLUTTER_APPLICATION_PATH=C:\Projects\DQ\hms-plugins\flutter-hms-location
+FLUTTER_TARGET=lib\main.dart
+FLUTTER_BUILD_DIR=build
+SYMROOT=${SOURCE_ROOT}/../build\ios
+OTHER_LDFLAGS=$(inherited) -framework Flutter
+FLUTTER_FRAMEWORK_DIR=C:\Program Files\flutter\bin\cache\artifacts\engine\ios
+FLUTTER_BUILD_NAME=5.0.0
+FLUTTER_BUILD_NUMBER=301
+DART_OBFUSCATION=false
+TRACK_WIDGET_CREATION=false
+TREE_SHAKE_ICONS=false
+PACKAGE_CONFIG=.packages
diff --git a/hms-plugins/flutter-hms-location/ios/Flutter/flutter_export_environment.sh b/hms-plugins/flutter-hms-location/ios/Flutter/flutter_export_environment.sh
new file mode 100644
index 00000000..87c35592
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Flutter/flutter_export_environment.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=C:\Program Files\flutter"
+export "FLUTTER_APPLICATION_PATH=C:\Projects\DQ\hms-plugins\flutter-hms-location"
+export "FLUTTER_TARGET=lib\main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "SYMROOT=${SOURCE_ROOT}/../build\ios"
+export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
+export "FLUTTER_FRAMEWORK_DIR=C:\Program Files\flutter\bin\cache\artifacts\engine\ios"
+export "FLUTTER_BUILD_NAME=5.0.0"
+export "FLUTTER_BUILD_NUMBER=301"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"
diff --git a/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.h b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.h
new file mode 100644
index 00000000..ed9a5c61
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.h
@@ -0,0 +1,17 @@
+//
+// Generated file. Do not edit.
+//
+
+#ifndef GeneratedPluginRegistrant_h
+#define GeneratedPluginRegistrant_h
+
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GeneratedPluginRegistrant : NSObject
++ (void)registerWithRegistry:(NSObject*)registry;
+@end
+
+NS_ASSUME_NONNULL_END
+#endif /* GeneratedPluginRegistrant_h */
diff --git a/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.m b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.m
new file mode 100644
index 00000000..60dfa42b
--- /dev/null
+++ b/hms-plugins/flutter-hms-location/ios/Runner/GeneratedPluginRegistrant.m
@@ -0,0 +1,12 @@
+//
+// Generated file. Do not edit.
+//
+
+#import "GeneratedPluginRegistrant.h"
+
+@implementation GeneratedPluginRegistrant
+
++ (void)registerWithRegistry:(NSObject*)registry {
+}
+
+@end
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
index d36b1fab..e83c3bf5 100644
--- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,122 +1,128 @@
{
- "images" : [
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "Icon-App-20x20@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "Icon-App-29x29@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "Icon-App-40x40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "Icon-App-60x60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "Icon-App-20x20@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "Icon-App-29x29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "Icon-App-40x40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@1x.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "Icon-App-76x76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "Icon-App-83.5x83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "Icon-App-1024x1024@1x.png",
- "scale" : "1x"
+ "images":[
+ {
+ "idiom":"iphone",
+ "size":"20x20",
+ "scale":"2x",
+ "filename":"Icon-App-20x20@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"20x20",
+ "scale":"3x",
+ "filename":"Icon-App-20x20@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"29x29",
+ "scale":"1x",
+ "filename":"Icon-App-29x29@1x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"29x29",
+ "scale":"2x",
+ "filename":"Icon-App-29x29@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"29x29",
+ "scale":"3x",
+ "filename":"Icon-App-29x29@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"40x40",
+ "scale":"2x",
+ "filename":"Icon-App-40x40@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"40x40",
+ "scale":"3x",
+ "filename":"Icon-App-40x40@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"60x60",
+ "scale":"2x",
+ "filename":"Icon-App-60x60@2x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"60x60",
+ "scale":"3x",
+ "filename":"Icon-App-60x60@3x.png"
+ },
+ {
+ "idiom":"iphone",
+ "size":"76x76",
+ "scale":"2x",
+ "filename":"Icon-App-76x76@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"20x20",
+ "scale":"1x",
+ "filename":"Icon-App-20x20@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"20x20",
+ "scale":"2x",
+ "filename":"Icon-App-20x20@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"29x29",
+ "scale":"1x",
+ "filename":"Icon-App-29x29@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"29x29",
+ "scale":"2x",
+ "filename":"Icon-App-29x29@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"40x40",
+ "scale":"1x",
+ "filename":"Icon-App-40x40@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"40x40",
+ "scale":"2x",
+ "filename":"Icon-App-40x40@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"76x76",
+ "scale":"1x",
+ "filename":"Icon-App-76x76@1x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"76x76",
+ "scale":"2x",
+ "filename":"Icon-App-76x76@2x.png"
+ },
+ {
+ "idiom":"ipad",
+ "size":"83.5x83.5",
+ "scale":"2x",
+ "filename":"Icon-App-83.5x83.5@2x.png"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "scale" : "1x",
+ "filename" : "ItunesArtwork@2x.png"
+ }
+ ],
+ "info":{
+ "version":1,
+ "author":"easyappicon"
}
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
index 28c6bf03..0e65243a 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 2ccbfd96..2e4c7963 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index f091b6b0..59435c76 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
index 4cde1211..20855aad 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index d0ef06e7..11d35da4 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index dcdc2306..93523cbe 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
index 2ccbfd96..2e4c7963 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index c8f9ed8f..00bb8dbd 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index a6d6b860..3eaa1fb6 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index a6d6b860..3eaa1fb6 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index 75b2d164..fd80aa41 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
index c4df70d3..39c7958d 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index 6a84f41e..47a96a43 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index d0e1f585..8c4ca7b0 100644
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist
index 0c093a2a..633037cb 100644
--- a/ios/Runner/GoogleService-Info.plist
+++ b/ios/Runner/GoogleService-Info.plist
@@ -3,21 +3,23 @@
CLIENT_ID
- 864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r.apps.googleusercontent.com
+ 815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com
REVERSED_CLIENT_ID
- com.googleusercontent.apps.864393916058-ekeb4s8tgfo58dutv0l54399t7ivr06r
+ com.googleusercontent.apps.815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt
+ ANDROID_CLIENT_ID
+ 815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com
API_KEY
- AIzaSyA_6ayGCk4fly7o7eTVBrj9kuHBYHMAOfs
+ AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA
GCM_SENDER_ID
- 864393916058
+ 815750722565
PLIST_VERSION
1
BUNDLE_ID
- com.cloud.diplomaticquarterapp
+ com.HMG.HMG-Smartphone
PROJECT_ID
- diplomaticquarter-d2385
+ api-project-815750722565
STORAGE_BUCKET
- diplomaticquarter-d2385.appspot.com
+ api-project-815750722565.appspot.com
IS_ADS_ENABLED
IS_ANALYTICS_ENABLED
@@ -29,8 +31,8 @@
IS_SIGNIN_ENABLED
GOOGLE_APP_ID
- 1:864393916058:ios:13f787bbfe6051f8b97923
+ 1:815750722565:ios:328ec247a81a2ca23c186c
DATABASE_URL
- https://diplomaticquarter-d2385.firebaseio.com
+ https://api-project-815750722565.firebaseio.com
\ No newline at end of file
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index ae084167..72bd4ac9 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -11,7 +11,7 @@
CFBundleInfoDictionaryVersion
6.0
CFBundleName
- diplomaticquarterapp
+ Dr. Alhabib
CFBundlePackageType
APPL
CFBundleShortVersionString
diff --git a/lib/config/config.dart b/lib/config/config.dart
index e3dbfbf2..a2640d90 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -13,16 +13,20 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
+<<<<<<< HEAD
// const BASE_URL = 'https://uat.hmgwebservices.com/';
+=======
+//const BASE_URL = 'https://uat.hmgwebservices.com/';
+>>>>>>> bcb4f487854a894a41a6578a08e0e8f306120033
const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
-const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
-const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
+//const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
+//const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
-// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
-// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
+const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
+const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index e5f21342..b7670c0e 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -1143,6 +1143,12 @@ const Map localizedValues = {
"YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"blood-donation": {"en": "Blood Donation", "ar": "التبرع بالدم"},
+ "blood-donation-info": {
+ "en":
+ "Through this service, you can register your name as a blood donor where the blood bank in the Habib Medical Group will communicate you in case of need for blood type.",
+ "ar":
+ "عن طريق هذه الخدمة تستطيع تسجيل اسمك كمتبرع بالدم حيث سيتم التواصل معك عن طريق بنك الدم في مجموعة الحبيب الطبية في حال الحاجة الى فصيلة الدم ."
+ },
"blood-instruction": {
"en":
"Enter the required information, In order to register for Blood Donation Service",
@@ -1808,7 +1814,7 @@ const Map localizedValues = {
"drinking": {"en": "Drinkning", "ar": "الشرب"},
"remaining": {"en": "Remaining", "ar": "المتبقي"},
"taken": {"en": "Taken", "ar": " مأخوذ"},
- "ml": {"en": "ml", "ar": "مل"},
+ "ml": {"en": "ML", "ar": "مل"},
"l": {"en": "L", "ar": "لتر"},
"custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"},
"custom-label-in-litres": {
@@ -1995,6 +2001,8 @@ const Map localizedValues = {
"en": "Please enter the mobile number and the medical file number",
"ar": "الرجاء إدخال رقم الجوال ورقم الملف الطبي"
},
+ "allow": {"en": "Allow", "ar": "السماح"},
+ "reject": {"en": "Reject", "ar": "رفض"},
"referralRequesterInformation": {
"en": "Referral requester information",
"ar": "معلومات طالب الإحالة"
@@ -2003,20 +2011,11 @@ const Map localizedValues = {
"en": "Enter Referral Requester Name*",
"ar": "أدخل اسم مقدم طلب الإحالة *"
},
- "selectRelationship": {
- "en": "Select Relationship",
- "ar": "حدد العلاقة"
- },
+ "selectRelationship": {"en": "Select Relationship", "ar": "حدد العلاقة"},
"requesterRelationship": {
"en": "Requester Relationship",
"ar": "علاقة الطالب"
},
- "newReferral": {
- "en": "New Referral",
- "ar": "إحالة جديدة"
- },
- "searchForReferrals": {
- "en": "Search For Referrals",
- "ar": "ابحث عن الإحالات"
- }
+ "newReferral": {"en": "New Referral", "ar": "إحالة جديدة"},
+ "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"}
};
diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart
index caada21f..6e761991 100644
--- a/lib/config/shared_pref_kay.dart
+++ b/lib/config/shared_pref_kay.dart
@@ -29,3 +29,4 @@ const BLOOD_TYPE = 'blood-type';
const NOTIFICATION_COUNT = 'notification-count';
const PHARMACY_SELECTED_ADDRESS = 'selected-address';
const PHARMACY_AUTORZIE_TOKEN = 'PHARMACY_AUTORZIE_TOKEN';
+const H2O_UNIT = 'H2O_UNIT';
diff --git a/lib/core/model/feedback/COC_items.dart b/lib/core/model/feedback/COC_items.dart
index 068c8bee..2748ca50 100644
--- a/lib/core/model/feedback/COC_items.dart
+++ b/lib/core/model/feedback/COC_items.dart
@@ -27,34 +27,35 @@ class COCItem {
String statusAr;
dynamic statusEn;
- COCItem(
- {this.appointment,
- this.appointmentClinicName,
- this.appointmentDate,
- this.appointmentProjectName,
- this.cOCID,
- this.cOCTitle,
- this.channel,
- this.clinic,
- this.clinicID,
- this.date,
- this.detail,
- this.doctor,
- this.doctorID,
- this.formType,
- this.formTypeID,
- this.identificationNo,
- this.itemID,
- this.mobileNo,
- this.naturename,
- this.patientID,
- this.patientName,
- this.project,
- this.projectID,
- this.solution,
- this.status,
- this.statusAr,
- this.statusEn});
+ COCItem({
+ this.appointment,
+ this.appointmentClinicName,
+ this.appointmentDate,
+ this.appointmentProjectName,
+ this.cOCID,
+ this.cOCTitle,
+ this.channel,
+ this.clinic,
+ this.clinicID,
+ this.date,
+ this.detail,
+ this.doctor,
+ this.doctorID,
+ this.formType,
+ this.formTypeID,
+ this.identificationNo,
+ this.itemID,
+ this.mobileNo,
+ this.naturename,
+ this.patientID,
+ this.patientName,
+ this.project,
+ this.projectID,
+ this.solution,
+ this.status,
+ this.statusAr,
+ this.statusEn,
+ });
COCItem.fromJson(Map json) {
appointment = json['Appointment'];
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index f12ef3da..03f12df1 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -68,7 +68,7 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
- body['LanguageID'] = languageID == 'ar' ? 1 : 2;
+ body['LanguageID'] = (languageID == 'ar' ? 1 : 2);
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
diff --git a/lib/core/service/medical/WeightPressureService.dart b/lib/core/service/medical/WeightPressureService.dart
index b48c4795..6d150c28 100644
--- a/lib/core/service/medical/WeightPressureService.dart
+++ b/lib/core/service/medical/WeightPressureService.dart
@@ -7,12 +7,9 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
class WeightService extends BaseService {
///Average
- List
- monthWeightMeasurementResultAverage = List();
- List weekWeightMeasurementResultAverage =
- List();
- List yearWeightMeasurementResultAverage =
- List();
+ List monthWeightMeasurementResultAverage = List();
+ List weekWeightMeasurementResultAverage = List();
+ List yearWeightMeasurementResultAverage = List();
///Result
List monthWeightMeasurementResult = List();
@@ -23,24 +20,20 @@ class WeightService extends BaseService {
hasError = false;
Map body = Map();
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) {
monthWeightMeasurementResultAverage.clear();
weekWeightMeasurementResultAverage.clear();
yearWeightMeasurementResultAverage.clear();
response['List_MonthWeightMeasurementResultAverage'].forEach((item) {
- monthWeightMeasurementResultAverage
- .add(MonthWeightMeasurementResultAverage.fromJson(item));
+ monthWeightMeasurementResultAverage.add(MonthWeightMeasurementResultAverage.fromJson(item));
});
response['List_WeekWeightMeasurementResultAverage'].forEach((item) {
- weekWeightMeasurementResultAverage
- .add(WeekWeightMeasurementResultAverage.fromJson(item));
+ weekWeightMeasurementResultAverage.add(WeekWeightMeasurementResultAverage.fromJson(item));
});
response['List_YearWeightMeasurementResultAverage'].forEach((item) {
- yearWeightMeasurementResultAverage
- .add(YearWeightMeasurementResultAverage.fromJson(item));
+ yearWeightMeasurementResultAverage.add(YearWeightMeasurementResultAverage.fromJson(item));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
@@ -50,8 +43,7 @@ class WeightService extends BaseService {
Future getWeightMeasurementResult() async {
hasError = false;
- await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT,
- onSuccess: (dynamic response, int statusCode) {
+ await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT, onSuccess: (dynamic response, int statusCode) {
monthWeightMeasurementResult.clear();
weekWeightMeasurementResult.clear();
yearWeightMeasurementResult.clear();
@@ -61,8 +53,7 @@ class WeightService extends BaseService {
});
response['List_MonthWeightMeasurementResult'].forEach((item) {
- monthWeightMeasurementResult
- .add(WeightMeasurementResult.fromJson(item));
+ monthWeightMeasurementResult.add(WeightMeasurementResult.fromJson(item));
});
response['List_YearWeightMeasurementResult'].forEach((item) {
@@ -74,8 +65,7 @@ class WeightService extends BaseService {
}, body: Map());
}
- addWeightResult(
- {String weightDate, String weightMeasured, int weightUnit}) async {
+ addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async {
hasError = false;
super.error = "";
@@ -85,15 +75,14 @@ class WeightService extends BaseService {
body['weightUnit'] = weightUnit;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
- updateWeightResult({int lineItemNo, int weightUnit,String weightMeasured,String weightDate}) async {
+ updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async {
hasError = false;
super.error = "";
Map body = Map();
@@ -103,36 +92,36 @@ class WeightService extends BaseService {
body['WeightDate'] = weightDate;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(UPDATE_WEIGHT_PRESSURE_RESULT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(UPDATE_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
+
Future sendReportByEmail() async {
hasError = false;
super.error = "";
Map body = Map();
body['isDentalAllowedBackend'] = false;
body['to'] = user.emailAddress;
- await baseAppClient.post(SEND_AVERAGE_BLOOD_WEIGHT_REPORT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(SEND_AVERAGE_BLOOD_WEIGHT_REPORT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
- hasError = true;
- super.error = error;
- }, body: body);
+ hasError = true;
+ super.error = error;
+ }, body: body);
}
- deleteWeightResult({int lineItemNo, }) async {
+ deleteWeightResult({
+ int lineItemNo,
+ }) async {
hasError = false;
super.error = "";
Map body = Map();
body['LineItemNo'] = lineItemNo;
body['isDentalAllowedBackend'] = false;
- await baseAppClient.post(DEACTIVATE_WEIGHT_PRESSURE_RESULT,
- onSuccess: (response, statusCode) async {},
+ await baseAppClient.post(DEACTIVATE_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
diff --git a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart
index a89ec799..9d163a27 100644
--- a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart
+++ b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart
@@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../../../locator.dart';
+import 'dart:math' as math;
class H2OViewModel extends BaseViewModel {
H2OService _h2OService = locator();
@@ -91,11 +92,21 @@ class H2OViewModel extends BaseViewModel {
_h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) {
globalData.add(new ChartSeries(data.dayName, data.percentageConsumed));
});
+ Iterable minMaxList = globalData.map((e) => e.x).toList();
+ int maxValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.max);
+ int minValue = minMaxList.isEmpty ? 0 : minMaxList.reduce(math.min);
+
+ if (maxValue == 0 && minValue == 0) {
+ maxValue = 1;
+ minValue = -1;
+ }
return [
new charts.Series(
id: 'Global Revenue',
domainFn: (ChartSeries sales, _) => sales.y,
measureFn: (ChartSeries sales, _) => sales.x,
+ measureLowerBoundFn: (ChartSeries sales, _) => minValue,
+ measureUpperBoundFn: (ChartSeries sales, _) => maxValue,
data: globalData,
),
];
diff --git a/lib/core/viewModels/medical/blood_sugar_view_model.dart b/lib/core/viewModels/medical/blood_sugar_view_model.dart
index 8a513992..28292311 100644
--- a/lib/core/viewModels/medical/blood_sugar_view_model.dart
+++ b/lib/core/viewModels/medical/blood_sugar_view_model.dart
@@ -39,6 +39,9 @@ class BloodSugarViewMode extends BaseViewModel {
element.dailyAverageResult.toDouble(),
));
});
+ if (bloodWeekTimeSeriesData.isEmpty) {
+ bloodWeekTimeSeriesData.add(TimeSeriesSales2(DateTime.now(), 0));
+ }
for (int index = 0;
index < bloodSugarService.monthDiabtectResultAverageList.length;
diff --git a/lib/core/viewModels/medical/reports_monthly_view_model.dart b/lib/core/viewModels/medical/reports_monthly_view_model.dart
index adb7223e..15ac9219 100644
--- a/lib/core/viewModels/medical/reports_monthly_view_model.dart
+++ b/lib/core/viewModels/medical/reports_monthly_view_model.dart
@@ -14,6 +14,10 @@ class ReportsMonthlyViewModel extends BaseViewModel {
ReportsService _reportsService = locator();
String get userAgreementContent => _reportsService.userAgreementContent;
+ bool get receiveHealthSummaryReport => _reportsService?.user?.receiveHealthSummaryReport ?? false;
+ set receiveHealthSummaryReport(bool val) {
+ _reportsService?.user?.receiveHealthSummaryReport = val;
+ }
getUserTermsAndConditions() async {
setState(ViewState.Busy);
@@ -26,14 +30,9 @@ class ReportsMonthlyViewModel extends BaseViewModel {
}
}
- updatePatientHealthSummaryReport(
- {String message,
- bool isSummary,
- bool isUpdateEmail = false,
- String email}) async {
+ updatePatientHealthSummaryReport({String message, bool isSummary, bool isUpdateEmail = false, String email}) async {
setState(ViewState.BusyLocal);
- await _reportsService.updatePatientHealthSummaryReport(
- isSummary: isSummary);
+ await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
if (_reportsService.hasError) {
error = _reportsService.error;
AppToast.showErrorToast(message: error);
diff --git a/lib/core/viewModels/medical/weight_pressure_view_model.dart b/lib/core/viewModels/medical/weight_pressure_view_model.dart
index 42db0a58..4a01bd3b 100644
--- a/lib/core/viewModels/medical/weight_pressure_view_model.dart
+++ b/lib/core/viewModels/medical/weight_pressure_view_model.dart
@@ -16,14 +16,11 @@ import '../../../core/viewModels/base_view_model.dart';
class WeightPressureViewModel extends BaseViewModel {
WeightService weightService = locator();
- List get monthWeightMeasurementResult =>
- weightService.monthWeightMeasurementResult;
+ List get monthWeightMeasurementResult => weightService.monthWeightMeasurementResult;
- List get weekWeightMeasurementResult =>
- weightService.weekWeightMeasurementResult;
+ List get weekWeightMeasurementResult => weightService.weekWeightMeasurementResult;
- List get yearWeightMeasurementResult =>
- weightService.yearWeightMeasurementResult;
+ List get yearWeightMeasurementResult => weightService.yearWeightMeasurementResult;
List weightWeekTimeSeriesData = [];
List weighMonthTimeSeriesData = [];
@@ -35,7 +32,7 @@ class WeightPressureViewModel extends BaseViewModel {
await weightService.getWeightMeasurementResult();
if (weightService.hasError) {
error = weightService.error;
- setState(ViewState.Error);
+ setState(ViewState.ErrorLocal);
} else {
weightService.weekWeightMeasurementResultAverage.forEach((element) {
weightWeekTimeSeriesData.add(TimeSeriesSales2(
@@ -44,14 +41,10 @@ class WeightPressureViewModel extends BaseViewModel {
));
});
- for (int index = 0;
- index < weightService.monthWeightMeasurementResultAverage.length;
- index++) {
+ for (int index = 0; index < weightService.monthWeightMeasurementResultAverage.length; index++) {
weighMonthTimeSeriesData.add(TimeSeriesSales3(
index,
- weightService
- .monthWeightMeasurementResultAverage[index].weekAverageResult
- .toDouble(),
+ weightService.monthWeightMeasurementResultAverage[index].weekAverageResult.toDouble(),
));
}
@@ -66,8 +59,7 @@ class WeightPressureViewModel extends BaseViewModel {
}
}
- addWeightResult(
- {String weightDate, String weightMeasured, int weightUnit}) async {
+ addWeightResult({String weightDate, String weightMeasured, int weightUnit}) async {
setState(ViewState.BusyLocal);
await weightService.addWeightResult(
weightDate: weightDate,
@@ -82,6 +74,7 @@ class WeightPressureViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
+
Future sendReportByEmail() async {
setState(ViewState.BusyLocal);
@@ -94,14 +87,10 @@ class WeightPressureViewModel extends BaseViewModel {
}
}
- updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured,String weightDate}) async {
+ updateWeightResult({int lineItemNo, int weightUnit, String weightMeasured, String weightDate}) async {
setState(ViewState.BusyLocal);
await weightService.updateWeightResult(
- lineItemNo: lineItemNo,
- weightMeasured: weightMeasured,
- weightUnit: weightUnit,
- weightDate: weightDate
- );
+ lineItemNo: lineItemNo, weightMeasured: weightMeasured, weightUnit: weightUnit, weightDate: weightDate);
if (weightService.hasError) {
error = weightService.error;
setState(ViewState.Error);
@@ -111,7 +100,9 @@ class WeightPressureViewModel extends BaseViewModel {
}
}
- deleteWeightResult({int lineItemNo, }) async {
+ deleteWeightResult({
+ int lineItemNo,
+ }) async {
setState(ViewState.BusyLocal);
await weightService.deleteWeightResult(
lineItemNo: lineItemNo,
diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart
index 2bb75305..17ccb267 100644
--- a/lib/core/viewModels/project_view_model.dart
+++ b/lib/core/viewModels/project_view_model.dart
@@ -36,7 +36,6 @@ class ProjectViewModel extends BaseViewModel {
bool get isArabic => _isArabic;
-
bool isLoginChild = false;
List privilegeRootUser = List();
List privilegeChildUser = List();
@@ -67,7 +66,8 @@ class ProjectViewModel extends BaseViewModel {
}
Future loadSharedPrefLanguage() async {
- currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
+ currentLanguage =
+ await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
_appLocale = Locale(currentLanguage);
_isArabic = currentLanguage == 'ar';
notifyListeners();
@@ -89,10 +89,9 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners();
}
- setPrivilegeModelList(
- {List privilege}) {
+ setPrivilegeModelList({List privilege}) {
this.isLoginChild = isLoginChild;
- privilegeRootUser = privilege;
+ privilegeRootUser = privilege;
notifyListeners();
}
@@ -113,18 +112,18 @@ class ProjectViewModel extends BaseViewModel {
notifyListeners();
}
- setIsLoginChild({@required bool isLoginChild}){
+ setIsLoginChild({@required bool isLoginChild}) {
this.isLoginChild = isLoginChild;
notifyListeners();
}
bool havePrivilege(int id) {
bool isHavePrivilege = false;
- if(isLoginChild)
+ if (isLoginChild)
privilegeChildUser.forEach((element) {
- if (element.iD == id) isHavePrivilege = element.privilege;
- });
- else{
+ if (element.iD == id) isHavePrivilege = element.privilege;
+ });
+ else {
privilegeRootUser.forEach((element) {
if (element.iD == id) isHavePrivilege = element.privilege;
});
diff --git a/lib/main.dart b/lib/main.dart
index 2412e4d1..70ca9d71 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -36,7 +36,7 @@ class MyApp extends StatefulWidget {
class _MyApp extends State {
@override
- void initState(){
+ void initState() {
// ProjectViewModel projectProvider;
// projectProvider = Provider.of(context);
// var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans';
@@ -72,10 +72,7 @@ class _MyApp extends State {
value: SearchProvider(),
),
ChangeNotifierProvider(
- create: (context) => ThemeNotifier(
- defaultTheme()
- )
- ),
+ create: (context) => ThemeNotifier(defaultTheme())),
StreamProvider.value(
value: RobotProvider().intStream(),
initialData: RobotProvider().setValue({}),
diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
index 4295558a..4acc7eaf 100644
--- a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
@@ -13,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
+import 'package:shared_preferences/shared_preferences.dart';
import 'Dialog/setting_page_radio_button_list_dialog.dart';
@@ -31,7 +33,7 @@ class _H2oSettingState extends State {
TextEditingController _nameController = TextEditingController();
TextEditingController _heightController = TextEditingController();
TextEditingController _weightController = TextEditingController();
- bool _isUnitML = false;
+ bool _isUnitML = true;
bool _isGenderMale = false;
bool _isHeightCM = false;
bool _isWeightKG = false;
@@ -61,6 +63,14 @@ class _H2oSettingState extends State {
_isGenderMale = _userDetailModel.gender == "M" ? true : false;
_dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB);
_selectedActiveLevel = _userDetailModel.activityID ?? 1;
+ readPrefs();
+ }
+
+ SharedPreferences prefs;
+ void readPrefs() async {
+ prefs = await SharedPreferences.getInstance();
+ _isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
+ setState(() {});
}
@override
@@ -68,19 +78,9 @@ class _H2oSettingState extends State {
// TODO: implement didChangeDependencies
super.didChangeDependencies();
- _activityLevelListEng = [
- TranslationBase.of(context).notActive,
- TranslationBase.of(context).lightActive,
- TranslationBase.of(context).modActive,
- TranslationBase.of(context).active
- ];
+ _activityLevelListEng = [TranslationBase.of(context).notActive, TranslationBase.of(context).lightActive, TranslationBase.of(context).modActive, TranslationBase.of(context).active];
- _remindedTimeListEng = [
- "1 ${TranslationBase.of(context).time}",
- "2 ${TranslationBase.of(context).times}",
- "3 ${TranslationBase.of(context).times}",
- "4 ${TranslationBase.of(context).times}"
- ];
+ _remindedTimeListEng = ["1 ${TranslationBase.of(context).time}", "2 ${TranslationBase.of(context).times}", "3 ${TranslationBase.of(context).times}", "4 ${TranslationBase.of(context).times}"];
}
@override
@@ -339,8 +339,7 @@ class _H2oSettingState extends State {
]);
}
- Widget _commonSlidersRow(
- _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
+ Widget _commonSlidersRow(_controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange) {
return Container(
margin: EdgeInsets.only(top: 6),
padding: EdgeInsets.all(6),
@@ -451,6 +450,7 @@ class _H2oSettingState extends State {
_userDetailModel.dOB = tempDate;
_userDetailModel.activityID = _selectedActiveLevel;
GifLoaderDialogUtils.showMyDialog(context);
+ await prefs.setString(H2O_UNIT, _isUnitML ? "ml" : "l");
await widget.viewModel.updateUserDetail(_userDetailModel, (tag) {
if (tag) {
AppToast.showSuccessToast(message: TranslationBase.of(context).success);
diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart
index b4d39682..b847190f 100644
--- a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart
@@ -1,12 +1,18 @@
import 'dart:ui';
+import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
+import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
+import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
+import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@@ -18,14 +24,16 @@ class H2OPage extends StatefulWidget {
_H2OPageState createState() => _H2OPageState();
}
-class _H2OPageState extends State
- with SingleTickerProviderStateMixin {
+class _H2OPageState extends State with SingleTickerProviderStateMixin {
TabController _tabController;
@override
void initState() {
super.initState();
- _tabController = TabController(length: 3, vsync: this,);
+ _tabController = TabController(
+ length: 3,
+ vsync: this,
+ );
}
@override
@@ -43,6 +51,7 @@ class _H2OPageState extends State
appBarTitle: TranslationBase.of(context).waterTracker,
showHomeAppBarIcon: false,
baseViewModel: model,
+ isHelp: true,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
@@ -129,6 +138,39 @@ class _H2OPageState extends State
)
],
),
+ bottomNavigationBar: BottomNavBar(
+ changeIndex: (index) {
+ if (index == 0) {
+ IS_VOICE_COMMAND_CLOSED = false;
+ } else if (index == 1) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: AppScaffold(
+ appBarTitle: TranslationBase.of(context).medicalProfile,
+ isShowAppBar: true,
+ showHomeAppBarIcon: false,
+ appBarIcons: [
+ IconButton(
+ icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
+ color: Colors.white,
+ onPressed: () => Navigator.of(context).pushNamed(
+ SETTINGS,
+ ),
+ ),
+ ],
+ body: MedicalProfilePage())));
+ } else if (index == 2) {
+ Navigator.of(context).pushNamedAndRemoveUntil(HOME, (Route route) => false);
+ } else if (index == 3) {
+ Navigator.of(context).pushNamed(MY_FAMILIY);
+ } else if (index == 4) {
+ Navigator.push(context, FadePage(page: ToDo(isShowAppBar: false)));
+ }
+ },
+ showHomeIcon: true,
+ index: 0,
+ ),
),
),
);
diff --git a/lib/pages/AlHabibMedicalService/h2o/month_page.dart b/lib/pages/AlHabibMedicalService/h2o/month_page.dart
index e0118495..8867fb77 100644
--- a/lib/pages/AlHabibMedicalService/h2o/month_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/month_page.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
@@ -8,15 +9,17 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
class MonthPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
onModelReady: (model) => model.getUserProgressForMonthData(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: false,
- appBarTitle: TranslationBase.of(context).h2o,
+ appBarTitle: TranslationBase.of(context).h2o,
baseViewModel: model,
body: Padding(
padding: EdgeInsets.all(8.0),
@@ -46,7 +49,7 @@ class MonthPage extends StatelessWidget {
],
),
// SizedBox(height: 8),
- AppBarChart(seriesList: model.userProgressForMonthDataSeries),
+ AppBarChart(seriesList: model.userProgressForMonthDataSeries, isArabic: projectViewModel.isArabic),
],
),
),
diff --git a/lib/pages/AlHabibMedicalService/h2o/today_page.dart b/lib/pages/AlHabibMedicalService/h2o/today_page.dart
index 33383287..03d11f50 100644
--- a/lib/pages/AlHabibMedicalService/h2o/today_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/today_page.dart
@@ -1,3 +1,4 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@@ -7,8 +8,14 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart';
+import 'package:shared_preferences/shared_preferences.dart';
class TodayPage extends StatelessWidget {
+ Future readPrefs() async {
+ SharedPreferences prefs = await SharedPreferences.getInstance();
+ return (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
+ }
+
@override
Widget build(BuildContext context) {
return BaseView(
@@ -34,55 +41,75 @@ class TodayPage extends StatelessWidget {
: (model.userProgressData.percentageConsumed / 100) >= 1
? 1
: (model.userProgressData.percentageConsumed / 100),
- //,
center: Center(
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- // SizedBox(
- // height: 40,
- // ),
- Text(
- TranslationBase.of(context).consumed,
- style: TextStyle(fontSize: 16.0),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- model.userProgressData == null
- ? "0.0"
- : model.userProgressData.quantityConsumed.toString() + TranslationBase.of(context).ml,
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0, color: HexColor("#60BCF9")),
- ),
- SizedBox(
- height: 4,
- ),
- SizedBox(
- height: 5,
- width: 50,
- child: Container(),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- TranslationBase.of(context).remaining,
- style: TextStyle(fontSize: 16.0),
- ),
- SizedBox(
- height: 4,
- ),
- Text(
- model.userProgressData == null
- ? "0.0"
- : (model.userProgressData.quantityLimit - model.userProgressData.quantityConsumed) < 0
- ? "0 ${TranslationBase.of(context).ml}"
- : (model.userProgressData.quantityLimit - model.userProgressData.quantityConsumed).toString() +
- ' ${TranslationBase.of(context).ml}',
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),
- ),
- ],
+ child: FutureBuilder(
+ future: readPrefs(),
+ builder: (context, data) {
+ var isUnitML = true;
+ String unit;
+ if (data.connectionState == ConnectionState.done) {
+ isUnitML = data.data;
+ }
+ if (isUnitML) {
+ unit = TranslationBase.of(context).ml;
+ } else {
+ unit = TranslationBase.of(context).l;
+ }
+ unit = unit.toLowerCase();
+ var totalH2O = model?.userProgressData?.quantityLimit ?? 0.0;
+ var consumedH2O = model?.userProgressData?.quantityConsumed ?? 0.0;
+ if (!isUnitML) {
+ totalH2O = totalH2O / 1000;
+ consumedH2O = consumedH2O / 1000;
+ }
+ var remainingH2O = totalH2O - consumedH2O;
+
+ return Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ // SizedBox(
+ // height: 40,
+ // ),
+ Text(
+ TranslationBase.of(context).consumed,
+ style: TextStyle(fontSize: 16.0),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ Text(
+ model.userProgressData == null ? "0.0" : "$consumedH2O $unit",
+ style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0, color: HexColor("#60BCF9")),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ SizedBox(
+ height: 5,
+ width: 50,
+ child: Container(),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ Text(
+ TranslationBase.of(context).remaining,
+ style: TextStyle(fontSize: 16.0),
+ ),
+ SizedBox(
+ height: 4,
+ ),
+ Text(
+ model.userProgressData == null
+ ? "0.0"
+ : (remainingH2O) < 0
+ ? "0 $unit"
+ : '$remainingH2O $unit',
+ style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.0),
+ ),
+ ],
+ );
+ },
),
),
circularStrokeCap: CircularStrokeCap.butt,
diff --git a/lib/pages/AlHabibMedicalService/h2o/week_page.dart b/lib/pages/AlHabibMedicalService/h2o/week_page.dart
index 34e365e6..6f4423b2 100644
--- a/lib/pages/AlHabibMedicalService/h2o/week_page.dart
+++ b/lib/pages/AlHabibMedicalService/h2o/week_page.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_bar_chart.dart';
@@ -8,10 +9,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
class WeekPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
onModelReady: (model) => model.getUserProgressForWeekData(),
builder: (_, model, widget) => AppScaffold(
@@ -46,7 +49,7 @@ class WeekPage extends StatelessWidget {
],
),
// SizedBox(height: 8),
- AppBarChart(seriesList: model.userProgressForWeekDataSeries),
+ AppBarChart(seriesList: model.userProgressForWeekDataSeries,isArabic: projectViewModel.isArabic),
],
),
),
diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart
index adff790c..ce6ab8ee 100644
--- a/lib/pages/Blood/blood_donation.dart
+++ b/lib/pages/Blood/blood_donation.dart
@@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart';
import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart';
@@ -60,7 +61,7 @@ class _BloodDonationPageState extends State {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
var checkedValue = false;
-
+ List imagesInfo = List();
@override
void initState() {
super.initState();
@@ -69,6 +70,13 @@ class _BloodDonationPageState extends State {
@override
Widget build(BuildContext context) {
+ imagesInfo.add(
+ ImagesInfo(
+ imageEn:
+ 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
+ imageAr:
+ 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
+ );
ProjectViewModel projectProvider = Provider.of(context);
return BaseView(
@@ -76,6 +84,8 @@ class _BloodDonationPageState extends State {
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
+ imagesInfo: imagesInfo,
+ description: TranslationBase.of(context).bloodDonationInfo,
appBarTitle: TranslationBase.of(context).bloodD,
body: SingleChildScrollView(
physics: ScrollPhysics(),
diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart
index 96e055b3..e4a82cb4 100644
--- a/lib/pages/DrawerPages/family/add-family_type.dart
+++ b/lib/pages/DrawerPages/family/add-family_type.dart
@@ -75,7 +75,7 @@ class AddFamilyMemberType extends StatelessWidget {
),
AppText(
TranslationBase.of(context)
- .nationalID,
+ .idNo,
fontSize: SizeConfig
.textMultiplier *
2,
diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart
index 07f99b16..32aaaf45 100644
--- a/lib/pages/DrawerPages/family/my-family.dart
+++ b/lib/pages/DrawerPages/family/my-family.dart
@@ -395,12 +395,20 @@ class _MyFamily extends State with TickerProviderStateMixin {
left: 10, right: 10),
child: Row(children: [
Expanded(
- flex: 3, child: AppText('Name')),
+ flex: 3,
+ child: AppText(
+ TranslationBase.of(context)
+ .name)),
Expanded(
- flex: 1, child: AppText('Allow')),
+ flex: 1,
+ child: AppText(
+ TranslationBase.of(context)
+ .allow)),
Expanded(
flex: 1,
- child: AppText('Reject')),
+ child: AppText(
+ TranslationBase.of(context)
+ .reject)),
])),
Column(
children: familyFileProvider
@@ -577,9 +585,15 @@ class _MyFamily extends State with TickerProviderStateMixin {
EdgeInsets.only(left: 10, right: 10),
child: Row(children: [
Expanded(
- flex: 3, child: AppText('Name')),
+ flex: 3,
+ child: AppText(
+ TranslationBase.of(context)
+ .name)),
Expanded(
- flex: 1, child: AppText('Delete')),
+ flex: 1,
+ child: AppText(
+ TranslationBase.of(context)
+ .delete)),
])),
Column(
children: familyFileProvider
diff --git a/lib/pages/base/base_view.dart b/lib/pages/base/base_view.dart
index 5977e97e..ba274bdd 100644
--- a/lib/pages/base/base_view.dart
+++ b/lib/pages/base/base_view.dart
@@ -33,10 +33,10 @@ class _BaseViewState extends State> {
@override
void initState() {
- if(widget.allowAny && widget.onModelReady != null){
+ if (widget.allowAny && widget.onModelReady != null) {
widget.onModelReady(model);
- }
- else if (widget.onModelReady != null && Provider.of(context, listen: false).isLogin) {
+ } else if (widget.onModelReady != null &&
+ Provider.of(context, listen: false).isLogin) {
widget.onModelReady(model);
}
super.initState();
@@ -60,7 +60,6 @@ class _BaseViewState extends State> {
if (model != null) {
model = null;
}
-
super.dispose();
}
}
diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart
index 8ebdabd8..fca9624c 100644
--- a/lib/pages/feedback/send_feedback_page.dart
+++ b/lib/pages/feedback/send_feedback_page.dart
@@ -44,6 +44,7 @@ class _SendFeedbackPageState extends State {
stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord;
var event = RobotProvider();
+
String getSelected(BuildContext context) {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
@@ -325,6 +326,9 @@ class _SendFeedbackPageState extends State {
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
+ onChanged: (v){setState(() {
+
+ });},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptySubject;
@@ -347,6 +351,9 @@ class _SendFeedbackPageState extends State {
onSuffixTap: () {
openSpeechReco();
},
+ onChanged: (v){setState(() {
+
+ });},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptyMessage;
@@ -440,41 +447,39 @@ class _SendFeedbackPageState extends State {
label: TranslationBase.of(context).send,
textColor: Colors.white,
disabled: (titleController.text.toString().isEmpty ||
- messageController.text.toString().isEmpty ||
- messageType == MessageType.NON),
+ messageController.text.toString().isEmpty ),
onTap: () {
final form = formKey.currentState;
- if (form.validate()) if (messageType != MessageType.NON) {
- GifLoaderDialogUtils.showMyDialog(context);
- model
- .sendCOCItem(
- title: titleController.text,
- attachment: images.length > 0 ? images[0] : "",
- details: messageController.text,
- cOCTypeName: getCOCName(),
- appointHistory: messageType ==
- MessageType.ComplaintOnAnAppointment
- ? appointHistory
- : null)
- .then((value) {
- if (value) {
- setState(() {
- titleController.text = "";
- messageController.text = "";
- images = [];
- });
- setMessageType(MessageType.NON);
- GifLoaderDialogUtils.hideDialog(context);
- AppToast.showSuccessToast(
- message: TranslationBase.of(context).yourFeedback);
- } else {
- AppToast.showErrorToast(message: model.error);
- GifLoaderDialogUtils.hideDialog(context);
- }
- });
- } else {
- AppToast.showErrorToast(
- message: TranslationBase.of(context).selectPart);
+ if (form.validate()) {
+
+ GifLoaderDialogUtils.showMyDialog(context);
+ model
+ .sendCOCItem(
+ title: titleController.text,
+ attachment: images.length > 0 ? images[0] : "",
+ details: messageController.text,
+ cOCTypeName: getCOCName(),
+ appointHistory: messageType ==
+ MessageType.ComplaintOnAnAppointment
+ ? appointHistory
+ : null)
+ .then((value) {
+ if (value) {
+ setState(() {
+ titleController.text = "";
+ messageController.text = "";
+ images = [];
+ });
+ setMessageType(MessageType.NON);
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showSuccessToast(
+ message: TranslationBase.of(context).yourFeedback);
+ } else {
+ AppToast.showErrorToast(message: model.error);
+ GifLoaderDialogUtils.hideDialog(context);
+ }
+ });
+
}
},
),
@@ -500,10 +505,10 @@ class _SendFeedbackPageState extends State {
return "4";
break;
case MessageType.Suggestion:
- return "5";
+ return "6";
break;
case MessageType.NON:
- return "";
+ return "5";
break;
}
return "";
@@ -583,6 +588,7 @@ class FeedbackTypeDialogState extends State {
setMessageDialogType(MessageType messageType) {
setState(() {
+
messageTypeDialog = messageType;
});
}
diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart
index da66c572..cf58e815 100644
--- a/lib/pages/insurance/insurance_card_screen.dart
+++ b/lib/pages/insurance/insurance_card_screen.dart
@@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
-import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
+import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@@ -33,26 +33,41 @@ class _InsuranceCardState extends State {
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
- imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',
- imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
+ imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
return BaseView(
onModelReady: (model) => model.getInsurance(),
- builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
- AppScaffold(
+ builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
+ showHomeAppBarIcon: false,
appBarTitle: TranslationBase.of(context).insuranceCards,
description: TranslationBase.of(context).infoInsuranceCards,
infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo,
+ appBarIcons: [
+ IconButton(
+ padding: EdgeInsets.zero,
+ icon: Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(8),
+ ),
+ margin: EdgeInsets.only(right: 8),
+ padding: EdgeInsets.only(right: 4, left: 4),
+ child: Image.asset(
+ 'assets/images/medical/insurance_update_icon_.png',
+ height: SizeConfig.heightMultiplier * 5,
+ width: SizeConfig.heightMultiplier * 5,
+ ),
+ ),
+ onPressed: () {
+ Navigator.push(context, FadePage(page: InsuranceUpdate()));
+ },
+ ),
+ ],
body: Container(
- margin: EdgeInsets.only(
- left: SizeConfig.screenWidth * 0.004,
- right: SizeConfig.screenWidth * 0.004,
- top: SizeConfig.screenWidth * 0.04),
+ margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04),
child: ListView.builder(
itemCount: model.insurance == null ? 0 : model.insurance.length,
itemBuilder: (BuildContext context, int index) {
@@ -82,23 +97,16 @@ class _InsuranceCardState extends State {
Container(
padding: EdgeInsets.all(14),
width: double.infinity,
- decoration: BoxDecoration(
- shape: BoxShape.rectangle,
- border: Border.all(
- color: Colors.grey, width: 0.2),
- borderRadius:
- BorderRadius.all(Radius.circular(2)),
- boxShadow: [
- BoxShadow(
- color: Colors.white70,
- ),
- ]),
+ decoration: BoxDecoration(shape: BoxShape.rectangle, border: Border.all(color: Colors.grey, width: 0.2), borderRadius: BorderRadius.all(Radius.circular(2)), boxShadow: [
+ BoxShadow(
+ color: Colors.white70,
+ ),
+ ]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
- TranslationBase.of(context).companyName +
- model.insurance[index].companyName,
+ TranslationBase.of(context).companyName + model.insurance[index].companyName,
fontSize: 20.0,
fontWeight: FontWeight.w700,
),
@@ -108,93 +116,46 @@ class _InsuranceCardState extends State {
thickness: 0.5,
),
Column(
- crossAxisAlignment:
- CrossAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: [
- Texts(
- TranslationBase.of(context)
- .category,
- fontSize: 18.5),
- Texts(
- model.insurance[index]
- .subCategoryDesc,
- fontSize: 18.5)
- ],
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [Texts(TranslationBase.of(context).category, fontSize: 18.5), Texts(model.insurance[index].subCategoryDesc, fontSize: 18.5)],
),
Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Texts(
- TranslationBase.of(context)
- .expirationDate,
- fontSize: 18.5),
+ Texts(TranslationBase.of(context).expirationDate, fontSize: 18.5),
Texts(
convertDateFormat(
- model.insurance[index]
- .cardValidTo,
+ model.insurance[index].cardValidTo,
),
fontSize: 18.5),
],
),
Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Texts(
- TranslationBase.of(context)
- .status +
- ": ",
- fontSize: 18.5),
- model.insurance[index].isActive ==
- true
- ? Texts(
- TranslationBase.of(context)
- .activeInsurence,
- color: Colors.green,
- fontWeight: FontWeight.w900,
- fontSize: 17.9)
- : Texts(
- TranslationBase.of(context)
- .notActive,
- color: Colors.red,
- fontWeight: FontWeight.w900,
- fontSize: 17.9)
+ Texts(TranslationBase.of(context).status + ": ", fontSize: 18.5),
+ model.insurance[index].isActive == true
+ ? Texts(TranslationBase.of(context).activeInsurence, color: Colors.green, fontWeight: FontWeight.w900, fontSize: 17.9)
+ : Texts(TranslationBase.of(context).notActive, color: Colors.red, fontWeight: FontWeight.w900, fontSize: 17.9)
],
),
Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: [
- Texts(
- TranslationBase.of(context)
- .patientCard,
- fontSize: 18.5),
- Texts(
- model.insurance[index]
- .patientCardID,
- fontSize: 18.5)
- ],
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [Texts(TranslationBase.of(context).patientCard, fontSize: 18.5), Texts(model.insurance[index].patientCardID, fontSize: 18.5)],
),
- Row(
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: [
- Texts(
- TranslationBase.of(context)
- .policyNumber,
- fontSize: 18.5,
- ),
- Texts(
- model.insurance[index]
- .insurancePolicyNumber,
- fontSize: 18.5,
- )
- ]),
+ Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+ Texts(
+ TranslationBase.of(context).policyNumber,
+ fontSize: 18.5,
+ ),
+ Texts(
+ model.insurance[index].insurancePolicyNumber,
+ fontSize: 18.5,
+ )
+ ]),
],
),
SizedBox(
@@ -204,11 +165,8 @@ class _InsuranceCardState extends State {
Container(
color: Colors.transparent,
child: SecondaryButton(
- onTap: () => {
- getDetails(model.insurance[index])
- },
- label: TranslationBase.of(context)
- .seeDetails,
+ onTap: () => {getDetails(model.insurance[index])},
+ label: TranslationBase.of(context).seeDetails,
textColor: Colors.white,
),
width: double.infinity,
@@ -235,23 +193,16 @@ class _InsuranceCardState extends State {
final startIndex = exDate.indexOf(start);
final endIndex = exDate.indexOf(end, startIndex + start.length);
- var date = new DateTime.fromMillisecondsSinceEpoch(
- int.parse(exDate.substring(startIndex + start.length, endIndex)));
- String newDate = date.year.toString() +
- "-" +
- date.month.toString().padLeft(2, '0') +
- "-" +
- date.day.toString().padLeft(2, '0');
+ var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(exDate.substring(startIndex + start.length, endIndex)));
+ String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
return newDate.toString();
}
getDetails(data) {
GifLoaderDialogUtils.showMyDialog(context);
- _insuranceCardService.getInsuranceDetails(data).then((value) => {
- GifLoaderDialogUtils.hideDialog(context),
- Navigator.push(context,
- FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
- });
+ _insuranceCardService
+ .getInsuranceDetails(data)
+ .then((value) => {GifLoaderDialogUtils.hideDialog(context), Navigator.push(context, FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))});
}
}
diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart
index d1b8d4f3..51692461 100644
--- a/lib/pages/landing/home_page.dart
+++ b/lib/pages/landing/home_page.dart
@@ -156,15 +156,23 @@ class _HomePageState extends State {
onPressed: () {
navigateToCovidDriveThru();
},
- child: Texts(
- TranslationBase.of(
- context)
- .bookNow,
- fontWeight:
- FontWeight
- .w700,
- color: Colors
- .white,
+ child: Center(
+ child: Center(
+ child: Center(
+ child: Center(
+ child: Texts(
+ TranslationBase.of(
+ context)
+ .bookNow,
+ fontWeight:
+ FontWeight
+ .w700,
+ color: Colors
+ .white,
+ ),
+ ),
+ ),
+ ),
),
),
),
diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart
index 467068cc..548405f0 100644
--- a/lib/pages/login/register-info.dart
+++ b/lib/pages/login/register-info.dart
@@ -278,44 +278,46 @@ class _RegisterInfo extends State {
registerNow() {
dynamic request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context);
- this.authService.registerUser(request).then((result) => {
- GifLoaderDialogUtils.hideDialog(context),
- // userData = result.list;
- //AuthenticatedUser.fromJson(result['List'][0]),
- if(result is String){
- new ConfirmDialog(
- context: context,
- confirmMessage: result,
- okText: TranslationBase.of(context).ok,
- cancelText: TranslationBase.of(context).cancel_nocaps,
- okFunction: () => {
- ConfirmDialog.closeAlertDialog(context)
- },
- cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)})
- .showAlertDialog(context)
-
- }else
- {
- result.list.isFamily = false,
- sharedPref.setObject(USER_PROFILE, result.list),
- this.sharedPref.setObject(MAIN_USER, result.list),
- sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
- sharedPref.setString(TOKEN, result.authenticationTokenID),
- Navigator.of(context).pushNamed(HOME)
- }
- }).catchError((err) {
- GifLoaderDialogUtils.hideDialog(context);
+ this
+ .authService
+ .registerUser(request)
+ .then((result) => {
+ GifLoaderDialogUtils.hideDialog(context),
+ // userData = result.list;
+ //AuthenticatedUser.fromJson(result['List'][0]),
+ if (result is String)
+ {
+ new ConfirmDialog(
+ context: context,
+ confirmMessage: result,
+ okText: TranslationBase.of(context).ok,
+ cancelText: TranslationBase.of(context).cancel_nocaps,
+ okFunction: () =>
+ {ConfirmDialog.closeAlertDialog(context)},
+ cancelFunction: () => {
+ ConfirmDialog.closeAlertDialog(context)
+ }).showAlertDialog(context)
+ }
+ else
+ {
+ result.list.isFamily = false,
+ sharedPref.setObject(USER_PROFILE, result.list),
+ this.sharedPref.setObject(MAIN_USER, result.list),
+ sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
+ sharedPref.setString(TOKEN, result.authenticationTokenID),
+ Navigator.of(context).pushNamed(HOME)
+ }
+ })
+ .catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: err,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
- okFunction: () => {
- ConfirmDialog.closeAlertDialog(context)
- },
+ okFunction: () => {ConfirmDialog.closeAlertDialog(context)},
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context);
-
});
}
@@ -347,12 +349,12 @@ class _RegisterInfo extends State {
"PatientIdentificationNo": registerInfo.idNumber,
"MobileNumber": registerd_data.patientMobileNumber,
"PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1,
- "FirstNameN":registerInfo.firstNameAr =='-' ?"": registerInfo.firstNameAr,
- "FirstName": registerInfo.firstNameEn =='-' ?"":registerInfo.firstNameEn,
- "MiddleNameN":registerInfo.secondNameAr =='-' ? "" : registerInfo.secondNameAr,
- "MiddleName":registerInfo.secondNameEn == '-' ? "": registerInfo.secondNameEn,
- "LastNameN": registerInfo.lastNameAr =='-'? "" : registerInfo.lastNameAr,
- "LastName": registerInfo.lastNameEn =='-' ? "": registerInfo.lastNameEn,
+ "FirstNameN": registerInfo.firstNameAr,
+ "FirstName": registerInfo.firstNameEn,
+ "MiddleNameN": registerInfo.secondNameAr,
+ "MiddleName": registerInfo.secondNameEn,
+ "LastNameN": registerInfo.lastNameAr,
+ "LastName": registerInfo.lastNameEn,
"StrDateofBirth": registerInfo.dateOfBirth,
"DateofBirth": DateUtil.convertISODateToJsonDate(
registerInfo.dateOfBirth.replaceAll('/', '-')),
diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart
index c6a3b872..1591d1d5 100644
--- a/lib/pages/login/register.dart
+++ b/lib/pages/login/register.dart
@@ -21,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:intl/intl.dart';
class Register extends StatefulWidget {
@override
@@ -294,12 +295,12 @@ class _Register extends State {
// DOB: this.dateOption === '1' ? this.dateOfBirth : moment(this.dateOfBirth).format('DD/MM/YYYY'),
// IsHijri: Number(this.dateOption)
// }
+
+ final DateFormat dateFormat = DateFormat('dd/MM/yyyy');
GifLoaderDialogUtils.showMyDialog(context);
var request = CheckUserStatusRequest();
request.patientIdentificationID = nationalIDorFile.text;
- request.dOB = isHijri == 1
- ? dob
- : "${selectedDate.toLocal()}".split(' ')[0].replaceAll('-', '/');
+ request.dOB = isHijri == 1 ? dob : dateFormat.format(selectedDate);
request.isHijri = isHijri;
request.patientOutSA = countryCode == '966' ? 0 : 1;
this.authService.checkUserStatus(request).then((result) => {
@@ -311,7 +312,12 @@ class _Register extends State {
Navigator.of(context).push(FadePage(page: ConfirmLogin())),
}
else
- {AppToast.showErrorToast(message: result)}
+ {
+ AppToast.showErrorToast(
+ message: result
+ ? result
+ : TranslationBase.of(context).somethingWentWrong)
+ }
});
}
diff --git a/lib/pages/medical/balance/new_text_Field.dart b/lib/pages/medical/balance/new_text_Field.dart
index f61c7267..3e20dc00 100644
--- a/lib/pages/medical/balance/new_text_Field.dart
+++ b/lib/pages/medical/balance/new_text_Field.dart
@@ -74,7 +74,7 @@ class NewTextFields extends StatefulWidget {
this.fontWeight = FontWeight.w700,
this.autoValidate = false,
this.hintColor,
- this.isEnabled = true})
+ this.isEnabled = true,this.counterText=""})
: super(key: key);
final String hintText;
@@ -112,6 +112,7 @@ class NewTextFields extends StatefulWidget {
final bool borderOnlyError;
final Color hintColor;
final String initialValue;
+ final String counterText;
@override
_NewTextFieldsState createState() => _NewTextFieldsState();
}
@@ -199,6 +200,7 @@ class _NewTextFieldsState extends State {
: widget.inputFormatters,
decoration: InputDecoration(
labelText: widget.hintText,
+ counterText: widget.counterText,
labelStyle:
TextStyle(color: Theme.of(context).textTheme.bodyText1.color),
errorBorder: OutlineInputBorder(
diff --git a/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart b/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart
index 71799084..62f4e878 100644
--- a/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart
@@ -51,6 +51,7 @@ class _AddWeightPageState extends State {
];
final List measureUnitArList = ["كيلو جرام", "باوند"];
String measureTimeSelectedType;
+ bool isButtonDisabled = false;
@override
void initState() {
@@ -64,6 +65,7 @@ class _AddWeightPageState extends State {
else if (measureUnitArList.contains(widget.measureTimeSelectedType))
weightUnit = measureUnitArList.indexOf(widget.measureTimeSelectedType);
_weightValueController.text = widget.weightValue;
+ validateForm();
}
}
@@ -76,40 +78,41 @@ class _AddWeightPageState extends State {
appBarTitle: widget.isUpdate
? TranslationBase.of(context).update
: TranslationBase.of(context).add,
- appBarIcons:widget.isUpdate? [
- IconButton(
- icon: Icon(Icons.delete),
- color: Colors.white,
- onPressed: () {
- ConfirmDialog dialog = new ConfirmDialog(
- context: context,
- confirmMessage: 'Remove this measure',
- okText: TranslationBase.of(context).ok,
- cancelText: TranslationBase.of(context).cancel,
- okFunction: () async {
- ConfirmDialog.closeAlertDialog(context);
+ appBarIcons: widget.isUpdate
+ ? [
+ IconButton(
+ icon: Icon(Icons.delete),
+ color: Colors.white,
+ onPressed: () {
+ ConfirmDialog dialog = new ConfirmDialog(
+ context: context,
+ confirmMessage: 'Remove this measure',
+ okText: TranslationBase.of(context).ok,
+ cancelText: TranslationBase.of(context).cancel,
+ okFunction: () async {
+ ConfirmDialog.closeAlertDialog(context);
- GifLoaderDialogUtils.showMyDialog(context);
- widget.model
- .deleteWeightResult(lineItemNo: widget.lineItemNo)
- .then((value) {
- GifLoaderDialogUtils.hideDialog(context);
- if (widget.model.state == ViewState.ErrorLocal)
- AppToast.showErrorToast(
- message: widget.model.error);
- else
- Navigator.pop(context);
- }).catchError((e) {
- GifLoaderDialogUtils.hideDialog(context);
- AppToast.showErrorToast(
- message: widget.model.error);
- });
- },
- cancelFunction: () => {});
- dialog.showAlertDialog(context);
- },
- )
- ]:null,
+ GifLoaderDialogUtils.showMyDialog(context);
+ widget.model
+ .deleteWeightResult(lineItemNo: widget.lineItemNo)
+ .then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (widget.model.state == ViewState.ErrorLocal)
+ AppToast.showErrorToast(
+ message: widget.model.error);
+ else
+ Navigator.pop(context);
+ }).catchError((e) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(message: widget.model.error);
+ });
+ },
+ cancelFunction: () => {});
+ dialog.showAlertDialog(context);
+ },
+ )
+ ]
+ : null,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
@@ -123,6 +126,7 @@ class _AddWeightPageState extends State {
hintText: TranslationBase.of(context).weightAdd,
controller: _weightValueController,
keyboardType: TextInputType.number,
+ onChanged: (value) => validateForm(),
),
SizedBox(
height: 8,
@@ -235,16 +239,19 @@ class _AddWeightPageState extends State {
loading: widget.model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white,
+ color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
onTap: () {
if (_weightValueController.text.isNotEmpty) {
if (widget.isUpdate) {
GifLoaderDialogUtils.showMyDialog(context);
- widget.model.updateWeightResult(
- weightDate: '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00',
- weightMeasured: _weightValueController.text.toString(),
- weightUnit: weightUnit,
- lineItemNo: widget.lineItemNo
- )
+ widget.model
+ .updateWeightResult(
+ weightDate:
+ '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00',
+ weightMeasured:
+ _weightValueController.text.toString(),
+ weightUnit: weightUnit,
+ lineItemNo: widget.lineItemNo)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.Error)
@@ -253,8 +260,10 @@ class _AddWeightPageState extends State {
Navigator.pop(context);
});
} else
- widget.model.addWeightResult(
- weightDate: '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00',
+ widget.model
+ .addWeightResult(
+ weightDate:
+ '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00',
weightMeasured: _weightValueController.text.toString(),
weightUnit: weightUnit,
)
@@ -291,9 +300,23 @@ class _AddWeightPageState extends State {
setState(() {
measureTimeSelectedType = value;
weightUnit = list.indexOf(value);
+ validateForm();
});
},
),
);
}
+
+ void validateForm() {
+ if (_weightValueController.text.length > 0 &&
+ measureTimeSelectedType != null) {
+ setState(() {
+ isButtonDisabled = true;
+ });
+ } else {
+ setState(() {
+ isButtonDisabled = false;
+ });
+ }
+ }
}
diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
index b275431c..47afd9fe 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart
@@ -1,5 +1,3 @@
-import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart';
-import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart';
@@ -30,7 +28,11 @@ class WeightWeeklyPage extends StatelessWidget {
body: model.weightWeekTimeSeriesData.isEmpty
? Container(
child: Center(
- child: Texts(TranslationBase.of(context).noDataAvailable),
+ child: Container(
+ child: Center(
+ child: Texts(TranslationBase.of(context).noDataAvailable),
+ ),
+ ),
),
)
: ListView(
@@ -42,7 +44,7 @@ class WeightWeeklyPage extends StatelessWidget {
horizontalInterval: 1.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightWeekTimeSeriesData,
- indexes: model.weightWeekTimeSeriesData.length ~/ 5.5,
+ indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0,
),
),
SizedBox(
diff --git a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
index 0187a13b..a3b443d4 100644
--- a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
+++ b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart
@@ -43,7 +43,7 @@ class WeightYearPage extends StatelessWidget {
horizontalInterval: 2.0,
title: TranslationBase.of(context).weight,
timeSeries: model.weightYearTimeSeriesData,
- indexes: model.weightYearTimeSeriesData.length ~/ 5.5,
+ indexes: model.weightYearTimeSeriesData.length ~/ 5.5 ?? "",
)),
SizedBox(
height: 12,
diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart
index c8e07818..fc2df783 100644
--- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart
+++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart
@@ -46,6 +46,7 @@ class _AddBloodPressurePageState extends State {
DateTime bloodSugarDate = DateTime.now();
DateTime timeSugarDate = DateTime.now();
int measuredArm = 1;
+ bool isButtonDisabled = false;
final List measureTimeEnList = [
'Left',
'Right',
@@ -69,6 +70,7 @@ class _AddBloodPressurePageState extends State {
measuredArm = measureTimeArList.indexOf(widget.measureTimeSelectedType);
_bloodSystolicValueController.text = widget.bloodSystolicValue;
_bloodDiastolicValueController.text = widget.bloodDiastolicValue;
+ validateForm();
}
}
@@ -78,7 +80,13 @@ class _AddBloodPressurePageState extends State {
return AppScaffold(
isShowAppBar: true,
+<<<<<<< HEAD
appBarTitle: widget.isUpdate ? TranslationBase.of(context).update : TranslationBase.of(context).add,
+=======
+ appBarTitle: widget.isUpdate
+ ? TranslationBase.of(context).update
+ : TranslationBase.of(context).add,
+>>>>>>> bcb4f487854a894a41a6578a08e0e8f306120033
appBarIcons: widget.isUpdate
? [
IconButton(
@@ -94,10 +102,21 @@ class _AddBloodPressurePageState extends State {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
+<<<<<<< HEAD
widget.model.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo).then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (widget.model.state == ViewState.ErrorLocal)
AppToast.showErrorToast(message: widget.model.error);
+=======
+ widget.model
+ .deactivateDiabeticStatus(
+ lineItemNo: widget.lineItemNo)
+ .then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (widget.model.state == ViewState.ErrorLocal)
+ AppToast.showErrorToast(
+ message: widget.model.error);
+>>>>>>> bcb4f487854a894a41a6578a08e0e8f306120033
else
Navigator.pop(context);
}).catchError((e) {
@@ -124,6 +143,8 @@ class _AddBloodPressurePageState extends State {
hintText: TranslationBase.of(context).systolicAdd,
controller: _bloodSystolicValueController,
keyboardType: TextInputType.number,
+ maxLength: 3,
+ onChanged: (value) => validateForm(),
),
SizedBox(
height: 8,
@@ -132,6 +153,8 @@ class _AddBloodPressurePageState extends State {
hintText: TranslationBase.of(context).diastolicAdd,
controller: _bloodDiastolicValueController,
keyboardType: TextInputType.number,
+ maxLength: 3,
+ onChanged: (value) => validateForm(),
),
SizedBox(
height: 8,
@@ -225,6 +248,9 @@ class _AddBloodPressurePageState extends State {
loading: widget.model.state == ViewState.BusyLocal,
label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white,
+ color: isButtonDisabled
+ ? Colors.grey[900]
+ : Colors.grey,
onTap: () async {
if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
@@ -275,9 +301,43 @@ class _AddBloodPressurePageState extends State {
setState(() {
measureTimeSelectedType = value;
measuredArm = list.indexOf(value);
+ validateForm();
});
},
),
);
}
+
+ void validateForm() {
+ print("_bloodSystolicValueController "+_bloodSystolicValueController.text.length.toString());
+ if (measureTimeSelectedType != 'Left Arm' &&
+ _bloodSystolicValueController.text.length > 0 &&
+ _bloodDiastolicValueController.text.length > 0) {
+ setState(() {
+ isButtonDisabled = true;
+ });
+ } else {
+ setState(() {
+ isButtonDisabled = false;
+ });
+ }
+ // if(measureTimeSelectedType == 'Left Arm'){
+ // setState(() {
+ // isButtonDisabled = false;
+ // });
+ // }else if(_bloodSystolicValueController.text.length < 0){
+ // setState(() {
+ // isButtonDisabled = false;
+ // });
+ // }else if(_bloodDiastolicValueController.text.length < 0){
+ // setState(() {
+ // isButtonDisabled = false;
+ // });
+ // }else{
+ // setState(() {
+ // isButtonDisabled = true;
+ // });
+ // }
+ }
+
}
diff --git a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart
index 94e48b92..2ed34c0f 100644
--- a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart
+++ b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart
@@ -46,6 +46,7 @@ class _AddBloodSugarPageState extends State {
DateTime timeSugarDate = DateTime.now();
String measureUnitSelectedType = 'mg/dlt';
int measuredTime = 1;
+ bool isButtonDisabled = false;
final List measureUnitList = ['mg/dlt', 'mol/L'];
final List measureTimeEnList = [
'Before Breakfast',
@@ -85,6 +86,7 @@ class _AddBloodSugarPageState extends State {
else if (measureTimeArList.contains(widget.measuredTime))
measuredTime = measureTimeArList.indexOf(widget.measuredTime);
_bloodSugarValueController.text = widget.bloodSugarValue;
+ validateForm();
}
}
@@ -96,40 +98,44 @@ class _AddBloodSugarPageState extends State {
appBarTitle: widget.isUpdate
? TranslationBase.of(context).update
: TranslationBase.of(context).add,
- appBarIcons: widget.isUpdate?[
- IconButton(
- icon: Icon(Icons.delete),
- color: Colors.white,
- onPressed: () {
- ConfirmDialog dialog = new ConfirmDialog(
- context: context,
- confirmMessage: 'Remove this measure',
- okText: TranslationBase.of(context).ok,
- cancelText: TranslationBase.of(context).cancel,
- okFunction: () async {
- ConfirmDialog.closeAlertDialog(context);
+ appBarIcons: widget.isUpdate
+ ? [
+ IconButton(
+ icon: Icon(Icons.delete),
+ color: Colors.white,
+ onPressed: () {
+ ConfirmDialog dialog = new ConfirmDialog(
+ context: context,
+ confirmMessage: 'Remove this measure',
+ okText: TranslationBase.of(context).ok,
+ cancelText: TranslationBase.of(context).cancel,
+ okFunction: () async {
+ ConfirmDialog.closeAlertDialog(context);
- GifLoaderDialogUtils.showMyDialog(context);
- widget.bloodSugarViewMode
- .deactivateDiabeticStatus(lineItemNo: widget.lineItemNo)
- .then((value) {
- GifLoaderDialogUtils.hideDialog(context);
- if (widget.bloodSugarViewMode.state == ViewState.ErrorLocal)
- AppToast.showErrorToast(
- message: widget.bloodSugarViewMode.error);
- else
- Navigator.pop(context);
- }).catchError((e) {
- GifLoaderDialogUtils.hideDialog(context);
- AppToast.showErrorToast(
- message: widget.bloodSugarViewMode.error);
- });
+ GifLoaderDialogUtils.showMyDialog(context);
+ widget.bloodSugarViewMode
+ .deactivateDiabeticStatus(
+ lineItemNo: widget.lineItemNo)
+ .then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (widget.bloodSugarViewMode.state ==
+ ViewState.ErrorLocal)
+ AppToast.showErrorToast(
+ message: widget.bloodSugarViewMode.error);
+ else
+ Navigator.pop(context);
+ }).catchError((e) {
+ GifLoaderDialogUtils.hideDialog(context);
+ AppToast.showErrorToast(
+ message: widget.bloodSugarViewMode.error);
+ });
+ },
+ cancelFunction: () => {});
+ dialog.showAlertDialog(context);
},
- cancelFunction: () => {});
- dialog.showAlertDialog(context);
- },
- )
- ]:null,
+ )
+ ]
+ : null,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
@@ -143,6 +149,7 @@ class _AddBloodSugarPageState extends State {
hintText: TranslationBase.of(context).sugarAdd,
controller: _bloodSugarValueController,
keyboardType: TextInputType.number,
+ onChanged: (value) => validateForm(),
),
SizedBox(
height: 8,
@@ -274,6 +281,7 @@ class _AddBloodSugarPageState extends State {
child: SecondaryButton(
label: TranslationBase.of(context).save.toUpperCase(),
textColor: Colors.white,
+ color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
onTap: () {
if (_bloodSugarValueController.text.isNotEmpty) {
if (widget.isUpdate) {
@@ -289,7 +297,8 @@ class _AddBloodSugarPageState extends State {
_bloodSugarValueController.text.toString())
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
- if (widget.bloodSugarViewMode.state == ViewState.ErrorLocal)
+ if (widget.bloodSugarViewMode.state ==
+ ViewState.ErrorLocal)
AppToast.showErrorToast(
message: widget.bloodSugarViewMode.error);
else
@@ -360,4 +369,16 @@ class _AddBloodSugarPageState extends State {
),
);
}
+
+ void validateForm() {
+ if (_bloodSugarValueController.text.length > 0) {
+ setState(() {
+ isButtonDisabled = true;
+ });
+ } else {
+ setState(() {
+ isButtonDisabled = false;
+ });
+ }
+ }
}
diff --git a/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart b/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart
index 842d55f1..2f654526 100644
--- a/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart
+++ b/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart
@@ -17,8 +17,7 @@ class BloodYearPage extends StatelessWidget {
final List diabtecPatientResult;
final List timeSeriesData;
- const BloodYearPage({Key key, this.diabtecPatientResult, this.timeSeriesData})
- : super(key: key);
+ const BloodYearPage({Key key, this.diabtecPatientResult, this.timeSeriesData}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -38,7 +37,7 @@ class BloodYearPage extends StatelessWidget {
child: LineChartCurved(
title: 'Sugar',
timeSeries: timeSeriesData,
- indexes: timeSeriesData.length ~/ 5.5,
+ indexes: timeSeriesData.length ~/ 5.5 ?? 0,
)),
SizedBox(
height: 12,
@@ -55,8 +54,7 @@ class BloodYearPage extends StatelessWidget {
children: [
Table(
border: TableBorder.symmetric(
- inside:
- BorderSide(width: 2.0, color: Colors.grey[300]),
+ inside: BorderSide(width: 2.0, color: Colors.grey[300]),
),
children: fullData(context, projectViewModel),
),
@@ -68,8 +66,7 @@ class BloodYearPage extends StatelessWidget {
);
}
- List fullData(
- BuildContext context, ProjectViewModel projectViewModel) {
+ List fullData(BuildContext context, ProjectViewModel projectViewModel) {
List tableRow = [];
tableRow.add(
TableRow(
@@ -79,12 +76,8 @@ class BloodYearPage extends StatelessWidget {
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
- topLeft: projectViewModel.isArabic
- ? Radius.circular(0.0)
- : Radius.circular(10.0),
- topRight: projectViewModel.isArabic
- ? Radius.circular(10.0)
- : Radius.circular(0.0),
+ topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
+ topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
),
),
child: Center(
@@ -130,12 +123,8 @@ class BloodYearPage extends StatelessWidget {
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
- topLeft: projectViewModel.isArabic
- ? Radius.circular(10.0)
- : Radius.circular(0.0),
- topRight: projectViewModel.isArabic
- ? Radius.circular(0.0)
- : Radius.circular(10.0),
+ topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
+ topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
),
),
child: Center(
diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart
index 60f3293d..328ac246 100644
--- a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart
+++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart
@@ -31,42 +31,47 @@ class BloodSugarWeeklyPage extends StatelessWidget {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
- body:timeSeriesData.isEmpty?Container(child: Center(child: Texts(TranslationBase.of(context).noDataAvailable),),): ListView(
- children: [
- Container(
- margin: EdgeInsets.only(top: 12, left: 8, right: 8),
- color: Colors.white,
- child: LineChartCurved(
- title: 'Sugar',
- timeSeries: timeSeriesData,
- indexes: timeSeriesData.length ~/ 5.5,
- ),
- ),
- SizedBox(
- height: 12,
- ),
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: Texts(TranslationBase.of(context).details),
- ),
- Container(
- padding: EdgeInsets.all(10),
- color: Colors.transparent,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Table(
- border: TableBorder.symmetric(
- inside: BorderSide(width: 2.0, color: Colors.grey[300]),
+ body: timeSeriesData.isEmpty
+ ? Container(
+ child: Center(
+ child: Texts(TranslationBase.of(context).noDataAvailable),
+ ),
+ )
+ : ListView(
+ children: [
+ Container(
+ margin: EdgeInsets.only(top: 12, left: 8, right: 8),
+ color: Colors.white,
+ child: LineChartCurved(
+ title: 'Sugar',
+ timeSeries: timeSeriesData,
+ indexes: timeSeriesData.length ~/ 5.5,
),
- children:
- fullData(context, projectViewModel, bloodSugarViewMode),
),
+ SizedBox(
+ height: 12,
+ ),
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Texts(TranslationBase.of(context).details),
+ ),
+ Container(
+ padding: EdgeInsets.all(10),
+ color: Colors.transparent,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Table(
+ border: TableBorder.symmetric(
+ inside: BorderSide(width: 2.0, color: Colors.grey[300]),
+ ),
+ children: fullData(context, projectViewModel, bloodSugarViewMode),
+ ),
+ ],
+ ),
+ )
],
),
- )
- ],
- ),
);
}
diff --git a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart
index eeff06dd..70f10407 100644
--- a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart
+++ b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart
@@ -184,7 +184,7 @@ class LineChartCurved extends StatelessWidget {
}
double getMinY() {
- double min = timeSeries[0].sales;
+ double min = timeSeries.isEmpty ? 0 : timeSeries.first.sales;
timeSeries.forEach((element) {
double resultValueDouble = element.sales;
if (resultValueDouble < min) min = resultValueDouble;
diff --git a/lib/pages/medical/reports/monthly_reports.dart b/lib/pages/medical/reports/monthly_reports.dart
index 4484bd5f..80f6ac76 100644
--- a/lib/pages/medical/reports/monthly_reports.dart
+++ b/lib/pages/medical/reports/monthly_reports.dart
@@ -19,15 +19,24 @@ class MonthlyReportsPage extends StatefulWidget {
}
class _MonthlyReportsPageState extends State {
- bool isAgree = false;
- bool isSummary = false;
- String email = "";
+ bool isAgree;
+ bool isSummary;
+ String email;
final formKey = GlobalKey();
@override
Widget build(BuildContext context) {
- return BaseView(
- builder: (_, model, w) => AppScaffold(
+ return BaseView(builder: (_, model, w) {
+ if (isSummary == null) {
+ isSummary = model.receiveHealthSummaryReport;
+ }
+ if (isAgree == null) {
+ isAgree = model.receiveHealthSummaryReport;
+ }
+ if (email == null) {
+ email = model?.user?.emailAddress ?? "";
+ }
+ return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports,
body: SingleChildScrollView(
@@ -41,15 +50,10 @@ class _MonthlyReportsPageState extends State {
Container(
padding: EdgeInsets.all(9),
height: 55,
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.all(Radius.circular(8)),
- shape: BoxShape.rectangle,
- border: Border.all(color: Colors.grey)),
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(8)), shape: BoxShape.rectangle, border: Border.all(color: Colors.grey)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
-
Texts(
TranslationBase.of(context).patientHealthSummaryReport,
bold: true,
@@ -62,12 +66,12 @@ class _MonthlyReportsPageState extends State {
setState(() {
isSummary = !isSummary;
});
- if(!isSummary) {
+ if (!isSummary) {
GifLoaderDialogUtils.showMyDialog(context);
- await model.updatePatientHealthSummaryReport(
- message: TranslationBase
- .of(context)
- .updateSuccessfully, isSummary: isSummary);
+ await model.updatePatientHealthSummaryReport(message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary);
+ model.receiveHealthSummaryReport = isSummary;
+ isAgree = isSummary;
+ model.user.emailAddress = "";
GifLoaderDialogUtils.hideDialog(context);
}
},
@@ -80,11 +84,11 @@ class _MonthlyReportsPageState extends State {
),
Container(
margin: EdgeInsets.all(8),
- child: TextFields(
+ child: TextFields(
fillColor: Colors.red,
hintText: 'email@email.com',
fontSize: 20,
- initialValue: model.user.emailAddress,
+ initialValue: email,
fontWeight: FontWeight.w600,
onChanged: (text) {
email = text;
@@ -111,8 +115,7 @@ class _MonthlyReportsPageState extends State {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
- child: Texts(TranslationBase.of(context)
- .toViewTheTermsAndConditions),
+ child: Texts(TranslationBase.of(context).toViewTheTermsAndConditions),
),
InkWell(
onTap: () {
@@ -156,19 +159,15 @@ class _MonthlyReportsPageState extends State {
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).save,
- disabled: (!isAgree || !isSummary ),
+ disabled: (!isAgree || !isSummary),
onTap: () async {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
- message: TranslationBase
- .of(context)
- .updateSuccessfully,
- isSummary: isSummary,
- isUpdateEmail: true,
- email: email.isNotEmpty ? email : model.user
- .emailAddress);
+ message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary, isUpdateEmail: true, email: email.isNotEmpty ? email : model.user.emailAddress);
+ model.receiveHealthSummaryReport = isSummary;
+ model.user.emailAddress = email.isNotEmpty ? email : model.user.emailAddress;
GifLoaderDialogUtils.hideDialog(context);
}
},
@@ -177,8 +176,7 @@ class _MonthlyReportsPageState extends State {
Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
- TranslationBase.of(context)
- .instructionAgree,
+ TranslationBase.of(context).instructionAgree,
fontWeight: FontWeight.normal,
),
),
@@ -191,7 +189,7 @@ class _MonthlyReportsPageState extends State {
),
),
),
- ),
- );
+ );
+ });
}
}
diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart
index 72d0422b..922fb239 100644
--- a/lib/pages/medical/reports/report_list_widget.dart
+++ b/lib/pages/medical/reports/report_list_widget.dart
@@ -61,15 +61,13 @@ class ReportListWidget extends StatelessWidget {
),
Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription),
- Texts(TranslationBase.of(context).invoiceNo +
- ': ${reportList[index].invoiceNo}'),
+ Texts(TranslationBase.of(context).invoiceNo + ': ${reportList[index].invoiceNo}'),
SizedBox(height: 12),
],
),
reportList[index].status == 2
? Container(
- margin:
- EdgeInsets.only(left: 15.0, right: 15.0),
+ margin: EdgeInsets.only(left: 15.0, right: 15.0),
child: InkWell(
onTap: () {
showConfirmMessage(reportList[index]);
@@ -78,7 +76,7 @@ class ReportListWidget extends StatelessWidget {
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
- size: 35.0,
+ size: 30.0,
),
),
)
@@ -123,8 +121,7 @@ class ReportListWidget extends StatelessWidget {
report.setupId)
.then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
- AppToast.showSuccessToast(
- message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully);
+ AppToast.showSuccessToast(message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(err);
diff --git a/lib/pages/settings/general_setting.dart b/lib/pages/settings/general_setting.dart
index 0a6b0e73..eff9537a 100644
--- a/lib/pages/settings/general_setting.dart
+++ b/lib/pages/settings/general_setting.dart
@@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
import 'package:screen/screen.dart';
@@ -27,10 +28,11 @@ class _GeneralSettings extends State
bool location = false;
var sharedPref = new AppSharedPreferences();
var permission = new PermissionService();
+ LocationPermission locationPermission;
var mediaQueryData;
@override
void initState() {
- getValues();
+ this.getValues();
super.initState();
}
@@ -80,7 +82,6 @@ class _GeneralSettings extends State
setState(() {
accsibility = value;
});
- //setAccisibility(value);
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
@@ -199,6 +200,7 @@ class _GeneralSettings extends State
setState(() {
camera = value;
});
+ this.permission.openSettings();
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
@@ -215,9 +217,12 @@ class _GeneralSettings extends State
Switch(
value: location,
onChanged: (value) {
- setState(() {
- location = value;
- });
+ if (value == true) {
+ Navigator.pop(context);
+ this.setLocationPermission();
+ } else {
+ Geolocator.openLocationSettings();
+ }
},
activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green,
@@ -227,6 +232,23 @@ class _GeneralSettings extends State
]));
}
+ setLocationPermission() async {
+ locationPermission = await Geolocator.checkPermission();
+ if (locationPermission == LocationPermission.denied) {
+ locationPermission = await Geolocator.requestPermission();
+ if (locationPermission != LocationPermission.denied) {
+ setState(() {
+ location = true;
+ });
+ } else {
+ this.location = false;
+ }
+ } else {
+ Geolocator.openLocationSettings();
+ this.location = true;
+ }
+ }
+
setTheme(value) async {
switch (value) {
case 0:
@@ -277,20 +299,30 @@ class _GeneralSettings extends State
vibration = permission.isVibrationEnabled() == null
? false
: permission.isVibrationEnabled();
- accsibility = mediaQueryData.accessibleNavigation;
- setTheme(blindValue);
+ // accsibility = mediaQueryData.accessibleNavigation;
+ //setTheme(blindValue);
}
+ var camera = await this.permission.isCameraEnabled();
+ var location = await this.permission.isLocationEnabled();
+ setState(() {
+ this.camera = camera;
+ this.location = location;
+ });
}
getTheme(value) async {
if (value == 1) {
return invertThemes(
- fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'WorkSans'
- );
+ fontName:
+ Provider.of(context, listen: false).isArabic
+ ? 'Cairo'
+ : 'WorkSans');
} else if (value == 3) {
return bwThemes(
- fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'WorkSans'
- );
+ fontName:
+ Provider.of(context, listen: false).isArabic
+ ? 'Cairo'
+ : 'WorkSans');
} else {
return defaultTheme(
fontName:
diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart
index 833cdf2b..d877514c 100644
--- a/lib/pages/settings/profile_setting.dart
+++ b/lib/pages/settings/profile_setting.dart
@@ -44,7 +44,7 @@ class _ProfileSettings extends State
child: model.user != null
? ListView(scrollDirection: Axis.vertical, children: [
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.all(15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -74,7 +74,7 @@ class _ProfileSettings extends State
padding: EdgeInsets.all(10),
),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
@@ -93,7 +93,7 @@ class _ProfileSettings extends State
],
)),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
@@ -116,7 +116,7 @@ class _ProfileSettings extends State
padding: EdgeInsets.all(10),
),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
@@ -136,7 +136,7 @@ class _ProfileSettings extends State
],
)),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Row(
@@ -160,7 +160,7 @@ class _ProfileSettings extends State
padding: EdgeInsets.all(10),
),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Column(
@@ -175,7 +175,7 @@ class _ProfileSettings extends State
],
)),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Column(
@@ -190,7 +190,7 @@ class _ProfileSettings extends State
],
)),
Container(
- color: Theme.of(context).primaryColor,
+ color: Theme.of(context).textTheme.headline2.color,
padding: EdgeInsets.only(
top: 0, left: 10, right: 10, bottom: 0),
child: Column(
diff --git a/lib/services/family_files/family_files_provider.dart b/lib/services/family_files/family_files_provider.dart
index 7a2dec81..8238a35b 100644
--- a/lib/services/family_files/family_files_provider.dart
+++ b/lib/services/family_files/family_files_provider.dart
@@ -259,7 +259,7 @@ class FamilyFilesProvider with ChangeNotifier {
var currentUser =
AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER));
//const request = new SwitchUserRequest();
- request['LogInTokenID'] = '';
+ // request['LogInTokenID'] = '';
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['PatientMobileNumber'] =
currentUser.mobileNumber; //['MobileNumber'];
@@ -276,7 +276,7 @@ class FamilyFilesProvider with ChangeNotifier {
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
//const request = new SwitchUserRequest();
- request['LogInTokenID'] = '';
+ // request['LogInTokenID'] = '';
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['PatientMobileNumber'] =
switchUser.mobileNumber; //['MobileNumber'];
diff --git a/lib/services/permission/permission_service.dart b/lib/services/permission/permission_service.dart
index ea408ce2..d88ec599 100644
--- a/lib/services/permission/permission_service.dart
+++ b/lib/services/permission/permission_service.dart
@@ -10,9 +10,12 @@ import 'package:flutter/services.dart';
import 'package:localstorage/localstorage.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:vibration/vibration.dart';
+import 'package:geolocator/geolocator.dart' as geo;
+// import 'package:open_settings/open_settings.dart';
+
class PermissionService extends BaseService {
final LocalStorage storage = new LocalStorage("permission");
-
+ geo.LocationPermission locationPermission;
AppGlobal appGlobal = new AppGlobal();
setVibrationPermission(flag) async {
@@ -20,23 +23,24 @@ class PermissionService extends BaseService {
}
isVibrationEnabled() {
- return (storage.getItem('isVibration') ==null) || (storage.getItem('isVibration')) ==false ? false :true;
+ return (storage.getItem('isVibration') == null) ||
+ (storage.getItem('isVibration')) == false
+ ? false
+ : true;
}
- vibrate(callback, context) async{
- if (callback == null)
- return null;
- if(isVibrationEnabled() ==true){
- if (await Vibration.hasVibrator()) {
- Vibration.vibrate(duration: 100);
- callback();
+ vibrate(callback, context) async {
+ if (callback == null) return null;
+ if (isVibrationEnabled() == true) {
+ if (await Vibration.hasVibrator()) {
+ Vibration.vibrate(duration: 100);
+ callback();
}
- }else{
+ } else {
callback();
}
}
-
setTheme(flag) async {
storage.setItem('isTheme', flag);
}
@@ -44,23 +48,36 @@ class PermissionService extends BaseService {
isThemeEnabled() {
return storage.getItem('isTheme');
}
- cameraPermission() async{
- Map statuses = await [
- Permission.camera,
- ].request();
- }
- isCameraEnabled() async{
- print(await Permission.camera.status);
- return await Permission.camera.status == PermissionStatus.granted ? true : false;
+
+ cameraPermission() async {
+ Map statuses = await [
+ Permission.camera,
+ ].request();
+ }
+
+ isCameraEnabled() async {
+ return await Permission.camera.isGranted;
}
- setCameraLocationPermission(context) async{
+
+ setCameraLocationPermission(context) async {
Navigator.pop(context);
openAppSettings();
}
- isLocationEnabled() async{
- return await Permission.location.status == PermissionStatus.granted ? true : false;
+
+ isLocationEnabled() async {
+ var permission = await geo.Geolocator.checkPermission();
+ if (permission == geo.LocationPermission.denied) {
+ return false;
+ } else {
+ return true;
+ }
}
- openSettings() async{
+
+ openSettings() async {
openAppSettings();
}
+
+ openAccessbility() {
+ // OpenSettings.openAppSetting();
+ }
}
diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart
index 9f959885..b5d5ab59 100644
--- a/lib/uitl/date_uitl.dart
+++ b/lib/uitl/date_uitl.dart
@@ -393,7 +393,6 @@ class DateUtil {
break;
case DayOfWeek.Sunday:
return "Sunday";
-
break;
}
return "";
diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart
index f8489768..c86012f2 100644
--- a/lib/uitl/translations_delegate_base.dart
+++ b/lib/uitl/translations_delegate_base.dart
@@ -754,8 +754,10 @@ class TranslationBase {
String get shippedMethod =>
localizedValues['shippedMethod'][locale.languageCode];
String get orderDetail => localizedValues['orderDetail'][locale.languageCode];
- String get deliveryDriverTrack => localizedValues['DeliveryDriverTrack'][locale.languageCode];
- String get deliveryLocation => localizedValues['DeliveryLocation'][locale.languageCode];
+ String get deliveryDriverTrack =>
+ localizedValues['DeliveryDriverTrack'][locale.languageCode];
+ String get deliveryLocation =>
+ localizedValues['DeliveryLocation'][locale.languageCode];
String get driver => localizedValues['Driver'][locale.languageCode];
String get subtotal => localizedValues['subtotal'][locale.languageCode];
String get shipping => localizedValues['shipping'][locale.languageCode];
@@ -1038,6 +1040,9 @@ class TranslationBase {
localizedValues['ItemInSearch'][locale.languageCode];
String get bloodDonation =>
localizedValues['blood-donation'][locale.languageCode];
+ String get bloodDonationInfo =>
+ localizedValues['blood-donation-info'][locale.languageCode];
+
String get bloodInstruction =>
localizedValues['blood-instruction'][locale.languageCode];
String get bloodTermsNcondition =>
@@ -1562,14 +1567,17 @@ class TranslationBase {
localizedValues["submitncontinue"][locale.languageCode];
String get areyousure => localizedValues["areyousure"][locale.languageCode];
-
// Offer And Packahes
- String get subT=> localizedValues['OffersAndPackages'][locale.languageCode];
- String get totalWithColonRight => localizedValues['totalWithColonRight'][locale.languageCode];
+ String get subT => localizedValues['OffersAndPackages'][locale.languageCode];
+ String get totalWithColonRight =>
+ localizedValues['totalWithColonRight'][locale.languageCode];
String get preferredunit =>
localizedValues["preferredunit"][locale.languageCode];
String get trySaying => localizedValues["try-saying"][locale.languageCode];
+ String get somethingWentWrong =>
+ localizedValues["somethingWentWrong"][locale.languageCode];
+
String get enterIdentificationNumber =>
localizedValues["enterIdentificationNumber"][locale.languageCode];
String get accountActivationDesc =>
@@ -1609,11 +1617,17 @@ class TranslationBase {
String get insuranceID =>
localizedValues["insurance-id"][locale.languageCode];
String get enterFile => localizedValues["enter-file"][locale.languageCode];
- String get enterReferralRequesterName => localizedValues["enterReferralRequesterName"][locale.languageCode];
- String get selectRelationship => localizedValues["selectRelationship"][locale.languageCode];
- String get requesterRelationship => localizedValues["requesterRelationship"][locale.languageCode];
+ String get allow => localizedValues["allow"][locale.languageCode];
+ String get reject => localizedValues["reject"][locale.languageCode];
+ String get enterReferralRequesterName =>
+ localizedValues["enterReferralRequesterName"][locale.languageCode];
+ String get selectRelationship =>
+ localizedValues["selectRelationship"][locale.languageCode];
+ String get requesterRelationship =>
+ localizedValues["requesterRelationship"][locale.languageCode];
String get newReferral => localizedValues["newReferral"][locale.languageCode];
- String get searchForReferrals => localizedValues["searchForReferrals"][locale.languageCode];
+ String get searchForReferrals =>
+ localizedValues["searchForReferrals"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate {
diff --git a/lib/widgets/LoadingButton.dart b/lib/widgets/LoadingButton.dart
index 46983903..6924bd44 100644
--- a/lib/widgets/LoadingButton.dart
+++ b/lib/widgets/LoadingButton.dart
@@ -62,21 +62,21 @@ class _AnimatedButtonState extends State
_buttonOpacityAnimation =
Tween(begin: 1.0, end: 0.0).animate(CurvedAnimation(
- parent: widget.controller,
- curve: Threshold(.65),
- ));
+ parent: widget.controller,
+ curve: Threshold(.65),
+ ));
_ringThicknessAnimation =
Tween(begin: _loadingCircleRadius, end: _loadingCircleThickness)
.animate(CurvedAnimation(
- parent: widget.controller,
- curve: Interval(.65, .85),
- ));
+ parent: widget.controller,
+ curve: Interval(.65, .85),
+ ));
_ringOpacityAnimation =
Tween(begin: 1.0, end: 0.0).animate(CurvedAnimation(
- parent: widget.controller,
- curve: Interval(.85, 1.0),
- ));
+ parent: widget.controller,
+ curve: Interval(.85, 1.0),
+ ));
widget.controller.addStatusListener(handleStatusChanged);
}
@@ -161,7 +161,9 @@ class _AnimatedButtonState extends State
// button width is min 120.0 and max 240.0
_width = textWidth > 120.0 && textWidth < 240.0
? textWidth
- : textWidth >= 240.0 ? 240.0 : 120.0;
+ : textWidth >= 240.0
+ ? 240.0
+ : 120.0;
_sizeAnimation = Tween(begin: 1.0, end: _height / _width)
.animate(CurvedAnimation(
@@ -191,13 +193,14 @@ class _AnimatedButtonState extends State
animation: _colorAnimation,
builder: (context, child) => Material(
shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(_height/2)
- ),
+ borderRadius: BorderRadius.circular(_height / 2)),
color: _colorAnimation.value,
child: child,
shadowColor: _color,
elevation: !_isLoading
- ? (_hover ? buttonTheme.highlightElevation : buttonTheme.elevation)
+ ? (_hover
+ ? buttonTheme.highlightElevation
+ : buttonTheme.elevation)
: 0,
),
child: InkWell(
@@ -279,15 +282,14 @@ class Ring extends StatelessWidget {
child: thickness == 0
? null
: CircularProgressIndicator(
- valueColor: AlwaysStoppedAnimation(color),
- strokeWidth: thickness,
- value: value,
- ),
+ valueColor: AlwaysStoppedAnimation(color),
+ strokeWidth: thickness,
+ value: value,
+ ),
);
}
}
-
enum AnimatedTextRotation { up, down }
/// https://medium.com/flutter-community/flutter-challenge-3d-bottom-navigation-bar-48952a5fd996
@@ -319,7 +321,6 @@ class _AnimatedTextState extends State
double get radius => _layoutHeight / 2;
-
@override
void initState() {
super.initState();
@@ -370,7 +371,7 @@ class _AnimatedTextState extends State
if (kIsWeb) {
return Matrix4.identity();
}
- return Matrix4.identity()..setEntry(3, 2, .006);
+ return Matrix4.identity()..setEntry(3, 2, .006);
}
Matrix4 _getFrontSideUp(double value) {
@@ -452,12 +453,14 @@ class _AnimatedTextState extends State
);
}
-
// Helpers
double toRadian(double degree) => degree * pi / 180;
- double lerp(double start, double end, double percent) => (start + percent * (end - start));
+
+ double lerp(double start, double end, double percent) =>
+ (start + percent * (end - start));
+
Size getWidgetSize(GlobalKey key) {
final RenderBox renderBox = key.currentContext?.findRenderObject();
return renderBox?.size;
}
-}
\ No newline at end of file
+}
diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart
index f33e9dd5..efca856b 100644
--- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart
+++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart
@@ -21,7 +21,8 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class BottomNavBar extends StatefulWidget {
final ValueChanged changeIndex;
final int index;
- BottomNavBar({Key key, this.changeIndex, this.index}) : super(key: key);
+ final bool showHomeIcon;
+ BottomNavBar({Key key, this.changeIndex, this.index, this.showHomeIcon = false}) : super(key: key);
@override
_BottomNavBarState createState() => _BottomNavBarState();
@@ -33,7 +34,7 @@ class _BottomNavBarState extends State {
var event = RobotProvider();
_changeIndex(int index) async {
widget.changeIndex(index);
- if (_index == 0) {
+ if (index == 0) {
event.setValue({'isRobotVisible': 'true'});
}
}
@@ -72,16 +73,27 @@ class _BottomNavBarState extends State {
),
if (widget.index == 0)
Expanded(
- child: SizedBox(
- height: 50,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- SizedBox(height: 22),
- ],
- ),
- ),
+ child: (widget.showHomeIcon)
+ ? SizedBox(
+ child: BottomNavigationItem(
+ icon: Icons.home_outlined,
+ activeIcon: Icons.home_outlined,
+ changeIndex: _changeIndex,
+ index: widget.index,
+ currentIndex: 2,
+ name: TranslationBase.of(context).home,
+ ),
+ )
+ : SizedBox(
+ height: 50,
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SizedBox(height: 22),
+ ],
+ ),
+ ),
),
if (widget.index != 0 && projectViewModel.havePrivilege(34))
BottomNavigationItem(
diff --git a/lib/widgets/charts/app_bar_chart.dart b/lib/widgets/charts/app_bar_chart.dart
index 439d5ae9..818de33f 100644
--- a/lib/widgets/charts/app_bar_chart.dart
+++ b/lib/widgets/charts/app_bar_chart.dart
@@ -4,10 +4,12 @@ import 'package:charts_flutter/flutter.dart' as charts;
class AppBarChart extends StatelessWidget {
const AppBarChart({
Key key,
+ @required this.isArabic,
@required this.seriesList,
}) : super(key: key);
final List seriesList;
+ final bool isArabic;
@override
Widget build(BuildContext context) {
@@ -19,7 +21,7 @@ class AppBarChart extends StatelessWidget {
// animate: animate,
domainAxis: charts.OrdinalAxisSpec(
renderSpec: charts.GridlineRendererSpec(
- labelAnchor: charts.TickLabelAnchor.after,
+ labelAnchor: isArabic ? charts.TickLabelAnchor.before : charts.TickLabelAnchor.after,
labelRotation: -30,
labelOffsetFromAxisPx: 30,
labelOffsetFromTickPx: 15,
diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart
index 5192e0f0..283c559f 100644
--- a/lib/widgets/drawer/app_drawer_widget.dart
+++ b/lib/widgets/drawer/app_drawer_widget.dart
@@ -309,7 +309,7 @@ class _AppDrawerState extends State {
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
- AppText(TranslationBase.of(context).fileno + ": " + result.patientID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
+ AppText(TranslationBase.of(context).fileno + ": " + result.responseID.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
]))),
],
)))
diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart
index ca72e267..64dd8c27 100644
--- a/lib/widgets/others/app_scaffold_widget.dart
+++ b/lib/widgets/others/app_scaffold_widget.dart
@@ -58,8 +58,7 @@ class AppScaffold extends StatelessWidget {
final List appBarIcons;
final List imagesInfo;
final bool isHelp;
- AuthenticatedUserObject authenticatedUserObject =
- locator();
+ AuthenticatedUserObject authenticatedUserObject = locator();
AppBarWidget appBar;
AppScaffold(
@@ -130,6 +129,7 @@ class AppScaffold extends StatelessWidget {
)
: buildBodyWidget(context),
),
+ floatingActionButton: floatingActionButton,
);
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 34ac3656..c86b4a59 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -162,7 +162,7 @@ dependencies:
# recase: ^3.0.0
wakelock: ^0.1.4
after_layout: ^1.0.7
- twilio_programmable_video: ^0.5.0+3
+ twilio_programmable_video: ^0.6.2
cached_network_image: ^2.4.1
flutter_tts:
path: flutter_tts-voice_enhancement
@@ -176,7 +176,7 @@ dependencies:
path: speech_to_text
badges: ^1.1.4
-
+# open_settings: ^2.0.1
# Dep by Zohaib
shimmer: ^1.1.2
carousel_slider: ^2.3.1