Merge branch 'dev_v3.13.6' of http://34.17.52.180/Haroon6138/diplomatic-quarter into dev_v3.13.6_CR_7211_Lab_report_changes

# Conflicts:
#	android/app/build.gradle
#	android/app/src/main/AndroidManifest.xml
#	android/build.gradle
#	android/gradle.properties
#	android/settings.gradle
#	lib/config/localized_values.dart
#	lib/pages/medical/labs/laboratory_result_page.dart
#	lib/uitl/translations_delegate_base.dart
#	lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart
#	lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart
#	pubspec.yaml
merge-update-with-lab-changes
taha.alam 1 year ago
commit 9047ebf723

@ -58,6 +58,7 @@ android {
namespace = "com.ejada.hmg" namespace = "com.ejada.hmg"
buildFeatures { buildFeatures {
viewBinding true viewBinding true
dataBinding true
} }
sourceSets { sourceSets {
@ -137,9 +138,8 @@ android {
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
kotlinOptions { kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8 jvmTarget = '1.8'
} }
} }
flutter { flutter {
@ -189,6 +189,10 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'androidx.test.ext:junit:1.1.5' implementation 'androidx.test.ext:junit:1.1.5'
implementation 'com.android.volley:volley:1.2.1' implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.8.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.8.5'
implementation 'androidx.activity:activity:1.9.3'
def room_version = "2.4.0-alpha04" def room_version = "2.4.0-alpha04"
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version" annotationProcessor "androidx.room:room-compiler:$room_version"
@ -218,7 +222,10 @@ dependencies {
implementation 'com.google.android.material:material:1.9.0' implementation 'com.google.android.material:material:1.9.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
androidTestImplementation "androidx.test:core:1.4.0" androidTestImplementation "androidx.test:core:1.4.0"
implementation 'com.airbnb.android:lottie:5.2.0' // implementation 'com.airbnb.android:lottie:5.2.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22' // implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0'
implementation 'com.whatsapp.otp:whatsapp-otp-android-sdk:0.1.0'
} }

@ -1,51 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.ejada.hmg"> package="com.ejada.hmg">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that <!--
io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method. calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide 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 additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> FlutterApplication and put your custom class here.
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" tools:node="remove"/> -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/> <uses-permission
<!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/>--> android:name="android.permission.ACTIVITY_RECOGNITION"
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/>--> tools:node="remove" />
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/>--> <uses-permission
<!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/>--> android:name="android.permission.READ_PHONE_STATE"
<uses-permission android:name="android.permission.BROADCAST_STICKY" tools:node="remove"/> tools:node="remove" /> <!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/> -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/> <!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/> -->
<!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />--> <!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/> -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" tools:node="remove"/> <!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/> -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" tools:node="remove"/> <uses-permission
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" tools:node="remove"/> android:name="android.permission.BROADCAST_STICKY"
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" tools:node="remove"/> tools:node="remove" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" tools:node="remove"/> <uses-permission
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" tools:node="remove"/> android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"
tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" tools:node="remove" /> <uses-permission
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
<!-- <uses-permission android:name="android.permission.INTERNET" />--> tools:node="remove" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />--> <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" /> <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />
<uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false" tools:node="replace"/> <uses-feature
<uses-feature android:name="android.hardware.sensor.stepdetector" android:required="false" tools:node="replace"/> android:name="android.hardware.sensor.stepcounter"
android:required="false"
tools:node="replace" />
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"
tools:node="replace" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/> <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/> <uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@ -53,107 +84,146 @@
<uses-permission android:name="android.permission.READ_CALENDAR" /> <uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" /> <uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA"/>
<!-- <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />-->
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<!-- Wifi Permissions--> <uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA" /> <!-- <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" /> -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <!-- Wifi Permissions -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>--> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> -->
<!-- Detect Reboot Permission --> <!-- Detect Reboot Permission -->
<!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>--> <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> -->
<queries> <queries>
<intent> <intent>
<action android:name="android.speech.RecognitionService" /> <action android:name="android.speech.RecognitionService" />
</intent> </intent>
<package android:name="com.whatsapp" />
<package android:name="com.whatsapp.w4b" />
</queries> </queries>
<application <application
android:name=".Application" android:name=".Application"
android:label="Dr. Alhabib"
android:icon="@mipmap/ic_launcher_local"
android:usesCleartextTraffic="true"
android:showOnLockScreen="true"
android:screenOrientation="sensorPortrait"
android:allowBackup="false" android:allowBackup="false"
android:extractNativeLibs="true" android:extractNativeLibs="true"
tools:replace="android:extractNativeLibs,android:label" android:icon="@mipmap/ic_launcher_local"
android:label="Dr. Alhabib"
android:screenOrientation="sensorPortrait"
android:showOnLockScreen="true"
android:usesCleartextTraffic="true"
tools:replace="android:extractNativeLibs,android:label">
<activity
android:name=".WhatsAppCodeActivity"
android:exported="true"
android:enabled="true"
android:launchMode="standard"
> >
<intent-filter>
<action android:name="com.whatsapp.otp.OTP_RETRIEVED" />
</intent-filter>
</activity>
<meta-data
android:name="push_kit_auto_init_enabled"
android:value="true" />
<meta-data android:name="push_kit_auto_init_enabled" android:value="true" />
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:enabled="true"
android:exported="true"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:showOnLockScreen="true" android:showOnLockScreen="true"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:exported="true" android:windowSoftInputMode="adjustResize"
tools:node="merge" tools:node="merge">
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!--
Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. --> to determine the Window background behind the Flutter UI.
-->
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" /> android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen <!--
Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of gap between the end of Android's launch screen and the painting of
Flutter's first frame. --> Flutter's first frame.
-->
<meta-data <meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable" android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" /> android:resource="@drawable/launch_background" />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" /> <action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
</activity> </activity> <!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true"> -->
<!-- <intent-filter> -->
<!-- <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:exported="true">--> <!-- <action android:name="android.intent.action.BOOT_COMPLETED"/> -->
<!-- <intent-filter>--> <!-- <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/> -->
<!-- <action android:name="android.intent.action.BOOT_COMPLETED"/>--> <!-- </intent-filter> -->
<!-- <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>--> <!-- </receiver> -->
<!-- </intent-filter>-->
<!-- </receiver>-->
<!-- Geofencing --> <!-- Geofencing -->
<service android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" /> <service
<receiver android:name=".geofence.intent_receivers.GeofenceBroadcastReceiver" android:enabled="true" android:exported="false" /> android:name=".geofence.intent_receivers.GeofenceTransitionsJobIntentService"
<receiver android:name=".geofence.intent_receivers.GeofencingRebootBroadcastReceiver" android:enabled="true" android:exported="false"> android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<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> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/> <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver android:name=".geofence.intent_receivers.LocationProviderChangeReceiver" android:exported="false"> <receiver
android:name=".geofence.intent_receivers.LocationProviderChangeReceiver"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="android.location.PROVIDERS_CHANGED"/> <action android:name="android.location.PROVIDERS_CHANGED" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:exported="true" android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- Geofencing -->
<service
android:name=".geofence.intent_receivers.ReregisterGeofenceJobService"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE" /> <!-- Geofencing -->
<!-- <!--
Huawei Push Notifications Huawei Push Notifications
Set push kit auto enable to true (for obtaining the token on initialize) Set push kit auto enable to true (for obtaining the token on initialize)
--> -->
<!-- <meta-data--> <!-- <meta-data -->
<!-- android:name="push_kit_auto_init_enabled"--> <!-- android:name="push_kit_auto_init_enabled" -->
<!-- android:value="true" />--> <!-- android:value="true" /> -->
<!-- These receivers are for sending scheduled local notifications --> <!-- These receivers are for sending scheduled local notifications -->
<receiver android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver" android:exported="false"> <receiver
android:name="com.huawei.hms.flutter.push.receiver.local.HmsLocalNotificationBootEventReceiver"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter> </intent-filter>
@ -169,26 +239,17 @@
<intent-filter> <intent-filter>
<action android:name="com.huawei.hms.flutter.push.receiver.BACKGROUND_REMOTE_MESSAGE" /> <action android:name="com.huawei.hms.flutter.push.receiver.BACKGROUND_REMOTE_MESSAGE" />
</intent-filter> </intent-filter>
</receiver> </receiver> <!-- Huawei Push Notifications -->
<!-- Huawei Push Notifications --> <meta-data
android:name="com.google.android.geo.API_KEY"
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8" />
android:value="AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"/> <!--
Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java
<!-- Don't delete the meta-data below. -->
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data <meta-data
android:name="flutterEmbedding" android:name="flutterEmbedding"
android:value="2" /> android:value="2" />
</application> </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" />-->
</manifest> </manifest>

@ -1,4 +1,5 @@
package com.ejada.hmg package com.ejada.hmg
import android.app.PendingIntent
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.os.Build import android.os.Build
@ -7,10 +8,14 @@ import android.view.WindowManager
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge import com.cloud.diplomaticquarterapp.PenguinInPlatformBridge
import com.cloud.diplomaticquarterapp.whatsapp.AppSignatureRetriever
import com.ejada.hmg.utils.* import com.ejada.hmg.utils.*
import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant import io.flutter.plugins.GeneratedPluginRegistrant
import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp
import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge
class MainActivity: FlutterFragmentActivity() { class MainActivity: FlutterFragmentActivity() {
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
@ -22,8 +27,9 @@ class MainActivity: FlutterFragmentActivity() {
PlatformBridge(flutterEngine, this).create() PlatformBridge(flutterEngine, this).create()
OpenTokPlatformBridge(flutterEngine, this).create() OpenTokPlatformBridge(flutterEngine, this).create()
PenguinInPlatformBridge(flutterEngine, this).create() PenguinInPlatformBridge(flutterEngine, this).create()
WhatsAppOtpPlatformBridge(flutterEngine, this).invoke()
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { AppSignatureRetriever().logSignatures(this)
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {x
// val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH) // val mChannel = NotificationChannel("video_call_noti", "video call", NotificationManager.IMPORTANCE_HIGH)
// val soundUri = Uri.parse("android.resource://" + getApplicationContext() // val soundUri = Uri.parse("android.resource://" + getApplicationContext()
// .getPackageName() + "/" + R.raw.alert) // .getPackageName() + "/" + R.raw.alert)

@ -204,6 +204,7 @@ internal class PenguinView(
// .setDeepLinkData("deeplink") // .setDeepLinkData("deeplink")
.setCustomizeColor("#2CA0AF") .setCustomizeColor("#2CA0AF")
.setDeepLinkSchema("") .setDeepLinkSchema("")
.setIsEnableReportIssue(true)
.build() .build()
// Set location delegate to handle location updates // Set location delegate to handle location updates
@ -215,7 +216,17 @@ internal class PenguinView(
// } // }
// Set events delegate for reporting issues // Set events delegate for reporting issues
PlugAndPlaySDK.setPiEventsDelegate { } // PlugAndPlaySDK.setPiEventsDelegate(new PIEventsDelegate() {
// @Override
// public void onReportIssue(PIReportIssue issue) {
// Log.e("Issue Reported: ", issue.getReportType());
// }
// // Implement issue reporting logic here }
// @Override
// public void onSharedLocation(String link) {
// // Implement Shared location logic here
// }
// })
// Start the Penguin SDK // Start the Penguin SDK
PlugAndPlaySDK.start(mContext, this) PlugAndPlaySDK.start(mContext, this)

@ -0,0 +1,81 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.cloud.diplomaticquarterapp.whatsapp;
import static java.sql.DriverManager.println;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.util.Base64;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Collection;
import java.util.stream.Collectors;
public class AppSignatureRetriever {
private static final String HASH_TYPE = "SHA-256";
public static final int NUM_HASHED_BYTES = 9;
public static final int NUM_BASE64_CHAR = 11;
public void logSignatures(Context context) {
Collection<String> appSignatures = getAppSignatures(context);
appSignatures.forEach(signature -> println("Signature: " + signature));
}
/**
* Get all the app signatures for the current package.
*
* @return signatures for current app
*/
public Collection<String> getAppSignatures(Context context) {
try {
// Get all package signatures for the current package
String packageName = context.getPackageName();
println("Package name: " + packageName);
PackageManager packageManager = context.getPackageManager();
Signature[] signatures = packageManager.getPackageInfo(packageName,
PackageManager.GET_SIGNATURES).signatures;
// For each signature create a compatible hash
Collection<String> appCodes = Arrays.stream(signatures)
.map(signature -> hash(packageName, signature.toCharsString()))
.collect(Collectors.toList());
return appCodes;
} catch (PackageManager.NameNotFoundException e) {
println("Unable to find package to obtain hash.");
throw new RuntimeException("Unable to find package to obtain hash.", e);
}
}
private String hash(String packageName, String signature) {
String appInfo = packageName + " " + signature;
try {
MessageDigest messageDigest = MessageDigest.getInstance(HASH_TYPE);
messageDigest.update(appInfo.getBytes(StandardCharsets.UTF_8));
byte[] hashSignature = messageDigest.digest();
// truncated into NUM_HASHED_BYTES
hashSignature = Arrays.copyOfRange(hashSignature, 0, NUM_HASHED_BYTES);
// encode into Base64
String base64Hash = Base64.encodeToString(hashSignature, Base64.NO_PADDING | Base64.NO_WRAP);
base64Hash = base64Hash.substring(0, NUM_BASE64_CHAR);
println(String.format("pkg: %s -- hash: %s", packageName, base64Hash));
return base64Hash;
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("Unable to generate hash for application", e);
}
}
}

@ -0,0 +1,31 @@
package com.cloud.diplomaticquarterapp.whatsapp
import android.content.Context
import android.content.Intent
import com.whatsapp.otp.android.sdk.WhatsAppOtpHandler
import com.whatsapp.otp.android.sdk.WhatsAppOtpIncomingIntentHandler
import java.lang.ref.WeakReference
object WhatsApp {
val whatsAppOtpHandler = WhatsAppOtpHandler()
inline fun handleOTP ( intent: Intent, crossinline validateOTP:(code: String )-> Unit) =
WhatsAppOtpIncomingIntentHandler().processOtpCode(
intent,
// call your function to validate
{code -> validateOTP(code) },
{error,exception->
println("the error is ${error.name}")
println("the exception stacktrace is ${exception.message}")
println("the exception is cause ${exception.cause}")
})
fun performHandShake(context : WeakReference<Context>) = whatsAppOtpHandler.sendOtpIntentToWhatsApp(context.get()!!)
fun isWhatsAppInstalled(context : WeakReference<Context>) : Boolean = whatsAppOtpHandler.isWhatsAppInstalled(context.get()!!)
}

@ -0,0 +1,17 @@
package com.ejada.hmg
import android.app.PendingIntent
import android.content.Intent
import android.os.Bundle
import com.cloud.diplomaticquarterapp.whatsapp.WhatsApp
import com.cloud.diplomaticquarterapp.whatsapp.WhatsAppOtpPlatformBridge
import io.flutter.embedding.android.FlutterFragmentActivity
class WhatsAppCodeActivity : FlutterFragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WhatsApp.handleOTP(intent){code ->
WhatsAppOtpPlatformBridge.result?.success(code);
finish()
}
}
}

@ -0,0 +1,52 @@
package com.cloud.diplomaticquarterapp.whatsapp
import android.os.Build
import android.util.Log
import androidx.annotation.RequiresApi
import com.cloud.diplomaticquarterapp.penguin.PenguinView
import com.ejada.hmg.MainActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import java.lang.ref.WeakReference
class WhatsAppOtpPlatformBridge(
private var flutterEngine: FlutterEngine,
private var mainActivity: MainActivity
) {
private lateinit var channel: MethodChannel
companion object {
private const val CHANNEL = "whats_app_otp"
var result: MethodChannel.Result? = null
}
fun invoke() {
channel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL)
channel.setMethodCallHandler { call: MethodCall, result: MethodChannel.Result ->
when (call.method) {
"isWhatsAppInstalled" -> {
val isAppInstalled =
WhatsApp.isWhatsAppInstalled(WeakReference(mainActivity))
result.success(isAppInstalled)
}
"performHandShake" -> {
WhatsApp.performHandShake(WeakReference(mainActivity))
}
"startListening" -> {
WhatsAppOtpPlatformBridge.result = result
}
else -> {
result.notImplemented()
}
}
}
}
}

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".WhatsAppCodeActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

@ -5,6 +5,6 @@ android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true android.defaults.buildfeatures.buildconfig=true
android.suppressUnsupportedCompileSdk=33 android.suppressUnsupportedCompileSdk=33
MAPBOX_USER_NAME = "mapbox" MAPBOX_USER_NAME = "mapbox"
MAPBOX_DOWNLOADS_TOKEN="sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
#MAPBOX_DOWNLOADS_TOKEN="pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"
kotlin.jvm.target.validation.mode=IGNORE kotlin.jvm.target.validation.mode=IGNORE
#MAPBOX_DOWNLOADS_TOKEN="sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg"
MAPBOX_DOWNLOADS_TOKEN="pk.eyJ1IjoicndhaWQiLCJhIjoiY2x5cGo4aHNjMGNsbTJyc2djempobGQxaSJ9.RCaC6WrUt4A4YnZNfxnONQ"

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@ -33,7 +33,8 @@ target 'Runner' do
pod 'OpenTok', '~> 2.22.0' pod 'OpenTok', '~> 2.22.0'
pod 'VTO2Lib' pod 'VTO2Lib'
pod 'MapboxMaps', '10.18.2' pod 'MapboxMaps', '10.19.0'
pod 'MapboxNavigation', '2.19.0'
pod 'FLAnimatedImage' pod 'FLAnimatedImage'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

@ -14,15 +14,16 @@
306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; }; 306FE6C8271D790C002D6EFC /* OpenTokPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */; };
306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; }; 306FE6CB271D8B73002D6EFC /* OpenTok.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306FE6CA271D8B73002D6EFC /* OpenTok.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
47C935002C91766800981BA7 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FC2C91766400981BA7 /* Penguin.xcframework */; }; 55DE18989C1F69DC483B9FB6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C56AF9B31AA04A5292EEA39F /* Pods_Runner.framework */; };
47C935012C91766800981BA7 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FC2C91766400981BA7 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
47C935022C91766900981BA7 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */; };
47C935032C91766900981BA7 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
47C935042C91766A00981BA7 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FB2C91766400981BA7 /* PenNavUI.xcframework */; };
47C935052C91766A00981BA7 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47C934FB2C91766400981BA7 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; }; 762D738E274E42650063CE73 /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 762D738C274E42650063CE73 /* ring_30Sec.caf */; };
762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; }; 762D738F274E42650063CE73 /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 762D738D274E42650063CE73 /* ring_30Sec.mp3 */; };
7651B82F2D3E9CA40066B33A /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */; };
7651B8302D3E9CA40066B33A /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7651B8312D3E9CA40066B33A /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */; };
7651B8322D3E9CA40066B33A /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
7651B8332D3E9CA40066B33A /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */; };
7651B8342D3E9CA40066B33A /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; }; 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76815B26275F381C00E66E94 /* HealthKit.framework */; };
76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; }; 76962ECE28AE5C10004EAE09 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */; };
76D71B672C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */; }; 76D71B672C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */; };
@ -51,19 +52,18 @@
E9C8C136256BACDA00EFFB62 /* HMG_Guest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */; }; E9C8C136256BACDA00EFFB62 /* HMG_Guest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */; };
E9E27168256E3A4000F49B69 /* LocalizedFromFlutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */; }; E9E27168256E3A4000F49B69 /* LocalizedFromFlutter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E27167256E3A4000F49B69 /* LocalizedFromFlutter.swift */; };
E9F7623B25922BCE00FB5CCF /* FlutterConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */; }; E9F7623B25922BCE00FB5CCF /* FlutterConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */; };
FD7241B0D73FB24C87572FAC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E413842321D0D624872E9BE /* Pods_Runner.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
768D81742C6DF6E4005C655F /* Embed Frameworks */ = { 7651B8352D3E9CA50066B33A /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase; isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 12;
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
47C935032C91766900981BA7 /* PenguinINRenderer.xcframework in Embed Frameworks */, 7651B8322D3E9CA40066B33A /* Penguin.xcframework in Embed Frameworks */,
47C935012C91766800981BA7 /* Penguin.xcframework in Embed Frameworks */, 7651B8302D3E9CA40066B33A /* PenguinINRenderer.xcframework in Embed Frameworks */,
47C935052C91766A00981BA7 /* PenNavUI.xcframework in Embed Frameworks */, 7651B8342D3E9CA40066B33A /* PenNavUI.xcframework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -71,6 +71,7 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
02C0468611167F0E858967A9 /* 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>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
29631B9D2C96C7F600DF5916 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = "<group>"; }; 29631B9D2C96C7F600DF5916 /* PenguinNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinNavigator.swift; sourceTree = "<group>"; };
@ -79,10 +80,6 @@
306FE6C7271D790C002D6EFC /* OpenTokPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenTokPlatformBridge.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = "<group>"; };
47C934FB2C91766400981BA7 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = "<group>"; };
47C934FC2C91766400981BA7 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = "<group>"; };
6EE8819867EC2775AB578377 /* 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>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; 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>"; }; 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>"; }; 762D738C274E42650063CE73 /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring_30Sec.caf; path = ../../assets/sounds/ring_30Sec.caf; sourceTree = "<group>"; };
@ -90,6 +87,9 @@
7643E4042BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main_Custom.strings; sourceTree = "<group>"; }; 7643E4042BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main_Custom.strings; sourceTree = "<group>"; };
7643E4052BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = "<group>"; }; 7643E4052BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = "<group>"; };
7643E4062BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = "<group>"; }; 7643E4062BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = "<group>"; };
7651B82D2D3E9CA40066B33A /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = "<group>"; };
7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = "<group>"; };
76815B26275F381C00E66E94 /* HealthKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HealthKit.framework; path = System/Library/Frameworks/HealthKit.framework; sourceTree = SDKROOT; }; 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>"; }; 76962ECD28AE5C10004EAE09 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMGPenguinInPlatformBridge.swift; sourceTree = "<group>"; }; 76D71B662C6B7F9C00DAFB84 /* HMGPenguinInPlatformBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMGPenguinInPlatformBridge.swift; sourceTree = "<group>"; };
@ -99,8 +99,6 @@
76D71B6F2C6B81EA00DAFB84 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = "<group>"; }; 76D71B6F2C6B81EA00DAFB84 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = "<group>"; };
76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; }; 76F2556027F1FFED0062C1CD /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
838788A2BEDC4910F4B029A6 /* 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>"; };
8E413842321D0D624872E9BE /* 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>"; }; 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>"; }; 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; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -108,6 +106,9 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9E4A8F0312C6AED5D3DC152C /* 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>"; };
C56AF9B31AA04A5292EEA39F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D72A14381E2E5999FC41D0A8 /* 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>"; };
E91B538D256AAA6500E96549 /* GlobalHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobalHelper.swift; 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>"; }; 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>"; }; E91B538F256AAA6500E96549 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = "<group>"; };
@ -126,7 +127,6 @@
E9C8C135256BACDA00EFFB62 /* HMG_Guest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMG_Guest.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; E9F7623A25922BCE00FB5CCF /* FlutterConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlutterConstants.swift; sourceTree = "<group>"; };
F2C7D3C4718A1DED85DA3AD4 /* 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 */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -134,13 +134,13 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
7651B8312D3E9CA40066B33A /* Penguin.xcframework in Frameworks */,
76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */, 76F2556127F1FFED0062C1CD /* PassKit.framework in Frameworks */,
76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */, 76815B27275F381C00E66E94 /* HealthKit.framework in Frameworks */,
E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */, E9620805255C2ED100D3A35D /* NetworkExtension.framework in Frameworks */,
47C935042C91766A00981BA7 /* PenNavUI.xcframework in Frameworks */, 7651B8332D3E9CA40066B33A /* PenNavUI.xcframework in Frameworks */,
47C935002C91766800981BA7 /* Penguin.xcframework in Frameworks */, 7651B82F2D3E9CA40066B33A /* PenguinINRenderer.xcframework in Frameworks */,
47C935022C91766900981BA7 /* PenguinINRenderer.xcframework in Frameworks */, 55DE18989C1F69DC483B9FB6 /* Pods_Runner.framework in Frameworks */,
FD7241B0D73FB24C87572FAC /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -160,13 +160,13 @@
555EAAA626EFB641859EF0BE /* Frameworks */ = { 555EAAA626EFB641859EF0BE /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
47C934FC2C91766400981BA7 /* Penguin.xcframework */, 7651B82D2D3E9CA40066B33A /* Penguin.xcframework */,
47C934FA2C91766400981BA7 /* PenguinINRenderer.xcframework */, 7651B82C2D3E9CA40066B33A /* PenguinINRenderer.xcframework */,
47C934FB2C91766400981BA7 /* PenNavUI.xcframework */, 7651B82E2D3E9CA40066B33A /* PenNavUI.xcframework */,
76F2556027F1FFED0062C1CD /* PassKit.framework */, 76F2556027F1FFED0062C1CD /* PassKit.framework */,
76815B26275F381C00E66E94 /* HealthKit.framework */, 76815B26275F381C00E66E94 /* HealthKit.framework */,
E9620804255C2ED100D3A35D /* NetworkExtension.framework */, E9620804255C2ED100D3A35D /* NetworkExtension.framework */,
8E413842321D0D624872E9BE /* Pods_Runner.framework */, C56AF9B31AA04A5292EEA39F /* Pods_Runner.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -174,9 +174,9 @@
605039E5DDF72C245F9765FE /* Pods */ = { 605039E5DDF72C245F9765FE /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F2C7D3C4718A1DED85DA3AD4 /* Pods-Runner.debug.xcconfig */, D72A14381E2E5999FC41D0A8 /* Pods-Runner.debug.xcconfig */,
838788A2BEDC4910F4B029A6 /* Pods-Runner.release.xcconfig */, 02C0468611167F0E858967A9 /* Pods-Runner.release.xcconfig */,
6EE8819867EC2775AB578377 /* Pods-Runner.profile.xcconfig */, 9E4A8F0312C6AED5D3DC152C /* Pods-Runner.profile.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
@ -293,15 +293,15 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = ( buildPhases = (
6D0B2FE51DC05E2D0395E861 /* [CP] Check Pods Manifest.lock */, BEE88E0BBD555ACCD7E82B57 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */, 9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */, 97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */, 97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */, 97C146EC1CF9000F007C117D /* Resources */,
768D81742C6DF6E4005C655F /* Embed Frameworks */, 7651B8352D3E9CA50066B33A /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */, 191312D8478950EB12CBDD28 /* [CP] Embed Pods Frameworks */,
4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */, 4CC68CB45B720A365C7CF7DC /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -368,6 +368,23 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
191312D8478950EB12CBDD28 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;
@ -384,7 +401,7 @@
shellPath = /bin/sh; 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\" embed_and_thin\n";
}; };
4671D3CD126F6635F4B75A6E /* [CP] Copy Pods Resources */ = { 4CC68CB45B720A365C7CF7DC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -401,24 +418,22 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
487FDD6493EB9AE7D8E39485 /* [CP] Embed Pods Frameworks */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Embed Pods Frameworks"; name = "Run Script";
outputFileListPaths = ( outputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
showEnvVarsInLog = 0;
}; };
6D0B2FE51DC05E2D0395E861 /* [CP] Check Pods Manifest.lock */ = { BEE88E0BBD555ACCD7E82B57 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -440,21 +455,6 @@
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"; 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; showEnvVarsInLog = 0;
}; };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
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";
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -583,12 +583,13 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3A359E86ZF; DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
"$(SRCROOT)/Frameworks",
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -600,7 +601,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.991; MARKETING_VERSION = 4.5.999;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -734,12 +735,13 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3A359E86ZF; DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
"$(SRCROOT)/Frameworks",
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -751,7 +753,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.991; MARKETING_VERSION = 4.5.999;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -777,12 +779,13 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 3A359E86ZF; DEVELOPMENT_TEAM = 3A359E86ZF;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
"$(SRCROOT)/Frameworks",
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -794,7 +797,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 4.5.991; MARKETING_VERSION = 4.5.999;
PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

@ -20,17 +20,14 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
var PACKAGES_ORDERS = '/api/orders'; var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://webservices.hmg.com/'; var BASE_URL = 'https://webservices.hmg.com/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
@ -105,6 +102,7 @@ var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrd
var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport'; var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport';
var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate';
var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
var SEND_LAB_RESULT_EMAIL_NEW = 'ReportsAPI/api/reports/labReport';
var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida';
var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo'; var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo';
@ -355,7 +353,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 16.7; var VERSION_ID = 17.4;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;
@ -695,6 +693,10 @@ var CHECK_PATIENT_ER_ADVANCE_BALANCE = 'Services/OUTPs.svc/Rest/getPatientAdvanc
var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC'; var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC';
var GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOccupation';
var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDoctorAvailableByCalendarSchedule';
//PAYFORT //PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";

@ -1921,6 +1921,8 @@ const Map localizedValues = {
"consent": {"en": "Consent", "ar": "التنويم"}, "consent": {"en": "Consent", "ar": "التنويم"},
"generalInstructionsTitle": {"en": "General", "ar": "تعليمات"}, "generalInstructionsTitle": {"en": "General", "ar": "تعليمات"},
"generalInstructionsSubTitle": {"en": "Instructions", "ar": "التنويم العامة"}, "generalInstructionsSubTitle": {"en": "Instructions", "ar": "التنويم العامة"},
"generalConsentTitle": {"en": "General", "ar": "الموافقة"},
"generalConsentSubTitle": {"en": "Consent", "ar": "العامة"},
"medicalInstructionsTitle": {"en": "Medical", "ar": "التعليمات الطبية"}, "medicalInstructionsTitle": {"en": "Medical", "ar": "التعليمات الطبية"},
"medicalInstructionsSubTitle": {"en": "Instructions", "ar": "قبل التنويم"}, "medicalInstructionsSubTitle": {"en": "Instructions", "ar": "قبل التنويم"},
"mealPlanTitle": {"en": "Meal Plan", "ar": "خدمات"}, "mealPlanTitle": {"en": "Meal Plan", "ar": "خدمات"},
@ -1984,6 +1986,7 @@ const Map localizedValues = {
"ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:" "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"
}, },
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"}, "validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"resultStatus": {"en": "Result Status: ", "ar": "حالة النتيجة: "},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"}, "contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"}, "checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please ensure you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."}, "locationCheckInError": {"en": "Please ensure you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
@ -2015,13 +2018,19 @@ const Map localizedValues = {
"howToUseVerificationMethod": {"en": "How to use verification methods?", "ar": "كيفية استخدام طرق التحقق؟"}, "howToUseVerificationMethod": {"en": "How to use verification methods?", "ar": "كيفية استخدام طرق التحقق؟"},
"addToWaitingList": {"en": "Add to waiting list", "ar": "اضافه الى قائمة الانتظار"}, "addToWaitingList": {"en": "Add to waiting list", "ar": "اضافه الى قائمة الانتظار"},
"searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"}, "searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"},
"enterMobileNumber": {"en": "Enter Mobile Number", "ar": "أدخل رقم الجوال"},
"videoCall": {"en": "Video Call", "ar": "اتصال فيديو"},
"audioCall": {"en": "Audio Call", "ar": "اتصال صوتية"},
"phoneCall": {"en": "Phone Call", "ar": "اتصال هاتفية"},
"selectCallType": {"en": "Select Call Type", "ar": "حدد نوع المكالمة"},
"selectedCallType": {"en": "Selected Call Type", "ar": "نوع المكالمة المحدد"},
"selectBranch": {"en": "Select Branch", "ar": "اختر الفرع"}, "selectBranch": {"en": "Select Branch", "ar": "اختر الفرع"},
"searchByBranch": {"en": "Search By Branch Name", "ar": "البحث عن طريق اسم الفرع"}, "searchByBranch": {"en": "Search By Branch Name", "ar": "البحث عن طريق اسم الفرع"},
"hospitalNavigationTitle": {"en": "Hospital", "ar": "الملاحة"}, "hospitalNavigationTitle": {"en": "Hospital", "ar": "الملاحة"},
"hospitalNavigationSubtitle": {"en": "Navigation", "ar": "المستشفى"}, "hospitalNavigationSubtitle": {"en": "Navigation", "ar": "المستشفى"},
"continueAgreeTerms": {"en": "By continuing, You agree to the above Terms and Conditions.", "ar": "من خلال المتابعة، فإنك توافق على الشروط والأحكام المذكورة أعلاه."}, "continueAgreeTerms": {"en": "By continuing, You agree to the above Terms and Conditions.", "ar": "من خلال المتابعة، فإنك توافق على الشروط والأحكام المذكورة أعلاه."},
"agreeText": {"en": "Agree", "ar": "أوافق"}, "agreeText": {"en": "Agree", "ar": "أوافق"},
"ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done.", "ar": "لقد تم تسجيل وصولك للطوارئ عبر الإنترنت بنجاح."}, "ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done. Please proceed to the waiting area.", "ar": "لقد تم تسجيل دخولك عبر الإنترنت بنجاح. يرجى التوجه إلى منطقة الانتظار."},
"generalConsent": {"en": "General Consent: ", "ar": "موافقة عامة:"}, "generalConsent": {"en": "General Consent: ", "ar": "موافقة عامة:"},
"generalConsent1": { "generalConsent1": {
@ -2114,6 +2123,23 @@ const Map localizedValues = {
"ar": "ar":
"لقد قرأت وفهمت وأوافق على الشروط والأحكام المبينة أعلاه وأوافق على الإلتزام بالمتطلبات المذكورة تجاه المستشفى ، لقد قرأت التفاصيل المبينة في نموذج التسجيل الخاص بي وأقر بأنها صحيحة. أنا الموقع ادناه أقر بأنه أتيحت لي الفرصة لطرح الأسئلة والتحفظات بشأن هذه الموافقة، وتلقيت إجابات مرضية على جميع إستفساراتي." "لقد قرأت وفهمت وأوافق على الشروط والأحكام المبينة أعلاه وأوافق على الإلتزام بالمتطلبات المذكورة تجاه المستشفى ، لقد قرأت التفاصيل المبينة في نموذج التسجيل الخاص بي وأقر بأنها صحيحة. أنا الموقع ادناه أقر بأنه أتيحت لي الفرصة لطرح الأسئلة والتحفظات بشأن هذه الموافقة، وتلقيت إجابات مرضية على جميع إستفساراتي."
}, },
"incorrectNationalId": {"en": "Incorrect National ID", "ar": "رقم الهوية غير صحيحة"},
"labResultFlag": {"en": "Flag", "ar": "Flag"},
"selectOccupation": {"en": "Select Occupation", "ar": "اختر المهنة"},
"selectOccupationError": {"en": "Please select your occupation.", "ar": "الرجاء تحديد مهنتك."},
"whatIsOnlineCheckIn": {"en": "What is Online Check-In?", "ar": "ما هو تسجيل الوصول عبر الإنترنت؟"},
"EROnlineCheckInDesc1": {"en": "Online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.", "ar": "يتيح تسجيل الوصول عبر الإنترنت للمرضى ملء النماذج ومشاركة تفاصيل التأمين وحجز المواعيد عبر الإنترنت، مما يجعل زيارتهم أكثر سلاسة وسرعة."},
"EROnlineCheckInHow": {"en": "How can i use Online Check-In?", "ar": "كيف يمكنني استخدام تسجيل الوصول عبر الإنترنت؟"},
"EROnlineCheckInTapOn": {"en": "Tap On", "ar": "اضغط على"},
"EROnlineCheckInHoldPhone": {"en": "Hold your phone", "ar": "أمسك هاتفك"},
"EROnlineCheckInWaitTurn": {"en": "Wait your turn", "ar": "انتظر دورك"},
"EROnlineCheckInWaitTurnInstruction": {"en": "Please wait in the waiting area until called by the nurse.", "ar": "يرجى الانتظار في منطقة الانتظار حتى يتم استدعاؤك من قبل الممرضة."},
"EROnlineCheckInHoldPhoneInstruction": {"en": "Hold the phone 1 to 2 cm from the NFC sign displayed on the board", "ar": "امسك الهاتف على مسافة 1 إلى 2 سم من علامة NFC المعروضة على اللوحة"},
"EROnlineCheckInTapOnCheckIn": {"en": "Tap on the check-in button within the app", "ar": "اضغط على زر تسجيل الدخول داخل التطبيق"},
"download": {"en": "Download", "ar": "تحميل"},
"share": {"en": "Share", "ar": "يشارك"},
"readMore": {"en": "Read More", "ar": "اقرأ أكثر"}, "readMore": {"en": "Read More", "ar": "اقرأ أكثر"},
"showLess": {"en": "Show Less", "ar": "عرض أقل"}, "showLess": {"en": "Show Less", "ar": "عرض أقل"},
"change": {"en": "Change", "ar": "فرق"}, "change": {"en": "Change", "ar": "فرق"},

@ -44,3 +44,4 @@ const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN'; const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai'; const REGISTER_INFO_DUBAI ='register-info-dubai';
const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown'; const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown';
const PATIENT_OCCUPATION_LIST ='patient-occupation-list';

@ -37,6 +37,8 @@ class PatientLabOrders {
String? setupID; String? setupID;
List<String>? speciality; List<String>? speciality;
bool? isLiveCareAppointment; bool? isLiveCareAppointment;
int? status;
String? statusDesc;
PatientLabOrders( PatientLabOrders(
{this.actualDoctorRate, {this.actualDoctorRate,
this.clinicDescription, this.clinicDescription,
@ -73,7 +75,9 @@ class PatientLabOrders {
this.invoiceNo_VP, this.invoiceNo_VP,
this.invoiceType, this.invoiceType,
this.speciality, this.speciality,
this.isLiveCareAppointment}); this.isLiveCareAppointment,
this.status,
this.statusDesc,});
PatientLabOrders.fromJson(Map<String, dynamic> json) { PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
@ -111,6 +115,8 @@ class PatientLabOrders {
invoiceNo_VP = json['invoiceNo_VP']; invoiceNo_VP = json['invoiceNo_VP'];
invoiceType = json['InvoiceType']; invoiceType = json['InvoiceType'];
isLiveCareAppointment = json['IsLiveCareAppointment']; isLiveCareAppointment = json['IsLiveCareAppointment'];
status = json['Status'];
statusDesc = json['StatusDesc'];
// speciality = json['Speciality'].cast<String>(); // speciality = json['Speciality'].cast<String>();
} }
@ -151,6 +157,8 @@ class PatientLabOrders {
data['Speciality'] = this.speciality; data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment; data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] = this.invoiceNo_VP; data['invoiceNo_VP'] = this.invoiceNo_VP;
data['Status'] = this.status;
data['StatusDesc'] = this.statusDesc;
return data; return data;
} }
} }

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart';
class RequestSendPrescriptionEmail { class RequestSendPrescriptionEmail {
String? appointmentDate; String? appointmentDate;
@ -26,6 +27,7 @@ class RequestSendPrescriptionEmail {
int? doctorID; int? doctorID;
int? projectID; int? projectID;
List<PrescriptionReport>? listPrescriptions; List<PrescriptionReport>? listPrescriptions;
List<PrescriptionReportINP>? listPrescriptionsINP;
RequestSendPrescriptionEmail( RequestSendPrescriptionEmail(
{this.appointmentDate, {this.appointmentDate,
@ -102,9 +104,12 @@ class RequestSendPrescriptionEmail {
data['PatientMobileNumber'] = this.patientMobileNumber; data['PatientMobileNumber'] = this.patientMobileNumber;
data['PatientName'] = this.patientName; data['PatientName'] = this.patientName;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
if (this.listPrescriptions != null) { if (this.listPrescriptions != null && this.listPrescriptions!.isNotEmpty) {
data['ListPrescriptions'] = this.listPrescriptions!.map((v) => v.toJson()).toList(); data['ListPrescriptions'] = this.listPrescriptions!.map((v) => v.toJson()).toList();
} }
if (this.listPrescriptionsINP != null && this.listPrescriptionsINP!.isNotEmpty) {
data['ListPrescriptions'] = this.listPrescriptionsINP!.map((v) => v.toJson()).toList();
}
data['ClinicName'] = this.clinicName; data['ClinicName'] = this.clinicName;
data['DoctorName'] = this.doctorName; data['DoctorName'] = this.doctorName;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;

@ -37,6 +37,9 @@ VitalSignService _vitalSignService = locator<VitalSignService>();
class BaseAppClient { class BaseAppClient {
final _analytics = locator<GAnalytics>(); final _analytics = locator<GAnalytics>();
var sampleNHICResponse =
'{"Date":null,"LanguageID":0,"ServiceName":0,"Time":null,"AndroidLink":null,"AuthenticationTokenID":null,"Data":null,"Dataw":false,"DietType":0,"DietTypeID":0,"ErrorCode":null,"ErrorEndUserMessage":null,"ErrorEndUserMessageN":null,"ErrorMessage":null,"ErrorStatusCode":0,"ErrorType":0,"FoodCategory":0,"IOSLink":null,"IsAuthenticated":false,"MealOrderStatus":0,"MealType":0,"MessageStatus":1,"NumberOfResultRecords":0,"PatientBlodType":null,"SuccessMsg":null,"SuccessMsgN":null,"VidaUpdatedResponse":null,"AccessTokenObject":null,"Age":23,"ClientIdentifierId":null,"CreatedBy":0,"DateOfBirth":"05\/20\/2001","FirstNameAr":"عميرخان","FirstNameEn":"UMAIR KHAN","Gender":"M","GenderAr":null,"GenderEn":null,"HealthId":"30000411002276","IdNumber":"2188030163","IdType":"Iqama","IsHijri":false,"IsInstertedOrUpdated":0,"IsNull":0,"IsPatientExistNHIC":0,"IsRecordLockedByCurrentUser":false,"LastNameAr":"خان","LastNameEn":"KHAN","List_ActiveAccessToken":null,"MaritalStatus":"غير معروف","MaritalStatusCode":"U","NationalDateOfBirth":"26\/02\/1422","Nationality":"باكستان","NationalityCode":"PAK","Occupation":"-","PCDTransactionDataResultList":null,"PCD_GetVidaPatientForManualVerificationList":null,"PCD_NHIC_HMG_PatientDetailsMatchCalulationList":null,"PCD_ReturnValue":0,"PatientStatus":"-","PlaceofBirth":"-","PractitionerStatusCode":null,"PractitionerStatusDescAr":null,"PractitionerStatusDescEn":null,"RowCount":0,"SecondNameAr":"عظيم","SecondNameEn":"AZEEM","ThirdNameAr":"خان عمر","ThirdNameEn":"KHAN UMAR","YakeenDoctorData_GetSourceList":null,"YakeenVidaPatientDataStatisticsByPatientIdList":null,"YakeenVidaPatientDataStatisticsList":null,"YakeenVidaPatientDataStatisticsPrefferedList":null,"accessToken":null,"categoryCode":0,"categoryNameAr":null,"categoryNameEn":null,"constraintCode":0,"constraintNameAr":null,"constraintNameEn":null,"content":null,"errorList":null,"licenseExpiryDate":null,"licenseIssuedDate":null,"licenseStatusCode":null,"licenseStatusDescAr":null,"licenseStatusDescEn":null,"organizations":null,"registrationNumber":null,"specialtyCode":0,"specialtyNameAr":null,"specialtyNameEn":null}';
post(String endPoint, post(String endPoint,
{required Map<String, dynamic> body, {required Map<String, dynamic> body,
required Function(dynamic response, int statusCode) onSuccess, required Function(dynamic response, int statusCode) onSuccess,
@ -184,7 +187,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217; // body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; //0560717232 // body['MobileNo'] = "531940021"; //0560717232
// body['PatientID'] = 4768303; //4609100 // body['PatientID'] = 5185584; //4609100
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// Patient ID: 3027574 // Patient ID: 3027574
@ -199,9 +202,9 @@ class BaseAppClient {
// } // }
// if (AppGlobal.isNetworkDebugEnabled) { // if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url"); debugPrint("URL : $url");
final jsonBody = json.encode(body); final jsonBody = json.encode(body);
print(jsonBody); debugPrint(jsonBody);
// } // }
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
@ -212,7 +215,12 @@ class BaseAppClient {
logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); logApiEndpointError(endPoint, 'Error While Fetching data', statusCode);
} else { } else {
// var decoded = utf8.decode(response.bodyBytes); // var decoded = utf8.decode(response.bodyBytes);
var parsed = json.decode(utf8.decode(response.bodyBytes)); var parsed;
// if (url.contains('Services/NHIC.svc/REST/GetPatientInfo')) {
// parsed = json.decode(sampleNHICResponse);
// } else {
parsed = json.decode(utf8.decode(response.bodyBytes));
// }
// print("Response: $parsed"); // print("Response: $parsed");

@ -29,6 +29,25 @@ class AskDoctorService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future isDoctorAvailable({int? projectId, int? doctorId, int? clinicId}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['DoctorID'] = doctorId;
body['ProjectID'] = projectId;
body['ClinicID'] = clinicId;
dynamic localRes;
await baseAppClient.post(IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getCallRequestTypeLOV() async { Future getCallRequestTypeLOV() async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();

@ -42,7 +42,7 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo; _requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0"; _requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.invoiceType = invoiceType!; _requestPatientLabSpecialResult.invoiceType = invoiceType ?? "";
_requestPatientLabSpecialResult.orderNo = orderNo; _requestPatientLabSpecialResult.orderNo = orderNo;
_requestPatientLabSpecialResult.setupID = setupID; _requestPatientLabSpecialResult.setupID = setupID;
@ -231,7 +231,8 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.doctorID = patientLabOrder.doctorID; _requestSendLabReportEmail.doctorID = patientLabOrder.doctorID;
_requestSendLabReportEmail.languageID = 1; _requestSendLabReportEmail.languageID = 1;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) {
if (isDownload) { if (isDownload) {
labReportPDF = response['LabReportsPDFContent']; labReportPDF = response['LabReportsPDFContent'];
} }

@ -98,6 +98,7 @@ class PrescriptionsService extends BaseService {
await baseAppClient.post(prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(prescriptions.isInOutPatient! ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
prescriptionReportEnhList.clear(); prescriptionReportEnhList.clear();
prescriptionReportListINP.clear();
isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported']; isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported'];
if (prescriptions.isInOutPatient!) { if (prescriptions.isInOutPatient!) {
response['ListPRM'].forEach((prescriptions) { response['ListPRM'].forEach((prescriptions) {
@ -120,8 +121,9 @@ class PrescriptionsService extends BaseService {
isDentalAllowedBackend: false, isDentalAllowedBackend: false,
); );
Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID) async { Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient) async {
_requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList; _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList;
_requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP;
_requestSendPrescriptionEmail.appointmentDate = appointmentDate; _requestSendPrescriptionEmail.appointmentDate = appointmentDate;
_requestSendPrescriptionEmail.patientID = patientID; _requestSendPrescriptionEmail.patientID = patientID;
_requestSendPrescriptionEmail.clinicName = clinicName; _requestSendPrescriptionEmail.clinicName = clinicName;

@ -114,9 +114,9 @@ class PrescriptionsViewModel extends BaseViewModel {
} }
} }
sendPrescriptionEmail({required String appointmentDate, required int patientID, required String clinicName, required String doctorName, required int doctorID, required String mes, required int projectID}) async { sendPrescriptionEmail({required String appointmentDate, required int patientID, required String clinicName, required String doctorName, required int doctorID, required String mes, required int projectID, required bool isInOutPatient}) async {
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);
await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID); await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error!; error = _prescriptionsService.error!;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -27,8 +29,19 @@ import 'pages/pharmacies/compare-list.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(); await Firebase.initializeApp();
// Pass all uncaught "fatal" errors from the framework to Crashlytics
// FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
// Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics
// PlatformDispatcher.instance.onError = (error, stack) {
// if (!kDebugMode) FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
// return true;
// };
setupLocator(); setupLocator();
HttpOverrides.global = MyHttpOverrides(); HttpOverrides.global = MyHttpOverrides();
runApp(MyApp()); runApp(MyApp());
} }
@ -55,8 +68,6 @@ class _MyApp extends State<MyApp> {
//0567184134 mobile //0567184134 mobile
//246305493 //246305493
// checkForUpdate() { // checkForUpdate() {
// // todo need to verify 'imp' // // todo need to verify 'imp'
// InAppUpdate.checkForUpdate().then((info) { // InAppUpdate.checkForUpdate().then((info) {
@ -140,14 +151,12 @@ class _MyApp extends State<MyApp> {
], ],
child: Consumer<ProjectViewModel>( child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp( builder: (context, projectProvider, child) => MaterialApp(
builder: (_, mchild) { builder: (_, mchild) {
return MediaQuery( return MediaQuery(
data: MediaQuery.of(context).copyWith( data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.linear(1.0), textScaler: TextScaler.linear(1.0),
), //set desired text scale factor here ), //set desired text scale factor here
child: mchild! child: mchild!);
);
// Container( // Container(
// color: Colors.blue, // color: Colors.blue,
// )); // ));

@ -204,8 +204,10 @@ class PatientDoctorAppointmentList {
String? filterName = ""; String? filterName = "";
String? distanceInKMs = ""; String? distanceInKMs = "";
List<DoctorList>? patientDoctorAppointmentList = []; List<DoctorList>? patientDoctorAppointmentList = [];
String? projectTopName = "";
String? projectBottomName = "";
PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, DoctorList? patientDoctorAppointment}) { PatientDoctorAppointmentList({this.filterName, this.distanceInKMs, this.projectTopName, this.projectBottomName, DoctorList? patientDoctorAppointment}) {
patientDoctorAppointmentList!.add(patientDoctorAppointment!); patientDoctorAppointmentList!.add(patientDoctorAppointment!);
} }
} }

@ -0,0 +1,22 @@
class GetPatientOccupationListResponse {
String? occupationID;
String? description;
String? descriptionN;
GetPatientOccupationListResponse(
{this.occupationID, this.description, this.descriptionN});
GetPatientOccupationListResponse.fromJson(Map<String, dynamic> json) {
occupationID = json['OccupationID'];
description = json['Description'];
descriptionN = json['DescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['OccupationID'] = this.occupationID;
data['Description'] = this.description;
data['DescriptionN'] = this.descriptionN;
return data;
}
}

@ -75,6 +75,7 @@ class RegisterInfoResponse {
int? specialtyCode; int? specialtyCode;
dynamic specialtyNameAr; dynamic specialtyNameAr;
dynamic specialtyNameEn; dynamic specialtyNameEn;
// String? occupationID;
RegisterInfoResponse( RegisterInfoResponse(
{this.date, {this.date,
@ -152,7 +153,9 @@ class RegisterInfoResponse {
this.registrationNumber, this.registrationNumber,
this.specialtyCode, this.specialtyCode,
this.specialtyNameAr, this.specialtyNameAr,
this.specialtyNameEn}); this.specialtyNameEn,
// this.occupationID
});
RegisterInfoResponse.fromJson(Map<String, dynamic> json) { RegisterInfoResponse.fromJson(Map<String, dynamic> json) {
date = json['Date']; date = json['Date'];
@ -231,6 +234,7 @@ class RegisterInfoResponse {
specialtyCode = json['specialtyCode']; specialtyCode = json['specialtyCode'];
specialtyNameAr = json['specialtyNameAr']; specialtyNameAr = json['specialtyNameAr'];
specialtyNameEn = json['specialtyNameEn']; specialtyNameEn = json['specialtyNameEn'];
// occupationID = json['OccupationID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -311,6 +315,7 @@ class RegisterInfoResponse {
data['specialtyCode'] = this.specialtyCode; data['specialtyCode'] = this.specialtyCode;
data['specialtyNameAr'] = this.specialtyNameAr; data['specialtyNameAr'] = this.specialtyNameAr;
data['specialtyNameEn'] = this.specialtyNameEn; data['specialtyNameEn'] = this.specialtyNameEn;
// data['OccupationID'] = this.occupationID;
return data; return data;
} }
} }

@ -16,6 +16,8 @@ class RegisterUserRequest {
int? isHijri; int? isHijri;
String? healthId; String? healthId;
String? zipCode; String? zipCode;
// String? occupationID;
RegisterUserRequest( RegisterUserRequest(
{this.patientobject, {this.patientobject,
this.patientIdentificationID, this.patientIdentificationID,
@ -33,7 +35,9 @@ class RegisterUserRequest {
this.dob, this.dob,
this.isHijri, this.isHijri,
this.healthId, this.healthId,
this.zipCode}); this.zipCode,
// this.occupationID
});
RegisterUserRequest.fromJson(Map<String, dynamic> json) { RegisterUserRequest.fromJson(Map<String, dynamic> json) {
patientobject = json['Patientobject'] != null ? new Patientobject.fromJson(json['Patientobject']) : null; patientobject = json['Patientobject'] != null ? new Patientobject.fromJson(json['Patientobject']) : null;
@ -53,6 +57,7 @@ class RegisterUserRequest {
isHijri = json['IsHijri']; isHijri = json['IsHijri'];
healthId = json['HealthId']; healthId = json['HealthId'];
zipCode = json['ZipCode']; zipCode = json['ZipCode'];
// occupationID = json['OccupationID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -76,6 +81,7 @@ class RegisterUserRequest {
data['IsHijri'] = this.isHijri; data['IsHijri'] = this.isHijri;
data['HealthId'] = this.healthId; data['HealthId'] = this.healthId;
data['ZipCode'] = this.zipCode; data['ZipCode'] = this.zipCode;
// data['OccupationID'] = this.occupationID;
return data; return data;
} }
} }
@ -102,6 +108,7 @@ class Patientobject {
String? sourceType; String? sourceType;
String? preferredLanguage; String? preferredLanguage;
String? marital; String? marital;
// String? occupationID;
Patientobject( Patientobject(
{this.tempValue, {this.tempValue,
@ -124,7 +131,9 @@ class Patientobject {
this.emailAddress, this.emailAddress,
this.sourceType, this.sourceType,
this.preferredLanguage, this.preferredLanguage,
this.marital}); this.marital,
// this.occupationID
});
Patientobject.fromJson(Map<String, dynamic> json) { Patientobject.fromJson(Map<String, dynamic> json) {
tempValue = json['TempValue']; tempValue = json['TempValue'];
@ -149,6 +158,7 @@ class Patientobject {
preferredLanguage = json['PreferredLanguage']; preferredLanguage = json['PreferredLanguage'];
marital = json['Marital']; marital = json['Marital'];
// occupationID = json['OccupationID'] ?? "";
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -174,6 +184,7 @@ class Patientobject {
data['SourceType'] = this.sourceType; data['SourceType'] = this.sourceType;
data['PreferredLanguage'] = this.preferredLanguage; data['PreferredLanguage'] = this.preferredLanguage;
data['Marital'] = this.marital; data['Marital'] = this.marital;
// data['OccupationID'] = this.occupationID;
return data; return data;
} }
} }

@ -4,6 +4,7 @@ class HmgServices {
String subTitle; String subTitle;
String icon; String icon;
bool isLogin; bool isLogin;
bool isLocked;
HmgServices(this.action, this.title, this.subTitle, this.icon,this.isLogin); HmgServices(this.action, this.title, this.subTitle, this.icon, this.isLogin, {this.isLocked = false});
} }

@ -30,28 +30,18 @@ class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult)? onPick; final Function(PickResult)? onPick;
final double? latitude; final double? latitude;
final double? longitude; final double? longitude;
final PatientERInsertPresOrderRequestModel? final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel;
patientERInsertPresOrderRequestModel;
final Function? changePageViewIndex; final Function? changePageViewIndex;
final HomeHealthCareViewModel model; final HomeHealthCareViewModel model;
const NewHomeHealthCareStepTowPage( const NewHomeHealthCareStepTowPage({Key? key, this.onPick, this.latitude, this.longitude, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model})
{Key? key,
this.onPick,
this.latitude,
this.longitude,
this.patientERInsertPresOrderRequestModel,
this.changePageViewIndex,
required this.model})
: super(key: key); : super(key: key);
@override @override
_NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState();
_NewHomeHealthCareStepTowPageState();
} }
class _NewHomeHealthCareStepTowPageState class _NewHomeHealthCareStepTowPageState extends State<NewHomeHealthCareStepTowPage> {
extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0; double latitude = 0;
double longitude = 0; double longitude = 0;
AddressInfo? _selectedAddress; AddressInfo? _selectedAddress;
@ -88,8 +78,7 @@ class _NewHomeHealthCareStepTowPageState
} }
void _getUserLocation() async { void _getUserLocation() async {
if (await this.sharedPref.getDouble(USER_LAT) != null && if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
await this.sharedPref.getDouble(USER_LONG) != null) {
var lat = await this.sharedPref.getDouble(USER_LAT); var lat = await this.sharedPref.getDouble(USER_LAT);
var long = await this.sharedPref.getDouble(USER_LONG); var long = await this.sharedPref.getDouble(USER_LONG);
latitude = lat; latitude = lat;
@ -97,8 +86,7 @@ class _NewHomeHealthCareStepTowPageState
currentPostion = LatLng(lat, long); currentPostion = LatLng(lat, long);
setMap(); setMap();
} else { } else {
locationUtils = locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) { locationUtils.getCurrentLocation(callBack: (value) {
print(value); print(value);
setMap(); setMap();
@ -138,8 +126,7 @@ class _NewHomeHealthCareStepTowPageState
showCurrentLocation = true; showCurrentLocation = true;
}); });
} else { } else {
latLong = widget latLong = widget.model.addressesList[widget.model.addressesList.length - 1].latLong;
.model.addressesList[widget.model.addressesList.length - 1].latLong;
} }
} }
@ -178,8 +165,7 @@ class _NewHomeHealthCareStepTowPageState
decoration: cardRadius(12), decoration: cardRadius(12),
child: Container( child: Container(
child: InkWell( child: InkWell(
onTap: () => onTap: () => confirmSelectLocationDialog(widget.model.addressesList),
confirmSelectLocationDialog(widget.model.addressesList),
child: Container( child: Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
width: double.infinity, width: double.infinity,
@ -212,28 +198,28 @@ class _NewHomeHealthCareStepTowPageState
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( // Navigator.push(
context, // context,
FadePage( // FadePage(
page: LocationPage( // page: LocationPage(
// latitude: latitude, // // latitude: latitude,
// longitude: longitude, // // longitude: longitude,
), // ),
), // ),
).then((value) async { // ).then((value) async {
print(value); // print(value);
await widget.model.getCustomerAddresses(); // await widget.model.getCustomerAddresses();
setState(() {}); // setState(() {});
}); // });
}, },
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8), padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 16),
child: Row( child: Row(
children: [ children: [
Icon(Icons.add_circle_outline_sharp), Icon(Icons.location_on_outlined),
mWidth(12), mWidth(12),
Text( Text(
TranslationBase.of(context).addNewAddress, TranslationBase.of(context).selectLocation,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -261,23 +247,18 @@ class _NewHomeHealthCareStepTowPageState
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).continues, TranslationBase.of(context).continues,
() { () {
setState(() { setState(() {
widget.patientERInsertPresOrderRequestModel!.latitude = widget.patientERInsertPresOrderRequestModel!.latitude = latitude;
latitude; widget.patientERInsertPresOrderRequestModel!.longitude = longitude;
widget.patientERInsertPresOrderRequestModel!.longitude =
longitude;
}); });
navigateTo( navigateTo(
context, context,
NewHomeHealthCareStepThreePage( NewHomeHealthCareStepThreePage(
patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
widget.patientERInsertPresOrderRequestModel,
model: widget.model, model: widget.model,
), ),
); );
@ -319,8 +300,7 @@ class _NewHomeHealthCareStepTowPageState
goToCurrentLocation() { goToCurrentLocation() {
Geolocator.getCurrentPosition().then((value) { Geolocator.getCurrentPosition().then((value) {
_selectedAddress = _selectedAddress = AddressInfo(latLong: '${value.latitude},${value.longitude}');
AddressInfo(latLong: '${value.latitude},${value.longitude}');
moveToLocation(LatLng(value.latitude, value.longitude)); moveToLocation(LatLng(value.latitude, value.longitude));
}); });
} }

@ -670,8 +670,8 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");

@ -190,7 +190,7 @@ class _BariatricsPageState extends State<BariatricsPage> {
} }
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async { Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)))
.then((value) { .then((value) {
setState(() { setState(() {
// dropdownValue = null; // dropdownValue = null;

@ -188,7 +188,7 @@ class _ResultPageState extends State<ResultPage> {
} }
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async { Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)))
.then((value) { .then((value) {
setState(() { setState(() {
// dropdownValue = null; // dropdownValue = null;

@ -154,7 +154,7 @@ class BmrResultPage extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -150,7 +150,7 @@ class FatResult extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -155,7 +155,7 @@ class CalorieResultPage extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -176,7 +176,7 @@ class CarbsResult extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -176,7 +176,7 @@ class DeliveryDueResult extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -214,7 +214,7 @@ class IdealBodyResult extends StatelessWidget {
BariatricsService service = new BariatricsService(); BariatricsService service = new BariatricsService();
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[]; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
service.getCalculationDoctors(calculationID: 4).then((res) { service.getCalculationDoctors(calculationID: 4).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -253,7 +253,15 @@ class IdealBodyResult extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: doctorsList,
patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital,
isDoctorSearchResult: false,
)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -186,7 +186,7 @@ class OvulationResult extends StatelessWidget {
} }
}); });
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital))); Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,)));
} }
} }
}).catchError((err) { }).catchError((err) {

@ -459,8 +459,9 @@ class _BookConfirmState extends State<BookConfirm> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: failureResult.toString()); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");

@ -712,8 +712,8 @@ class _BookSuccessState extends State<BookSuccess> {
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");

@ -243,8 +243,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
patientDoctorAppointmentListHospital patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
} }
}); });
} else {} } else {}

@ -9,6 +9,8 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/LaserBooking.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
@ -539,6 +541,8 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) { if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) {
navigateToDentalComplaints(context); navigateToDentalComplaints(context);
} else if (widget.isDoctorNameSearch && widget.doctor.clinicID == 253) {
navigateToLaserClinic(context);
} else { } else {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime; final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
navigateToBookConfirm(context); navigateToBookConfirm(context);
@ -560,6 +564,17 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
} }
} }
Future navigateToLaserClinic(BuildContext context) async {
HospitalsModel tempselectedHospital = new HospitalsModel();
tempselectedHospital.iD = widget.doctor.projectID;
Navigator.push(
context,
FadePage(
page: LaserClinic(selectedHospital: tempselectedHospital!),
),
);
}
Future navigateToDentalComplaints(BuildContext context) async { Future navigateToDentalComplaints(BuildContext context) async {
HospitalsModel selectedHospital = new HospitalsModel(); HospitalsModel selectedHospital = new HospitalsModel();
selectedHospital.name = widget.doctor.projectName; selectedHospital.name = widget.doctor.projectName;

@ -389,7 +389,6 @@ class _QRCodeState extends State<QRCode> {
service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, widget.patientShareResponse!.clinicID!, context).then((res) { service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, widget.patientShareResponse!.clinicID!, context).then((res) {
print(res); print(res);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
_showMyDialog(res["SuccessMsg"], this.context); _showMyDialog(res["SuccessMsg"], this.context);
}).catchError((err) { }).catchError((err) {

@ -17,6 +17,7 @@ class SearchResults extends StatelessWidget {
bool isObGyneAppointment; bool isObGyneAppointment;
bool isDoctorNameSearch; bool isDoctorNameSearch;
OBGyneProcedureListResponse? obGyneProcedureListResponse; OBGyneProcedureListResponse? obGyneProcedureListResponse;
bool isDoctorSearchResult;
SearchResults( SearchResults(
{required this.doctorsList, {required this.doctorsList,
@ -24,6 +25,7 @@ class SearchResults extends StatelessWidget {
this.isObGyneAppointment = false, this.isObGyneAppointment = false,
this.isDoctorNameSearch = false, this.isDoctorNameSearch = false,
required this.isLiveCareAppointment, required this.isLiveCareAppointment,
required this.isDoctorSearchResult,
this.obGyneProcedureListResponse}); this.obGyneProcedureListResponse});
@override @override
@ -50,7 +52,16 @@ class SearchResults extends StatelessWidget {
title: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") title: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0")
? patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km ? patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km
: patientDoctorAppointmentListHospital[index].filterName, : patientDoctorAppointmentListHospital[index].filterName,
projectTitleTop: patientDoctorAppointmentListHospital[index].projectTopName,
projectTitleBottom: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0")
? patientDoctorAppointmentListHospital[index].projectBottomName.toString() +
" - " +
patientDoctorAppointmentListHospital[index].distanceInKMs! +
" " +
TranslationBase.of(context).km
: patientDoctorAppointmentListHospital[index].projectBottomName.toString(),
isTitleSingleLine: false, isTitleSingleLine: false,
isDoctorSearchResult: isDoctorSearchResult,
isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false, isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false,
bodyWidget: ListView.separated( bodyWidget: ListView.separated(
shrinkWrap: true, shrinkWrap: true,

@ -77,8 +77,9 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
res['Laser_GetBodyPartsByCategoryList'].forEach((v) { res['Laser_GetBodyPartsByCategoryList'].forEach((v) {
_tempList.add(LaserBodyPart.fromJson(v)); _tempList.add(LaserBodyPart.fromJson(v));
}); });
if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) { // if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) {
fullBody = _tempList[0]; if (_tempList[0].category == 2 || _tempList[0].category == 10) {
// fullBody = _tempList[0];
_tempList.removeAt(0); _tempList.removeAt(0);
} }
laserBodyPartsList = _tempList; laserBodyPartsList = _tempList;
@ -211,7 +212,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
List<String> arrDistance = []; List<String> arrDistance = [];
List<String> result; List<String> result;
int numAll; int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[]; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
projectViewModel.selectedBodyPartList = _selectedBodyPartList; projectViewModel.selectedBodyPartList = _selectedBodyPartList;
@ -234,8 +235,12 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
} }
}); });
} else {} } else {}
@ -256,8 +261,15 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
} }
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async { Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) Navigator.push(
.then((value) { context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital,
isDoctorSearchResult: true,
))).then((value) {
setState(() { setState(() {
// dropdownValue = null; // dropdownValue = null;
}); });
@ -352,46 +364,47 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
if (fullBody != null) // if (fullBody != null)
Row( // Row(
children: [ // children: [
SizedBox( // SizedBox(
width: 22, // width: 22,
height: 22, // height: 22,
child: Theme( // child: Theme(
data: Theme.of(context).copyWith( // data: Theme.of(context).copyWith(
unselectedWidgetColor: Color(0xffEAEAEA), // unselectedWidgetColor: Color(0xffEAEAEA),
), // ),
child: Checkbox( // child: Checkbox(
value: _isFullBody, // value: _isFullBody,
onChanged: (value) { // onChanged: (value) {
setState(() { // setState(() {
if (value!) { // if (value!) {
_selectedBodyPartList.clear(); // _selectedBodyPartList.clear();
_selectedBodyPartList.add(fullBody); // _selectedBodyPartList.add(fullBody);
} else { // } else {
_selectedBodyPartList.clear(); // _selectedBodyPartList.clear();
} // }
_isFullBody = !_isFullBody; // _isFullBody = !_isFullBody;
}); // });
}, // },
activeColor: Color(0xffD02127), // activeColor: Color(0xffD02127),
), // ),
), // ),
), // ),
SizedBox(width: 12), // SizedBox(width: 12),
Text( // Text(
projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!, // projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!,
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14), // style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14),
), // ),
], // ],
), // ),
GridView.builder( GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 85 / 107, crossAxisSpacing: 4, mainAxisSpacing: 21), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 85 / 107, crossAxisSpacing: 4, mainAxisSpacing: 21),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemCount: laserBodyPartsList.length, itemCount: laserBodyPartsList.length,
padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero, // padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero,
padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
bool _isSelected = _selectedBodyPartList.any((file) => file.id == laserBodyPartsList[index].id); bool _isSelected = _selectedBodyPartList.any((file) => file.id == laserBodyPartsList[index].id);
return InkWell( return InkWell(
@ -406,7 +419,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
setState(() {}); setState(() {});
return; return;
} }
AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach); AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach, timeInSeconds: 3);
return; return;
} }
if (_isSelected) { if (_isSelected) {

@ -657,8 +657,12 @@ class _SearchByClinicState extends State<SearchByClinic> {
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); filterName: element.getProjectCompleteName(),
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName ?? "",
projectBottomName: element.projectBottomName ?? "",
patientDoctorAppointment: element));
} }
}); });
} else {} } else {}
@ -707,7 +711,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async { Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
isProjectLoaded = false; isProjectLoaded = false;
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,)))
.then((value) { .then((value) {
setState(() { setState(() {
dropdownValue = "null"; dropdownValue = "null";

@ -93,7 +93,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[]; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
service.getDoctorsListByName(doctorNameController.text, languageID, context).then((res) { service.getDoctorsListByName(doctorNameController.text, languageID, context).then((res) {
// GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
@ -105,13 +105,18 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
}); });
doctorsList.forEach((element) { doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList(); List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
.add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); filterName: element.getProjectCompleteName(),
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
} }
}); });
} else { } else {
@ -152,7 +157,8 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
} }
navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) { navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); Navigator.push(context,
FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,)));
} }
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) {

@ -2,6 +2,7 @@ import 'dart:collection';
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -118,15 +119,11 @@ class _SearchByHospitalState extends State<SearchByHospital> {
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<HospitalsModel>( child: DropdownButton<HospitalsModel>(
key: projectDropdownKey, key: projectDropdownKey,
hint: Text( hint: Text(TranslationBase.of(context).selectHospital),
TranslationBase.of(context).selectHospital),
value: selectedHospital, value: selectedHospital,
iconSize: 0, iconSize: 0,
isExpanded: true, isExpanded: true,
style: TextStyle( style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
fontSize: 14,
letterSpacing: -0.56,
color: Colors.black),
items: projectsList.map((HospitalsModel item) { items: projectsList.map((HospitalsModel item) {
return DropdownMenuItem<HospitalsModel>( return DropdownMenuItem<HospitalsModel>(
value: item, value: item,
@ -164,29 +161,16 @@ class _SearchByHospitalState extends State<SearchByHospital> {
mHeight(8), mHeight(8),
InkWell( InkWell(
onTap: () { onTap: () {
showClickListDialog(context, clinicIds ?? List.empty(), showClickListDialog(context, clinicIds ?? List.empty(), onSelection: (ListClinicCentralized clincs) {
onSelection: (ListClinicCentralized clincs) {
selectedClinic = clincs; selectedClinic = clincs;
Navigator.pop(context); Navigator.pop(context);
setState(() { setState(() {
dropdownTitle = clincs.clinicDescription!; dropdownTitle = clincs.clinicDescription!;
dropdownValue = clincs.clinicID.toString() + dropdownValue = clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString();
"-" +
clincs.isLiveCareClinicAndOnline.toString() +
"-" +
clincs.liveCareClinicID.toString() +
"-" +
clincs.liveCareServiceID.toString();
}); });
getDoctorsList(context); getDoctorsList(context);
context context.read<ProjectViewModel>().analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription);
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_clinic(
appointment_type: 'regular',
clinic: clincs.clinicDescription);
}); });
}, },
child: Container( child: Container(
@ -302,8 +286,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
}); });
List<ListClinicCentralized> clinicId = []; List<ListClinicCentralized> clinicId = [];
try { try {
Map res = await service.getClinicByHospital( Map res = await service.getClinicByHospital(projectID: newValue?.mainProjectID.toString() ?? "");
projectID: newValue?.mainProjectID.toString() ?? "");
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
List list = res['ListClinic']; List list = res['ListClinic'];
@ -376,8 +359,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
super.dispose(); super.dispose();
} }
Future navigateToDentalComplaints( Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async {
BuildContext context, SearchInfo searchInfo) async {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
@ -401,20 +383,10 @@ class _SearchByHospitalState extends State<SearchByHospital> {
List<String> arrDistance = []; List<String> arrDistance = [];
List<String> result; List<String> result;
int numAll; int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
[];
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppo, languageID, null).then((res) {
.getDoctorsList(
clinicID,
selectedHospital?.mainProjectID.toString() != ""
? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1")
: 0,
nearestAppo,
languageID,
null)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -424,27 +396,17 @@ class _SearchByHospitalState extends State<SearchByHospital> {
doctorsList.add(DoctorList.fromJson(v)); doctorsList.add(DoctorList.fromJson(v));
}); });
doctorsList.forEach((element) { doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
_patientDoctorAppointmentListHospital
.where( .where(
(elementClinic) => (elementClinic) => elementClinic.filterName == element.getProjectCompleteName(),
elementClinic.filterName == element.getProjectCompleteName(),
) )
.toList(); .toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[ _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList!
.add(element);
} else { } else {
_patientDoctorAppointmentListHospital.add( _patientDoctorAppointmentListHospital
PatientDoctorAppointmentList( .add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
filterName: element.getProjectCompleteName(),
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
} }
}); });
} else {} } else {}
@ -452,8 +414,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
result = LinkedHashSet<String>.from(arr).toList(); result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length; numAll = result.length;
navigateToSearchResults( navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
@ -464,19 +425,9 @@ class _SearchByHospitalState extends State<SearchByHospital> {
}); });
} }
Future navigateToSearchResults( Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
context, Navigator.push(context,
List<DoctorList> docList, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, isDoctorSearchResult: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)))
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
.then((value) { .then((value) {
print("navigation return "); print("navigation return ");
dropdownValue = null; dropdownValue = null;
@ -492,7 +443,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: LaserBooking(), page: LaserClinic(selectedHospital: selectedHospital!),
), ),
).then((value) { ).then((value) {
print("LaserBooking navigation return "); print("LaserBooking navigation return ");
@ -533,10 +484,7 @@ class _SearchByHospitalState extends State<SearchByHospital> {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: LiveCareBookAppointment( page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]),
clinicName: dropdownTitle,
liveCareClinicID: dropdownValue!.split("-")[2],
liveCareServiceID: dropdownValue!.split("-")[3]),
), ),
).then((value) { ).then((value) {
print("navigation return "); print("navigation return ");

@ -64,7 +64,7 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
getChiefComplaintsList() { getChiefComplaintsList() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2; int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[]; List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
@ -88,8 +88,12 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
projectTopName: element.projectTopName,
projectBottomName: element.projectBottomName,
patientDoctorAppointment: element));
} }
}); });
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
@ -104,6 +108,6 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
} }
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async { Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false))); Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false, isDoctorSearchResult: true,)));
} }
} }

@ -83,7 +83,7 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
), ),
SizedBox(height: 18), SizedBox(height: 18),
Text( Text(
widget.notification!.message!.trim(), widget.notification.message ?? "",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -85,7 +85,7 @@ class _EROnlineCheckInBookAppointmentState extends State<EROnlineCheckInBookAppo
items: projectsList.map((item) { items: projectsList.map((item) {
return new DropdownMenuItem<HospitalsModel>( return new DropdownMenuItem<HospitalsModel>(
value: item, value: item,
child: new Text(item.name!), child: new Text(item.name! + " - " + item.distanceInKilometers.toString() + " " + TranslationBase.of(context).km),
); );
}).toList(), }).toList(),
onChanged: (newValue) async { onChanged: (newValue) async {

@ -1,6 +1,8 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart'; import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInNFCQRCLocation.dart';
import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart'; import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -8,8 +10,10 @@ import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/bottom_sheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -31,8 +35,11 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
bool _supportsNFC = false; bool _supportsNFC = false;
bool isPatientArrived = false; bool isPatientArrived = false;
late LocationUtils locationUtils;
@override @override
void initState() { void initState() {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
// checkIfPatientHasArrived(); // checkIfPatientHasArrived();
if (projectViewModel.isLogin) checkPatientERAdvanceBalance(); if (projectViewModel.isLogin) checkPatientERAdvanceBalance();
@ -86,26 +93,27 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
), ),
mHeight(6), mHeight(6),
Text( Text(
"What is Online Check-In?", TranslationBase.of(context).whatIsOnlineCheckIn,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
), ),
mHeight(12),
Text( Text(
"online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.", TranslationBase.of(context).EROnlineCheckInDesc1,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
), ),
mHeight(16), mHeight(16),
Text( // Text(
"How can i use Online Check-In?", // TranslationBase.of(context).EROnlineCheckInHow,
maxLines: 1, // maxLines: 1,
style: TextStyle( // style: TextStyle(
fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), // fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
), // ),
Text( // Text(
"online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.", // "Online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.",
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), // style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
), // ),
], ],
), ),
), ),
@ -157,7 +165,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding( Padding(
padding: const EdgeInsets.only(left: 50, right: 50), padding: const EdgeInsets.only(left: 50, right: 50),
child: Text( child: Text(
"Tap On", TranslationBase.of(context).EROnlineCheckInTapOn,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
@ -171,8 +179,8 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding( Padding(
padding: const EdgeInsets.only(left: 50, right: 50), padding: const EdgeInsets.only(left: 50, right: 50),
child: Text( child: Text(
"Tap on the check-in button within the app", TranslationBase.of(context).EROnlineCheckInTapOnCheckIn,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w600, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
), ),
), ),
mHeight(16), mHeight(16),
@ -203,7 +211,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding( Padding(
padding: const EdgeInsets.only(left: 50, right: 50), padding: const EdgeInsets.only(left: 50, right: 50),
child: Text( child: Text(
"Hold your phone", TranslationBase.of(context).EROnlineCheckInHoldPhone,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
@ -217,8 +225,8 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding( Padding(
padding: const EdgeInsets.only(left: 50, right: 50), padding: const EdgeInsets.only(left: 50, right: 50),
child: Text( child: Text(
"Hold the phone 1 to 2 cm from the NFC sign displayed on the board", TranslationBase.of(context).EROnlineCheckInHoldPhoneInstruction,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w600, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24),
), ),
), ),
mHeight(16), mHeight(16),
@ -249,7 +257,7 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding( Padding(
padding: const EdgeInsets.only(left: 50, right: 50), padding: const EdgeInsets.only(left: 50, right: 50),
child: Text( child: Text(
"Wait your turn", TranslationBase.of(context).EROnlineCheckInWaitTurn,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
@ -263,8 +271,8 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
Padding( Padding(
padding: const EdgeInsets.only(left: 50, right: 50), padding: const EdgeInsets.only(left: 50, right: 50),
child: Text( child: Text(
"Please wait in the waiting area until called by the nurse", TranslationBase.of(context).EROnlineCheckInWaitTurnInstruction,
style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), style: TextStyle(fontSize: 13, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), letterSpacing: -1.44, height: 35 / 24),
), ),
), ),
], ],
@ -284,6 +292,60 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).arrived, TranslationBase.of(context).arrived,
() { () {
// showMyBottomSheet(context,
// callBackFunc: () {},
// child: Padding(
// padding: const EdgeInsets.all(21.0),
// child: Column(
// children: [
// Text(TranslationBase.of(context).scanQRHospital,
// style: TextStyle(
// fontSize: 20,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.48,
// )),
// mHeight(21),
// GridView(
// physics: const NeverScrollableScrollPhysics(),
// shrinkWrap: true,
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 12),
// children: [
// attendanceMethod(TranslationBase.of(context).scanNFC, "assets/images/nfc/contactless.svg", true, () {
// if (_supportsNFC) {
// Future.delayed(const Duration(milliseconds: 500), () {
// showNfcReader(context, onNcfScan: (String nfcId) {
// Future.delayed(const Duration(milliseconds: 100), () {
// print(nfcId);
// getProjectIDFromNFC(nfcId, true);
// // Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails()));
// });
// }, onCancel: () {
// Navigator.of(context).pop();
// });
// });
// } else {
// //NFCNotSupported
// AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported);
// }
// }),
// attendanceMethod(TranslationBase.of(context).pharmaLiveCareScanQR, "assets/images/new/services/qr_code.svg", true, () async {
// String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
// if (onlineCheckInQRCode != "") {
// print(onlineCheckInQRCode);
// getProjectIDFromNFC(onlineCheckInQRCode, true);
// // sendNfcCheckInRequest(onlineCheckInQRCode, 2);
// } else {}
// }),
// attendanceMethod(TranslationBase.of(context).checkInViaLocation, "assets/images/new/services/location.svg", true, () {})
// ],
// ),
// ],
// ),
// ));
// Navigator.push(context, FadePage(page: EROnlineCheckInNFCQRLocation(projectID: 15))).then((value) {});
if (_supportsNFC) { if (_supportsNFC) {
Future.delayed(const Duration(milliseconds: 500), () { Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) { showNfcReader(context, onNcfScan: (String nfcId) {
@ -306,31 +368,33 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
) )
: Row( : Row(
children: [ children: [
Expanded( // Expanded(
flex: 1, // flex: 1,
child: DefaultButton( // child: DefaultButton(
TranslationBase.of(context).checkinOptions, // TranslationBase.of(context).checkinOptions,
() { // () {
if (_supportsNFC) { // // Navigator.push(context, FadePage(page: EROnlineCheckInNFCQRLocation(projectID: 15))).then((value) {});
Future.delayed(const Duration(milliseconds: 500), () { //
showNfcReader(context, onNcfScan: (String nfcId) { // if (_supportsNFC) {
Future.delayed(const Duration(milliseconds: 100), () { // Future.delayed(const Duration(milliseconds: 500), () {
print(nfcId); // showNfcReader(context, onNcfScan: (String nfcId) {
getProjectIDFromNFC(nfcId, false); // Future.delayed(const Duration(milliseconds: 100), () {
}); // print(nfcId);
}, onCancel: () { // getProjectIDFromNFC(nfcId, false);
Navigator.of(context).pop(); // });
}); // }, onCancel: () {
}); // Navigator.of(context).pop();
} else { // });
//NFCNotSupported // });
AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported); // } else {
} // //NFCNotSupported
}, // AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported, localContext: context);
color: CustomColors.green, // }
), // },
), // color: CustomColors.green,
mWidth(12), // ),
// ),
// mWidth(12),
Expanded( Expanded(
flex: 1, flex: 1,
child: DefaultButton( child: DefaultButton(
@ -435,7 +499,48 @@ class _EROnlineCheckInHomePageState extends State<EROnlineCheckInHomePage> with
}); });
} }
Widget markCheckInWidget() {
return GridView(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: const EdgeInsets.only(bottom: 0, top: 21),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8),
children: [],
);
}
Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => InkWell(
onTap: () {
Navigator.pop(context);
onPress();
},
child: Container(
decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.darkGreyColor, 1),
clipBehavior: Clip.antiAlias,
padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: SvgPicture.asset(image, color: Colors.black, alignment: Alignment.topLeft)),
Text(
title,
style: TextStyle(color: Colors.black, fontSize: 14, letterSpacing: -0.68, fontWeight: FontWeight.bold),
),
// title.toText17(isBold: true, color: Colors.white),
],
),
),
);
// .onPress(
// () {
// if (!isEnabled) return;
// onPress();
// },
// );
void checkPatientERAdvanceBalance() { void checkPatientERAdvanceBalance() {
locationUtils.getCurrentLocation();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
ClinicListService ancillaryOrdersService = new ClinicListService(); ClinicListService ancillaryOrdersService = new ClinicListService();
ancillaryOrdersService.checkPatientERAdvanceBalance(10).then((response) { ancillaryOrdersService.checkPatientERAdvanceBalance(10).then((response) {

@ -0,0 +1,374 @@
import 'dart:typed_data';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
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/pages/landing/landing_page.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/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.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';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class EROnlineCheckInNFCQRLocation extends StatefulWidget {
// late PatientShareResponse? patientShareResponse;
// late AppoitmentAllHistoryResultList? appointment;
// late String? appoQR;
// AuthenticatedUser? authUser;
// AppSharedPreferences sharedPref = AppSharedPreferences();
int projectID;
EROnlineCheckInNFCQRLocation({required this.projectID});
@override
_EROnlineCheckInNFCQRLocationState createState() => _EROnlineCheckInNFCQRLocationState();
}
class _EROnlineCheckInNFCQRLocationState extends State<EROnlineCheckInNFCQRLocation> {
late Uint8List _bytes;
bool _supportsNFC = false;
late BuildContext _context;
late ProjectViewModel projectViewModel;
late LocationUtils locationUtils;
ProjectDetailListModel projectDetailListModel = ProjectDetailListModel();
@override
void initState() {
super.initState();
}
startNFCScan() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId, 2);
});
}, onCancel: () {
// Navigator.of(context).pop();
});
});
}
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
sendNfcCheckInRequest(onlineCheckInQRCode, 2);
} else {}
}
startLocationCheckIn() async {
GifLoaderDialogUtils.showMyDialog(context);
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(callBack: (value) {
projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.projectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) {
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}
});
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
_context = context;
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// DoctorHeader(
// headerModel: HeaderModel(
// widget.appointment!.doctorTitle! + " " + widget.appointment!.doctorNameObj!,
// widget.appointment!.doctorID ?? 0,
// 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,
// "",
// ),
// 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,
),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId, 2);
});
}, onCancel: () {
// Navigator.of(context).pop();
});
},
),
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,
)),
),
),
],
),
mHeight(21),
Padding(
padding: EdgeInsets.only(left: 21, right: 21),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: checkInOptionsList.length,
itemBuilder: (BuildContext context, int index) {
return checkInOptionsList[index];
},
),
),
],
),
),
// 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),
// ),
// 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,
// )),
// ),
// ),
// ),
// ],
// ),
// ),
);
}
List<Widget> getCheckInOptionsList(BuildContext context) {
List<Widget> optionsList = [];
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(102)) {
startLocationCheckIn();
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).checkInViaLocation,
imagePath: 'location.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(102),
width: 70.0,
height: 70.0,
),
),
);
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(79)) {
startQRCodeScan();
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).pharmaLiveCareScanQR,
imagePath: 'qr_code.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(79),
width: 80.0,
height: 80.0,
),
),
);
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(80) && _supportsNFC) {
startNFCScan();
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).scanNFC,
imagePath: 'contactless.svg',
subTitle: "",
isEnable: projectViewModel.havePrivilege(80),
width: 80.0,
height: 80.0,
),
),
);
return optionsList;
}
Future navigateToHome(context) async {
Navigator.of(context).pushNamed(HOME);
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {}
String getDate(String appoDate) {
var appoDateFormatted = "";
var dateObj = DateUtil.convertStringToDate(appoDate);
setState(() {
appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString() +
", " +
dateObj.hour.toString() +
":" +
dateObj.minute.toString() +
":00";
});
return appoDateFormatted;
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
if (docSpecial != null && docSpecial.length != 0) {
docSpecial.forEach((v) {
docSpeciality = docSpeciality + v + "\n";
});
}
return docSpeciality;
}
sendNfcCheckInRequest(String nfcId, int checkInBy) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
// service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, widget.patientShareResponse!.clinicID!, context).then((res) {
// print(res);
//
// GifLoaderDialogUtils.hideDialog(context);
// _showMyDialog(res["SuccessMsg"], this.context);
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// _showMyDialog(err, this.context);
// });
}
Future<void> _showMyDialog(String message, BuildContext context) async {
return showDialog<void>(
context: context,
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Alert'),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text(message),
],
),
),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
},
),
],
);
},
);
}
}

@ -423,8 +423,9 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: failureResult.toString()); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
@ -521,9 +522,10 @@ class _EROnlineCheckInPaymentDetailsState extends State<EROnlineCheckInPaymentDe
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (widget.isERBookAppointment) { if (widget.isERBookAppointment) {
AppToast.showSuccessToast(message: "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital."); AppToast.showSuccessToast(message: "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital.");
Navigator.pop(context); // Navigator.pop(context);
Navigator.pop(context); // Navigator.pop(context);
Navigator.pop(context); // Navigator.pop(context);
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
} else { } else {
autoGenerateInvoiceER(paymentRes); autoGenerateInvoiceER(paymentRes);
} }

@ -13,6 +13,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
import 'package:url_launcher/url_launcher.dart';
class InPatientPendingAdvancePayment extends StatefulWidget { class InPatientPendingAdvancePayment extends StatefulWidget {
InPatientAdvanceResponseModel inPatientAdvanceResponseModel; InPatientAdvanceResponseModel inPatientAdvanceResponseModel;
@ -32,7 +33,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
inAppWebViewGroupOptions: InAppWebViewGroupOptions( inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false),
ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)), ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.white),
android: AndroidInAppBrowserOptions(), android: AndroidInAppBrowserOptions(),
ios: ios:
IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
@ -254,6 +255,7 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17; int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17;
service service
.getInPatientPaymentLink( .getInPatientPaymentLink(
widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!,
projectViewModel.inPatientProjectID, projectViewModel.inPatientProjectID,
// projectViewModel.getAdmissionInfoResponseModel.admissionNo!, // projectViewModel.getAdmissionInfoResponseModel.admissionNo!,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!,
@ -273,7 +275,9 @@ class _InPatientPendingAdvancePaymentState extends State<InPatientPendingAdvance
if (isCopy) { if (isCopy) {
Share.share(paymentLink); Share.share(paymentLink);
} else { } else {
this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions); Uri uri = Uri.parse(paymentLink);
launchUrl(uri, mode: LaunchMode.externalApplication);
// this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions);
} }
} else { } else {
AppToast.showErrorToast(message: res["endUserMessage"]); AppToast.showErrorToast(message: res["endUserMessage"]);

@ -159,8 +159,13 @@ class _HelpPROState extends State<HelpPRO> {
(projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, assistText.text, context) (projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, assistText.text, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport); AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport);
Navigator.of(context).pop(); Navigator.of(context).pop();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage'], localContext: context);
Navigator.of(context).pop();
}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);

@ -514,7 +514,8 @@ class InPatientGeneralConsent extends StatelessWidget {
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
AppToast.showErrorToast(message: res["SuccessMsg"]); AppToast.showSuccessToast(message: res["SuccessMsg"] ?? TranslationBase.of(context).success);
Navigator.of(context);
} else { } else {
AppToast.showErrorToast(message: res["endUserMessage"]); AppToast.showErrorToast(message: res["endUserMessage"]);
} }

@ -86,9 +86,9 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
openPatientGeneralConsent(); openPatientGeneralConsent();
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).generalInstructionsTitle, title: TranslationBase.of(context).generalConsentTitle,
imagePath: 'general_instructions.svg', imagePath: 'general_instructions.svg',
subTitle: TranslationBase.of(context).consent, subTitle: TranslationBase.of(context).generalConsentSubTitle,
width: 50.0, width: 50.0,
height: 40.0, height: 40.0,
isInPatient: true, isInPatient: true,
@ -278,7 +278,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) { service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) {
print(res["PatientHasDischargeMedicineList"].length);
setState(() { setState(() {
if (res["PatientHasDischargeMedicineList"].length != 0) { if (res["PatientHasDischargeMedicineList"].length != 0) {
isReceivePrescriptionEnabled = true; isReceivePrescriptionEnabled = true;
@ -308,13 +307,18 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
void openBirthNotificationsPage(BuildContext context) { void openBirthNotificationsPage(BuildContext context) {
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getBirthNotification(projectViewModel.user.patientID!, projectViewModel.isArabic ? 1 : 2, context).then((res) { service
.getBirthNotification(
projectViewModel.user.patientID!,
projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID! : projectViewModel.getAdmissionRequestInfoResponseModel.projectId!,
projectViewModel.isArabic ? 1 : 2,
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
print(res['birthNotification']);
Navigator.push(context, FadePage(page: BirthNotification())); Navigator.push(context, FadePage(page: BirthNotification()));
} else { } else {
AppToast.showErrorToast(message: res["endUserMessage"]); AppToast.showErrorToast(message: res["endUserMessage"], localContext: context);
} }
}).catchError((err) { }).catchError((err) {
print(err); print(err);
@ -335,7 +339,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v)); getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v));
}); });
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['generalInstructions']);
Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList)));
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -356,7 +359,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v));
}); });
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['MedicalInstruction']);
Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList)));
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -380,7 +382,7 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
if (res['responseInpatient'] != null) { if (res['responseInpatient'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'].length != 0) {
inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]);
Navigator.push(context, Navigator.push(context,
FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel)));
@ -398,8 +400,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
} }
void checkCurrentTime(BuildContext context) { void checkCurrentTime(BuildContext context) {
print(DateTime.now().hour);
print(DateTime.now().minute);
if (DateTime.now().hour >= 7 && DateTime.now().hour <= 22) { if (DateTime.now().hour >= 7 && DateTime.now().hour <= 22) {
Navigator.push(context, FadePage(page: HelpPRO())); Navigator.push(context, FadePage(page: HelpPRO()));
} else { } else {
@ -415,8 +415,6 @@ class _InPatientServicesHomeState extends State<InPatientServicesHome> {
} }
bool checkAdmissionRequestDate() { bool checkAdmissionRequestDate() {
print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate));
print(DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours);
if (DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours > 24) { if (DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours > 24) {
return false; return false;
} }

@ -105,7 +105,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
widget.appo.doctorImageURL!, widget.appo.doctorImageURL!,
widget.appo.doctorSpeciality!, widget.appo.doctorSpeciality!,
"", "",
widget.appo.projectName!, widget.appo.projectName ?? "",
DateUtil.convertStringToDate(widget.appo.appointmentDate!), DateUtil.convertStringToDate(widget.appo.appointmentDate!),
widget.appo.isLiveCareAppointment! ? DateUtil.convertStringToDate(widget.appo.appointmentDate!).toString().split(" ")[1].substring(0, 5) : widget.appo.startTime!.substring(0, 5), widget.appo.isLiveCareAppointment! ? DateUtil.convertStringToDate(widget.appo.appointmentDate!).toString().split(" ")[1].substring(0, 5) : widget.appo.startTime!.substring(0, 5),
"", "",

@ -433,7 +433,8 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
FadePage( FadePage(
page: AppointmentDetails( page: AppointmentDetails(
appo: _appointmentResult, appo: _appointmentResult,
parentIndex: _currentPage, // parentIndex: _currentPage,
parentIndex: _appointmentResult.patientStatusType == 42 ? 1 : 0,
), ),
), ),
).then((value) { ).then((value) {

@ -131,8 +131,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
.parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic) + " " + widget.appo.startTime!), .parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic) + " " + widget.appo.startTime!),
//DateUtil.convertStringToDate(widget.appo.appointmentDate), //DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.doctorNameObj!, widget.appo.doctorNameObj!,
"", widget.appo.appointmentNo.toString(),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic), 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!, widget.appo.startTime!,
@ -410,6 +409,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
if (res['ListLabResultsByAppNo'] != null) { if (res['ListLabResultsByAppNo'] != null) {
patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString(); patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString();
patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString(); patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString();
patientLabOrders.invoiceType = res['ListLabResultsByAppNo'][0]['InvoiceType'].toString();
patientLabOrders.clinicID = widget.appo.clinicID; patientLabOrders.clinicID = widget.appo.clinicID;
patientLabOrders.clinicDescription = widget.appo.clinicName; patientLabOrders.clinicDescription = widget.appo.clinicName;
patientLabOrders.projectID = widget.appo.projectID.toString(); patientLabOrders.projectID = widget.appo.projectID.toString();
@ -440,7 +440,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology(); FinalRadiology finalRadiology = new FinalRadiology();
service.getPatientRadOrders(widget.appo.appointmentNo.toString(), languageID, context).then((res) { service.getPatientRadOrders(widget.appo.appointmentNo.toString(), widget.appo.projectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['FinalRadiologyList'] != null) { if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']); print(res['FinalRadiologyList']);

@ -902,6 +902,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
isLiveCareAppointment: false, isLiveCareAppointment: false,
isObGyneAppointment: true, isObGyneAppointment: true,
doctorsList: docList, doctorsList: docList,
isDoctorSearchResult: false,
patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital,
obGyneProcedureListResponse: obGyneProcedureListResponse))); obGyneProcedureListResponse: obGyneProcedureListResponse)));
} }
@ -1530,8 +1531,8 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");

@ -80,7 +80,7 @@ class _CallScreenState extends State<CallScreen> {
try { try {
Map<String, bool> SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false}; Map<String, bool> SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false};
Map<String, bool> SDKvideoOptions = { Map<String, bool> SDKvideoOptions = {
"localVideoOn": true, "localVideoOn": args.callType == 1 ? true : false,
}; };
JoinSessionConfig joinSession = JoinSessionConfig( JoinSessionConfig joinSession = JoinSessionConfig(
sessionName: args.sessionName, sessionName: args.sessionName,
@ -1588,8 +1588,9 @@ class CallArguments {
final String displayName; final String displayName;
final String sessionIdleTimeoutMins; final String sessionIdleTimeoutMins;
final String role; final String role;
final int callType;
CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin); CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin, this.callType);
} }
class JoinArguments { class JoinArguments {

@ -171,17 +171,17 @@ class _InsuranceCardState extends State<InsuranceCard> {
SizedBox( SizedBox(
height: 8.5, height: 8.5,
), ),
if (model.insurance[index].isActive == true) // if (model.insurance[index].isActive == true)
Container( // Container(
color: Colors.transparent, // color: Colors.transparent,
child: DefaultButton( // child: DefaultButton(
TranslationBase.of(context).seeDetails, // TranslationBase.of(context).seeDetails,
() => { // () => {
getDetails(model.insurance[index]), // getDetails(model.insurance[index]),
}, // },
), // ),
width: double.infinity, // width: double.infinity,
), // ),
], ],
), ),
), ),

@ -57,10 +57,12 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
projectViewModel.isIndoorNavigationEnabled projectViewModel.isIndoorNavigationEnabled
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin)) ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin,
isLocked: !projectViewModel.havePrivilege(107)))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(
HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, isLocked: !projectViewModel.havePrivilege(108)));
hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
@ -76,10 +78,12 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
// hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin));
projectViewModel.isIndoorNavigationEnabled projectViewModel.isIndoorNavigationEnabled
? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin)) ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin,
isLocked: !projectViewModel.havePrivilege(107)))
: hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin,
isLocked: !projectViewModel.havePrivilege(108)));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.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(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
@ -358,8 +362,9 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
itemCount: hmgServices.length, itemCount: hmgServices.length,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return ServicesView(hmgServices[index], index, true, projectViewModel, // return ServicesView(hmgServices[index], index, true, projectViewModel,
isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false); // isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false);
return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: hmgServices[index].isLocked);
}, },
), ),
), ),

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -55,7 +56,7 @@ class _HomePageState2 extends State<HomePage2> {
model, model,
onLoginClick: () { onLoginClick: () {
widget.onLoginClick!(); widget.onLoginClick!();
// FirebaseCrashlytics.instance.crash();
// Navigator.pushNamed( // Navigator.pushNamed(
// context, // context,
// "zoom_call_page", // "zoom_call_page",

@ -41,6 +41,7 @@ import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/vital_signs/vital_sign.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/location_selection_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/location_selection_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
@ -229,6 +230,9 @@ class ServicesView extends StatelessWidget {
} else if (hmgServices.action == 1) { } else if (hmgServices.action == 1) {
openLiveCare(context); openLiveCare(context);
} else if (hmgServices.action == 2) { } else if (hmgServices.action == 2) {
//todo for temporary basis
// Navigator.push(context, FadePage(page: VitalSigns()));
// initPenguinSDK(); // initPenguinSDK();
if (projectViewModel.isIndoorNavigationEnabled) { if (projectViewModel.isIndoorNavigationEnabled) {
if (!isLocked) openNavigationProjectSelection(context); if (!isLocked) openNavigationProjectSelection(context);
@ -258,7 +262,7 @@ class ServicesView extends StatelessWidget {
Navigator.push(context, FadePage(page: InPatientServicesHome())); Navigator.push(context, FadePage(page: InPatientServicesHome()));
locator<GAnalytics>().hmgServices.logServiceName('find us reach us'); locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
} else if (hmgServices.action == 9) { } else if (hmgServices.action == 9) {
Navigator.push(context, FadePage(page: EROnlineCheckInHomePage())); if (!isLocked) Navigator.push(context, FadePage(page: EROnlineCheckInHomePage()));
locator<GAnalytics>().hmgServices.logServiceName('ER Online CheckIn'); locator<GAnalytics>().hmgServices.logServiceName('ER Online CheckIn');
} }
} }

@ -223,7 +223,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
Navigator.pushReplacementNamed( Navigator.pushReplacementNamed(
context, context,
"zoom_call_page", "zoom_call_page",
arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false), arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)),
); );
} else { } else {
// OpenTok Call Page // OpenTok Call Page

@ -1,5 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -28,8 +30,10 @@ class LiveCarePatmentPage extends StatefulWidget {
String clinicName; String clinicName;
bool isPharmaLiveCare; bool isPharmaLiveCare;
String pharmaLiveCareClientID; String pharmaLiveCareClientID;
int selectedCallType;
LiveCarePatmentPage({required this.getERAppointmentFeesList, required this.waitingTime, required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = ""}); LiveCarePatmentPage(
{required this.getERAppointmentFeesList, required this.waitingTime, required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = "", required this.selectedCallType});
@override @override
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState(); _LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
@ -225,8 +229,9 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
], ],
), ),
), ),
mHeight(32.0),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 16.0),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Radio( Radio(
@ -265,6 +270,36 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
], ],
), ),
), ),
AutoSizeText(
TranslationBase.of(context).selectedCallType,
maxLines: 1,
minFontSize: 12,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 2.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
mHeight(12.0),
Row(
children: <Widget>[
SvgPicture.asset(
getCallTypeImagePath(),
width: 18,
height: 18,
),
mWidth(10),
Text(
getCallTypeText(),
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
),
mFlex(1), mFlex(1),
Text( Text(
TranslationBase.of(context).upComingPayOption, TranslationBase.of(context).upComingPayOption,
@ -375,6 +410,38 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
); );
} }
String getCallTypeImagePath() {
String callTypeImagePath = "";
switch (widget.selectedCallType) {
case 1:
callTypeImagePath = "assets/images/new/services/video_call.svg";
break;
case 2:
callTypeImagePath = "assets/images/new/services/audio_call.svg";
break;
case 3:
callTypeImagePath = "assets/images/new/services/phone_call.svg";
break;
}
return callTypeImagePath;
}
String getCallTypeText() {
String callTypeText = "";
switch (widget.selectedCallType) {
case 1:
callTypeText = TranslationBase.of(context).videoCall;
break;
case 2:
callTypeText = TranslationBase.of(context).audioCall;
break;
case 3:
callTypeText = TranslationBase.of(context).phoneCall;
break;
}
return callTypeText;
}
@override @override
void dispose() { void dispose() {
// cancelAPI(); // cancelAPI();

@ -0,0 +1,145 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LiveCareCallTypeSelectPage extends StatefulWidget {
Function onSelectedMethod;
LiveCareCallTypeSelectPage({required this.onSelectedMethod});
@override
State<LiveCareCallTypeSelectPage> createState() => _LiveCareCallTypeSelectPageState();
}
class _LiveCareCallTypeSelectPageState extends State<LiveCareCallTypeSelectPage> {
int selectedCallType = 1;
String mobileNo = "";
String countryCode = '966';
late ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
mobileNo = Utils.getPhoneNumberWithoutZero(projectViewModel.authenticatedUserObject.user.mobileNumber!);
return AppScaffold(
appBarTitle: TranslationBase.of(context).selectCallType,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Padding(
padding: EdgeInsets.all(21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
children: [
InkWell(
onTap: () {
setState(() {
selectedCallType = 1;
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).videoCall,
imagePath: 'video_call.svg',
subTitle: "",
isPngImage: false,
isShowBorder: selectedCallType == 1,
),
),
InkWell(
onTap: () {
setState(() {
selectedCallType = 2;
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).audioCall,
imagePath: 'audio_call.svg',
subTitle: "",
isPngImage: false,
isShowBorder: selectedCallType == 2,
),
),
InkWell(
onTap: () {
setState(() {
selectedCallType = 3;
});
},
child: MedicalProfileItem(
title: TranslationBase.of(context).phoneCall,
imagePath: 'phone_call.svg',
subTitle: "",
isPngImage: false,
isShowBorder: selectedCallType == 3,
),
),
],
),
if (selectedCallType == 3)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
mHeight(32.0),
AutoSizeText(
TranslationBase.of(context).mobileNumber,
maxLines: 1,
minFontSize: 12,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 2.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
mHeight(16.0),
PhoneNumberSelectorWidget(
onNumberChange: (value) => {
mobileNo = value,
},
onCountryChange: (value) => {
countryCode = value,
},
mobileNo: this.mobileNo,
isLiveCareTypeSelect: true,
),
],
),
],
),
),
bottomSheet: Container(
color: CustomColors.white,
padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0),
child: DefaultButton(
TranslationBase.of(context).next,
() {
if (mobileNo.isNotEmpty) {
widget.onSelectedMethod(selectedCallType, mobileNo);
Navigator.pop(context, [selectedCallType, mobileNo]);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).enterMobileNumber);
}
},
color: CustomColors.accentColor,
),
),
);
}
}

@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_call_type_select.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.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_scheduling/schedule_clinic_card.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart';
@ -37,6 +38,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -95,6 +97,9 @@ class _clinic_listState extends State<ClinicList> {
String? transID; String? transID;
BuildContext? localContext; BuildContext? localContext;
int selectedCallType = 0;
String selectedMobileNumber = "";
@override @override
void initState() { void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse(); liveCareClinicsListResponse = new LiveCareClinicsListResponse();
@ -128,28 +133,7 @@ class _clinic_listState extends State<ClinicList> {
} }
void startLiveCare() { void startLiveCare() {
int languageID = projectViewModel.isArabic ? 1 : 2; makePayment();
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
} else {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res as Map<String, dynamic>);
isError = false;
}
if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList!);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
isError = true;
AppToast.showErrorToast(message: err, localContext: context);
});
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
} }
showLiveCareCancelDialog(String msg, res) { showLiveCareCancelDialog(String msg, res) {
@ -263,6 +247,7 @@ class _clinic_listState extends State<ClinicList> {
navigateTo( navigateTo(
context, context,
LiveCarePatmentPage( LiveCarePatmentPage(
selectedCallType: this.selectedCallType,
getERAppointmentFeesList: getERAppointmentFeesList, getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime, waitingTime: waitingTime,
clinicName: selectedClinicName, clinicName: selectedClinicName,
@ -270,22 +255,12 @@ class _clinic_listState extends State<ClinicList> {
pharmaLiveCareClientID: widget.pharmacyLiveCareQRCode)) pharmaLiveCareClientID: widget.pharmacyLiveCareQRCode))
.then( .then(
(value) { (value) {
if (value) { if (value != null && value) {
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
addNewCallForPatientER(projectViewModel.user!.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString()); addNewCallForPatientER(projectViewModel.user!.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
} else { } else {
navigateToPaymentMethod(getERAppointmentFeesList, context); navigateToPaymentMethod(getERAppointmentFeesList, context);
} }
// askVideoCallPermission().then((value) {
// if (value) {
// if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
// addNewCallForPatientER(projectViewModel.user.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
// } else {
// navigateToPaymentMethod(getERAppointmentFeesList, context);
// }
// }
// });
} else { } else {
Navigator.pop(context); Navigator.pop(context);
} }
@ -293,6 +268,42 @@ class _clinic_listState extends State<ClinicList> {
); );
} }
makePayment() {
showDraggableDialog(
context,
LiveCareCallTypeSelectPage(
onSelectedMethod: (int selectedCallType, String mobileNumber) {
print(selectedCallType);
print(mobileNumber);
this.selectedCallType = selectedCallType;
selectedMobileNumber = mobileNumber;
int languageID = projectViewModel.isArabic ? 1 : 2;
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
showLiveCareCancelDialog(res['ErrorEndUserMessage'], res);
} else {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res as Map<String, dynamic>);
isError = false;
}
if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList!);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
isError = true;
AppToast.showErrorToast(message: err, localContext: context);
});
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
},
),
);
}
Future<bool> askVideoCallPermission() async { Future<bool> askVideoCallPermission() async {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) { if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
return false; return false;
@ -475,9 +486,9 @@ class _clinic_listState extends State<ClinicList> {
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); GifLoaderDialogUtils.hideDialog(context);
GifLoaderDialogUtils.hideDialog(localContext!); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
GifLoaderDialogUtils.hideDialog(localContext!); GifLoaderDialogUtils.hideDialog(localContext!);
@ -507,7 +518,7 @@ class _clinic_listState extends State<ClinicList> {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false); transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false);
selectedPaymentMethod = paymentMethod[0]!; selectedPaymentMethod = paymentMethod[0]!;
selectedInstallmentPlan = paymentMethod[1]!; selectedInstallmentPlan = paymentMethod[1] ?? "0";
this.amount = amount.toString(); this.amount = amount.toString();
browser.openPaymentBrowser(amount, "LiveCare Payment", widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode! : transID!, "12", authenticatedUser.emailAddress!, paymentMethod[0]!, browser.openPaymentBrowser(amount, "LiveCare Payment", widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode! : transID!, "12", authenticatedUser.emailAddress!, paymentMethod[0]!,
@ -646,7 +657,7 @@ class _clinic_listState extends State<ClinicList> {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
int languageID = projectViewModel.isArabic ? 1 : 2; int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.addNewCallForPatientER(selectedClinicID, clientRequestID, languageID, widget.isPharmacyLiveCare, context).then((res) { service.addNewCallForPatientER(selectedClinicID, clientRequestID, selectedCallType, languageID, widget.isPharmacyLiveCare, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: "New Call has been added successfully"); AppToast.showSuccessToast(message: "New Call has been added successfully");
widget.getLiveCareHistory(); widget.getLiveCareHistory();
@ -954,7 +965,8 @@ class _clinic_listState extends State<ClinicList> {
} }
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async { Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))); Navigator.push(context,
FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false)));
} }
updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) { updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) {

@ -30,6 +30,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/whatsapp_method_channel.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -344,7 +345,18 @@ class _ConfirmLogin extends State<ConfirmLogin> {
sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN); sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN);
} }
loginWithSMS(type) { loginWithSMS(type) async {
if (type == 4) {
var channel = WhatsappMethodChannel();
// var whatsappStatus = await channel.isWhatsAppInstalled();
// if(whatsappStatus) {
// print("whatapp is installed");
channel.handleHandShake();
// }else{
// print("whatapp is not installed");
// }
}
//if (!el.disabled) { //if (!el.disabled) {
if (this.user != null && this.registerd_data == null) { if (this.user != null && this.registerd_data == null) {
this.checkUserAuthentication(type); this.checkUserAuthentication(type);
@ -697,37 +709,37 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
checkIfUserAgreedBefore(CheckActivationCode result) { checkIfUserAgreedBefore(CheckActivationCode result) {
// this.authService.checkIfUserAgreed().then((result) { this.authService.checkIfUserAgreed().then((result) {
// if (result['IsPatientAlreadyAgreed']) { if (result['IsPatientAlreadyAgreed']) {
// goToHome(); goToHome();
// } else { } else {
// this.authService.getUserAgreementContent().then((result) { this.authService.getUserAgreementContent().then((result) {
// GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
// Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
// context, context,
// FadePage( FadePage(
// page: UserLoginAgreementPage( page: UserLoginAgreementPage(
// userAgreementText: result['UserAgreementContent'], userAgreementText: result['UserAgreementContent'],
// authenticatedUserObject: authenticatedUserObject, authenticatedUserObject: authenticatedUserObject,
// appointmentRateViewModel: appointmentRateViewModel, appointmentRateViewModel: appointmentRateViewModel,
// selectedOption: selectedOption, selectedOption: selectedOption,
// ), ),
// ), ),
// (r) => false); (r) => false);
// }).catchError((err) { }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// print(err); print(err);
// }); });
// } }
// }).catchError((err) { }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
// print(err); print(err);
// }); });
// if (result.isNeedUserAgreement == true) { // if (result.isNeedUserAgreement == true) {
//move to agreement page. // // move to agreement page.
// } else { // } else {
goToHome(); // goToHome();
// } // }
} }

@ -151,7 +151,7 @@ class _Login extends State<Login> {
TranslationBase.of(context).login, TranslationBase.of(context).login,
() { () {
if (isButtonDisabled) { if (isButtonDisabled) {
AppToast.showErrorToast(message: "National ID can only contain numbers"); AppToast.showErrorToast(message: TranslationBase.of(context).incorrectNationalId, localContext: context);
} else { } else {
this.startLogin(); this.startLogin();
} }
@ -362,12 +362,12 @@ class _Login extends State<Login> {
projectViewModel.setPrivilege(privilegeList: result); projectViewModel.setPrivilege(privilegeList: result);
result = CheckActivationCode.fromJson(result); result = CheckActivationCode.fromJson(result);
result.list.isFamily = false; result.list.isFamily = false;
this.sharedPref.setString(BLOOD_TYPE, await this.sharedPref.setString(BLOOD_TYPE,
result.patientBloodType != null ? result.patientBloodType : ""); result.patientBloodType != null ? result.patientBloodType : "");
this.sharedPref.setObject(USER_PROFILE, result.list); await this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(MAIN_USER, result.list); await this.sharedPref.setObject(MAIN_USER, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); await this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); await this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true; authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true; appointmentRateViewModel.isLogin = true;

@ -1,6 +1,10 @@
import 'dart:convert';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -9,7 +13,9 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation; 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/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart'; import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/get_patient_occupation_list_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/dialog/clinic_list_dialog.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
@ -84,11 +90,18 @@ class _RegisterInfo extends State<RegisterInfo> {
String gender = 'M'; String gender = 'M';
String maritalStatus = 'M'; String maritalStatus = 'M';
String nationality = 'SAU'; String nationality = 'SAU';
String selectedOccupationID = "";
// List<GetPatientOccupationListResponse> patientOccupationList = [];
// GetPatientOccupationListResponse? selectedPatientOccupation;
final GlobalKey projectDropdownKey = GlobalKey();
@override @override
void initState() { void initState() {
if (widget.page == 1) { if (widget.page == 1) {
getCountries(); getCountries();
// getPatientOccupationList();
} }
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getRegisterInfo(); getRegisterInfo();
@ -121,7 +134,7 @@ class _RegisterInfo extends State<RegisterInfo> {
Expanded(child: SizedBox()) Expanded(child: SizedBox())
], ],
), ),
SizedBox(height: 20), SizedBox(height: 10),
(isDubai && page == 1) (isDubai && page == 1)
? Column( ? Column(
children: [ children: [
@ -232,13 +245,13 @@ class _RegisterInfo extends State<RegisterInfo> {
: (registerInfo.healthId != null && page == 1) : (registerInfo.healthId != null && page == 1)
? Column( ? Column(
children: [ children: [
SizedBox(height: 20), SizedBox(height: 10),
getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName, getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName,
registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn), registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn),
SizedBox(height: 20), SizedBox(height: 10),
getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn, getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn,
TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn), TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn),
SizedBox(height: 20), SizedBox(height: 10),
getnameField( getnameField(
TranslationBase.of(context).gender, TranslationBase.of(context).gender,
registerInfo.maritalStatusCode == 'U' registerInfo.maritalStatusCode == 'U'
@ -248,17 +261,82 @@ class _RegisterInfo extends State<RegisterInfo> {
: 'Female', : 'Female',
TranslationBase.of(context).maritalStatus, TranslationBase.of(context).maritalStatus,
registerInfo.maritalStatus), registerInfo.maritalStatus),
SizedBox(height: 20), SizedBox(height: 10),
getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()), getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()),
SizedBox(height: 20), SizedBox(height: 10),
getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""), getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""),
SizedBox(height: 20),
], ],
) )
: widget.page == 2 : widget.page == 2
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
// (!isDubai)
// ? Container(
// width: double.infinity,
// decoration: containerRadius(Colors.white, 12),
// padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
// child: Row(
// children: [
// Flexible(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// TranslationBase.of(context).selectOccupation,
// style: TextStyle(
// fontSize: 11,
// letterSpacing: -0.44,
// fontWeight: FontWeight.w600,
// ),
// ),
// Container(
// height: 18,
// width: double.infinity,
// child: DropdownButtonHideUnderline(
// child: DropdownButton<GetPatientOccupationListResponse>(
// key: projectDropdownKey,
// hint: Text(TranslationBase.of(context).selectOccupation),
// value: selectedPatientOccupation,
// iconSize: 0,
// isExpanded: true,
// style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black),
// items: patientOccupationList.map((GetPatientOccupationListResponse item) {
// return DropdownMenuItem<GetPatientOccupationListResponse>(
// value: item,
// child: AutoSizeText(
// projectViewModel.isArabic ? item.descriptionN! : item.description!,
// maxLines: 1,
// minFontSize: 10,
// style: TextStyle(
// fontSize: SizeConfig.textMultiplier! * 1.6,
// fontWeight: FontWeight.w600,
// letterSpacing: -0.39,
// height: 0.8,
// ),
// ),
// // Text('${item.name!}'),
// );
// }).toList(),
// onChanged: (GetPatientOccupationListResponse? newValue) {
// setState(() {
// selectedPatientOccupation = newValue!;
// selectedOccupationID = selectedPatientOccupation!.occupationID!;
// registerInfo.occupationID = selectedOccupationID;
// });
// debugPrint("Selected Occupation ID: ${registerInfo.occupationID}");
// },
// ),
// ),
// ),
// ],
// ),
// ),
// Icon(Icons.keyboard_arrow_down),
// ],
// ))
// : SizedBox(),
mHeight(20),
Container( Container(
width: double.infinity, width: double.infinity,
decoration: containerRadius(Colors.white, 12), decoration: containerRadius(Colors.white, 12),
@ -407,6 +485,8 @@ class _RegisterInfo extends State<RegisterInfo> {
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).cancel, () { child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop(); Navigator.of(context).pop();
// widget.changePageViewIndex!(0);
// getPatientOccupationList();
locator<GAnalytics>().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'other details'); locator<GAnalytics>().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'other details');
}, textColor: Colors.white, color: Color(0xffD02127))), }, textColor: Colors.white, color: Color(0xffD02127))),
), ),
@ -432,6 +512,16 @@ class _RegisterInfo extends State<RegisterInfo> {
} }
} else { } else {
registerNow(); registerNow();
// if (isDubai) {
// registerNow();
// } else {
// if (selectedPatientOccupation != null) {
// registerNow();
// } else {
// AppToast.showErrorToast(message: TranslationBase.of(context).selectOccupationError);
// }
// }
} }
} }
@ -445,12 +535,15 @@ class _RegisterInfo extends State<RegisterInfo> {
registerNow() { registerNow() {
dynamic request; dynamic request;
if (isDubai) if (isDubai)
request = getTempUserRequestDubai(); request = getTempUserRequestDubai();
else else
request = getTempUserRequest(); request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); print(request);
GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: true);
dynamic res; dynamic res;
this this
.authService .authService
@ -503,7 +596,7 @@ class _RegisterInfo extends State<RegisterInfo> {
okFunction: () => {ConfirmDialog.closeAlertDialog(context)}, okFunction: () => {ConfirmDialog.closeAlertDialog(context)},
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
projectViewModel.analytics.loginRegistration.registration_fail(errorType: err); projectViewModel.analytics.loginRegistration.registration_fail(errorType: "");
}); });
} }
@ -530,6 +623,16 @@ class _RegisterInfo extends State<RegisterInfo> {
if (isDubai) location = '2'; if (isDubai) location = '2';
}); });
} }
// try {
// var patientOccupationListVal = json.decode(await sharedPref.getString(PATIENT_OCCUPATION_LIST));
// patientOccupationListVal.forEach((v) {
// patientOccupationList.add(new GetPatientOccupationListResponse.fromJson(v));
// });
// setState(() {});
// } catch (ex) {
// print(ex.toString());
// }
} }
getTempUserRequest() { getTempUserRequest() {
@ -559,6 +662,7 @@ class _RegisterInfo extends State<RegisterInfo> {
"EmailAddress": email, "EmailAddress": email,
"SourceType": location, "SourceType": location,
"PreferredLanguage": registerd_data.languageID.toString(), "PreferredLanguage": registerd_data.languageID.toString(),
// "OccupationID": registerInfo.occupationID,
"Marital": registerInfo.maritalStatusCode == 'U' "Marital": registerInfo.maritalStatusCode == 'U'
? '0' ? '0'
: registerInfo.maritalStatusCode == 'M' : registerInfo.maritalStatusCode == 'M'
@ -911,6 +1015,25 @@ class _RegisterInfo extends State<RegisterInfo> {
), ),
); );
} }
void openDropdown(GlobalKey key) {
GestureDetector? detector;
void searchForGestureDetector(BuildContext element) {
element.visitChildElements((element) {
if (element.widget != null && element.widget is GestureDetector) {
detector = element.widget as GestureDetector?;
// return false;
} else {
searchForGestureDetector(element);
}
// return true;
});
}
searchForGestureDetector(key.currentContext!);
assert(detector != null);
detector!.onTap!();
}
} }
class Language { class Language {

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
@ -7,6 +9,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart'; import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart';
import 'package:diplomaticquarterapp/models/Authentication/get_patient_occupation_list_response.dart';
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/login/login.dart'; import 'package:diplomaticquarterapp/pages/login/login.dart';
@ -54,6 +57,16 @@ class _Register extends State<Register> {
late bool isLoading; late bool isLoading;
List<GetPatientOccupationListResponse> patientOccupationList = [];
GetPatientOccupationListResponse? selectedPatientOccupation;
@override
void initState() {
getPatientOccupationList();
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -361,10 +374,10 @@ class _Register extends State<Register> {
nRequest['isHijri'] = isHijri; nRequest['isHijri'] = isHijri;
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest);
sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']); sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']);
if(request.patientOutSA ==0 ) { if (request.patientOutSA == 0) {
this.chekUserData(response['LogInTokenID']); this.chekUserData(response['LogInTokenID']);
}else{ } else {
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai:true))); Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai: true)));
} }
} }
} else { } else {
@ -405,6 +418,7 @@ class _Register extends State<Register> {
{ {
result = CheckUserStatusResponse.fromJson(result as Map<String, dynamic>), result = CheckUserStatusResponse.fromJson(result as Map<String, dynamic>),
sharedPref.setObject(NHIC_DATA, result), sharedPref.setObject(NHIC_DATA, result),
// widget.changePageViewIndex!(1),
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true))), Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true))),
} }
else else
@ -413,4 +427,13 @@ class _Register extends State<Register> {
} }
}); });
} }
getPatientOccupationList() async {
patientOccupationList.clear();
await authService.getPatientOccupationList().then((result) {
sharedPref.setString(PATIENT_OCCUPATION_LIST, json.encode(result['GetOccupationLst']));
}).catchError((err) {
AppToast.showErrorToast(message: err);
});
}
} }

@ -20,6 +20,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
class UserLoginAgreementPage extends StatefulWidget { class UserLoginAgreementPage extends StatefulWidget {
final String userAgreementText; final String userAgreementText;
@ -38,6 +39,38 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
late ToDoCountProviderModel toDoProvider; late ToDoCountProviderModel toDoProvider;
final authService = AuthProvider(); final authService = AuthProvider();
late final WebViewController _controller;
bool isPageLoaded = false;
@override
void initState() {
super.initState();
_controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {
// Update loading bar.
},
onPageStarted: (String url) {},
onPageFinished: (String url) {
setState(() {
isPageLoaded = true;
});
},
onHttpError: (HttpResponseError error) {},
onWebResourceError: (WebResourceError error) {},
onNavigationRequest: (NavigationRequest request) {
if (request.url.startsWith('https://www.youtube.com/')) {
return NavigationDecision.prevent;
}
return NavigationDecision.navigate;
},
),
)
..loadRequest(Uri.parse("https://hmg.com/en/Pages/Privacy.aspx"));
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
@ -49,14 +82,15 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
showNewAppBar: true, showNewAppBar: true,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: TranslationBase.of(context).userAgreement, appBarTitle: TranslationBase.of(context).userAgreement,
body: Padding( body: WebViewWidget(controller: _controller),
padding: const EdgeInsets.all(8.0), // Padding(
child: SingleChildScrollView( // padding: const EdgeInsets.all(8.0),
child: Html( // child: SingleChildScrollView(child: WebViewWidget(controller: _controller)
data: widget.userAgreementText, // // Html(
), // // data: widget.userAgreementText,
), // // ),
), // ),
// ),
bottomSheet: Container( bottomSheet: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -101,9 +135,11 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton( child: CustomTextButton(
backgroundColor: CustomColors.green, backgroundColor: CustomColors.green,
elevation: 0, elevation: 0,
onPressed: () { onPressed: isPageLoaded
? () {
addUsageAgreement(); addUsageAgreement();
}, }
: null,
child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(), child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(),
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 18.0,
@ -123,14 +159,16 @@ class _UserLoginAgreementPageState extends State<UserLoginAgreementPage> {
child: CustomTextButton( child: CustomTextButton(
backgroundColor: Color(0xffc5272d), backgroundColor: Color(0xffc5272d),
elevation: 0, elevation: 0,
onPressed: () { onPressed: isPageLoaded
? () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
FadePage( FadePage(
page: LandingPage(), page: LandingPage(),
), ),
(r) => false); (r) => false);
}, }
: null,
child: Text(TranslationBase.of(context).declineLbl.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), child: Text(TranslationBase.of(context).declineLbl.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
), ),
), ),

@ -80,7 +80,8 @@ class AskDoctorPage extends StatelessWidget {
doctor: doctorList, doctor: doctorList,
isLiveCareAppointment: false, isLiveCareAppointment: false,
isShowFlag: false, isShowFlag: false,
onTap: () { onTap: () async {
if (await checkIfDoctorAvailable(_doctor, context)) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) { service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -95,6 +96,7 @@ class AskDoctorPage extends StatelessWidget {
if (err != null) AppToast.showErrorToast(message: err.toString()); if (err != null) AppToast.showErrorToast(message: err.toString());
print(err); print(err);
}); });
}
}, },
); );
}, },
@ -106,6 +108,27 @@ class AskDoctorPage extends StatelessWidget {
); );
} }
Future<bool> checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) {
bool isAvailable = false;
GifLoaderDialogUtils.showMyDialog(context);
service.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['IsDoctorAvailable']);
if (res['IsDoctorAvailable']) {
isAvailable = true;
} else {
isAvailable = false;
AppToast.showErrorToast(message: res['endUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
if (err != null) AppToast.showErrorToast(message: err.toString());
print(err);
});
return Future.value(isAvailable);
}
String getDate(String date) { String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date); DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getWeekDay(dateObj.weekday) + return DateUtil.getWeekDay(dateObj.weekday) +

@ -330,8 +330,8 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.message.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.message.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");

@ -87,6 +87,9 @@ class LabsHomePage extends StatelessWidget {
isLiveCareAppointment: labOrder.isLiveCareAppointment, isLiveCareAppointment: labOrder.isLiveCareAppointment,
date: labOrder.orderDate, date: labOrder.orderDate,
isSortByClinic: _isSortByClinic, isSortByClinic: _isSortByClinic,
isLabOrderResult: true,
resultStatus: labOrder.status!,
resultStatusDesc: labOrder.statusDesc!,
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
); );
}, },

@ -39,9 +39,11 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
dynamic grandTotal = 0; dynamic grandTotal = 0;
late ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
generateInvoiceDetails(); generateInvoiceDetails();
return AppScaffold( return AppScaffold(
appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(), appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(),
@ -278,13 +280,13 @@ class _InvoiceDetailState extends State<InvoiceDetail> {
tableRow.add( tableRow.add(
TableRow(children: [ TableRow(children: [
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].procedureName}', Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].procedureName}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)), isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}', Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)), isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString() + " " + TranslationBase.of(context).sar}', Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString() + " " + TranslationBase.of(context).sar}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)), isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString() + " " + TranslationBase.of(context).sar}', Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString() + " " + TranslationBase.of(context).sar}',
isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1)), isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel),
]), ]),
); );
} }

@ -61,9 +61,11 @@ class PrescriptionItemsPage extends StatelessWidget {
prescriptions.name!, prescriptions.name!,
DateUtil.convertStringToDate(prescriptions.appointmentDate!), DateUtil.convertStringToDate(prescriptions.appointmentDate!),
DateUtil.formatDateToTime( DateUtil.formatDateToTime(
model.prescriptionReportEnhList.length > 0 || model.prescriptionReportListINP.length > 0 ? DateUtil.convertStringToDate( model.prescriptionReportEnhList.length > 0 || model.prescriptionReportListINP.length > 0
? DateUtil.convertStringToDate(
model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!, model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!,
) : DateTime.now(), )
: DateTime.now(),
), ),
prescriptions.nationalityFlagURL ?? "", prescriptions.nationalityFlagURL ?? "",
prescriptions.doctorRate, prescriptions.doctorRate,
@ -433,7 +435,10 @@ class PrescriptionItemsPage extends StatelessWidget {
doctorName: prescriptions.doctorName!, doctorName: prescriptions.doctorName!,
doctorID: prescriptions.doctorID!, doctorID: prescriptions.doctorID!,
mes: TranslationBase.of(context).sendSuc, mes: TranslationBase.of(context).sendSuc,
projectID: prescriptions.projectID!); projectID: prescriptions.projectID!,
isInOutPatient: prescriptions.isInOutPatient!
);
}, },
), ),
); );

@ -24,6 +24,7 @@ import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:open_filex/open_filex.dart'; import 'package:open_filex/open_filex.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
class ReportListWidget extends StatelessWidget { class ReportListWidget extends StatelessWidget {
final List<Reports> reportList; final List<Reports> reportList;
@ -131,31 +132,48 @@ class ReportListWidget extends StatelessWidget {
if (reportList[index].status == 2) if (reportList[index].status == 2)
Row( Row(
children: [ children: [
// InkWell( InkWell(
// onTap: () { onTap: () {
// getMedicalReportPDF(report); getMedicalReportPDF(report, false);
// }, },
// child: Padding( child: Padding(
// padding: const EdgeInsets.only(right: 11.0, left: 11.0), padding: const EdgeInsets.only(right: 11.0, left: 11.0),
// child: Text(TranslationBase.of(context).viewReport, child: Text(TranslationBase.of(context).download,
// style: TextStyle( style: TextStyle(
// fontSize: 12, fontSize: 12,
// fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// fontStyle: FontStyle.italic, fontStyle: FontStyle.italic,
// color: CustomColors.accentColor, color: CustomColors.accentColor,
// letterSpacing: -0.48, letterSpacing: -0.48,
// height: 18 / 12, height: 18 / 12,
// decoration: TextDecoration.underline)), decoration: TextDecoration.underline)),
// ), ),
// ), ),
IconButton( InkWell(
icon: Icon(Icons.email), onTap: () {
color: Color(0xff28323A), getMedicalReportPDF(report, true);
constraints: BoxConstraints(), },
padding: EdgeInsets.zero, child: Padding(
onPressed: () { padding: const EdgeInsets.only(right: 11.0, left: 11.0),
showConfirmMessage(reportList[index]); child: Text(TranslationBase.of(context).share,
}) style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontStyle: FontStyle.italic,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 18 / 12,
decoration: TextDecoration.underline)),
),
),
// IconButton(
// icon: Icon(Icons.email),
// color: Color(0xff28323A),
// constraints: BoxConstraints(),
// padding: EdgeInsets.zero,
// onPressed: () {
// showConfirmMessage(reportList[index]);
// })
], ],
), ),
], ],
@ -187,7 +205,7 @@ class ReportListWidget extends StatelessWidget {
); );
} }
void getMedicalReportPDF(Reports report) { void getMedicalReportPDF(Reports report, bool isShare) {
GifLoaderDialogUtils.showMyDialog(AppGlobal.context); GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
ReportsService _reportsService = locator<ReportsService>(); ReportsService _reportsService = locator<ReportsService>();
_reportsService _reportsService
@ -195,12 +213,16 @@ class ReportListWidget extends StatelessWidget {
DateUtil.convertDateToString(report.requestDate!), report.setupId!) DateUtil.convertDateToString(report.requestDate!), report.setupId!)
.then((value) async { .then((value) async {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
try {
String path = await _createFileFromString(value["MedicalReportBase64"], "pdf"); String path = await _createFileFromString(value["MedicalReportBase64"], "pdf");
if (isShare) {
Share.shareXFiles([XFile(path)], text: "Medical Report");
} else {
try {
OpenFilex.open(path); OpenFilex.open(path);
} catch (ex) { } catch (ex) {
AppToast.showErrorToast(message: "Cannot open file."); AppToast.showErrorToast(message: "Cannot open file.");
} }
}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context); GifLoaderDialogUtils.hideDialog(AppGlobal.context);
print(err); print(err);

@ -117,8 +117,8 @@ class _VitalSingChartAndDetialsState extends State<VitalSingChartAndDetials> {
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}", "${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)), isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1)), Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
], ],
), ),
); );

@ -113,9 +113,9 @@ class VitalSingChartBloodPressure extends StatelessWidget {
children: [ children: [
Utils.tableColumnValue( Utils.tableColumnValue(
"${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}", "${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}",
isLast: i == (labResultList.length - 1)), isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1)), Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1)), Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel),
], ],
), ),
); );

@ -1285,7 +1285,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientRadOrders(String appoNo, int languageID, BuildContext context) async { Future<Map> getPatientRadOrders(String appoNo, int projectID, int languageID, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
@ -1295,6 +1295,7 @@ class DoctorsListService extends BaseService {
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"AppointmentNo": appoNo, "AppointmentNo": appoNo,
"ProjectID": projectID,
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"IPAdress": req.IPAdress, "IPAdress": req.IPAdress,

@ -1777,7 +1777,7 @@ class AuthProvider with ChangeNotifier {
Future<dynamic> checkIfUserAgreed() async { Future<dynamic> checkIfUserAgreed() async {
Map<String, dynamic> request; Map<String, dynamic> request;
request = {"Region": 1}; request = {"Region": 1, "SessionID": SESSION_ID};
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_USAGE_AGREEMENT, onSuccess: (dynamic response, int statusCode) { await new BaseAppClient().post(CHECK_USAGE_AGREEMENT, onSuccess: (dynamic response, int statusCode) {
@ -1910,6 +1910,24 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future getPatientOccupationList() async {
Map<String, dynamic> request = {"ProjectOutSA": false};
dynamic localRes;
try {
await new BaseAppClient().post(GET_PATIENT_OCCUPATION_LIST, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
localRes = error;
return Future.value(error);
}, body: request);
// logout();
return Future.value(localRes);
} catch (error) {
throw error;
}
}
logout() async { logout() async {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID); await sharedPref.remove(PHARMACY_CUSTOMER_ID);

@ -184,12 +184,13 @@ class ClinicListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getInPatientPaymentLink(int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async { Future<Map> getInPatientPaymentLink(int paymentRequestID, int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
// request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo}; // request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo};
request = { request = {
"ProjectID": projectID, "ProjectID": projectID,
"PaymentRequestId": paymentRequestID,
"ClientOrderID": orderID, "ClientOrderID": orderID,
"OrderDescription": "InPatient Advance Payment", "OrderDescription": "InPatient Advance Payment",
"CustomerName": name, "CustomerName": name,
@ -306,9 +307,9 @@ class ClinicListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getBirthNotification(num motherMRN, int languageID, context) async { Future<Map> getBirthNotification(num motherMRN, int projectID, int languageID, context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
request = {"mothermrn": motherMRN, "LanguageID": languageID}; request = {"mothermrn": motherMRN, "LanguageID": languageID, "ProjectID": projectID};
dynamic localRes; dynamic localRes;

@ -209,7 +209,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, int languageID, bool isPharma, BuildContext context) async { Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, int callTypeID, int languageID, bool isPharma, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
String? deviceToken; String? deviceToken;
@ -240,7 +240,8 @@ class LiveCareService extends BaseService {
"PatientID": authUser.patientID != null ? authUser.patientID : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0, "Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID, "LanguageID": languageID,
"IsVoip": Platform.isIOS ? true : false "IsVoip": Platform.isIOS ? true : false,
"CallTypeID": callTypeID
}; };
dynamic localRes; dynamic localRes;

@ -11,6 +11,8 @@ import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart'; import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart';
@ -84,6 +86,7 @@ class _SplashScreenState extends State<SplashScreen> {
// debugPrint("ALL SHARED PREFERENCES!!!!!"); // debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value)); // debugPrint(jsonEncode(value));
}); });
// if (!kDebugMode) await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
// PushNotificationHandler(context).init(); // Asyncronously // PushNotificationHandler(context).init(); // Asyncronously
} }

@ -5,6 +5,7 @@ import 'dart:ui';
import 'package:device_calendar/device_calendar.dart'; import 'package:device_calendar/device_calendar.dart';
import 'package:manage_calendar_events/manage_calendar_events.dart' as ios; import 'package:manage_calendar_events/manage_calendar_events.dart' as ios;
import 'package:timezone/data/latest.dart' as tzl;
final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin(); final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin();
final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin(); final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin();
@ -44,6 +45,7 @@ class CalendarUtils {
// } // }
static Future<CalendarUtils> getInstance() async { static Future<CalendarUtils> getInstance() async {
tzl.initializeTimeZones();
if (_completer != null) { if (_completer != null) {
return _completer!.future; return _completer!.future;
} }
@ -65,6 +67,7 @@ class CalendarUtils {
} }
Future createOrUpdateEvents({List<DateTime>? scheduleList, String? title, String? description, List<DateTime>? scheduleDateTime, List<DayOfWeek>? daysOfWeek}) async { Future createOrUpdateEvents({List<DateTime>? scheduleList, String? title, String? description, List<DateTime>? scheduleDateTime, List<DayOfWeek>? daysOfWeek}) async {
tzl.initializeTimeZones();
List<Event> events = []; List<Event> events = [];
Location _currentLocation; Location _currentLocation;
if (DateTime.now().timeZoneName == "+04") if (DateTime.now().timeZoneName == "+04")
@ -120,6 +123,8 @@ class CalendarUtils {
description: description, description: description,
); );
ios.CalendarEvent iosCalEvent =
ios.CalendarEvent(eventId: eventId, startDate: scheduleDateTimeUTZ, endDate: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description, isAllDay: false);
if(Platform.isAndroid) { if(Platform.isAndroid) {
Result<bool> result = await deviceCalendarPlugin.hasPermissions(); Result<bool> result = await deviceCalendarPlugin.hasPermissions();
@ -129,6 +134,14 @@ class CalendarUtils {
}).whenComplete(() { }).whenComplete(() {
print("whenComplete Calender ID " + eventId!); print("whenComplete Calender ID " + eventId!);
}); });
} else {
// Result<bool> result = await deviceCalendarPlugin.hasPermissions();
// print(result);
await _myPlugin.createEvent(calendarId: writableCalendars.id!, event: iosCalEvent).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID iOS " + eventId!);
});
} }

@ -18,6 +18,7 @@ class LaserBodyParts {
} }
Map<String, Widget> maleBodyMap = { Map<String, Widget> maleBodyMap = {
"1": imagePng("assets/images/new/body_parts/male/full_body_male.png"),
"40": imagePng("assets/images/new/body_parts/male/upper_arm.png"), "40": imagePng("assets/images/new/body_parts/male/upper_arm.png"),
"41": imagePng("assets/images/new/body_parts/male/lower_arm.png"), "41": imagePng("assets/images/new/body_parts/male/lower_arm.png"),
"42": imagePng("assets/images/new/body_parts/male/chest.png"), "42": imagePng("assets/images/new/body_parts/male/chest.png"),
@ -43,6 +44,7 @@ class LaserBodyParts {
}; };
Map<String, Widget> maleBodyRetouchMap = { Map<String, Widget> maleBodyRetouchMap = {
"50": imagePng("assets/images/new/body_parts/male/full_body_male.png"),
"51": imagePng("assets/images/new/body_parts/male/upper_arm.png"), "51": imagePng("assets/images/new/body_parts/male/upper_arm.png"),
"52": imagePng("assets/images/new/body_parts/male/lower_arm.png"), "52": imagePng("assets/images/new/body_parts/male/lower_arm.png"),
"53": imagePng("assets/images/new/body_parts/male/chest.png"), "53": imagePng("assets/images/new/body_parts/male/chest.png"),
@ -57,6 +59,7 @@ class LaserBodyParts {
}; };
Map<String, Widget> femaleBodyMap = { Map<String, Widget> femaleBodyMap = {
"1": imagePng("assets/images/new/body_parts/female/full_body_female.png"),
"40": imagePng("assets/images/new/body_parts/female/upper_arm.png"), "40": imagePng("assets/images/new/body_parts/female/upper_arm.png"),
"41": imagePng("assets/images/new/body_parts/female/lower_arm.png"), "41": imagePng("assets/images/new/body_parts/female/lower_arm.png"),
"42": imagePng("assets/images/new/body_parts/female/chest.png"), "42": imagePng("assets/images/new/body_parts/female/chest.png"),
@ -89,6 +92,7 @@ class LaserBodyParts {
}; };
Map<String, Widget> femaleBodyRetouchMap = { Map<String, Widget> femaleBodyRetouchMap = {
"50": imagePng("assets/images/new/body_parts/female/full_body_female.png"),
"51": imagePng("assets/images/new/body_parts/female/upper_arm.png"), "51": imagePng("assets/images/new/body_parts/female/upper_arm.png"),
"52": imagePng("assets/images/new/body_parts/female/lower_arm.png"), "52": imagePng("assets/images/new/body_parts/female/lower_arm.png"),
"53": imagePng("assets/images/new/body_parts/female/chest.png"), "53": imagePng("assets/images/new/body_parts/female/chest.png"),

@ -22,6 +22,7 @@ import 'package:firebase_messaging/firebase_messaging.dart' as fir;
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// import 'package:flutter_ios_voip_kit/call_state_type.dart'; // import 'package:flutter_ios_voip_kit/call_state_type.dart';
// import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; // import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
@ -393,7 +394,8 @@ class PushNotificationHandler {
if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) { if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) {
_incomingCall(remoteMessage.data); _incomingCall(remoteMessage.data);
// showCallkitIncoming(remoteMessage.data); // showCallkitIncoming(remoteMessage.data);
}if(remoteMessage.data['is_navigation'] == 'true' || remoteMessage.data['is_navigation'] == true ){ }
else if (remoteMessage.data['is_navigation'] == 'true' || remoteMessage.data['is_navigation'] == true) {
NavigationClinicDetails data = NavigationClinicDetails(); NavigationClinicDetails data = NavigationClinicDetails();
data.clinicId = remoteMessage.data['clinic_Id']; data.clinicId = remoteMessage.data['clinic_Id'];
data.patientId = remoteMessage.data['patient_Id']; data.patientId = remoteMessage.data['patient_Id'];

@ -3004,6 +3004,12 @@ class TranslationBase {
String get howToUseVerificationMethod => localizedValues["howToUseVerificationMethod"][locale.languageCode]; String get howToUseVerificationMethod => localizedValues["howToUseVerificationMethod"][locale.languageCode];
String get addToWaitingList => localizedValues["addToWaitingList"][locale.languageCode]; String get addToWaitingList => localizedValues["addToWaitingList"][locale.languageCode];
String get searchClinic => localizedValues["searchClinic"][locale.languageCode]; String get searchClinic => localizedValues["searchClinic"][locale.languageCode];
String get enterMobileNumber => localizedValues["enterMobileNumber"][locale.languageCode];
String get videoCall => localizedValues["videoCall"][locale.languageCode];
String get audioCall => localizedValues["audioCall"][locale.languageCode];
String get phoneCall => localizedValues["phoneCall"][locale.languageCode];
String get selectCallType => localizedValues["selectCallType"][locale.languageCode];
String get selectedCallType => localizedValues["selectedCallType"][locale.languageCode];
String get selectBranch => localizedValues["selectBranch"][locale.languageCode]; String get selectBranch => localizedValues["selectBranch"][locale.languageCode];
String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode]; String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode];
String get existingPackage => localizedValues["existingPackage"][locale.languageCode]; String get existingPackage => localizedValues["existingPackage"][locale.languageCode];
@ -3018,6 +3024,13 @@ class TranslationBase {
String get continueAgreeTerms => localizedValues["continueAgreeTerms"][locale.languageCode]; String get continueAgreeTerms => localizedValues["continueAgreeTerms"][locale.languageCode];
String get agreeText => localizedValues["agreeText"][locale.languageCode]; String get agreeText => localizedValues["agreeText"][locale.languageCode];
String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode]; String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode];
String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode];
String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode];
String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode];
String get resultStatus => localizedValues["resultStatus"][locale.languageCode];
String get labResultFlag => localizedValues["labResultFlag"][locale.languageCode];
String get selectOccupation => localizedValues["selectOccupation"][locale.languageCode];
String get selectOccupationError => localizedValues["selectOccupationError"][locale.languageCode];
String get readMore => localizedValues["readMore"][locale.languageCode]; String get readMore => localizedValues["readMore"][locale.languageCode];
@ -3036,6 +3049,18 @@ class TranslationBase {
String get criticalLow => localizedValues["criticalLow"][locale.languageCode]; String get criticalLow => localizedValues["criticalLow"][locale.languageCode];
String get high => localizedValues["high"][locale.languageCode]; String get high => localizedValues["high"][locale.languageCode];
String get whatIsOnlineCheckIn => localizedValues["whatIsOnlineCheckIn"][locale.languageCode];
String get EROnlineCheckInDesc1 => localizedValues["EROnlineCheckInDesc1"][locale.languageCode];
String get EROnlineCheckInHow => localizedValues["EROnlineCheckInHow"][locale.languageCode];
String get EROnlineCheckInTapOn => localizedValues["EROnlineCheckInTapOn"][locale.languageCode];
String get EROnlineCheckInTapOnCheckIn => localizedValues["EROnlineCheckInTapOnCheckIn"][locale.languageCode];
String get EROnlineCheckInHoldPhone => localizedValues["EROnlineCheckInHoldPhone"][locale.languageCode];
String get EROnlineCheckInHoldPhoneInstruction => localizedValues["EROnlineCheckInHoldPhoneInstruction"][locale.languageCode];
String get EROnlineCheckInWaitTurn => localizedValues["EROnlineCheckInWaitTurn"][locale.languageCode];
String get EROnlineCheckInWaitTurnInstruction => localizedValues["EROnlineCheckInWaitTurnInstruction"][locale.languageCode];
String get download => localizedValues["download"][locale.languageCode];
String get share => localizedValues["share"][locale.languageCode];
String get normal => localizedValues["normal"][locale.languageCode]; String get normal => localizedValues["normal"][locale.languageCode];

@ -39,6 +39,7 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
@ -823,7 +824,7 @@ class Utils {
); );
} }
static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) { static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, required ProjectViewModel mProjectViewModel}) {
ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context); ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context);
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -831,12 +832,41 @@ class Utils {
children: [ children: [
SizedBox(height: 12), SizedBox(height: 12),
Text( Text(
// isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text, isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (!isLast)
Divider(
height: 1,
color: Color(0xffEFEFEF),
thickness: 1,
)
],
);
}
static Widget tableColumnValueWithFlowChart(String text, String flowChartText, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 12),
Text(
text, text,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
SizedBox(height: 8),
AutoSizeText(
flowChartText,
maxLines: 1,
minFontSize: 6,
style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 12), SizedBox(height: 12),
if (!isLast) if (!isLast)
Divider( Divider(

@ -0,0 +1,34 @@
import 'dart:async';
import 'package:flutter/services.dart';
class WhatsappMethodChannel {
static const MethodChannel _channel = MethodChannel('whats_app_otp');
FutureOr<void> handleHandShake() async {
try {
await _channel.invokeMethod("performHandShake");
} on PlatformException catch (e) {
print("Failed to launch PenguinIn: '${e.message}'.");
}
}
Future<bool> isWhatsAppInstalled() async {
try {
return await _channel.invokeMethod("isWhatsAppInstalled");
} catch (e) {
return false;
}
}
Future<String> startListening() async {
try{
String code = await _channel.invokeMethod("startListening");
print("the code in flutter is ${code}");
return code;
}catch(e){
return "";
}
}
}

@ -0,0 +1,70 @@
// import 'package:flutter/material.dart';
// import 'package:vital_sign_camera/vital_sign_camera.dart';
//
// class VitalSigns extends StatefulWidget {
// const VitalSigns({super.key});
//
// @override
// State<VitalSigns> createState() => _VitalSignState();
// }
//
// class _VitalSignState extends State<VitalSigns> {
// late final VitalSignCameraController _vitalSignCameraController;
// late Future<CameraDevice?> cameraDevice;
//
// @override
// void initState() {
// super.initState();
// cameraDevice = getFrontCamera();
// }
//
// double? _heartRate;
//
// Future<CameraDevice?> getFrontCamera() async {
// if (CameraPermissionStatus.authorized != await requestCameraPermission()) {
// return null;
// }
// return queryCameraDevice(CameraPosition.front);
// }
//
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// body: Stack(children: [
// VitalSignCamera(
// onCreated: _onVitalSignCameraCreated,
// isActive: true,
// userInfo: UserInfo(
// age: 30, gender: Gender.male, userId: '__YOUR_USER_ID__'),
// config: VitalSignCameraConfig(apiKey: '__YOUR_API_KEY__'),
// device: cameraDevice,
// onVideoFrameProcessed: _onVideoFrameProcessed),
// Center(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// ElevatedButton(
// onPressed: () {
// setState(() {
// _vitalSignCameraController.startScanning();
// });
// },
// child: const Text('start')),
// Text('Heart rate: $_heartRate'),
// ],
// ),
// ),
// ]),
// );
// }
//
// void _onVideoFrameProcessed(VideoFrameProcessedEvent event) {
// // setState(() {
// // _heartRate = event.healthResult?.health?.vitalSigns.heartRate;
// // });
// }
//
// void _onVitalSignCameraCreated(VitalSignCameraController controller) {
// _vitalSignCameraController = controller;
// }
// }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save