diff --git a/android/app/build.gradle b/android/app/build.gradle
index bdabb828..965934fd 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -21,6 +21,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
+def keystoreProperties = new Properties()
+def keystorePropertiesFile = rootProject.file('key.properties')
+if (keystorePropertiesFile.exists()) {
+ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+}
+
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'kotlin-android'
@@ -51,29 +57,29 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ejada.hmg"
minSdkVersion 21
- targetSdkVersion 30
+ targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
signingConfigs {
- config{
- storeFile file('key')
- keyAlias 'hmg'
- storePassword 'HmGsa123'
- keyPassword 'HmGsa123'
+ release {
+ keyAlias keystoreProperties['keyAlias']
+ keyPassword keystoreProperties['keyPassword']
+ storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
+ storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
debuggable true
- signingConfig signingConfigs.config
+ signingConfig signingConfigs.release
}
release {
debuggable false
- signingConfig signingConfigs.config
+ signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@@ -127,10 +133,11 @@ dependencies {
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android
implementation 'com.google.android.gms:play-services-basement:17.5.0'
- implementation "com.opentok.android:opentok-android-sdk:2.19.1"
+ implementation "com.opentok.android:opentok-android-sdk:2.21.4"
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation 'com.facebook.stetho:stetho-urlconnection:1.5.1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
+ androidTestImplementation "androidx.test:core:1.4.0"
}
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index ab5e631b..6c937f09 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -4,4 +4,4 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
-
+
\ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index e6601b40..ef4a8f83 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -34,9 +34,9 @@
-
+
-
+
@@ -49,7 +49,6 @@
android:showOnLockScreen="true"
android:screenOrientation="sensorPortrait"
android:allowBackup="false"
- tools:replace="android:allowBackup,android:label"
android:label="Dr. Alhabib">
@@ -89,23 +88,23 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
@@ -117,20 +116,19 @@
Huawei Push Notifications
Set push kit auto enable to true (for obtaining the token on initialize)
-->
-
+
+
+
-
+
-
+ android:enabled="true"
+ android:exported="false" />
-
-
-
-
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt
index 2820daae..2ed2daf4 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceBroadcastReceiver.kt
@@ -1,7 +1,6 @@
-
-
package com.ejada.hmg.geofence.intent_receivers
+import android.annotation.SuppressLint
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
@@ -13,37 +12,60 @@ import com.google.android.gms.location.GeofenceStatusCodes
import com.google.android.gms.location.GeofencingEvent
class GeofenceBroadcastReceiver : BroadcastReceiver() {
- private val LOG_TAG = "GeofenceBroadcastReceiver"
- override fun onReceive(context: Context, intent: Intent) {
-
- val geofencingEvent = GeofencingEvent.fromIntent(intent)
- if (geofencingEvent.hasError()) {
- val errorMessage = GeofenceErrorMessages.getErrorString(context, geofencingEvent.errorCode)
- Log.e(LOG_TAG, errorMessage)
-
- Logs.GeofenceEvent.save(context,LOG_TAG,"Error while triggering geofence event",Logs.STATUS.ERROR)
- doReRegisterIfRequired(context,geofencingEvent.errorCode)
-
- return
- }
+ private val LOG_TAG = "GeofenceBroadcastReceiver"
+
+ @SuppressLint("LongLogTag")
+ override fun onReceive(context: Context, intent: Intent) {
+
+ val geofencingEvent = GeofencingEvent.fromIntent(intent)
+ if (geofencingEvent != null) {
+ if (geofencingEvent.hasError()) {
+ val errorMessage =
+ GeofenceErrorMessages.getErrorString(context, geofencingEvent.errorCode)
+ Log.e(LOG_TAG, errorMessage)
- Logs.GeofenceEvent.save(context,LOG_TAG,"Geofence event triggered: ${GeofenceTransition.fromInt(geofencingEvent.geofenceTransition).value} for ${geofencingEvent.triggeringGeofences.map {it.requestId}}",Logs.STATUS.SUCCESS)
- HMG_Geofence.shared(context).handleEvent(geofencingEvent.triggeringGeofences,geofencingEvent.triggeringLocation, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition));
-
- }
+ Logs.GeofenceEvent.save(
+ context,
+ LOG_TAG,
+ "Error while triggering geofence event",
+ Logs.STATUS.ERROR
+ )
+ doReRegisterIfRequired(context, geofencingEvent.errorCode)
- fun doReRegisterIfRequired(context: Context, errorCode: Int){
- val errorRequiredReregister = listOf(
+ return
+ }
+ }
+ if (geofencingEvent != null) {
+ Logs.GeofenceEvent.save(
+ context,
+ LOG_TAG,
+ "Geofence event triggered: ${GeofenceTransition.fromInt(geofencingEvent.geofenceTransition).value} for ${geofencingEvent.triggeringGeofences?.map { it.requestId }}",
+ Logs.STATUS.SUCCESS
+ )
+ geofencingEvent.triggeringLocation?.let {
+ geofencingEvent.triggeringGeofences?.let { it1 ->
+ HMG_Geofence.shared(context).handleEvent(
+ it1,
+ it, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition)
+ )
+ }
+ }
+ };
+
+ }
+
+ fun doReRegisterIfRequired(context: Context, errorCode: Int) {
+ val errorRequiredReregister = listOf(
GeofenceStatusCodes.GEOFENCE_NOT_AVAILABLE,
GeofenceStatusCodes.GEOFENCE_TOO_MANY_GEOFENCES,
GeofenceStatusCodes.GEOFENCE_TOO_MANY_PENDING_INTENTS,
GeofenceStatusCodes.GEOFENCE_REQUEST_TOO_FREQUENT
- )
+ )
- if(errorRequiredReregister.contains(errorCode))
- HMG_Geofence.shared(context).register(){ status, error ->
+ if (errorRequiredReregister.contains(errorCode))
+ HMG_Geofence.shared(context).register() { status, error ->
- }
+ }
- }
+ }
}
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt
index 21090f0f..b083e04e 100644
--- a/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt
+++ b/android/app/src/main/kotlin/com/cloud/diplomaticquarterapp/geofence/intent_receivers/GeofenceTransitionsJobIntentService.kt
@@ -59,18 +59,25 @@ class GeofenceTransitionsJobIntentService : JobIntentService() {
override fun onHandleWork(intent: Intent) {
val geofencingEvent = GeofencingEvent.fromIntent(intent)
- if (geofencingEvent.hasError()) {
- val errorMessage = GeofenceErrorMessages.getErrorString(context_!!, geofencingEvent.errorCode)
- Log.e(LOG_TAG, errorMessage)
+ if (geofencingEvent != null) {
+ if (geofencingEvent.hasError()) {
+ val errorMessage = GeofenceErrorMessages.getErrorString(context_!!, geofencingEvent.errorCode)
+ Log.e(LOG_TAG, errorMessage)
- saveLog(context_!!,LOG_TAG,errorMessage)
- doReRegisterIfRequired(context_!!, geofencingEvent.errorCode)
+ saveLog(context_!!,LOG_TAG,errorMessage)
+ doReRegisterIfRequired(context_!!, geofencingEvent.errorCode)
- return
- }
+ return
+ }
+ }
- HMG_Geofence.shared(context_!!).handleEvent(geofencingEvent.triggeringGeofences,geofencingEvent.triggeringLocation, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition));
+ if (geofencingEvent != null) {
+ geofencingEvent.triggeringGeofences?.let { geofencingEvent.triggeringLocation?.let { it1 ->
+ HMG_Geofence.shared(context_!!).handleEvent(it,
+ it1, GeofenceTransition.fromInt(geofencingEvent.geofenceTransition))
+ } }
+ };
}
diff --git a/android/build.gradle b/android/build.gradle
index edb27f2a..e723adba 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -11,7 +11,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.0.3'
+ classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
// classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 6e8ae021..1acad296 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index f43f5eaf..5fea0490 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -19,10 +19,10 @@
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; };
76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; };
76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76F2556027F1FFED0062C1CD /* PassKit.framework */; };
- 888788C5457DD4B4291ED407 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBECDFA177FC32F0D92001A8 /* Pods_Runner.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ B40C32A62DF065A3A0414845 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */; };
E91B5396256AAA6500E96549 /* GlobalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538D256AAA6500E96549 /* GlobalHelper.swift */; };
E91B5397256AAA6500E96549 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538E256AAA6500E96549 /* Extensions.swift */; };
E91B5398256AAA6500E96549 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = E91B538F256AAA6500E96549 /* API.swift */; };
@@ -63,7 +63,6 @@
306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = ""; };
306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = ""; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 7339683046E679D7577A50D3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = ""; };
@@ -71,7 +70,9 @@
76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; };
76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; };
76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
+ 7805E271E86E72F39E68ADCC /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -79,9 +80,7 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- C43E6143D6D42F3BF36E6E30 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- DBECDFA177FC32F0D92001A8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- E88A1DAFD417EE86EE2F7F02 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ BC1BA79F1F6E9D7BE59D2AE4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = ""; };
E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; };
E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; };
@@ -100,6 +99,7 @@
E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = ""; };
E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = ""; };
E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = ""; };
+ EBA301C32F4CA9F09D2D7713 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -110,7 +110,7 @@
76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */,
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */,
E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */,
- 888788C5457DD4B4291ED407 /* Pods_Runner.framework in Frameworks */,
+ B40C32A62DF065A3A0414845 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -133,7 +133,7 @@
76F2556027F1FFED0062C1CD /* PassKit.framework */,
76815B26275F381C00E66E94 /* HealthKit.framework */,
E9620804255C2ED100D3A35D /* NetworkExtension.framework */,
- DBECDFA177FC32F0D92001A8 /* Pods_Runner.framework */,
+ 8B99ADD0B93AC14DD8D0BAB0 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "";
@@ -141,9 +141,9 @@
605039E5DDF72C245F9765FE /* Pods */ = {
isa = PBXGroup;
children = (
- C43E6143D6D42F3BF36E6E30 /* Pods-Runner.debug.xcconfig */,
- 7339683046E679D7577A50D3 /* Pods-Runner.release.xcconfig */,
- E88A1DAFD417EE86EE2F7F02 /* Pods-Runner.profile.xcconfig */,
+ EBA301C32F4CA9F09D2D7713 /* Pods-Runner.debug.xcconfig */,
+ 7805E271E86E72F39E68ADCC /* Pods-Runner.release.xcconfig */,
+ BC1BA79F1F6E9D7BE59D2AE4 /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "";
@@ -246,15 +246,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 6CEC06A85A1BC01F415967B9 /* [CP] Check Pods Manifest.lock */,
+ A37FFD337A0067237A8DACD6 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- EB708D648E256F1D924823C6 /* [CP] Embed Pods Frameworks */,
- 1FDB0C9B620EC9533D2358F3 /* [CP] Copy Pods Resources */,
+ E1D6AED972DEFC56AA7DB402 /* [CP] Embed Pods Frameworks */,
+ 541D1D49FBD13BE6BA6DA5BC /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -320,7 +320,21 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 1FDB0C9B620EC9533D2358F3 /* [CP] Copy Pods Resources */ = {
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
+ };
+ 541D1D49FBD13BE6BA6DA5BC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -337,21 +351,21 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
- name = "Thin Binary";
+ name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- 6CEC06A85A1BC01F415967B9 /* [CP] Check Pods Manifest.lock */ = {
+ A37FFD337A0067237A8DACD6 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -373,21 +387,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
- EB708D648E256F1D924823C6 /* [CP] Embed Pods Frameworks */ = {
+ E1D6AED972DEFC56AA7DB402 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -538,7 +538,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 4.5.56;
+ MARKETING_VERSION = 4.5.57;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -682,7 +682,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 4.5.56;
+ MARKETING_VERSION = 4.5.57;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -720,7 +720,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
- MARKETING_VERSION = 4.5.56;
+ MARKETING_VERSION = 4.5.57;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/lib/config/config.dart b/lib/config/config.dart
index a7676855..ca5380d9 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -411,7 +411,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnar
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
-var VERSION_ID = 9.8;
+var VERSION_ID = 9.9;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@@ -773,7 +773,6 @@ class AppGlobal {
request.generalid = GENERAL_ID; //'Cs2020@2016\$2958';
request.PatientOutSA = 0;
request.SessionID = "wEVNbagIkaNhGECWZjHaA";
- request.TokenID = "@dm!n";
request.isDentalAllowedBackend = false;
request.DeviceTypeID = Platform.isIOS ? 1 : 2;
request.DeviceType = Platform.isIOS ? "iOS" : "Android";
diff --git a/lib/core/model/eye/AppoimentAllHistoryResult.dart b/lib/core/model/eye/AppoimentAllHistoryResult.dart
index 71c9573b..b431943d 100644
--- a/lib/core/model/eye/AppoimentAllHistoryResult.dart
+++ b/lib/core/model/eye/AppoimentAllHistoryResult.dart
@@ -178,7 +178,7 @@ class AppoimentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate'];
- doctorSpeciality = json['DoctorSpeciality'].cast();
+ if (doctorSpeciality != null) doctorSpeciality = json['DoctorSpeciality'].cast();
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index 38e63391..6a421073 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -149,7 +149,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021";
- // body['PatientID'] = 3649158; //3844083
+ // body['PatientID'] = 2001273; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
diff --git a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
index 5a098b6f..ea9af54d 100644
--- a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
+++ b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
@@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer
import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:geocoding/geocoding.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart
index fbef90e6..f45d2942 100644
--- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart
+++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart
@@ -25,7 +25,7 @@ import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:provider/provider.dart';
diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart
index 87d55b72..e846d31c 100644
--- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart
+++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart
@@ -20,7 +20,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:permission_handler/permission_handler.dart';
import 'cmc_location_page.dart';
diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart
index e96ddcc7..78e13982 100644
--- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart
+++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart
@@ -23,7 +23,7 @@ import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:provider/provider.dart';
diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart
index 7984cbbf..3a59b21e 100644
--- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart
+++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart
@@ -12,7 +12,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
class NewHomeHealthCareStepOnePage extends StatefulWidget {
diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart
index 5328bfba..79f10be7 100644
--- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart
+++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart
@@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
@@ -21,7 +22,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
+import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart';
import 'location_page.dart';
@@ -53,6 +54,7 @@ class _NewHomeHealthCareStepTowPageState extends State mapController = Completer();
+ LocationUtils locationUtils;
@override
void initState() {
@@ -62,7 +64,6 @@ class _NewHomeHealthCareStepTowPageState extends State with SingleTickerProv
return DoctorCard(
onTap: () => ancillaryOrdersDetails(model.ancillaryLists[0].ancillaryOrderList[index], model.ancillaryLists[0].projectID),
isInOutPatient: true,
- name: TranslationBase.of(context).dr.toString() + " " + (model.ancillaryLists[0].ancillaryOrderList[index].doctorName),
+ name: TranslationBase.of(context).dr.toString() + " " + (model.ancillaryLists[0].ancillaryOrderList[index].doctorName ?? ""),
billNo: model.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: model.ancillaryLists[0].projectName,
diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart
index 9b5374ef..71c9d0b2 100644
--- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart
+++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart
@@ -300,9 +300,10 @@ class _DocAvailableAppointmentsState extends State wit
}
getDoctorFreeSlots(context, DoctorList docObject) {
+ print(DocAvailableAppointments.initialSlotDuration);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
- service.getDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, context).then((res) {
+ service.getDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, context, projectViewModel).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['FreeTimeSlots'].length != 0) {
diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart
index d69ed4f3..057cb5c2 100644
--- a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart
+++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart
@@ -102,19 +102,23 @@ class _PickupLocationState extends State {
),
child: InkWell(
onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: PickupLocationFromMap(
- latitude: projectViewModel.latitude ?? 0,
- longitude: projectViewModel.longitude ?? 0,
- onPick: (value) {
- setState(() {
- _result = value;
- });
- },
- )),
- );
+ if (projectViewModel.latitude != null && projectViewModel.longitude != null) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: PickupLocationFromMap(
+ latitude: projectViewModel.latitude ?? 0,
+ longitude: projectViewModel.longitude ?? 0,
+ onPick: (value) {
+ setState(() {
+ _result = value;
+ });
+ },
+ )),
+ );
+ } else {
+ locationUtils.getCurrentLocation();
+ }
},
child: Row(
children: [
@@ -438,20 +442,24 @@ class _PickupLocationState extends State {
),
child: InkWell(
onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: PickupLocationFromMap(
- latitude: projectViewModel.latitude,
- longitude: projectViewModel.longitude,
- onPick: (value) {
- setState(() {
- _result = value;
- });
- },
+ if (projectViewModel.latitude != null && projectViewModel.longitude != null) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: PickupLocationFromMap(
+ latitude: projectViewModel.latitude,
+ longitude: projectViewModel.longitude,
+ onPick: (value) {
+ setState(() {
+ _result = value;
+ });
+ },
+ ),
),
- ),
- );
+ );
+ } else {
+ locationUtils.getCurrentLocation();
+ }
},
child: Row(
children: [
diff --git a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart
index 2008ef4c..56033e8c 100644
--- a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart
+++ b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart
@@ -309,6 +309,11 @@ class RRTRequestPickupAddressPageState extends State with SingleTickerProviderStateMixin {
return DoctorCard(
onTap: () => ancillaryOrdersDetails(widget.ancillaryLists[0].ancillaryOrderList[index], widget.ancillaryLists[0].projectID),
isInOutPatient: true,
- name: TranslationBase.of(context).dr.toString() + " " + (widget.ancillaryLists[0].ancillaryOrderList[index].doctorName),
+ name: TranslationBase.of(context).dr.toString() + " " + (widget.ancillaryLists[0].ancillaryOrderList[index].doctorName ?? ""),
billNo: widget.ancillaryLists[0].ancillaryOrderList[index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: widget.ancillaryLists[0].projectName,
diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart
index 39a54f1a..4bd1ae81 100644
--- a/lib/pages/feedback/send_feedback_page.dart
+++ b/lib/pages/feedback/send_feedback_page.dart
@@ -25,8 +25,8 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
-import 'package:speech_to_text/speech_recognition_error.dart';
-import 'package:speech_to_text/speech_to_text.dart' as stt;
+// import 'package:speech_to_text/speech_recognition_error.dart';
+// import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
@@ -49,7 +49,7 @@ class _SendFeedbackPageState extends State {
final formKey = GlobalKey();
MessageType messageType = MessageType.NON;
var _currentLocaleId;
- stt.SpeechToText speech = stt.SpeechToText();
+ // stt.SpeechToText speech = stt.SpeechToText();
var reconizedWord;
int selectedStatusIndex = 5;
var event = RobotProvider();
@@ -218,17 +218,17 @@ class _SendFeedbackPageState extends State {
inputWidget(TranslationBase.of(context).subject, "", titleController),
SizedBox(height: 12),
inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () async {
- if (Platform.isAndroid) {
- if (await PermissionService.isMicrophonePermissionEnabled()) {
- openSpeechReco();
- } else {
- Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
- openSpeechReco();
- });
- }
- } else {
- openSpeechReco();
- }
+ // if (Platform.isAndroid) {
+ // if (await PermissionService.isMicrophonePermissionEnabled()) {
+ // openSpeechReco();
+ // } else {
+ // Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
+ // openSpeechReco();
+ // });
+ // }
+ // } else {
+ // openSpeechReco();
+ // }
}),
SizedBox(height: 12),
InkWell(
@@ -517,26 +517,26 @@ class _SendFeedbackPageState extends State {
return;
}
- openSpeechReco() async {
- new RoboSearch(context: context).showAlertDialog(context);
- _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
- bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
- if (available) {
- speech.listen(
- onResult: resultListener,
- listenMode: stt.ListenMode.confirmation,
- localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
- );
- } else {
- print("The user has denied the use of speech recognition.");
- }
- }
-
- void errorListener(SpeechRecognitionError error) {
- event.setValue({"searchText": 'null'});
- //SpeechToText.closeAlertDialog(context);
- print(error);
- }
+ // openSpeechReco() async {
+ // new RoboSearch(context: context).showAlertDialog(context);
+ // _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
+ // bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
+ // if (available) {
+ // speech.listen(
+ // onResult: resultListener,
+ // listenMode: stt.ListenMode.confirmation,
+ // localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
+ // );
+ // } else {
+ // print("The user has denied the use of speech recognition.");
+ // }
+ // }
+ //
+ // void errorListener(SpeechRecognitionError error) {
+ // event.setValue({"searchText": 'null'});
+ // //SpeechToText.closeAlertDialog(context);
+ // print(error);
+ // }
void statusListener(String status) {
reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....';
@@ -556,14 +556,14 @@ class _SendFeedbackPageState extends State {
setState(() {
messageController.text += reconizedWord + '\n';
RoboSearch.closeAlertDialog(context);
- speech.stop();
+ // speech.stop();
});
}
}
- Future initSpeechState() async {
- bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
- print(hasSpeech);
- if (!mounted) return;
- }
+ // Future initSpeechState() async {
+ // bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
+ // print(hasSpeech);
+ // if (!mounted) return;
+ // }
}
diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart
index 75acbffb..2ea4213f 100644
--- a/lib/pages/insurance/insurance_page.dart
+++ b/lib/pages/insurance/insurance_page.dart
@@ -143,10 +143,10 @@ class InsurancePage extends StatelessWidget {
}
getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, bool isFamily, int parentID = 0, BuildContext context}) {
- // GifLoaderDialogUtils.showMyDialog(context);
- // _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) {
- // GifLoaderDialogUtils.hideDialog(context);
- // if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
+ GifLoaderDialogUtils.showMyDialog(context);
+ _insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push(
context,
FadePage(
@@ -158,9 +158,9 @@ class InsurancePage extends StatelessWidget {
))).then((value) {
model.getInsuranceUpdated();
});
- // } else {
- // AppToast.showErrorToast(message: _insuranceCardService.error);
- // }
- // });
+ } else {
+ AppToast.showErrorToast(message: _insuranceCardService.error);
+ }
+ });
}
}
diff --git a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart
index 7f22c7b6..c8519cfd 100644
--- a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart
+++ b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart
@@ -112,6 +112,12 @@ class _LiveCarePendingRequestState extends State {
// cancelLiveCareRequest();
}),
),
+ // DefaultButton(
+ // TranslationBase.of(context).cancel,
+ // () {
+ // cancelLiveCareRequest();
+ // },
+ // ),
],
),
),
@@ -200,30 +206,6 @@ class _LiveCarePendingRequestState extends State {
// " Patients",
// style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
- // Container(
- // transform: Matrix4.translationValues(0.0, 110.0, 0.0),
- // alignment: Alignment.bottomCenter,
- // width: MediaQuery.of(context).size.width,
- // child: ButtonTheme(
- // shape: RoundedRectangleBorder(
- // borderRadius: BorderRadius.circular(10.0),
- // ),
- // minWidth: MediaQuery.of(context).size.width,
- // height: 45.0,
- // child: RaisedButton(
- // color: Colors.red[800],
- // textColor: Colors.white,
- // elevation: 0,
- // disabledTextColor: Colors.white,
- // disabledColor: new Color(0xFFbcc2c4),
- // onPressed: () {
- // cancelLiveCareRequest();
- // },
- // child: Text(TranslationBase.of(context).cancel,
- // style: TextStyle(fontSize: 18.0)),
- // ),
- // ),
- // ),
// ],
// ),
);
diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart
index f132741e..1ca32e02 100644
--- a/lib/pages/medical/patient_sick_leave_page.dart
+++ b/lib/pages/medical/patient_sick_leave_page.dart
@@ -57,8 +57,8 @@ class _PatientSickLeavePageState extends State {
subName: model.sickLeaveList[index].clinicName,
isSortByClinic: false,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
- isSickLeave: true,
- sickLeaveStatus: model.sickLeaveList[index].status,
+ // isSickLeave: true,
+ // sickLeaveStatus: model.sickLeaveList[index].status,
onEmailTap: () {
showConfirmMessage(model, index);
},
@@ -69,13 +69,13 @@ class _PatientSickLeavePageState extends State {
}
void showConfirmMessage(PatientSickLeaveViewMode model, int index) {
- if (model.sickLeaveList[index].status == 1) {
- openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo, model.sickLeaveList[index].setupID, model, index, model.sickLeaveList[index].projectID);
- } else if (model.sickLeaveList[index].status == 2) {
+ // if (model.sickLeaveList[index].status == 1) {
+ // openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo, model.sickLeaveList[index].setupID, model, index, model.sickLeaveList[index].projectID);
+ // } else if (model.sickLeaveList[index].status == 2) {
showEmailDialog(model, index);
- } else {
- showApprovalDialog();
- }
+ // } else {
+ // showApprovalDialog();
+ // }
}
void showApprovalDialog() {
diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart
index dcc4b299..f57bb478 100644
--- a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart
+++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart
@@ -1,22 +1,20 @@
import 'dart:async';
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
-import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
+import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
-import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.dart';
-import 'package:geolocator/geolocator.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
class AddAddressPage extends StatefulWidget {
@@ -37,6 +35,7 @@ class _AddAddressPageState extends State {
LatLng currentPostion;
Completer mapController = Completer();
Placemark selectedPlace;
+ LocationUtils locationUtils;
static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
@@ -93,13 +92,28 @@ class _AddAddressPageState extends State {
}
_getCurrentLocation() async {
- await Geolocator.getLastKnownPosition().then((value) {
- _latitude = value.latitude;
- _longitude = value.longitude;
- }).catchError((e) {
- _longitude = 0;
- _latitude = 0;
- });
+ if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
+ var lat = await this.sharedPref.getDouble(USER_LAT);
+ var long = await this.sharedPref.getDouble(USER_LONG);
+ _latitude = lat;
+ _longitude = long;
+ currentPostion = LatLng(lat, long);
+ setMap();
+ } else {
+ locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
+ locationUtils.getCurrentLocation(callBack: (value) {
+ print(value);
+ setMap();
+ });
+ }
+
+ // await Geolocator.getLastKnownPosition().then((value) {
+ // _latitude = value.latitude;
+ // _longitude = value.longitude;
+ // }).catchError((e) {
+ // _longitude = 0;
+ // _latitude = 0;
+ // });
}
@override
@@ -184,8 +198,8 @@ class _AddAddressPageState extends State {
// widget.onPick(value);
// },
// ),
- ),
- );
+ ),
+ );
// );
}
}
diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart
index ca65e4de..6cf2251b 100644
--- a/lib/services/appointment_services/GetDoctorsList.dart
+++ b/lib/services/appointment_services/GetDoctorsList.dart
@@ -253,7 +253,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
- Future