Merge branch 'development_v3.3' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into PatientApp_VIDA_Plus_3.3

# Conflicts:
#	lib/config/config.dart
#	lib/core/service/client/base_app_client.dart
#	lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart
#	lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart
#	lib/pages/feedback/send_feedback_page.dart
#	lib/uitl/LocalNotification.dart
#	lib/uitl/push-notification-handler.dart
#	lib/widgets/others/bottom_bar.dart
#	lib/widgets/others/floating_button_search.dart
#	pubspec.yaml
PatientApp_VIDA_Plus_3.3
Sultan khan 3 years ago
commit ddcd0bb73c

@ -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"
}

@ -4,4 +4,4 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
</manifest>

@ -6,6 +6,7 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
@ -34,9 +35,9 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>-->
<!-- Detect Reboot Permission -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>-->
<queries>
<intent>
<action android:name="android.speech.RecognitionService" />
@ -49,7 +50,6 @@
android:showOnLockScreen="true"
android:screenOrientation="sensorPortrait"
android:allowBackup="false"
tools:replace="android:allowBackup,android:label"
android:label="Dr. Alhabib">
<meta-data android:name="push_kit_auto_init_enabled" android:value="true" />
@ -89,23 +89,23 @@
</intent-filter>
</activity>
<receiver android:exported="true" tools:replace="android:exported" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
<!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.BOOT_COMPLETED"/>-->
<!-- <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>-->
<!-- </intent-filter>-->
<!-- </receiver>-->
<!-- Geofencing -->
<service android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver" android:enabled="true" />
<receiver android:exported="true" android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true">
<receiver android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver" android:enabled="true" android:exported="false" />
<receiver android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
<receiver android:exported="true" android:name=".geofence.intent_receivers.LocationProviderChangeReceiver">
<receiver android:name=".geofence.intent_receivers.LocationProviderChangeReceiver" android:exported="false">
<intent-filter>
<action android:name="android.location.PROVIDERS_CHANGED"/>
</intent-filter>
@ -117,20 +117,19 @@
Huawei Push Notifications
Set push kit auto enable to true (for obtaining the token on initialize)
-->
<meta-data
android:name="push_kit_auto_init_enabled"
android:value="true" />
<!-- <meta-data-->
<!-- android:name="push_kit_auto_init_enabled"-->
<!-- android:value="true" />-->
<!-- These receivers are for sending scheduled local notifications -->
<receiver android:exported="true" android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver">
<receiver android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationScheduledPublisher"
android:exported="true"
android:enabled="true" />
android:enabled="true"
android:exported="false" />
<receiver
android:name="com.huawei.hms.flutter.push.receiver.BackgroundMessageBroadcastReceiver"
android:enabled="true"
@ -153,10 +152,10 @@
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
<!-- <uses-permission android:name="android.permission.USE_FINGERPRINT" />-->
<!-- <uses-permission android:name="android.permission.READ_CALENDAR" />-->
<!-- <uses-permission android:name="android.permission.WRITE_CALENDAR" />-->

@ -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 ->
}
}
}
}
}

@ -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))
} }
};
}

@ -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'

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -40,7 +40,19 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |build_configuration|
build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
'PERMISSION_LOCATION=1',
'PERMISSION_CAMERA=1',
'PERMISSION_MICROPHONE=1',
## dart: PermissionGroup.calendar
'PERMISSION_EVENTS=1',
## dart: PermissionGroup.reminders
'PERMISSION_REMINDERS=1',
]
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end

@ -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 = "<group>"; };
306FE6CA271D8B73002D6EFC /* OpenTok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTok.swift; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
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 = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = "<group>"; };
@ -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 = "<group>"; };
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 = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
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 = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
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 = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; sourceTree = "<group>"; };
E91B538E256AAA6500E96549 /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = "<group>"; };
@ -100,6 +99,7 @@
E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = "<group>"; };
E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedFromFlutter.swift; sourceTree = "<group>"; };
E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = "<group>"; };
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 = "<group>"; };
/* 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 = "<group>";
@ -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 = "<group>";
@ -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 = "";

File diff suppressed because it is too large Load Diff

@ -67,7 +67,7 @@ const Map localizedValues = {
'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'},
'laserMaxLimitReach': {'en': "Maximum limit is 90 minutes", 'ar': "الحد الأقصى هو 90 دقيقة"},
'confirmAppoHeading': {'en': 'Kindly review your Appointment', 'ar': 'يرجى تأكيد موعدك'},
'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'},
'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المراجع'},
'doctorFilter': {'en': 'Doctors will be filtered based on your gender and age', 'ar': 'سيتم تصفية الأطباء بناءً على جنسك وعمرك'},
'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'},
'patientShare': {'en': 'Patient Share', 'ar': 'نسبة العميل'},
@ -120,7 +120,7 @@ const Map localizedValues = {
'poweredBy': {'en': 'Powered by', 'ar': 'مشغل بواسطة'},
"welcome": {"en": "Welcome", "ar": "مرحبا بكم"},
"welcome-to": {"en": "Welcome to", "ar": "مرحبا بك في"},
"patient-app": {"en": "Patient App", "ar": "تطبيق المرضى"},
"patient-app": {"en": "Patient App", "ar": "تطبيق المراجعين"},
"welcome_text": {"en": "Dr. Sulaiman Al Habib Mobile Application", "ar": "الدكتور سليمان الحبيب لتطبيقات الهاتف"},
"dr-sulaiman-text": {"en": "Dr. Sulaiman Al Habib", "ar": "د. سليمان الحبيب"},
'welcome_text2': {'en': 'Have you previously visited the hospitals or medical centers of Dr. Sulaiman Al Habib?', 'ar': 'هل قمت مسبقا بزيارة مستشفيات او مراكز الدكتور سليمان الحبيب الطبية ؟'},
@ -183,6 +183,7 @@ const Map localizedValues = {
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'},
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'},
'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'},
'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"},
"EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"},
@ -207,7 +208,7 @@ const Map localizedValues = {
"last-name": {"en": "Last Name", "ar": "إسم العائلة"},
"female": {"en": "Female", "ar": "أنثى"},
"male": {"en": "Male", "ar": "ذكر"},
"preferred-language": {"en": "Preferred Language", "ar": "اللغة المفضلة"},
"preferred-language": {"en": "Preferred Language *", "ar": "اللغة المفضلة *"},
"english": {"en": "English", "ar": "الإنجليزية"},
"arabic": {"en": "Arabic", "ar": "العربية"},
"locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"},
@ -418,7 +419,7 @@ const Map localizedValues = {
"Amount": {"en": "Amount *", "ar": "المبلغ *"},
"DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"},
"Notes": {"en": "Notes", "ar": "ملاحظات"},
"SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المريض"},
"SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المراجع"},
"SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"},
"SelectHospital": {"en": "Select Hospital", "ar": "اختر المستشفى"},
"selectCity": {"en": "Select City", "ar": "اختر المدينة"},
@ -681,7 +682,7 @@ const Map localizedValues = {
"ar":
"توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية الاشعة التطعيمات العلاج الطبيعي) ..."
},
"email": {"en": "Email", "ar": "البريد الالكتروني"},
"email": {"en": "Email *", "ar": "البريد الالكتروني *"},
"Book": {"en": "Book", "ar": "حجز"},
"AppointmentLabel": {"en": "Appointment", "ar": "موعد"},
"BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"},
@ -863,7 +864,7 @@ const Map localizedValues = {
"question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "شكوى"},
"compliment": {"en": "Appreciation", "ar": "تقدير"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقتراحك شكرا لك"},
"select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"},
@ -1118,7 +1119,7 @@ const Map localizedValues = {
"visit": {"en": "Visit", "ar": "زيارة"},
"referralStatus": {"en": "Referral Status", "ar": "حالة الإحالة"},
"referralDate": {"en": "Referral Date", "ar": "تاريخ الإحالة"},
"patientName": {"en": "Patient Name", "ar": "اسم المريض"},
"patientName": {"en": "Patient Name", "ar": "اسم المراجع"},
"referralNumber": {"en": "Referral Number", "ar": "رقم الإحالة"},
"requestID": {"en": "Req ID", "ar": " رقم الطلب"},
"OrderStatus": {"en": "Status", "ar": "الحاله"},
@ -1323,7 +1324,7 @@ const Map localizedValues = {
"notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"},
"notif-permission-msg": {"en": "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات"},
"verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"},
"select-location": {"en": "Select Location", "ar": "اختر الموقع"},
"select-location": {"en": "Select Location *", "ar": "اختر الموقع *"},
"result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"},
"please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"},
"covid-info": {
@ -1411,7 +1412,7 @@ const Map localizedValues = {
"online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"},
"expected-weiting": {"en": "Waiting time to start LiveCare consultation ", "ar": "وقت الانتظار المتوقع لبدء استشارة لايف كير"},
"er-consult-fee": {"en": "Consultation Fee", "ar": "رسوم الاستشارة"},
"insured-patient": {"en": "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مريضًا في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"},
"insured-patient": {"en": "If you're Insurance patient, you have only have to pay the co-payment", "ar": "إذا كنت مراجع في مجال التأمين ، فليس عليك سوى دفع المبلغ المشترك"},
"i-accept-terms": {"en": "I Accept the Terms and Conditions", "ar": "موافق على الشروط والأحكام"},
"upcoming-pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"please-accept-terms": {"en": "Please accept terms & conditions to continue", "ar": "يرجى قبول الشروط والأحكام للمتابعة"},
@ -1420,7 +1421,7 @@ const Map localizedValues = {
"en":
"This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, by filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)",
"ar":
"تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المريض وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)"
"تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المراجع وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)"
},
"er-consultation": {
"en": "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.",
@ -1557,10 +1558,10 @@ const Map localizedValues = {
"insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"},
"preferredBranch": {"en": "Preferred Branch", "ar": "الفرع المفضل"},
"selectPreferredBranch": {"en": "Select Preferred Branch", "ar": "اختر الفرع المفضل"},
"patientLocated": {"en": "Where the patient located", "ar": "اين موقع المريض"},
"patientLocated": {"en": "Where the patient located", "ar": "اين موقع المراجع"},
"otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"},
"medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"},
"insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"},
"insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المراجع تامين؟"},
"rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"},
"rateAppointment": {"en": "Rate Appointment", "ar": "تقييم الموعد"},
"noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"},
@ -1588,7 +1589,7 @@ const Map localizedValues = {
"patientAge": {"en": "y", "ar": "سنة"},
"searchCriteria": {"en": "Select Search Criteria", "ar": "حدد معايير البحث"},
"RequesterInfo": {"en": "Requester Info", "ar": "معلومات مقدم الطلب"},
"PatientInfo": {"en": "Patient Info", "ar": "معلومات المريض"},
"PatientInfo": {"en": "Patient Info", "ar": "معلومات المراجع"},
"OtherInfo": {"en": "Other Info", "ar": "معلومات اخرى"},
"inPrgress": {"en": "In Progress", "ar": "في تقدم"},
"locked": {"en": "Locked", "ar": "مقفل"},
@ -1787,7 +1788,7 @@ const Map localizedValues = {
"productOutOfStock": {"en": "Out Of Stock", "ar": "إنتهى من المخزن"},
"productQuantity": {"en": "Quantity", "ar": "كمية"},
"yourTurn": {"en": "your turn is after", "ar": "دورك بعد"},
"patients": {"en": "patients", "ar": "مرضي"},
"patients": {"en": "patients", "ar": "مريض"},
"group": {"en": "Group", "ar": "مجموعة"},
"covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"},
"ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"},
@ -1809,7 +1810,7 @@ const Map localizedValues = {
},
"cameraPermissionDialog": {
"en": "Dr. Al Habib app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.",
"ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المريض والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات."
"ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المراجع والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات."
},
"galleryPermission": {
"en": "Dr. Al Habib app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.",
@ -1843,7 +1844,7 @@ const Map localizedValues = {
"privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"},
"termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"},
"prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."},
"liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."},
"liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."},
"lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" },
"lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" },
"lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" },
@ -1864,9 +1865,22 @@ const Map localizedValues = {
"NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" },
"enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"},
"workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"},
"callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم لايف كير"},
"callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"},
"needApproval": {"en": "Your sick leave is under process in medical administration, you will be notified once approved.", "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."},
"pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"},
"awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"},
"liveCareSupportContact": {"en": "LiveCare Support Contact: ", "ar": "اتصل لايف كير: "},
"pharmaLiveCare": {"en": "Pharma LiveCare", "ar": "لايف كير الصيدلية"},
"pharmaLiveCare1": {"en": "What is Pharma LiveCare?", "ar": "ما هولايف كير الصيدلية؟"},
"pharmaLiveCareDesc1": {"en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب."},
"wherePharmaLiveCare": {"en": "Where can i find Pharma LiveCare?", "ar": "أين يمكنني أن أجد لايف كير الصيدلية؟"},
"pharmaLiveCareDesc2": {"en": "You can find the booth in HMG Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."},
"howPharmaLiveCare": {"en": "How can i use Pharma LiveCare?", "ar": "كيف يمكنني استخدام لايف كير الصيدلية؟"},
"pharmaLiveCareDesc3": {"en": "Following the below steps you can easily benefit from the virtual consultation service:", "ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:"},
"pharmaLiveCareScanQR": {"en": "Scan QR Code", "ar": "مسح رمز الاستجابة السريعة"},
"pharmaLiveCareScanQR1": {"en": "Scan the QR Code in the booth to make the connection", "ar": "امسح رمز الاستجابة السريعة في المقصورة لإجراء الاتصال"},
"pharmaLiveCareMakePayment": {"en": "Make Payment Online", "ar": "قم بالدفع عبر الإنترنت"},
"pharmaLiveCareMakePayment1": {"en": "Make the payment through the mobile app", "ar": "قم بالدفع من خلال تطبيق الهاتف المحمول"},
"pharmaLiveCareJoinConsultation": {"en": "Join the virtual consultation from booth", "ar": "انضم إلى الاستشارة الافتراضية من الكبينة"},
"pharmaLiveCareJoinConsultation1": {"en": "Wait for the doctor in the pharma booth to join you", "ar": "انتظر حتى ينضم إليك الطبيب في كبينة لايف كير الصيدلية"},
};

@ -42,3 +42,4 @@ const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL';
const CLINICS_LIST = 'CLINICS_LIST';
const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai';

@ -178,7 +178,7 @@ class AppoimentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate'];
doctorSpeciality = json['DoctorSpeciality'].cast<String>();
if (doctorSpeciality != null) doctorSpeciality = json['DoctorSpeciality'].cast<String>();
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];

@ -99,12 +99,31 @@ class BaseAppClient {
} else {
body['PatientType'] = PATIENT_TYPE;
}
// }
// body['PatientType'] = body.containsKey('PatientType')
// ? body['PatientType'] != null
// ? body['PatientType']
// : user['PatientType'] != null
// ? user['PatientType']
// : PATIENT_TYPE
// : PATIENT_TYPE;
// if (!body.containsKey('PatientTypeID')) {
if (user != null && user['PatientType'] != null) {
body['PatientTypeID'] = user['PatientType'];
} else {
body['PatientType'] = PATIENT_TYPE_ID;
}
// }
// body['PatientTypeID'] = body.containsKey('PatientTypeID')
// ? body['PatientTypeID'] != null
// ? body['PatientTypeID']
// : user['PatientType'] != null
// ? user['PatientType']
// : PATIENT_TYPE_ID
// : PATIENT_TYPE_ID;
if (user != null) {
body['TokenID'] = body['TokenID'] != null ? body['TokenID'] : token;
@ -140,11 +159,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null);
// if (AppGlobal.isNetworkDebugEnabled) {
print("Debug URL : $url");
if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url");
final jsonBody = json.encode(body);
print("Debug Body : $jsonBody");
// }
print(jsonBody);
}
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);

@ -32,6 +32,8 @@ class GeofencingServices extends BaseService {
AppSharedPreferences pref = AppSharedPreferences();
await pref.setString(HMG_GEOFENCES, _zonesJsonString);
var res = await sharedPref.getStringWithDefaultValue(HMG_GEOFENCES, "[]");
print("-------GEO ZONES----------: $res");
return geoZones;
}

@ -117,12 +117,12 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future updateWorkplaceName(String workplaceName, int requestNumber, String setupID, int projectID) async {
Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async {
hasError = false;
Map<String, dynamic> body = Map();
body['Placeofwork'] = workplaceName;
body['Placeofworkar'] = workplaceName;
body['Placeofworkar'] = workplaceNameAR;
body['Req_ID'] = requestNumber;
body['TargetSetupID'] = setupID;
body['ProjectID'] = projectID;

@ -21,6 +21,7 @@ class DashboardViewModel extends BaseViewModel {
if (isLogin && _vitalSignService.weightKg.isEmpty) {
setState(ViewState.Busy);
await _vitalSignService.getPatientRadOrders();
booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-";
if (_vitalSignService.hasError) {
error = _vitalSignService.error;

@ -5,6 +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_mb/google_maps_place_picker.dart';
import '../../../locator.dart';
import '../base_view_model.dart';

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
@ -38,9 +39,10 @@ class ProjectViewModel extends BaseViewModel {
double _latitude;
double _longitude;
RegisterInfoResponse _registerInfo =RegisterInfoResponse();
double get latitude => _latitude;
double get longitude => _longitude;
RegisterInfoResponse get registerInfo=> _registerInfo;
dynamic get searchValue => searchvalue;
Locale get appLocal => _appLocale;
@ -164,4 +166,8 @@ class ProjectViewModel extends BaseViewModel {
searchvalue = data;
notifyListeners();
}
setRegisterData(RegisterInfoResponse data){
_registerInfo =data;
notifyListeners();
}
}

@ -4,7 +4,7 @@ class TimeSlot {
String isoTime;
DateTime start;
DateTime end;
TimeSlot({@required this.isoTime, @required this.start, @required this.end});
String vidaDate;
TimeSlot({@required this.isoTime, @required this.start, @required this.end, this.vidaDate});
}

@ -15,7 +15,9 @@ class CheckPatientAuthenticationReq {
Null sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
String dob;
int isHijri;
String healthId;
CheckPatientAuthenticationReq(
{this.patientMobileNumber,
this.zipCode,
@ -32,7 +34,11 @@ class CheckPatientAuthenticationReq {
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID});
this.deviceTypeID,
this.dob,
this.isHijri,
this.healthId
});
CheckPatientAuthenticationReq.fromJson(Map<String, dynamic> json) {
patientMobileNumber = json['PatientMobileNumber'];
@ -51,6 +57,9 @@ class CheckPatientAuthenticationReq {
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
dob = json['dob'];
isHijri = json['isHijri'];
healthId = json['HealthId'];
}
Map<String, dynamic> toJson() {
@ -71,6 +80,9 @@ class CheckPatientAuthenticationReq {
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['dob'] =this.dob;
data['isHijri'] = this.isHijri;
data['HealthId'] = healthId;
return data;
}
}

@ -0,0 +1,21 @@
class CountriesLists {
String iD;
String name;
dynamic nameN;
CountriesLists({this.iD, this.name, this.nameN});
CountriesLists.fromJson(Map<String, dynamic> json) {
iD = json['ID'];
name = json['Name'];
nameN = json['NameN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ID'] = this.iD;
data['Name'] = this.name;
data['NameN'] = this.nameN;
return data;
}
}

@ -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';

@ -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';

@ -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';

@ -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 {

@ -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<NewHomeHealthCareStepTowP
);
LatLng currentPostion;
Completer<GoogleMapController> mapController = Completer();
LocationUtils locationUtils;
@override
void initState() {
@ -62,7 +64,6 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
_updatePosition(camera);
},
onMapCreated: () {
// goToCurrentLocation();
_getUserLocation();
setState(() {});
},
@ -82,31 +83,36 @@ class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowP
currentPostion = LatLng(lat, long);
setMap();
} else {
if (await PermissionService.isLocationEnabled()) {
Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude;
longitude = value.longitude;
currentPostion = LatLng(latitude, longitude);
setMap();
});
} else {
if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () {
Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude;
longitude = value.longitude;
currentPostion = LatLng(latitude, longitude);
setMap();
});
});
} else {
Geolocator.getLastKnownPosition().then((value) {
latitude = value.latitude;
longitude = value.longitude;
setMap();
});
}
}
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
setMap();
});
// if (await PermissionService.isLocationEnabled()) {
// Geolocator.getLastKnownPosition().then((value) {
// latitude = value.latitude;
// longitude = value.longitude;
// currentPostion = LatLng(latitude, longitude);
// setMap();
// });
// } else {
// if (Platform.isAndroid) {
// Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () {
// Geolocator.getLastKnownPosition().then((value) {
// latitude = value.latitude;
// longitude = value.longitude;
// currentPostion = LatLng(latitude, longitude);
// setMap();
// });
// });
// } else {
// Geolocator.getLastKnownPosition().then((value) {
// latitude = value.latitude;
// longitude = value.longitude;
// setMap();
// });
// }
// }
}
}

@ -65,29 +65,53 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCareTitle, TranslationBase.of(context).liveCareSubtitle, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).onlinePayment, TranslationBase.of(context).onlinePaymentSubtitle, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).cmcTitle, TranslationBase.of(context).cmcSubtitle, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin));
hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin));
hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin));
hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin));
hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin));
hmgServices.add(new HmgServices(7, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin));
hmgServices.add(new HmgServices(10, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin));
hmgServices.add(new HmgServices(11, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(12, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(13, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin));
hmgServices.add(new HmgServices(14, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin));
hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin));
hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin));
hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin));
hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin));
hmgServices.add(new HmgServices(17, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(18, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin));
hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin));
hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin));
hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin));
hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin));
hmgServices.add(new HmgServices(21, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin));
hmgServices.add(new HmgServices(22, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
// hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
// hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
// hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin));
// hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
// hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin));
// hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
// hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin));
// hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin));
// hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin));
// hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin));
// hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin));
// hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin));
// hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin));
// hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin));
// hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin));
// hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin));
// hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin));
// hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin));
}
@override
@ -211,7 +235,7 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
itemCount: hmgServices.length,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index);
return ServicesView(hmgServices[index], index, false);
},
),
),

@ -148,7 +148,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrders> 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,

@ -484,7 +484,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
onSelectedMethod: (String method, [String selectedInstallmentPlan]) {
selectedPaymentMethod = method;
this.selectedInstallmentPlan = selectedInstallmentPlan;
openPayment(selectedPaymentMethod, projectViewModel.authenticatedUserObject.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan);
openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), null, model, selectedInstallmentPlan);
},
patientShare: double.parse(getTotalValue()),
isFromAdvancePayment: !projectViewModel.havePrivilege(94),
@ -494,24 +494,25 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.authenticatedUserObject.user.patientID);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID);
browser.openPaymentBrowser(
amount,
"Ancillary Orders Payment",
transID,
widget.projectID.toString(),
projectViewModel.authenticatedUserObject.user.emailAddress,
projectViewModel.user.emailAddress,
paymentMethod,
projectViewModel.authenticatedUserObject.user.patientType,
projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName,
projectViewModel.authenticatedUserObject.user.patientID,
projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.patientID,
authenticatedUser,
browser,
false,
"3",
// Need to get new Service ID from Ayman for Ancillary Tamara
"",
context,
model.ancillaryListsDetails[0].appointmentDate,
model.ancillaryListsDetails[0].appointmentNo,
model.ancillaryListsDetails[0].clinicID,
@ -603,7 +604,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(localContext);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(transID, localContext).then((res) {
service.checkPaymentStatus(transID, false, localContext).then((res) {
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
createAdvancePayment(res, appo);
@ -627,9 +628,9 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
res['Amount'],
res['Fort_id'],
res['PaymentMethod'],
projectViewModel.authenticatedUserObject.user.patientType,
projectViewModel.authenticatedUserObject.user.firstName + " " + projectViewModel.authenticatedUserObject.user.lastName,
projectViewModel.authenticatedUserObject.user.patientID,
projectViewModel.user.patientType,
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectViewModel.user.patientID,
localContext)
.then((res) {
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);

@ -350,7 +350,7 @@ class _H2oSettingState extends State<H2oSetting> {
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number,
keyboardType: TextInputType.text,
controller: _controller,
onChanged: (value) => {
// validateForm()

@ -195,7 +195,7 @@ class ConfirmPaymentPage extends StatelessWidget {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "Advance Payment", Utils.getAdvancePaymentTransID(authenticatedUser.projectID, authenticatedUser.patientID), appo.projectID.toString(),
authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", null);
}
onBrowserLoadStart(String url) {
@ -227,7 +227,7 @@ class ConfirmPaymentPage extends StatelessWidget {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), AppGlobal.context).then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print("Printing Payment Status Reponse!!!!");
print(res);

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
@ -269,9 +271,10 @@ class _BookConfirmState extends State<BookConfirm> {
});
}
insertAppointment(context, DoctorList docObject, int initialSlotDuration) {
insertAppointment(context, DoctorList docObject, int initialSlotDuration) async{
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
String logs = await sharedPref.getString('selectedLogSlots');
List<dynamic> decodedLogs = json.decode(logs);
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service
@ -284,6 +287,14 @@ class _BookConfirmState extends State<BookConfirm> {
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
getToDoCount();
});
widget.service.logDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, decodedLogs,res['AppointmentNo'], context).then((res) {
if (res['MessageStatus'] == 1) {
print("Logs Saved");
}else{
print("Error Saving logs");
}
});
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
} else {
GifLoaderDialogUtils.hideDialog(context);

@ -46,7 +46,7 @@ class BookSuccess extends StatefulWidget {
class _BookSuccessState extends State<BookSuccess> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
// AuthenticatedUser authUser;
ProjectViewModel projectViewModel;
String selectedPaymentMethod = "";
@ -284,8 +284,8 @@ class _BookSuccessState extends State<BookSuccess> {
),
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
@ -300,7 +300,8 @@ class _BookSuccessState extends State<BookSuccess> {
confirmAppointment(appo);
}
},
child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm, style: TextStyle(fontSize: 16.0, color: Colors.white)),
child: Text(widget.patientShareResponse.isLiveCareAppointment ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 16.0, color: Colors.white)),
),
),
),
@ -534,13 +535,6 @@ class _BookSuccessState extends State<BookSuccess> {
}
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
}
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientShareResponse.projectID;
appo.clinicID = widget.patientShareResponse.clinicID;
@ -562,7 +556,7 @@ class _BookSuccessState extends State<BookSuccess> {
patientShare: widget.patientShareResponse.patientShareWithTax)))
.then((value) {
if (value != null) {
openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment');
}
});
@ -587,6 +581,7 @@ class _BookSuccessState extends State<BookSuccess> {
widget.patientShareResponse.isLiveCareAppointment,
"2",
widget.patientShareResponse.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
context,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,
@ -729,7 +724,7 @@ class _BookSuccessState extends State<BookSuccess> {
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) {
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
txn_ref = res['Merchant_Reference'];
@ -760,7 +755,7 @@ class _BookSuccessState extends State<BookSuccess> {
getApplePayAPQ(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message'];
@ -954,12 +949,29 @@ class _BookSuccessState extends State<BookSuccess> {
}
Future navigateToQR(context, String appoQR) async {
AppoitmentAllHistoryResultList appointment = new AppoitmentAllHistoryResultList();
appointment.doctorTitle = "Dr. ";
appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj;
appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL;
appointment.doctorSpeciality = widget.patientShareResponse.doctorSpeciality;
appointment.projectName = widget.patientShareResponse.projectName;
appointment.projectID = widget.patientShareResponse.projectID;
appointment.appointmentDate = widget.patientShareResponse.appointmentDate;
appointment.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appointment.startTime = widget.patientShareResponse.startTime;
appointment.doctorRate = 5;
appointment.actualDoctorRate = 5;
appointment.noOfPatientsRate = 0;
appointment.clinicName = widget.patientShareResponse.clinicName;
Navigator.push(
context,
FadePage(
page: QRCode(
patientShareResponse: widget.patientShareResponse,
appoQR: appoQR,
appointment: appointment,
)));
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
import 'package:diplomaticquarterapp/models/Appointments/DentalProceduresModel.dart';
@ -19,6 +20,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class DentalComplaints extends StatefulWidget {
SearchInfo searchInfo;
@ -44,6 +46,8 @@ class _DentalComplaintsState extends State<DentalComplaints> {
DentalProceduresModel dentalProceduresModel;
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital = List();
ProjectViewModel projectViewModel;
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan());
@ -52,6 +56,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).chiefComplaints,

@ -492,27 +492,31 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
}
void goToBookConfirm() async {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
navigateToDentalComplaints(context);
} else {
if (DocAvailableAppointments.areSlotsAvailable) {
if (projectViewModel.isLogin) {
// if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) {
// navigateToDentalComplaints(context);
// } else {
if (DocAvailableAppointments.areSlotsAvailable) {
if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user.age > 12) {
navigateToDentalComplaints(context);
} else {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
navigateToBookConfirm(context);
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).loginToUseService,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {navigateToLogin()},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
} else
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
}
} else {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).loginToUseService,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {navigateToLogin()},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
} else
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
// }
}
Future navigateToDentalComplaints(BuildContext context) async {

@ -1,4 +1,3 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
@ -8,15 +7,18 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -53,159 +55,131 @@ class _QRCodeState extends State<QRCode> {
});
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
});
startNFCScan();
});
super.initState();
}
startNFCScan() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
});
}
@override
Widget build(BuildContext context) {
_context = context;
return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode,
appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
width: double.infinity,
height: MediaQuery.of(context).size.width / 3,
child: Row(
children: [
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: SvgPicture.asset("assets/images/nfc/contactless.svg"),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
],
),
),
// Expanded(
// flex: 1,
// child: Container(
// margin: EdgeInsets.only(top: 30.0),
// alignment: Alignment.center,
// child: Image.memory(
// _bytes,
// ),
// ),
// ),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
DoctorHeader(
headerModel: HeaderModel(
widget.appointment.doctorTitle + " " + widget.appointment.doctorNameObj,
widget.appointment.doctorID,
widget.appointment.doctorImageURL,
widget.appointment.doctorSpeciality,
"",
widget.appointment.projectName,
DateUtil.convertStringToDate(widget.appointment.appointmentDate),
widget.appointment.isLiveCareAppointment
? DateUtil.convertStringToDate(widget.appointment.appointmentDate).toString().split(" ")[1].substring(0, 5)
: widget.appointment.startTime.substring(0, 5),
null,
widget.appointment.doctorRate,
widget.appointment.actualDoctorRate,
widget.appointment.noOfPatientsRate,
"",
),
Container(
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
child: Divider(
color: Colors.red[700],
thickness: 0.8,
isShowName: true,
isNeedToShowButton: false,
buttonTitle: '',
onTap: () {},
onRatingAndReviewTap: () {},
),
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
padding: EdgeInsets.all(8),
child: SvgPicture.asset(
"assets/images/nfc/contactless.svg",
width: 80.0,
height: 80.0,
),
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
)),
),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
child: Divider(
color: Colors.red[700],
thickness: 0.8,
),
),
Container(
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey[200],
boxShadow: [
BoxShadow(color: Colors.grey, spreadRadius: 2),
],
],
),
],
),
),
bottomSheet: Container(
color: CustomColors.appBackgroudGreyColor,
padding: EdgeInsets.all(21),
// height: 45.0,
child: Row(
children: [
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n")
Container(
margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDate(widget.patientShareResponse.appointmentDate), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
],
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
startNFCScan();
},
child: Text(TranslationBase.of(context).scanNFC,
style: TextStyle(
fontSize: 18.0,
color: Colors.white,
)),
),
),
// Container(
// margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0),
// alignment: Alignment.bottomCenter,
// child: Column(
// mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[
// DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()})
// ],
// ),
// ),
],
),
),
],
),
),
);

@ -16,7 +16,7 @@ import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
import 'dart:convert';
import '../../../uitl/date_uitl.dart';
class DocAvailableAppointments extends StatefulWidget {
@ -58,6 +58,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
var language;
bool isLiveCareSchedule;
// String selectedLogSlots ='';
@override
void didUpdateWidget(covariant DocAvailableAppointments oldWidget) {
@ -212,6 +213,22 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
if (dayEvents.length != 0) {
DocAvailableAppointments.areSlotsAvailable = true;
selectedButtonIndex = 0;
// selectedLogSlots = dayEvents[selectedButtonIndex].toString();
List<Map<String,dynamic>> timeList =[];
for(var i =0; i<dayEvents.length;i++){
Map<String,dynamic> timeSlot={
"isoTime":dayEvents[i].isoTime,
"start":dayEvents[i].start.toString(),
"end":dayEvents[i].end.toString(),
"vidaDate":dayEvents[i].vidaDate
};
timeList.add(timeSlot);
}
AppSharedPreferences sharedPref = new AppSharedPreferences();
sharedPref.setString('selectedLogSlots', json.encode(timeList));
DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime;
} else
DocAvailableAppointments.areSlotsAvailable = false;
@ -229,7 +246,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
? DateUtil.convertStringToDate(freeSlotsResponse[i])
: DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[i], widget.doctor.projectID);
slotsList.add(FreeSlot(date, ['slot']));
docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date));
docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date, vidaDate: freeSlotsResponse[i]));
}
_eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event);
setState(() {
@ -300,9 +317,10 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> 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) {

@ -531,7 +531,15 @@ class _SearchByClinicState extends State<SearchByClinic> {
searchInfo.clinic = selectedClinic;
searchInfo.date = DateTime.now();
navigateToDentalComplaints(context, searchInfo);
if(projectViewModel.isLogin) {
if(projectViewModel.user.age > 12) {
navigateToDentalComplaints(context, searchInfo);
} else {
callDoctorsSearchAPI(17);
}
} else {
navigateToDentalComplaints(context, searchInfo);
}
} else if (dropdownValue.split("-")[0] == "253") {
navigateToLaserClinic(context);
// callDoctorsSearchAPI();
@ -552,15 +560,15 @@ class _SearchByClinicState extends State<SearchByClinic> {
Navigator.push(context, FadePage(page: LiveCareHome()));
}
if (value == "schedule") {
callDoctorsSearchAPI();
callDoctorsSearchAPI(int.parse(dropdownValue.split("-")[0]));
}
});
} else {
callDoctorsSearchAPI();
callDoctorsSearchAPI(int.parse(dropdownValue.split("-")[0]));
}
}
callDoctorsSearchAPI() {
callDoctorsSearchAPI(int clinicID) {
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
@ -570,7 +578,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
DoctorsListService service = new DoctorsListService();
service.getDoctorsList(int.parse(dropdownValue.split("-")[0]), projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, nearestAppo, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -376,7 +376,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) {
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];

@ -447,9 +447,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
refreshFamily(context) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
sharedPref.remove(FAMILY_FILE);
checkUserData();
});
}

@ -87,20 +87,21 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
showVideoProgressIndicator: true,
),
),
if (widget.notification.messageTypeData.length != 0 && widget.notification.notificationType != "2")
Padding(
padding: const EdgeInsets.only(top: 18),
child: Image.network(widget.notification.messageTypeData, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent loadingProgress) {
if (loadingProgress == null) return child;
return Center(
child: SizedBox(
width: 40.0,
height: 40.0,
child: AppCircularProgressIndicator(),
),
);
}, fit: BoxFit.fill),
),
if (widget.notification.messageTypeData != null)
if (widget.notification.messageTypeData.length != 0 && widget.notification.notificationType != "2")
Padding(
padding: const EdgeInsets.only(top: 18),
child: Image.network(widget.notification.messageTypeData, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent loadingProgress) {
if (loadingProgress == null) return child;
return Center(
child: SizedBox(
width: 40.0,
height: 40.0,
child: AppCircularProgressIndicator(),
),
);
}, fit: BoxFit.fill),
),
SizedBox(height: 18),
Text(
widget.notification.message.trim(),

@ -102,19 +102,23 @@ class _PickupLocationState extends State<PickupLocation> {
),
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<PickupLocation> {
),
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: [

@ -168,7 +168,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID);
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType,
authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "");
authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context);
}
onBrowserLoadStart(String url) {
@ -200,7 +200,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
service.checkPaymentStatus(transID, AppGlobal.context).then((res) {
service.checkPaymentStatus(transID, false, AppGlobal.context).then((res) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {

@ -309,6 +309,11 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
}
void _getUserLocation() async {
LocationSettings locationSettings = LocationSettings(
accuracy: LocationAccuracy.low
);
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);
@ -318,7 +323,7 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
setMap();
} else {
if (await Permission.location.request().isGranted) {
var position = await GeolocatorPlatform.instance.getCurrentPosition();
var position = await GeolocatorPlatform.instance.getCurrentPosition(locationSettings: locationSettings);
currentPostion = LatLng(position.latitude, position.longitude);
latitude = position.latitude;
longitude = position.longitude;
@ -327,7 +332,7 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
requestPermissions().then(
(value) async {
if (value[Permission.location].isGranted) {
var position = await GeolocatorPlatform.instance.getCurrentPosition();
var position = await GeolocatorPlatform.instance.getCurrentPosition(locationSettings: locationSettings);
currentPostion = LatLng(position.latitude, position.longitude);
latitude = position.latitude;
longitude = position.longitude;

@ -33,6 +33,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profil
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
@ -71,7 +72,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
padding: EdgeInsets.all(21),
shrinkWrap: true,
itemBuilder: (context, index) {
bool shouldEnable = (widget.appo.clinicID == 17 && widget.appo.clinicID == 47 && appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) && appoButtonsList[index].caller == "openReschedule");
return InkWell(
onTap: shouldEnable
? null
@ -106,13 +107,18 @@ class _AppointmentActionsState extends State<AppointmentActions> {
locator<GAnalytics>().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location');
break;
case "addReminder":
GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment';
showReminderDialog(
context,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
new DateFormat("dd MMM yyyy hh:mm")
.parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate), widget.projectViewModel.isArabic) + " " + widget.appo.startTime),
//DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.doctorNameObj,
"",
DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate), widget.projectViewModel.isArabic),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)),
// DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)),
widget.appo.startTime,
onSuccess: () {
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
},

@ -360,7 +360,7 @@ class _ToDoState extends State<ToDo> 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,
@ -960,6 +960,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
appo.isLiveCareAppointment,
"2",
appo.isLiveCareAppointment ? widget.patientShareResponse.clinicID.toString() : "",
context,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,
@ -1096,7 +1097,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), false, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {

@ -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);
}
});
}
}

@ -52,14 +52,15 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin));
}
@ -270,7 +271,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index);
return ServicesView(hmgServices[index], index, true);
},
),
),
@ -460,112 +461,126 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
flex: 1,
child: InkWell(
onTap: () {
widget.onPharmacyClick();
if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick();
},
child: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
child: Stack(
children: [
Container(
width: double.infinity,
height: double.infinity,
// color: Color(0xFF2B353E),
decoration: containerRadius(Color(0xFF359846), 20),
),
Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: projectViewModel.isArabic
? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor)
: containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
child: Stack(
children: [
SvgPicture.asset(
"assets/images/new/strips.svg",
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
),
],
child: Stack(children: [
Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
child: Stack(
children: [
Container(
width: double.infinity,
height: double.infinity,
// color: Color(0xFF2B353E),
decoration: containerRadius(Color(0xFF359846), 20),
),
),
projectViewModel.isArabic
? Positioned(
left: 20,
top: 12,
child: Opacity(
opacity: 0.04,
child: SvgPicture.asset(
"assets/images/new/Pharmacy.svg",
height: MediaQuery.of(context).size.width * 0.15,
Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: projectViewModel.isArabic
? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor)
: containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor),
child: Stack(
children: [
SvgPicture.asset(
"assets/images/new/strips.svg",
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
),
],
),
),
projectViewModel.isArabic
? Positioned(
left: 20,
top: 12,
child: Opacity(
opacity: 0.04,
child: SvgPicture.asset(
"assets/images/new/Pharmacy.svg",
height: MediaQuery.of(context).size.width * 0.15,
),
),
)
: Positioned(
right: 20,
top: 12,
child: Opacity(
opacity: 0.04,
child: SvgPicture.asset(
"assets/images/new/Pharmacy.svg",
height: MediaQuery.of(context).size.width * 0.15,
),
),
),
)
: Positioned(
right: 20,
top: 12,
child: Opacity(
opacity: 0.04,
Container(
width: double.infinity,
height: double.infinity,
padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
color: Colors.yellow,
// width: MediaQuery.of(context).size.width * 0.065,
child: SvgPicture.asset(
"assets/images/new/Pharmacy.svg",
height: MediaQuery.of(context).size.width * 0.15,
height: MediaQuery.of(context).size.width * 0.08,
),
),
),
Container(
width: double.infinity,
height: double.infinity,
padding: EdgeInsets.all(SizeConfig.widthMultiplier * 3.4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
color: Colors.yellow,
// width: MediaQuery.of(context).size.width * 0.065,
child: SvgPicture.asset(
"assets/images/new/Pharmacy.svg",
height: MediaQuery.of(context).size.width * 0.08,
),
),
mFlex(1),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
TranslationBase.of(context).onlinePharmacy,
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.45,
height: 1,
mFlex(1),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
TranslationBase.of(context).onlinePharmacy,
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.45,
height: 1,
),
),
),
projectViewModel.isArabic ? mHeight(5) : Container(),
Text(
TranslationBase.of(context).ecommerceSolution,
style: TextStyle(
color: Colors.black,
fontSize: 9,
fontWeight: FontWeight.w600,
letterSpacing: -0.27,
height: projectViewModel.isArabic ? 0.2 : 1,
projectViewModel.isArabic ? mHeight(5) : Container(),
Text(
TranslationBase.of(context).ecommerceSolution,
style: TextStyle(
color: Colors.black,
fontSize: 9,
fontWeight: FontWeight.w600,
letterSpacing: -0.27,
height: projectViewModel.isArabic ? 0.2 : 1,
),
),
),
],
),
],
],
),
],
),
),
),
],
],
),
),
),
projectViewModel.havePrivilege(100)
? Container()
: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
]),
),
);
}

@ -46,7 +46,6 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:wifi/wifi.dart';
import '../../locator.dart';
import '../../routes.dart';
@ -290,8 +289,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
WidgetsBinding.instance.addObserver(this);
AppGlobal.context = context;
_requestIOSPermissions();
pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true);
@ -309,7 +306,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.getToken().then((String token) {
print("Firebase Token: " + token);
sharedPref.setString(PUSH_TOKEN, token);
if(Platform.isIOS) {
if (Platform.isIOS) {
voIPKit.getVoIPToken().then((value) {
print('🎈 example: getVoIPToken: $value');
AppSharedPreferences().setString(APNS_TOKEN, value);
@ -639,6 +636,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
void checkUserStatus(token) async {
await PushNotificationHandler.getInstance().isAndroidPermissionGranted();
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));

@ -191,7 +191,7 @@ class LoggedSliderView extends StatelessWidget {
Texts(
'${TranslationBase.of(context).bloodType1} ${model.booldType}',
color: Colors.white,
fontSize: 8,
fontSize: 7,
)
],
),

@ -22,6 +22,7 @@ import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-locat
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
@ -39,7 +40,6 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../../locator.dart';
import '../landing_page.dart';
import '../landing_page_pharmcy.dart';
class ServicesView extends StatelessWidget {
@ -49,133 +49,18 @@ class ServicesView extends StatelessWidget {
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils;
bool isHomePage;
ServicesView(this.hmgServices, this.index);
ServicesView(this.hmgServices, this.index, this.isHomePage);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if (index == 0) {
openLiveCare(context);
} else if (index == 1) {
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (index == 2) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (index == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (index == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (index == 5) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (index == 6) {
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (index == 7) {
Navigator.push(context, FadePage(page: H2OPage()));
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
} else if (index == 8) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (index == 9) {
Navigator.push(
context,
FadePage(
page: MedicalProfilePageNew(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('my medical details');
} else if (index == 10) {
Navigator.push(
context,
FadePage(
page: Search(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (index == 11) {
getPharmacyToken(context);
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
} else if (index == 12) {
Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
} else if (index == 13) {
Navigator.push(
context,
FadePage(
page: MyFamily(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('my family files');
} else if (index == 14) {
Navigator.push(
context,
FadePage(page: ChildInitialPage()),
);
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
} else if (index == 15) {
// Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
locator<GAnalytics>().hmgServices.logServiceName('todo list');
} else if (index == 16) {
Navigator.push(
context,
FadePage(page: BloodDonationPage()),
);
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
} else if (index == 17) {
Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
);
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
} else if (index == 18) {
Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
);
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
} else if (index == 19) {
Navigator.push(
context,
FadePage(page: SmartWatchInstructions()),
);
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
} else if (index == 20) {
locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
);
} else if (index == 21) {
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
} else if (index == 22) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
locator<GAnalytics>().hmgServices.logServiceName('latest news');
if (isHomePage) {
handleHomePageServices(hmgServices, context);
} else {
handleAllServices(hmgServices, context);
}
},
child: Container(
@ -202,7 +87,7 @@ class ServicesView extends StatelessWidget {
padding: const EdgeInsets.all(12.0),
child: Opacity(
opacity: 0.04,
child: hmgServices.action == 2
child: hmgServices.action == 5
? Image.asset(
hmgServices.icon,
width: double.infinity,
@ -231,7 +116,7 @@ class ServicesView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
mFlex(1),
hmgServices.action == 2
hmgServices.action == (isHomePage ? 5 : 8)
? Image.asset(
hmgServices.icon,
height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18,
@ -278,6 +163,236 @@ class ServicesView extends StatelessWidget {
);
}
handleHomePageServices(HmgServices hmgServices, BuildContext context) {
if (hmgServices.action == 0) {
Navigator.push(context, FadePage(page: Search()));
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (hmgServices.action == 1) {
openLiveCare(context);
} else if (hmgServices.action == 2) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (hmgServices.action == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (hmgServices.action == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (hmgServices.action == 6) {
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (hmgServices.action == 7) {
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (hmgServices.action == 8) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
}
}
handleAllServices(HmgServices hmgServices, BuildContext context) {
if (hmgServices.action == 0) {
Navigator.push(context, FadePage(page: Search()));
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
} else if (hmgServices.action == 1) {
openLiveCare(context);
} else if (hmgServices.action == 2) {
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
} else if (hmgServices.action == 3) {
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
locator<GAnalytics>().hmgServices.logServiceName('home health care');
} else if (hmgServices.action == 4) {
Navigator.push(context, FadePage(page: CMCPage()));
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
} else if (hmgServices.action == 5) {
getPharmacyToken(context);
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
} else if (hmgServices.action == 6) {
Navigator.push(context, FadePage(page: MedicalProfilePageNew()));
} else if (hmgServices.action == 7) {
Navigator.push(context, FadePage(page: MyFamily()));
locator<GAnalytics>().hmgServices.logServiceName('my family files');
} else if (hmgServices.action == 8) {
Navigator.push(context, FadePage(page: PaymentService()));
locator<GAnalytics>().hmgServices.logServiceName('online payments');
} else if (hmgServices.action == 9) {
Navigator.push(context, FadePage(page: ChildInitialPage()));
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
} else if (hmgServices.action == 10) {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
} else if (hmgServices.action == 11) {
Navigator.push(context, FadePage(page: EReferralPage()));
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
} else if (hmgServices.action == 12) {
Navigator.push(context, FadePage(page: H2OPage()));
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
} else if (hmgServices.action == 13) {
Navigator.push(context, FadePage(page: (HealthCalculators())));
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
} else if (hmgServices.action == 14) {
Navigator.push(context, FadePage(page: HealthConverter()));
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
} else if (hmgServices.action == 15) {
Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
locator<GAnalytics>().hmgServices.logServiceName('todo list');
} else if (hmgServices.action == 16) {
Navigator.push(context, FadePage(page: BloodDonationPage()));
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
} else if (hmgServices.action == 17) {
showCovidDialog(context);
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
} else if (hmgServices.action == 18) {
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
} else if (hmgServices.action == 19) {
Navigator.push(context, FadePage(page: SmartWatchInstructions()));
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
} else if (hmgServices.action == 20) {
Navigator.push(context, FadePage(page: ParkingPage()));
locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
} else if (hmgServices.action == 21) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),
),
);
locator<GAnalytics>().hmgServices.logServiceName('latest news');
} else if (hmgServices.action == 22) {
Navigator.push(context, FadePage(page: ContactUsPage()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
}
// if (hmgServices.action == 10) {
// openLiveCare(context);
// } else if (index == 1) {
// showCovidDialog(context);
// locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
// } else if (index == 2) {
// Navigator.push(context, FadePage(page: PaymentService()));
// locator<GAnalytics>().hmgServices.logServiceName('online payments');
// } else if (index == 3) {
// Navigator.push(context, FadePage(page: HomeHealthCarePage()));
// locator<GAnalytics>().hmgServices.logServiceName('home health care');
// } else if (index == 4) {
// Navigator.push(context, FadePage(page: CMCPage()));
// locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
// } else if (index == 5) {
// Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
// locator<GAnalytics>().hmgServices.logServiceName('emergency service');
// } else if (index == 6) {
// Navigator.push(context, FadePage(page: EReferralPage()));
// locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
// } else if (index == 7) {
// Navigator.push(context, FadePage(page: H2OPage()));
// locator<GAnalytics>().hmgServices.logServiceName('water consumption');
// } else if (index == 8) {
// Navigator.push(context, FadePage(page: ContactUsPage()));
// locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
// } else if (index == 9) {
// Navigator.push(
// context,
// FadePage(
// page: MedicalProfilePageNew(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('my medical details');
// } else if (index == 10) {
// Navigator.push(
// context,
// FadePage(
// page: Search(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('book appointment');
// } else if (index == 11) {
// getPharmacyToken(context);
// locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
// } else if (index == 12) {
// Navigator.push(
// context,
// FadePage(
// page: InsuranceUpdate(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('update insurance');
// } else if (index == 13) {
// Navigator.push(
// context,
// FadePage(
// page: MyFamily(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('my family files');
// } else if (index == 14) {
// Navigator.push(
// context,
// FadePage(page: ChildInitialPage()),
// );
// locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
// } else if (index == 15) {
// LandingPage.shared.switchToDoFromHMGServices();
// locator<GAnalytics>().hmgServices.logServiceName('todo list');
// } else if (index == 16) {
// Navigator.push(
// context,
// FadePage(page: BloodDonationPage()),
// );
// locator<GAnalytics>().hmgServices.logServiceName('blood donation');
// } else if (index == 17) {
// Navigator.push(
// context,
// FadePage(
// page: (HealthCalculators()),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('health calculator');
// } else if (index == 18) {
// Navigator.push(
// context,
// FadePage(
// page: HealthConverter(),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('heath converters');
// } else if (index == 19) {
// Navigator.push(
// context,
// FadePage(page: SmartWatchInstructions()),
// );
// locator<GAnalytics>().hmgServices.logServiceName('smart watches');
// } else if (index == 20) {
// locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// );
// } else if (index == 21) {
// launch("https://hmgwebservices.com/vt_mobile/html/index.html");
// locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
// } else if (index == 22) {
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (BuildContext context) => MyWebView(
// title: "HMG News",
// selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
// ),
// ),
// );
// locator<GAnalytics>().hmgServices.logServiceName('latest news');
// }
}
showCovidDialog(BuildContext context) {
if (Platform.isAndroid) {
showDialog(

@ -49,7 +49,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
void dispose() {
_animationController.dispose();
player.stop();
_controller.dispose();
// _controller.dispose();
disposeAudioResources();
super.dispose();
}
@ -62,17 +62,17 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
body: FutureBuilder<void>(
future: _initializeControllerFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
// if (snapshot.connectionState == ConnectionState.done) {
return Stack(
alignment: FractionalOffset.center,
children: <Widget>[
new Positioned.fill(
child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
),
// new Positioned.fill(
// child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
// ),
new Positioned.fill(
child: new ClipRect(
child: new BackdropFilter(
filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
// child: new BackdropFilter(
// filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: new Container(
decoration: new BoxDecoration(color: Colors.grey[800].withOpacity(0.8)),
child: Column(
@ -191,29 +191,18 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
),
),
),
),
// ),
],
);
} else {
return const Center(child: CircularProgressIndicator());
}
// } else {
// return const Center(child: CircularProgressIndicator());
// }
},
),
);
}
void _runAnimation() async {
final cameras = await availableCameras();
final firstCamera = cameras[1];
_controller = CameraController(
// Get a specific camera from the list of available cameras.
firstCamera,
// Define the resolution to use.
ResolutionPreset.medium,
);
_initializeControllerFuture = _controller.initialize();
setState(() {
isCameraReady = true;
});
@ -229,7 +218,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
try {
// backToHome();
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
await _controller.dispose();
// await _controller.dispose();
changeCallStatusAPI(4);
await Navigator.of(context).pushReplacement(
MaterialPageRoute(

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -21,8 +23,10 @@ class LiveCarePatmentPage extends StatefulWidget {
GetERAppointmentFeesList getERAppointmentFeesList;
int waitingTime;
String clinicName;
bool isPharmaLiveCare;
String pharmaLiveCareClientID;
LiveCarePatmentPage({@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName});
LiveCarePatmentPage({@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = ""});
@override
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
@ -46,6 +50,10 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
showNewAppBarTitle: true,
showNewAppBar: true,
description: TranslationBase.of(context).erConsultation,
onTap: () {
Navigator.pop(context);
Navigator.pop(context);
},
body: Container(
width: double.infinity,
height: double.infinity,
@ -277,6 +285,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
child: DefaultButton(
TranslationBase.of(context).cancel,
() {
if (widget.isPharmaLiveCare) cancelAPI();
Navigator.pop(context, false);
},
),
@ -289,24 +298,28 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
if (_selected == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
} else {
askVideoCallPermission().then((value) async {
if (value) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
});
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
if (widget.isPharmaLiveCare) {
Navigator.pop(context, true);
} else {
askVideoCallPermission().then((value) async {
if (value == true) {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
print(value);
});
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
});
} else {
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
}
} else {
Navigator.pop(context, true);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
openPermissionsDialog();
}
} else {
openPermissionsDialog();
}
});
});
}
}
},
color: CustomColors.green,
@ -321,11 +334,39 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
);
}
@override
void dispose() {
// cancelAPI();
super.dispose();
}
Future<bool> askVideoCallPermission() async {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
return false;
if (Platform.isIOS) {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
return false;
}
} else {
await showDialog(
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: TranslationBase.of(context).covidConsentHeader,
message: TranslationBase.of(context).liveCarePermissions,
onTap: () async {
if (!(await Permission.notification.request().isGranted) ||
!(await Permission.camera.request().isGranted) ||
!(await Permission.microphone.request().isGranted) ||
!(await Permission.location.request().isGranted)) {
return false;
}
},
));
}
return true;
// if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) {
// return false;
// }
// return true;
}
openPermissionsDialog() {
@ -342,6 +383,17 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
dialog.showAlertDialog(context);
}
openPermissionsConsentDialog() {
showDialog(
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: TranslationBase.of(context).covidConsentHeader,
message: TranslationBase.of(context).covidConsent,
onTap: () async {},
));
}
Future drawOverAppsMessageDialog(BuildContext context) async {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
@ -356,6 +408,13 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
dialog.showAlertDialog(context);
}
void cancelAPI() {
LiveCareService service = new LiveCareService();
service.cancelPharmaLiveCareRequest(widget.pharmaLiveCareClientID, context).then((res) {}).catchError((err) {
print(err);
});
}
void onRadioChanged(int value) {
setState(() {
_selected = value;

@ -17,6 +17,10 @@ import 'package:provider/provider.dart';
class LiveCareHome extends StatefulWidget {
static bool showFooterButton = true;
static bool isLiveCareTypeSelected = false;
final bool isPharmacyLiveCare;
final String pharmacyLiveCareQRCode;
const LiveCareHome({Key key, this.isPharmacyLiveCare = false, this.pharmacyLiveCareQRCode = ""}) : super(key: key);
@override
_LiveCareHomeState createState() => _LiveCareHomeState();
@ -121,6 +125,8 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
isDataLoaded && !hasLiveCareRequest
? ClinicList(
getLiveCareHistory: getLiveCareHistory,
isPharmacyLiveCare: widget.isPharmacyLiveCare,
pharmacyLiveCareQRCode: widget.pharmacyLiveCareQRCode,
)
: isDataLoaded
? LiveCarePendingRequest(getLiveCareHistory: getLiveCareHistory, pendingERRequestHistoryList: pendingERRequestHistoryList)

@ -1,9 +1,14 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/livecare/pharma_livecare_intro_page.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
@ -18,6 +23,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
AppSharedPreferences sharedPref = AppSharedPreferences();
ProjectViewModel projectViewModel;
String pharmacyLiveCareQRCode = "";
@override
void initState() {
@ -89,7 +95,6 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).livecareSummary, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
physics: NeverScrollableScrollPhysics(),
@ -98,6 +103,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
children: [
_loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1),
_loginOptionButton(TranslationBase.of(context).livecareOption4, 'assets/images/new/book appointment.svg', 2),
_loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3, isEnable: projectViewModel.havePrivilege(99)),
],
),
SizedBox(
@ -110,46 +116,105 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
);
}
Widget _loginOptionButton(String _title, String _icon, int _loginIndex) {
Widget _loginOptionButton(String _title, String _icon, int _loginIndex, {bool isEnable = true}) {
return InkWell(
onTap: () {
if (_loginIndex == 1) {
Navigator.pop(context, "immediate");
projectViewModel.analytics.liveCare.livecare_immediate_consultation();
} else {
} else if (_loginIndex == 2) {
Navigator.pop(context, "schedule");
projectViewModel.analytics.liveCare.livecare_schedule_video_call();
} else {
//Pharmacy LiveCare
if (isEnable) {
Navigator.push(
context,
FadePage(
page: PharmaLiveCareIntroPage(),
),
).then((value) {
if (value != null && value.contains("pharmacy/")) {
pharmacyLiveCareQRCode = value.split("/")[1];
startPharmacyLiveCareProcess();
}
});
}
}
},
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 3, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SvgPicture.asset(
_icon,
height: _loginIndex == 1 ? 60 : 50,
width: _loginIndex == 1 ? 60 : 50,
child: Stack(children: [
AspectRatio(
aspectRatio: 1.0,
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 3, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
Text(
_title,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SvgPicture.asset(
_icon,
height: _loginIndex == 3 ? 80 : 60,
width: _loginIndex == 3 ? 80 : 60,
),
Text(
_title,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),
],
),
),
),
isEnable
? Container()
: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.grey.withOpacity(0.6),
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
width: double.infinity,
height: double.infinity,
child: Icon(
Icons.lock_outline,
size: 40,
),
)
]),
);
}
readQRCode() async {
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
if (pharmacyLiveCareQRCode != "") {
GifLoaderDialogUtils.showMyDialog(context);
LiveCareService service = new LiveCareService();
service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
startPharmacyLiveCareProcess();
});
} else {}
}
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1");
Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode");
// Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,)));
}
getLanguageID() async {
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() {

@ -0,0 +1,207 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../uitl/utils.dart';
class PharmaLiveCareIntroPage extends StatefulWidget {
const PharmaLiveCareIntroPage({Key key}) : super(key: key);
@override
State<PharmaLiveCareIntroPage> createState() => _PharmaLiveCareIntroPageState();
}
class _PharmaLiveCareIntroPageState extends State<PharmaLiveCareIntroPage> {
ProjectViewModel projectViewModel;
String pharmacyLiveCareQRCode = "";
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).pharmaLiveCare,
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(child: Text(TranslationBase.of(context).pharmaLiveCare1, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Text(TranslationBase.of(context).pharmaLiveCareDesc1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).wherePharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
"assets/images/new/booth_image.png",
),
Container(
width: MediaQuery.of(context).size.width * 0.6,
margin: EdgeInsets.only(left: 10.0, right: 10.0),
child: Text(TranslationBase.of(context).pharmaLiveCareDesc2,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
)),
Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(TranslationBase.of(context).howPharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Text(TranslationBase.of(context).pharmaLiveCareDesc3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 7.0),
padding: EdgeInsets.fromLTRB(14.0, 5.0, 14.0, 5.0),
decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))),
child: Text("1", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset("assets/images/new/qr_code.svg", width: 40),
),
Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareScanQR,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareScanQR1,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 7.0),
padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0),
decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))),
child: Text("2", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset("assets/images/new/payment.svg", width: 40),
),
Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment1,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
),
],
),
),
Container(
margin: EdgeInsets.only(top: 7.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 7.0),
padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0),
decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))),
child: Text("3", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset("assets/images/new/pharmaicon.svg", width: 40),
),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))),
Container(
width: MediaQuery.of(context).size.width * 0.7,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation1,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))),
],
),
],
),
),
SizedBox(
height: 100.0,
)
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.08,
width: double.infinity,
color: Colors.white,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: DefaultButton(TranslationBase.of(context).pharmaLiveCareScanQR, () {
readQRCode();
}),
),
],
),
),
);
}
readQRCode() async {
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
if (pharmacyLiveCareQRCode != "") {
GifLoaderDialogUtils.showMyDialog(context);
LiveCareService service = new LiveCareService();
service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
startPharmacyLiveCareProcess();
});
} else {}
}
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1");
Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode");
}
}

@ -96,15 +96,15 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
child: Text(TranslationBase.of(context).yourTurn + " " + widget.pendingERRequestHistoryList.patCount.toString() + " " + TranslationBase.of(context).patients,
style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)),
),
Row(
children: [
Container(
padding: const EdgeInsets.all(5.0),
child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)),
),
Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)))
],
),
// Row(
// children: [
// Container(
// padding: const EdgeInsets.all(5.0),
// child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)),
// ),
// Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)))
// ],
// ),
mHeight(12.0),
Container(
child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () {
@ -112,120 +112,17 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
// cancelLiveCareRequest();
}),
),
// DefaultButton(
// TranslationBase.of(context).cancel,
// () {
// cancelLiveCareRequest();
// },
// ),
],
),
),
],
),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Container(
// child: Text("In Progress:",
// style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(top: 10.0),
// child: Text("Estimated Waiting Time: ",
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -50.0, 0.0),
// alignment: Alignment.center,
// child: CircularCountDownTimer(
// duration:
// widget.pendingERRequestHistoryList.watingtimeInteger * 60,
// width: MediaQuery.of(context).size.width / 3,
// height: MediaQuery.of(context).size.height / 3,
// color: Colors.white,
// fillColor: Colors.green[700],
// strokeWidth: 15.0,
// textStyle: TextStyle(
// fontSize: 22.0,
// color: Colors.black87,
// fontWeight: FontWeight.bold),
// isReverse: true,
// isTimerTextShown: true,
// onComplete: () {
// print('Countdown Ended');
// },
// ),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -60.0, 0.0),
// child: Divider(
// color: Colors.grey[500],
// thickness: 0.7,
// ),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -50.0, 0.0),
// child: Text("Requested date:",
// style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -30.0, 0.0),
// child: Text(
// DateUtil.getDateFormatted(
// widget.pendingERRequestHistoryList.arrivalTime),
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -20.0, 0.0),
// padding: EdgeInsets.all(7.0),
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.all(Radius.circular(5)),
// color: Colors.red[800],
// ),
// margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
// child: Text(widget.pendingERRequestHistoryList.stringCallStatus,
// style: TextStyle(fontSize: 14.0, color: Colors.white)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, 0.0, 0.0),
// child: Divider(
// color: Colors.grey[500],
// thickness: 0.7,
// ),
// ),
// Container(
// alignment: Alignment.center,
// transform: Matrix4.translationValues(0.0, 10.0, 0.0),
// child: Text(
// "Your turn is after " +
// widget.pendingERRequestHistoryList.patCount.toString() +
// " 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)),
// ),
// ),
// ),
// ],
// ),
);
}

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart';
@ -39,8 +40,10 @@ import '../live_care_payment_page.dart';
class ClinicList extends StatefulWidget {
final Function getLiveCareHistory;
bool isPharmacyLiveCare;
String pharmacyLiveCareQRCode;
ClinicList({@required this.getLiveCareHistory});
ClinicList({@required this.getLiveCareHistory, this.isPharmacyLiveCare = false, this.pharmacyLiveCareQRCode = ""});
@override
_clinic_listState createState() => _clinic_listState();
@ -117,7 +120,7 @@ class _clinic_listState extends State<ClinicList> {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, context).then((res) {
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
@ -182,7 +185,7 @@ class _clinic_listState extends State<ClinicList> {
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, context).then((res) {
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) {
@ -193,7 +196,15 @@ class _clinic_listState extends State<ClinicList> {
}
showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
navigateTo(context, LiveCarePatmentPage(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName)).then(
navigateTo(
context,
LiveCarePatmentPage(
getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime,
clinicName: selectedClinicName,
isPharmaLiveCare: widget.isPharmacyLiveCare,
pharmaLiveCareClientID: widget.pharmacyLiveCareQRCode))
.then(
(value) {
if (value) {
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
@ -211,6 +222,8 @@ class _clinic_listState extends State<ClinicList> {
// }
// }
// });
} else {
Navigator.pop(context);
}
},
);
@ -291,6 +304,9 @@ class _clinic_listState extends State<ClinicList> {
});
}
bool isPharmacyLiveCare = widget.isPharmacyLiveCare;
String pharmaLiveCareQRCodeValue = widget.pharmacyLiveCareQRCode;
Navigator.push(
context,
FadePage(
@ -299,8 +315,11 @@ class _clinic_listState extends State<ClinicList> {
setState(() {});
},
patientShare: num.parse(getERAppointmentFeesList.total),
isFromAdvancePayment: widget.isPharmacyLiveCare,
))).then((value) {
print(value);
widget.isPharmacyLiveCare = isPharmacyLiveCare;
widget.pharmacyLiveCareQRCode = pharmaLiveCareQRCodeValue;
if (value != null) {
openPayment(value, authUser, num.parse(getERAppointmentFeesList.total), appo);
projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment');
@ -315,8 +334,27 @@ class _clinic_listState extends State<ClinicList> {
selectedInstallmentPlan = paymentMethod[1];
this.amount = amount.toString();
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod[0],
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, "", "", "", "", paymentMethod[1]);
browser.openPaymentBrowser(
amount,
"LiveCare Payment",
widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo),
"12",
authenticatedUser.emailAddress,
paymentMethod[0],
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
browser,
false,
"4",
selectedClinicID,
context,
"",
"",
"",
"",
paymentMethod[1]);
}
onBrowserLoadStart(String url) {
@ -424,17 +462,25 @@ class _clinic_listState extends State<ClinicList> {
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
service
.checkPaymentStatus(
widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), widget.isPharmacyLiveCare, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
String paymentInfo = res['Response_Message'];
amount = res['Amount'].toString();
payment_method = res['PaymentMethod'];
if (paymentInfo == 'Success') {
addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
addNewCallForPatientER(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode : Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
} else {
AppToast.showErrorToast(message: res['Response_Message']);
projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed(
appointment_type: 'livecare', payment_type: 'appointment', payment_method: selectedPaymentMethod, txn_amount: this.amount, txn_currency: currency, error_message: res['Response_Message']);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> route) => false,
);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -446,7 +492,7 @@ class _clinic_listState extends State<ClinicList> {
addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) {
service.addNewCallForPatientER(selectedClinicID, clientRequestID, widget.isPharmacyLiveCare, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: "New Call has been added successfully");
widget.getLiveCareHistory();
@ -526,13 +572,18 @@ class _clinic_listState extends State<ClinicList> {
openLiveCareSelectionDialog() async {
liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA);
sharedPref.remove(LIVECARE_CLINIC_DATA);
if (liveCareClinicIDs != null) {
selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]);
setState(() {
currentSelectedLiveCareType = "immediate";
});
// if(widget.isPharmacyLiveCare) {
//
// } else {
getLiveCareClinicsList();
startLiveCare();
// }
} else {
Navigator.of(context)
.push(new MaterialPageRoute<String>(
@ -540,9 +591,17 @@ class _clinic_listState extends State<ClinicList> {
return LiveCareTypeSelect();
},
fullscreenDialog: true))
.then((value) {
.then((value) async {
if (value == null) {
Navigator.pop(context);
} else if (value.contains("/")) {
widget.isPharmacyLiveCare = true;
widget.pharmacyLiveCareQRCode = value.split("/")[1];
liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA);
selectedClinicID = 1;
selectedClinicName = TranslationBase.of(context).pharmaLiveCare;
sharedPref.remove(LIVECARE_CLINIC_DATA);
startLiveCare();
} else {
print(value);
if (value == "immediate") {

@ -42,8 +42,8 @@ import 'package:provider/provider.dart';
class ConfirmLogin extends StatefulWidget {
final Function changePageViewIndex;
final fromRegistration;
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false}) : super(key: key);
final bool isDubai;
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key);
@override
_ConfirmLogin createState() => _ConfirmLogin();
@ -385,8 +385,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
var request = this.getCommonRequest(type: type);
request.sMSSignature = await SMSOTP.getSignature();
GifLoaderDialogUtils.showMyDialog(context);
if (healthId != null) {
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
if (healthId != null || widget.isDubai) {
if(!widget.isDubai){
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
}
request.healthId = healthId;
request.isHijri = isHijri;
await this.authService.sendActivationCodeRegister(request).then((result) {
@ -547,7 +549,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1;
request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0;
request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0';
request.dob = this.registerd_data.dob;
request.isRegister = this.registerd_data.isRegister;
} else {
request.searchType = request.searchType != null ? request.searchType : 2;
@ -565,8 +567,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
GifLoaderDialogUtils.showMyDialog(context);
var request = this.getCommonRequest().toJson();
dynamic res;
if (healthId != null) {
request['DOB'] = dob;
if (healthId != null || widget.isDubai) {
if(!widget.isDubai) {
request['DOB'] = dob;
}
request['HealthId'] = healthId;
request['IsHijri'] = isHijri;
@ -579,6 +583,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
result = CheckActivationCode.fromJson(result),
if (this.registerd_data != null && this.registerd_data.isRegister == true)
{
// if(widget.isDubai ==false){
widget.changePageViewIndex(1),
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
}

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation;
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
@ -45,21 +46,30 @@ class RegisterInfo extends StatefulWidget {
class _RegisterInfo extends State<RegisterInfo> {
final authService = new AuthProvider();
final sharedPref = new AppSharedPreferences();
RegisterInfoResponse registerInfo;
RegisterInfoResponse registerInfo = RegisterInfoResponse();
bool isLoading;
int page;
final List<Location> locationList = [
new Location(name: 'KSA', value: '1'),
new Location(name: 'Dubai', value: '2'),
new Location(name: 'KSA', value: '1', nameAr: "السعودية"),
new Location(name: 'Dubai', value: '2', nameAr: "دبي"),
];
String language = '1';
var registerd_data;
CheckPatientAuthenticationReq registerd_data;
final List<Language> languageList = [
new Language(name: 'English', value: '2'),
new Language(name: 'Arabic', value: '1'),
new Language(name: 'English', value: '2', nameAr: "إنجليزي"),
new Language(name: 'Arabic', value: '1', nameAr: "عربي"),
];
final List<Language> genderList = [
new Language(name: 'Male', value: 'M', nameAr: "ذكر"),
new Language(name: 'Female', value: 'F', nameAr: "أنثى"),
];
final List<Language> maritalList = [
new Language(name: 'Married', value: 'M', nameAr: "متزوج"),
new Language(name: 'Single', value: 'S', nameAr: "اعزب"),
new Language(name: 'Divorce', value: 'D', nameAr: "الطلاق"),
];
String email = '';
List<CountriesLists> countriesList = [];
ToDoCountProviderModel toDoProvider;
String location = '1';
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@ -67,16 +77,22 @@ class _RegisterInfo extends State<RegisterInfo> {
ProjectViewModel projectViewModel;
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
bool isDubai = false;
RegisterInfoResponse data = RegisterInfoResponse();
CheckPatientAuthenticationReq data2;
String gender = 'M';
String maritalStatus = 'M';
String nationality = 'SAU';
@override
void initState() {
if (widget.page == 1) {
getCountries();
}
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getRegisterInfo();
});
setState(() {
page = widget.page;
});
page = widget.page;
super.initState();
}
@ -105,169 +121,279 @@ class _RegisterInfo extends State<RegisterInfo> {
],
),
SizedBox(height: 20),
registerInfo != null && page == 1
(isDubai && page == 1)
? Column(
children: [
SizedBox(height: 20),
getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName,
registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn),
SizedBox(height: 20),
getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn,
TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn),
getnameField(TranslationBase.of(context).identificationNumber, registerd_data.patientIdentificationID, TranslationBase.of(context).mobileNumber,
registerd_data.patientMobileNumber.toString()),
// SizedBox(height: 20),
projectViewModel.isArabic
? getnameField(
'',
inputWidget("First Name", "First Name English", 'fNameEn'),
'',
inputWidget("Last Name", "Last Name English", 'lNameEn'),
)
: SizedBox(
height: 0,
),
getnameField(
'',
inputWidget(TranslationBase.of(context).firstName, TranslationBase.of(context).firstName, 'fName'),
'',
inputWidget(TranslationBase.of(context).middleName, TranslationBase.of(context).middleName, 'sName'),
),
getnameField(
'',
inputWidget(TranslationBase.of(context).lastName, TranslationBase.of(context).lastName, 'lName'),
TranslationBase.of(context).gender,
Container(
height: 20,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: gender,
hint: Text(TranslationBase.of(context).gender),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
gender = value;
registerInfo.gender = value;
})
},
items: genderList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList()))),
),
SizedBox(height: 20),
getnameField(
TranslationBase.of(context).gender,
registerInfo.maritalStatusCode == 'U'
? 'Unknown'
: registerInfo.maritalStatusCode == 'M'
? 'Male'
: 'Female',
TranslationBase.of(context).maritalStatus,
registerInfo.maritalStatus),
SizedBox(height: 20),
getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: maritalStatus,
hint: Text(TranslationBase.of(context).maritalStatus),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
maritalStatus = value;
registerInfo.maritalStatusCode = value;
})
},
items: maritalList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList()))),
TranslationBase.of(context).nationality,
Container(
height: 22,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: nationality,
hint: Text(TranslationBase.of(context).nationality),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
nationality = value;
registerInfo.nationalityCode = value;
})
},
items: countriesList.map<DropdownMenuItem<String>>((CountriesLists value) {
return DropdownMenuItem<String>(
value: value.iD,
child: Text(
value.name,
),
);
}).toList())))),
SizedBox(height: 20),
getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""),
getnameField(TranslationBase.of(context).dateOfBirth, registerd_data.dob, "", ""),
SizedBox(height: 20),
],
)
: registerInfo != null && widget.page == 2
: (registerInfo.healthId != null && page == 1)
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).prefferedLanguage,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: language,
hint: Text(TranslationBase.of(context).prefferedLanguage),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
language = value;
})
},
items: languageList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(value.name),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: location,
hint: Text(TranslationBase.of(context).selectLocation),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
location = value;
})
},
items: locationList.map<DropdownMenuItem<String>>((Location value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
value.name,
),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12),
margin: EdgeInsets.only(bottom: 0),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).email,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
child: TextField(
onChanged: (value) {
setState(() {
email = value;
});
},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
))
]))
])),
children: [
SizedBox(height: 20),
getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName,
registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn),
SizedBox(height: 20),
getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn,
TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn),
SizedBox(height: 20),
getnameField(
TranslationBase.of(context).gender,
registerInfo.maritalStatusCode == 'U'
? 'Unknown'
: registerInfo.maritalStatusCode == 'M'
? 'Male'
: 'Female',
TranslationBase.of(context).maritalStatus,
registerInfo.maritalStatus),
SizedBox(height: 20),
getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()),
SizedBox(height: 20),
getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""),
SizedBox(height: 20),
],
)
: SizedBox(),
: widget.page == 2
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).prefferedLanguage,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: language,
hint: Text(TranslationBase.of(context).prefferedLanguage),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
language = value;
})
},
items: languageList.map<DropdownMenuItem<String>>((Language value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).selectLocation,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
child: DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: true,
value: location,
hint: Text(TranslationBase.of(context).selectLocation),
iconSize: 40,
elevation: 16,
onChanged: (value) => {
setState(() {
location = value;
})
},
items: locationList.map<DropdownMenuItem<String>>((Location value) {
return DropdownMenuItem<String>(
value: value.value,
child: Text(
projectViewModel.isArabic == 1 ? value.nameAr : value.name,
),
);
}).toList())))
]))
])),
SizedBox(
height: 20,
),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12),
margin: EdgeInsets.only(bottom: 0),
child: Row(children: [
Flexible(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
TranslationBase.of(context).email,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
child: TextField(
keyboardType: TextInputType.emailAddress,
onChanged: (value) {
setState(() {
email = value;
});
},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
))
]))
])),
],
)
: SizedBox(),
]),
),
bottomSheet: Container(
@ -289,24 +415,40 @@ class _RegisterInfo extends State<RegisterInfo> {
child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () {
nextPage();
page == 1 ? locator<GAnalytics>().loginRegistration.registration_personal_info() : locator<GAnalytics>().loginRegistration.registration_patient_info();
}, textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)),
}, textColor: Colors.white, color: isValid() == true ? Color(0xff359846) : Colors.grey)),
),
],
)));
}
nextPage() {
nextPage() async {
if (page == 1) {
setState(() {
if (isDubai) {
await setRegisterData();
widget.changePageViewIndex(2);
});
} else {
widget.changePageViewIndex(2);
}
} else {
registerNow();
}
}
setRegisterData() async {
registerInfo.gender = gender;
registerInfo.maritalStatusCode = maritalStatus;
registerInfo.nationalityCode = nationality;
projectViewModel.setRegisterData(registerInfo);
// await sharedPref.setObject(REGISTER_INFO_DUBAI, registerInfo);
}
registerNow() {
dynamic request = getTempUserRequest();
dynamic request;
if (isDubai)
request = getTempUserRequestDubai();
else
request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context);
dynamic res;
this
@ -374,14 +516,17 @@ class _RegisterInfo extends State<RegisterInfo> {
}
getRegisterInfo() async {
var data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA));
if (await sharedPref.getObject(NHIC_DATA) != null) {
data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA));
this.registerInfo = data;
}
if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) {
var data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN));
setState(() {
this.registerInfo = data;
this.registerd_data = data2;
isDubai = data2.patientOutSA == 1 ? true : false;
if (isDubai) location = '2';
});
}
}
@ -424,8 +569,54 @@ class _RegisterInfo extends State<RegisterInfo> {
};
}
getTempUserRequestDubai() {
DateFormat dateFormat = DateFormat("mm/dd/yyyy");
registerInfo = projectViewModel.registerInfo;
print(dateFormat.parse(registerd_data.dob));
var hDate = new HijriCalendar.fromDate(dateFormat.parse(registerd_data.dob));
var date = hDate.toString();
final DateFormat dateFormat1 = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
return {
"Patientobject": {
"TempValue": true,
"PatientIdentificationType": registerd_data.patientIdentificationID.substring(0, 1) == "1" ? 1 : 2,
"PatientIdentificationNo": registerd_data.patientIdentificationID,
"MobileNumber": registerd_data.patientMobileNumber,
"PatientOutSA": (registerd_data.zipCode == '966' || registerd_data.zipCode == '+966') ? 0 : 1,
"FirstNameN": registerInfo.firstNameAr ?? "",
"FirstName": registerInfo.firstNameEn ?? "",
"MiddleNameN": registerInfo.secondNameAr ?? ".",
"MiddleName": registerInfo.secondNameEn ?? ".",
"LastNameN": registerInfo.lastNameAr ?? "",
"LastName": registerInfo.lastNameEn ?? "",
"StrDateofBirth": dateFormat1.format(dateFormat2.parse(registerd_data.dob)),
"DateofBirth": DateUtil.convertISODateToJsonDate(registerd_data.dob.replaceAll('/', '-')),
"Gender": registerInfo.gender == 'M' ? 1 : 2,
"NationalityID": registerInfo.nationalityCode,
"eHealthIDField": null,
"DateofBirthN": date,
"EmailAddress": email,
"SourceType": location,
"PreferredLanguage": registerd_data.languageID.toString(),
"Marital": registerInfo.maritalStatusCode == 'U'
? '0'
: registerInfo.maritalStatusCode == 'M'
? '1'
: '2',
},
"PatientIdentificationID": registerd_data.patientIdentificationID,
"PatientMobileNumber": registerd_data.patientMobileNumber.toString()[0] == '0' ? registerd_data.patientMobileNumber : '0' + registerd_data.patientMobileNumber.toString(),
"DOB": registerd_data.dob,
"IsHijri": registerd_data.isHijri
};
}
bool isValid() {
if (location != null && language != null && Utils.validEmail(email) == true) {
if ((location != null && language != null && Utils.validEmail(email) == true) ||
(registerInfo.firstNameEn != null && registerInfo.lastNameEn != null) ||
(projectViewModel.isArabic && registerInfo.firstNameEn != null && registerInfo.firstNameAr != null && registerInfo.lastNameEn != null && registerInfo.lastNameAr != null)) {
return true;
} else {
return false;
@ -436,49 +627,57 @@ class _RegisterInfo extends State<RegisterInfo> {
return Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name1,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
Text(
value1,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
),
),
],
)),
child: Padding(
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name1,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
value1 is String
? Text(
value1,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
),
)
: value1,
],
))),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name2,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
Text(
value2,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
),
),
],
))
child: Padding(
padding: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
name2,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
value2 is String
? Text(
value2,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
),
)
: value2,
],
)))
],
);
}
@ -547,18 +746,146 @@ class _RegisterInfo extends State<RegisterInfo> {
print(err);
});
}
getCountries() {
ClinicListService service = new ClinicListService();
service.getCountries().then((res) {
if (res['MessageStatus'] == 1) {
res['ListNationality'].forEach((items) => {countriesList.add(CountriesLists.fromJson(items))});
setState(() {});
}
}).catchError((err) {
print(err);
});
}
Widget inputWidget(String _labelText, String _hintText, String name, {String prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 10, right: 10, bottom: 5, top: 5),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: InkWell(
onTap: hasSelection ? () {} : null,
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.text,
// controller: _controller,
onChanged: (value) => {
setState(() {
switch (name) {
case 'fName':
{
if (projectViewModel.isArabic) {
registerInfo.firstNameAr = value;
} else {
registerInfo.firstNameEn = value;
registerInfo.firstNameAr = '...';
}
}
break;
case 'sName':
{
if (projectViewModel.isArabic) {
registerInfo.secondNameAr = value.isEmpty ? "." : value;
registerInfo.secondNameEn = '...';
} else {
registerInfo.secondNameEn = value.isEmpty ? "." : value;
registerInfo.secondNameAr = '...';
}
}
break;
case 'lName':
{
if (projectViewModel.isArabic) {
registerInfo.lastNameAr = value;
} else {
registerInfo.lastNameEn = value;
registerInfo.lastNameAr = '...';
}
}
break;
case 'fNameEn':
registerInfo.firstNameEn = value;
break;
case 'lNameEn':
registerInfo.lastNameEn = value;
break;
}
})
//_controller.text =value
},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
],
),
),
);
}
}
class Language {
final String name;
final String value;
final String nameAr;
Language({this.name, this.value});
Language({this.name, this.value, this.nameAr});
}
class Location {
final String name;
final String value;
final String nameAr;
Location({this.name, this.value});
Location({this.name, this.value, this.nameAr});
}

@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
@ -56,125 +55,127 @@ class _Register extends State<Register> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: false,
isShowDecPage: false,
showNewAppBar: false,
showNewAppBarTitle: true,
body: Column(
children: [
Expanded(
child: ListView(
padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
children: [
SizedBox(height: 10),
Padding(
padding: EdgeInsets.all(10),
child: Text(
TranslationBase.of(context).enterNationalId,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
)),
SizedBox(height: 10),
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
SizedBox(height: 12),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)),
SizedBox(height: 20),
Row(
children: <Widget>[
Expanded(
child: Row(
children: <Widget>[
Radio(
value: 1,
groupValue: isHijri,
onChanged: (value) {
setState(() {
isHijri = value;
});
validateForm();
},
),
Text(TranslationBase.of(context).hijriDate),
],
),
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: false,
isShowDecPage: false,
showNewAppBar: false,
showNewAppBarTitle: true,
body: Column(
children: [
Expanded(
child: ListView(
padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
children: [
SizedBox(height: 10),
Padding(
padding: EdgeInsets.all(10),
child: Text(
TranslationBase.of(context).enterNationalId,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
)),
SizedBox(height: 10),
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
SizedBox(height: 12),
Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)),
SizedBox(height: 20),
Row(
children: <Widget>[
Expanded(
child: Row(
children: <Widget>[
Radio(
value: 1,
groupValue: isHijri,
onChanged: (value) {
setState(() {
isHijri = value;
});
validateForm();
},
),
Text(TranslationBase.of(context).hijriDate),
],
),
Expanded(
child: Row(
children: <Widget>[
Radio(
value: 0,
groupValue: isHijri,
onChanged: (value) {
setState(() {
isHijri = value;
});
validateForm();
},
),
Text(TranslationBase.of(context).gregorianDate),
],
),
),
Expanded(
child: Row(
children: <Widget>[
Radio(
value: 0,
groupValue: isHijri,
onChanged: (value) {
setState(() {
isHijri = value;
});
validateForm();
},
),
Text(TranslationBase.of(context).gregorianDate),
],
),
],
),
Row(children: <Widget>[
Container(
width: SizeConfig.realScreenWidth * .9,
child: isHijri == 1
? Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob,
isNumber: false,
suffix: Icon(
Icons.calendar_today,
size: 16,
)))
: Container(
child: InkWell(
onTap: () {
if (isHijri != null) _selectDate(context);
},
child: Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn,
isNumber: false,
isEnable: false,
suffix: Icon(
Icons.calendar_today,
size: 16,
)))))),
])
],
),
),
],
),
Row(children: <Widget>[
Container(
width: SizeConfig.realScreenWidth * .89,
child: isHijri == 1
? Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob,
isNumber: false,
suffix: Icon(
Icons.calendar_today,
size: 16,
)))
: Container(
child: InkWell(
onTap: () {
if (isHijri != null) _selectDate(context);
},
child: Directionality(
textDirection: TextDirection.ltr,
child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn,
isNumber: false,
isEnable: false,
suffix: Icon(
Icons.calendar_today,
size: 16,
)))))),
])
],
),
Container(
width: double.maxFinite,
// height: 80.0,
color: Colors.white,
// margin: EdgeInsets.only(bottom: 50.0),
child: Row(
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details');
}, textColor: Colors.white, color: Color(0xffD02127))),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).next, (){
startRegistration();
locator<GAnalytics>().loginRegistration.registration_enter_details();
}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
),
],
),)
],
),);
),
Container(
width: double.maxFinite,
// height: 80.0,
color: Colors.white,
// margin: EdgeInsets.only(bottom: 50.0),
child: Row(
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details');
}, textColor: Colors.white, color: Color(0xffD02127))),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).next, () {
startRegistration();
locator<GAnalytics>().loginRegistration.registration_enter_details();
}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
),
],
),
)
],
),
);
}
Future<Null> _selectDate(BuildContext context) async {
@ -349,12 +350,19 @@ class _Register extends State<Register> {
cancelFunction: () {})
.showAlertDialog(context);
} else {
final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy');
nRequest['forRegister'] = true;
nRequest['isRegister'] = true;
nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString();
nRequest['dob'] = isHijri == 1 ? dob.text : dateFormat.format(selectedDate);
nRequest['isHijri'] = isHijri;
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest);
sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']);
this.chekUserData(response['LogInTokenID']);
if(request.patientOutSA ==0 ) {
this.chekUserData(response['LogInTokenID']);
}else{
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai:true)));
}
}
} else {
// if (response['ErrorCode'] == '-986') {

@ -47,7 +47,7 @@ class AllergiesPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).remarks+" :"),
Texts(TranslationBase.of(context).description + model.allergies[index].description ?? ''),
Texts(TranslationBase.of(context).description + ": " + model.allergies[index].description ?? ''),
],
),
)

@ -367,6 +367,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
false,
"3",
"0",
context,
"",
"",
"",
@ -427,7 +428,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
final currency = projectViewModel.user.outSA == 0 ? "sar" : 'aed';
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
DoctorsListService service = new DoctorsListService();
service.checkPaymentStatus(transID, AppGlobal.context).then((res) {
service.checkPaymentStatus(transID, false, AppGlobal.context).then((res) {
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
txn_ref = res['Merchant_Reference'];

@ -47,13 +47,26 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
GifLoaderDialogUtils.hideDialog(context);
},
billNo: widget.patientLabOrders.invoiceNo,
details: model.patientLabSpecialResult[index].resultDataHTML,
// details: model.patientLabSpecialResult[index].resultDataHTML,
details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model),
orderNo: widget.patientLabOrders.orderNo,
patientLabOrder: widget.patientLabOrders,
),
itemCount: model.patientLabSpecialResult.length,
itemCount: 1,
),
),
);
}
String getSpecialResults(LabsViewModel model) {
String labResults = "";
model.patientLabSpecialResult.forEach((element) {
if (element.resultDataHTML != null) {
labResults += (element.resultDataHTML + "<br/> <br/>");
} else {
labResults += ("<h6>No Result Available</h6>");
}
});
return labResults;
}
}

@ -57,8 +57,8 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
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<PatientSickLeavePage> {
}
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() {

@ -222,7 +222,9 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service.updateWorkplaceName(workplaceName.text, widget.requestNumber, widget.setupID, widget.projectID).then((res) {
service
.updateWorkplaceName(projectViewModel.isArabic ? "-" : workplaceName.text, projectViewModel.isArabic ? workplaceName.text : "-", widget.requestNumber, widget.setupID, widget.projectID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.of(context).pop(true);
}).catchError((err) {

@ -35,7 +35,7 @@ class VitalSingChartBloodPressure extends StatelessWidget {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
generateData();
return SingleChildScrollView(
child: Column(

@ -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<AddAddressPage> {
LatLng currentPostion;
Completer<GoogleMapController> mapController = Completer();
Placemark selectedPlace;
LocationUtils locationUtils;
static CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
@ -93,13 +92,28 @@ class _AddAddressPageState extends State<AddAddressPage> {
}
_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<AddAddressPage> {
// widget.onPick(value);
// },
// ),
),
);
),
);
// );
}
}

@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
@ -65,12 +66,13 @@ class DoctorsListService extends BaseService {
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
"DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null,
"IsGetNearAppointment": false,
"SearchForVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false,
"DoctorIDsList": doctorId,
"Latitude": lat != null ? lat.toString() : 0,
"Longitude": long != null ? long.toString() : 0,
"isDentalAllowedBackend": isContinueDentalPlan,
"isDentalAllowedBackend": clinicID == 17 ? true : isContinueDentalPlan,
"IsGetNearAppointment": isNearest,
if (isNearest) "SelectedDate": DateUtil.convertDateToString(DateTime.now()),
"License": true
@ -119,6 +121,7 @@ class DoctorsListService extends BaseService {
"ContinueDentalPlan": false,
"IsSearchAppointmnetByClinicID": false,
"DoctorName": docName,
"DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"gender": authUser.gender != null ? authUser.gender : 0,
"age": authUser.age != null ? authUser.age : 0,
@ -253,7 +256,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context) async {
Future<Map> getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
@ -276,6 +279,16 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": 1
};
if (clinicID == 253) {
List<String> procedureID = projectViewModel.selectedBodyPartList.map((element) => element.id.toString()).toList();
request["GeneralProcedureList"] = procedureID;
if (procedureID.length == 1 && procedureID[0] == "1") {
request["ProcedureSlotDuration"] = 90;
} else {
request["ProcedureSlotDuration"] = projectViewModel.laserSelectionDuration;
}
}
dynamic localRes;
await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async {
@ -893,7 +906,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> checkPaymentStatus(String transactionID, BuildContext context) async {
Future<Map> checkPaymentStatus(String transactionID, bool isPharma, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
@ -903,6 +916,7 @@ class DoctorsListService extends BaseService {
Request req = appGlobal.getPublicRequest();
request = {
"ClientRequestID": transactionID,
"IsPharmacy": isPharma,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
@ -1742,4 +1756,51 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
"IsBookingForLiveCare": 0,
"ClinicID": clinicID,
"ProjectID": projectID,
"OriginalClinicID": clinicID,
"days": 0,
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
};
request = {
"ClinicID": clinicID,
"ProjectID": projectID,
"AppointmentNo":appoNumber,
"DoctorFreeSlotRequest":requestFreeSlots,
"DoctorFreeSlotResponse":selectedfreeSlots,
"Value1":docID
};
dynamic localRes;
await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -247,7 +247,7 @@ class AuthProvider with ChangeNotifier {
return Future.value(localRes);
}
Future<dynamic> checkActivationCode(request, [value]) async {
Future<dynamic> checkActivationCode(request, [value]) async {
var neRequest = CheckActivationCodeReq.fromJson(request);
neRequest.activationCode = value ?? "0000";
@ -376,10 +376,16 @@ class AuthProvider with ChangeNotifier {
requestN.patientOutSA = requestN.patientobject.patientOutSA;
final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
if(nhic !=null) {
requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(
dateFormat.parse(nhic['DateOfBirth']));
requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
requestN.healthId = requestN.patientobject.eHealthIDField;
}
requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966';
requestN.healthId = requestN.patientobject.eHealthIDField;
requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
await sharedPref.remove(USER_PROFILE);
dynamic localRes;

@ -123,7 +123,8 @@ class ClinicListService extends BaseService {
"DeviceTypeID": 1,
"PatientID": 1,
"ContinueDentalPlan": true,
"IsSearchAppointmnetByClinicID": false
"IsSearchAppointmnetByClinicID": false,
"DateofBirth": authUser.dateofBirth
};
dynamic localRes;
@ -176,4 +177,14 @@ class ClinicListService extends BaseService {
}, body: request);
return Future.value(localRes);
}
Future<Map> getCountries() async {
Map<String, dynamic> request ={};
dynamic localRes;
await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -146,7 +146,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> getERAppointmentFees(int serviceID, BuildContext context) async {
Future<Map> getERAppointmentFees(int serviceID, bool isPharmaLiveCare, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -155,8 +155,9 @@ class LiveCareService extends BaseService {
}
request = {
"IsPharmacy": isPharmaLiveCare,
"ServiceID": serviceID,
"ProjectID": 15,
"ProjectID": 12,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Age": authUser.age != null ? authUser.age : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
@ -172,7 +173,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> getERAppointmentTime(int serviceID, BuildContext context) async {
Future<Map> getERAppointmentTime(int serviceID, bool isPharmaLiveCare, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -181,8 +182,9 @@ class LiveCareService extends BaseService {
}
request = {
"IsPharmacy": isPharmaLiveCare,
"ServiceID": serviceID,
"ProjectID": 15,
"ProjectID": 12,
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
@ -198,7 +200,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, BuildContext context) async {
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, bool isPharma, BuildContext context) async {
Map<String, dynamic> request;
String deviceToken;
@ -214,6 +216,7 @@ class LiveCareService extends BaseService {
}
request = {
"IsPharmacy": isPharma,
"ErServiceID": serviceID,
"ClientRequestID": clientRequestID,
"DeviceToken": deviceToken,
@ -326,9 +329,7 @@ class LiveCareService extends BaseService {
Future<Map> getOneSignalVOIPToken(String voipToken, BuildContext context) async {
Map<String, dynamic> request;
// request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0, "test_type": 1};
request = { "app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0 };
request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0};
dynamic localRes;
@ -339,4 +340,19 @@ class LiveCareService extends BaseService {
}, body: request);
return Future.value(localRes);
}
Future<Map> cancelPharmaLiveCareRequest(String pharmaClientRequestID, BuildContext context) async {
Map<String, dynamic> request;
request = {"clientid": pharmaClientRequestID, "status": "Cancel"};
dynamic localRes;
await baseAppClient.post(CANCEL_PHARMA_LIVECARE_REQUEST, isExternal: true, isAllowAny: true, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -62,10 +62,10 @@ class CalendarUtils {
TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime, _currentLocation);
print("eventId: " + eventId);
print("writableCalendars-name: " + writableCalendars.name);
print("writableCalendars-Id: " + writableCalendars.id);
print("writableCalendarsToString: " + writableCalendars.toString());
// print("eventId: " + eventId);
// print("writableCalendars-name: " + writableCalendars.name);
// print("writableCalendars-Id: " + writableCalendars.id);
// print("writableCalendarsToString: " + writableCalendars.toString());
Event event = Event(writableCalendars.id, start: scheduleDateTimeUTZ, end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description);
deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) {
print("catchError " + e.toString());

@ -14,10 +14,10 @@ class AppPermission{
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
return false;
}
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await _drawOverAppsMessageDialog(context);
return false;
}
// if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
// await _drawOverAppsMessageDialog(context);
// return false;
// }
return true;
}

@ -24,6 +24,7 @@ class LocationUtils {
bool isShowConfirmDialog;
BuildContext context;
bool isHuawei;
final GeolocatorPlatform _geolocatorPlatform = GeolocatorPlatform.instance;
LocationUtils({@required this.isShowConfirmDialog, @required this.context, this.isHuawei = false});
@ -43,11 +44,16 @@ class LocationUtils {
if (permission == LocationPermission.denied || permission == LocationPermission.deniedForever) {
if (Platform.isAndroid) {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) {
setLocation(value);
if (callBack != null) callBack(LatLng(value.latitude, value.longitude));
});
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () async {
final hasPermission = await _handlePermission();
if (hasPermission) {
Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) {
setLocation(value);
if (callBack != null) callBack(LatLng(value.latitude, value.longitude));
});
} else {
if (isShowConfirmDialog) showErrorLocationDialog(false);
}
});
} else {
if (await Permission.location.request().isGranted) {
@ -70,6 +76,29 @@ class LocationUtils {
}
}
Future<bool> _handlePermission() async {
bool serviceEnabled;
LocationPermission permission;
serviceEnabled = await _geolocatorPlatform.isLocationServiceEnabled();
if (!serviceEnabled) {
return false;
}
permission = await _geolocatorPlatform.checkPermission();
if (permission == LocationPermission.denied) {
permission = await _geolocatorPlatform.requestPermission();
if (permission == LocationPermission.denied) {
return false;
}
}
if (permission == LocationPermission.deniedForever) {
return false;
}
return true;
}
LocationCallback _locationCallback;
_getHMSCurrentLocation(Function(LatLng) callBack) async {

@ -10,18 +10,21 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notificatio
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/app-permissions.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:firebase_messaging/firebase_messaging.dart' as fir;
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:flutter_ios_voip_kit/call_state_type.dart';
import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
// import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
import 'package:huawei_push/huawei_push.dart' as h_push;
import 'package:permission_handler/permission_handler.dart';
import 'app_shared_preferences.dart';
import 'navigation_service.dart';
@ -115,7 +118,7 @@ class PushNotificationHandler {
final BuildContext context;
static PushNotificationHandler _instance;
final voIPKit = FlutterIOSVoIPKit.instance;
// HmsApiAvailability hmsApiAvailability;
HmsApiAvailability hmsApiAvailability;
Timer timeOutTimer;
bool isTalking = false;
@ -161,7 +164,6 @@ class PushNotificationHandler {
}
init() async {
// hmsApiAvailability = new HmsApiAvailability();
// VoIP Callbacks
voIPKit.getVoIPToken().then((value) {
print('🎈 example: getVoIPToken: $value');
@ -223,39 +225,56 @@ class PushNotificationHandler {
// if (Platform.isAndroid && (!await FlutterHmsGmsAvailability.isHmsAvailable)) {
if (Platform.isAndroid) {
// await hmsApiAvailability.isHMSAvailable().then((value) async {
// if (value != 0) {
// final fcmToken = await FirebaseMessaging.instance.getToken();
// if (fcmToken != null) onToken(fcmToken);
// }
// }).catchError((err) {});
try {
if (!(await Utils.isGoogleServicesAvailable())) {
h_push.Push.enableLogger();
final result = await h_push.Push.setAutoInitEnabled(true);
h_push.Push.onNotificationOpenedApp.listen((message) {
newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
h_push.Push.onMessageReceivedStream.listen((message) {
newMessage(toFirebaseRemoteMessage(message));
}, onError: (e) => print(e.toString()));
h_push.Push.getTokenStream.listen((token) {
onToken(token);
}, onError: (e) => print(e.toString()));
await h_push.Push.getToken('');
h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler);
} else {
final fcmToken = await FirebaseMessaging.instance.getToken();
if (fcmToken != null) onToken(fcmToken);
}
} catch (ex) {}
}
if (Platform.isIOS) {
await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: true, // Required to display a heads up notification
badge: true,
sound: true,
);
final permission = await FirebaseMessaging.instance.requestPermission();
if (permission.authorizationStatus == AuthorizationStatus.denied) return;
}
// 'Android HMS' (Handle Huawei Push_Kit Streams)
// if (Platform.isAndroid) {
// if (Platform.isAndroid && (await FlutterHmsGmsAvailability.isHmsAvailable)) {
// } else {
// 'Android GMS or iOS' (Handle Firebase Messaging Streams
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
subscribeFCMTopic();
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else if (message != null) newMessage(message);
});
} else {}
try {
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
if (message != null) {
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else if (message != null) newMessage(message);
}
});
} catch (ex) {}
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print("Firebase onMessage!!!");
// Utils.showPermissionConsentDialog(context, "onMessage", (){});
// newMessage(message);
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
newMessage(message);
@ -284,40 +303,11 @@ class PushNotificationHandler {
onToken(token);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
if (Platform.isAndroid) {
// await hmsApiAvailability.isHMSAvailable().then((value) async {
// if (value == 0) {
// h_push.Push.enableLogger();
// final result = await h_push.Push.setAutoInitEnabled(true);
//
// h_push.Push.onNotificationOpenedApp.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
// }, onError: (e) => print(e.toString()));
//
// h_push.Push.onMessageReceivedStream.listen((message) {
// newMessage(toFirebaseRemoteMessage(message));
// }, onError: (e) => print(e.toString()));
//
// h_push.Push.getTokenStream.listen((token) {
// onToken(token);
// }, onError: (e) => print(e.toString()));
// await h_push.Push.getToken('');
//
// h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler);
// }
// }).catchError((err) {
// print(err);
// });
}
}
subscribeFCMTopic() async {
print("subscribeFCMTopic!!!");
await FirebaseMessaging.instance.unsubscribeFromTopic('all_hmg_patients').then((value) async {
await FirebaseMessaging.instance.subscribeToTopic('all_hmg_patients');
FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value);
});
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
}
newMessage(RemoteMessage remoteMessage) async {
@ -356,109 +346,25 @@ class PushNotificationHandler {
_incomingCall(call_data);
}
}
}
/* todo verify all functionality */
// _firebaseMessaging.configure(
// // onMessage: (Map<String, dynamic> message) async {
// // // showDialog("onMessage: $message");
// // print("onMessage: $message");
// // print(message);
// // print(message['name']);
// // print(message['appointmentdate']);
// //
// // if (Platform.isIOS) {
// // if (message['is_call'] == "true") {
// // var route = ModalRoute.of(context);
// //
// // if (route != null) {
// // print(route.settings.name);
// // }
// //s
// // Map<String, dynamic> myMap = new Map<String, dynamic>.from(mesage);
// // print(myMap);
// // LandingPage.isOpenCallPage = true;
// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// // if (!isPageNavigated) {
// // isPageNavigated = true;
// // Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
// // isPageNavigated = false;
// // });
// // }
// // } else {
// // print("Is Call Not Found iOS");
// // }
// // } else {
// // print("Is Call Not Found iOS");
// // }
// //
// // if (Platform.isAndroid) {
// // if (message['data'].containsKey("is_call")) {
// // var route = ModalRoute.of(context);
// //
// // if (route != null) {
// // print(route.settings.name);
// // }
// //
// // Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']);
// // print(myMap);
// // if (LandingPage.isOpenCallPage) {
// // return;
// // }
// // LandingPage.isOpenCallPage = true;
// // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// // if (!isPageNavigated) {
// // isPageNavigated = true;
// // Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
// // Future.delayed(Duration(seconds: 5), () {
// // isPageNavigated = false;
// // });
// // });
// // }
// // } else {
// // print("Is Call Not Found Android");
// // LocalNotification.getInstance().showNow(title: message['notification']['title'], subtitle: message['notification']['body']);
// // }
// // } else {
// // print("Is Call Not Found Android");
// // }
// // },
// onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
// onLaunch: (Map<String, dynamic> message) async {
// print("onLaunch: $message");
// // showDialog("onLaunch: $message");
// },
// onResume: (Map<String, dynamic> message) async {
// print("onResume: $message");
// print(message);
// print(message['name']);
// print(message['appointmentdate']);
//
// // showDialog("onResume: $message");
//
// if (Platform.isIOS) {
// if (message['is_call'] == "true") {
// var route = ModalRoute.of(context);
//
// if (route != null) {
// print(route.settings.name);
// }
//
// Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
// print(myMap);
// LandingPage.isOpenCallPage = true;
// LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
// isPageNavigated = false;
// });
// }
// } else {
// print("Is Call Not Found iOS");
// }
// } else {
// print("Is Call Not Found iOS");
// }
// },
// );
Future<void> isAndroidPermissionGranted() async {
if (Platform.isAndroid) {
final bool granted = await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()?.areNotificationsEnabled() ?? false;
if (!granted) {
await requestPermissions();
}
}
}
Future<void> requestPermissions() async {
try {
if (Platform.isIOS) {
await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()?.requestPermissions(alert: true, badge: true, sound: true);
} else if (Platform.isAndroid) {
Permission.notification.request();
}
} catch (err) {
debugPrint(err);
}
}
}

@ -2877,6 +2877,20 @@ class TranslationBase {
String get pendingActivation => localizedValues["pendingActivation"][locale.languageCode];
String get awaitingApproval => localizedValues["awaitingApproval"][locale.languageCode];
String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode];
String get scanNFC => localizedValues["scanNFC"][locale.languageCode];
String get pharmaLiveCare => localizedValues["pharmaLiveCare"][locale.languageCode];
String get pharmaLiveCare1 => localizedValues["pharmaLiveCare1"][locale.languageCode];
String get pharmaLiveCareDesc1 => localizedValues["pharmaLiveCareDesc1"][locale.languageCode];
String get wherePharmaLiveCare => localizedValues["wherePharmaLiveCare"][locale.languageCode];
String get pharmaLiveCareDesc2 => localizedValues["pharmaLiveCareDesc2"][locale.languageCode];
String get howPharmaLiveCare => localizedValues["howPharmaLiveCare"][locale.languageCode];
String get pharmaLiveCareDesc3 => localizedValues["pharmaLiveCareDesc3"][locale.languageCode];
String get pharmaLiveCareScanQR => localizedValues["pharmaLiveCareScanQR"][locale.languageCode];
String get pharmaLiveCareScanQR1 => localizedValues["pharmaLiveCareScanQR1"][locale.languageCode];
String get pharmaLiveCareMakePayment => localizedValues["pharmaLiveCareMakePayment"][locale.languageCode];
String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode];
String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode];
String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode];
}

@ -44,6 +44,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_api_availability/google_api_availability.dart';
// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:provider/provider.dart';
@ -772,6 +773,15 @@ class Utils {
);
}
static Future<bool> isGoogleServicesAvailable() async {
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();
String status = availability.toString().split('.').last;
if (status == "success") {
return true;
}
return false;
}
static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -1,6 +1,5 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

@ -47,6 +47,7 @@ class AppMapState extends State<AppMap> {
checkIsHuawei() async {
await hmsApiAvailability.isHMSAvailable().then((value) {
isHuawei = value == 0 ? true : false;
hmsMap.HuaweiMapInitializer.initializeMap();
});
print(isHuawei);
setState(() {});

@ -183,9 +183,13 @@ class ShowChart extends StatelessWidget {
getMaxX();
getMin();
getMinY();
increasingY = ((maxY - minY) / timeSeries.length - 1) * 15;
maxY += increasingY.abs();
minY -= increasingY.abs();
try {
increasingY = ((maxY - minY) / timeSeries.length - 1) * 15;
maxY += increasingY.abs();
minY -= increasingY.abs();
} catch(ex) {
print(ex);
}
}
double _fetchLeftTileInterval() {
@ -259,7 +263,7 @@ class ShowChart extends StatelessWidget {
barWidth: 1.5,
isStrokeCapRound: true,
dotData: FlDotData(
show: false,
show: true,
),
belowBarData: BarAreaData(
show: false,

@ -194,7 +194,7 @@ class LabResultWidget extends StatelessWidget {
context,
FadePage(
page: FlowChartPage(
filterName: filterName,
filterName: labResultList[i].description,
patientLabOrder: patientLabOrder,
),
),

@ -116,7 +116,7 @@ class DoctorCard extends StatelessWidget {
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12),
padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
@ -224,7 +224,7 @@ class DoctorCard extends StatelessWidget {
onTap: onEmailTap,
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
color: sickLeaveStatus != 3 ? Theme.of(context).primaryColor : Colors.grey[400],
),
)
: onTap != null

@ -1,5 +1,3 @@
import 'dart:io';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
@ -18,6 +16,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
@ -76,6 +75,7 @@ class _AppDrawerState extends State<AppDrawer> {
String booldType;
String notificationCount;
final authService = new AuthProvider();
String pharmacyLiveCareQRCode = "";
@override
Widget build(BuildContext context) {
@ -496,18 +496,25 @@ class _AppDrawerState extends State<AppDrawer> {
}
readQRCode() async {
String result = (await BarcodeScanner.scan())?.rawContent;
print(result);
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
print(pharmacyLiveCareQRCode);
GifLoaderDialogUtils.showMyDialog(context);
LiveCareService service = new LiveCareService();
service.getPatientInfoByQR(result, context).then((res) {
service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
Navigator.pop(context);
startPharmacyLiveCareProcess();
});
}
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "7");
Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,)));
}
drawerNavigator(context, routeName) {
Navigator.of(context).pushNamed(routeName);
}
@ -594,6 +601,7 @@ class _AppDrawerState extends State<AppDrawer> {
switchUser(user, context) {
GifLoaderDialogUtils.showMyDialog(context);
sharedPref.remove(BLOOD_TYPE);
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) {
// GifLoaderDialogUtils.hideDialog(context);
// Navigator.of(context).pop();

@ -41,6 +41,8 @@ class MyInAppBrowser extends InAppBrowser {
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
@ -63,7 +65,7 @@ class MyInAppBrowser extends InAppBrowser {
AuthProvider authProvider = new AuthProvider();
InAppBrowser browser = new InAppBrowser();
AuthenticatedUser authUser;
// AuthenticatedUser authUser;
AppoitmentAllHistoryResultList appo;
String deviceToken;
@ -125,16 +127,16 @@ class MyInAppBrowser extends InAppBrowser {
this.deviceToken = deviceToken;
}
getPatientData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
lat = await this.sharedPref.getDouble(USER_LAT);
long = await this.sharedPref.getDouble(USER_LONG);
}
}
// getPatientData() async {
// if (await this.sharedPref.getObject(USER_PROFILE) != null) {
// var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
// authUser = data;
// }
// if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
// lat = await this.sharedPref.getDouble(USER_LAT);
// long = await this.sharedPref.getDouble(USER_LONG);
// }
// }
openPackagesPaymentBrowser({@required int customer_id, @required int order_id}) {
paymentType = _PAYMENT_TYPE.PACKAGES;
@ -143,10 +145,10 @@ class MyInAppBrowser extends InAppBrowser {
}
openPaymentBrowser(num amount, String orderDesc, String transactionID, String projId, String emailId, String paymentMethod, dynamic patientType, String patientName, dynamic patientID,
AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, var servID, var LiveServID,
AuthenticatedUser authenticatedUser, InAppBrowser browser, bool isLiveCareAppo, var servID, var LiveServID, BuildContext context,
[var appoDate, var appoNo, var clinicID, var doctorID, var installments]) async {
this.browser = browser;
await getPatientData();
// await getPatientData();
if (paymentMethod == "ApplePay") {
getDeviceToken();
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
@ -187,7 +189,8 @@ class MyInAppBrowser extends InAppBrowser {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) {
if (context != null) GifLoaderDialogUtils.hideDialog(context);
String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result'];
String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // Prod
// String url = "https://uat.hmgwebservices.com/HMGApplePayLiveNew/applepay/pay?apq=" + res['result']; // UAT
// safariBrowser.open(url: Uri.parse(url));
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions);
}).catchError((err) {
@ -212,7 +215,7 @@ class MyInAppBrowser extends InAppBrowser {
tamaraRequestModel.orderDescription = orderDesc;
tamaraRequestModel.isInstallment = true;
tamaraRequestModel.projectID = num.parse(projId);
tamaraRequestModel.accessCode = authUser.mobileNumber;
tamaraRequestModel.accessCode = authenticatedUser.mobileNumber;
tamaraRequestModel.appointmentNo = (appoNo != null && appoNo != "") ? appoNo.toString() : "0";
tamaraRequestModel.customerName = patientName;
tamaraRequestModel.fileNumber = patientID.toString();
@ -253,7 +256,7 @@ class MyInAppBrowser extends InAppBrowser {
AuthenticatedUser authenticatedUser, InAppBrowser browser) {
this.browser = browser;
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
getPatientData();
// getPatientData();
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
if (order.customValuesXml.contains("ApplePay")) {
safariBrowser.open(url: Uri.parse(value));
@ -299,7 +302,7 @@ class MyInAppBrowser extends InAppBrowser {
// if (servID == "4")
// form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.PREAUTH_SERVICE_URL);
// else
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
if (servID != null) {
form = form.replaceFirst('SERV_ID', servID);

@ -22,6 +22,7 @@ class DoctorHeader extends StatelessWidget {
final String buttonTitle;
final String buttonIcon;
final bool isNeedToShowButton;
final bool isShowName;
DoctorHeader(
{Key key,
@ -29,6 +30,7 @@ class DoctorHeader extends StatelessWidget {
@required this.buttonTitle,
@required this.onTap,
this.isNeedToShowButton = true,
this.isShowName = false,
this.buttonIcon,
this.showConfirmMessageDialog = true,
@required this.onRatingAndReviewTap})
@ -44,7 +46,18 @@ class DoctorHeader extends StatelessWidget {
color: Colors.white,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (isShowName)
Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Text(
headerModel.doctorName,
maxLines: 1,
style: TextStyle(
fontSize: 24, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
),
),
Padding(
padding: EdgeInsets.only(left: 21, right: 21, bottom: 12),
child: Row(
@ -289,7 +302,7 @@ class DoctorHeader extends StatelessWidget {
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
@ -310,7 +323,7 @@ class DoctorHeader extends StatelessWidget {
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
@ -331,7 +344,7 @@ class DoctorHeader extends StatelessWidget {
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
@ -352,7 +365,7 @@ class DoctorHeader extends StatelessWidget {
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
@ -374,7 +387,7 @@ class DoctorHeader extends StatelessWidget {
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),

@ -44,6 +44,7 @@ class _NfcLayoutState extends State<NfcLayout> {
}
void readNFC() async {
FlutterNfcKit.finish();
FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: true, androidCheckNDEF: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async {
setState(() {
_reading = true;
@ -55,6 +56,9 @@ class _NfcLayoutState extends State<NfcLayout> {
Navigator.pop(context);
});
nfcId = value.id;
}).catchError((err) {
print(err);
Navigator.of(context).pop();
});
}

@ -13,7 +13,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.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';

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.005+4050005
version: 4.5.63+1
environment:
sdk: ">=2.7.0 <3.0.0"
@ -22,7 +22,8 @@ dependencies:
connectivity: ^3.0.6
async: ^2.8.1
audio_wave: ^0.1.2
audio_wave: ^0.1.4
# audio_session: ^0.1.13
# State Management
provider: ^6.0.1
@ -33,13 +34,13 @@ dependencies:
health: ^3.0.3
#chart
fl_chart: ^0.40.2
fl_chart: ^0.45.0
#Camera Preview
camera: ^0.9.4+5
camera: ^0.10.1
# Permissions
permission_handler: ^8.3.0
permission_handler: ^10.2.0
# Flutter Html View
flutter_html: ^2.2.1
@ -89,8 +90,8 @@ dependencies:
google_maps_flutter: ^2.1.1
# Huawei
huawei_map: 6.0.1+305
huawei_push: ^5.3.0+304
huawei_map: 6.5.0+301
huawei_push: ^6.5.0+300
# Qr code Scanner TODO fix it
# barcode_scanner: ^1.0.1
@ -98,7 +99,7 @@ dependencies:
location: ^4.3.0
# Qr code Scanner
# barcode_scan_fix: ^1.0.2
barcode_scan2: ^4.2.1
barcode_scan2: ^4.2.2
# Rating Stars
rating_bar: ^0.2.0
@ -113,13 +114,13 @@ dependencies:
manage_calendar_events: ^2.0.1
#InAppBrowser
# flutter_inappwebview: ^5.3.2
flutter_inappwebview: 5.7.2+3
#Circular progress bar for reverse timer
circular_countdown_timer: ^0.2.0
#Just Audio to play ringing for incoming video call
just_audio: ^0.9.18
just_audio: ^0.9.30
#hijri
hijri: ^2.0.3
@ -130,13 +131,13 @@ dependencies:
carousel_pro: ^1.0.0
#local_notifications
flutter_local_notifications: ^9.1.4
flutter_local_notifications: any
#device_calendar
device_calendar: ^4.2.0
#Handle Geolocation
geolocator: ^7.7.1
geolocator: ^9.0.2
#Handle lat long to address
geocoding: ^2.0.1
@ -150,7 +151,8 @@ dependencies:
#google maps places
google_maps_place_picker: ^2.1.0-nullsafety.3
google_maps_place_picker_mb: ^3.0.0
# google_maps_place_picker: ^2.1.0-nullsafety.3
map_launcher: ^1.1.3
#countdown timer for Upcoming List
flutter_countdown_timer: ^4.1.0
@ -170,8 +172,10 @@ dependencies:
flutter_nfc_kit: ^3.3.1
speech_to_text:
path: speech_to_text
geofencing: ^0.1.0
# speech_to_text: ^6.1.1
# path: speech_to_text
in_app_update: ^3.0.0
@ -202,14 +206,16 @@ dependencies:
# sms_retriever: ^1.0.0
sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.0.5
google_api_availability: ^3.0.1
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
dependency_overrides:
provider : ^5.0.0
permission_handler : ^6.0.1+1
# permission_handler : ^10.2.0
flutter_svg: ^1.0.0
# firebase_messaging_platform_interface: any
flutter_inappwebview: 5.7.2+3
# flutter_inappwebview: 5.7.2+3
# git:
# url: https://github.com/CodeEagle/flutter_inappwebview

Loading…
Cancel
Save