Merge remote-tracking branch 'origin/dev_v3.13.6' into dev_v3.13.6

merge-update-with-lab-changes
Aamir.Muhammad 2 years ago
commit 76f5fc2ef8

@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICgjCCAWoCAQAwPTEjMCEGCSqGSIb3DQEJARYUSGFyb29uNjEzOEBnbWFpbC5j
b20xCTAHBgNVBAMMADELMAkGA1UEBhMCQUUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDHadAER62mSf+wOxPu9rF1EvifDxbAEv6znZIHvwimgShdPLLS
rkFdN4VpSHMzrASqpHnlSL3wxO6eym9pATH3WfLvKIQxnn9OkO5fScjQi0RkFbe0
JqTqN2LaFxrSFrhqQ/1p/izr690HqjrfquRI8t8evatyTku67/xcCj6uSIVLfJoS
8YCDVn0Y+w9n2Vw/+kHiNY6P96qp/CfXZgMLFpUu0mqcmZl97htfmB9AH2tC45yh
mKxDJiKEnk69zVCh/bkc9tFE1tUDkkKblJTCEyWfdDUUYM4ET3t3fBqWB78F4J3m
XglByGZmHgY2+7nsSQBiq7k9tFN2c7FZ9BD3AgMBAAGgADANBgkqhkiG9w0BAQsF
AAOCAQEAJxqoyfEJ7V83ffCAqkYNNEcCQMIRi1Y4cTTm/5KZGA/UPeDeX48/bm4K
XIf2zbv88OGASInBrvMDp0x0zs13Dx2yXxofGN+iQSBwN6jPV/upmm0DjgTmgUGh
BJste70LaU228ADzWDw8UJm/GKjK8WvE0XOGpPKYq9cuVW3M+6QRoRHXy0eJc2PX
VgopsuhHUyA5trxM7k4yc6GgYVx+fAwMaplovTwn5U8XK6bDEIvCjImfat/u4Wp8
R31p0BQzQaeyWfpp9Ucn/fvQSeB+wtjhHuA1ukcyWY1kBYOyCMIHymFrJLaTpUj7
aQFYZDV28HYv0yWhWIAD9Pu+aDHWpA==
-----END CERTIFICATE REQUEST-----

@ -0,0 +1,74 @@
Bag Attributes
friendlyName: VoIP Services: com.HMG.HMG-Smartphone
localKeyID: 70 4A 99 03 F8 D7 92 FA F7 2F DD 3B D8 BF 2C F0 BD CE 21 C8
subject=/UID=com.HMG.HMG-Smartphone.voip/CN=VoIP Services: com.HMG.HMG-Smartphone/OU=3A359E86ZF/O=Dr Sulaiman Al Habib Medical Center/C=SA
issuer=/CN=Apple Worldwide Developer Relations Certification Authority/OU=G4/O=Apple Inc./C=US
-----BEGIN CERTIFICATE-----
MIIGkTCCBXmgAwIBAgIQFB+/PYFlrZ6SCzSX9cqOBDANBgkqhkiG9w0BAQsFADB1
MUQwQgYDVQQDDDtBcHBsZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9ucyBD
ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTELMAkGA1UECwwCRzQxEzARBgNVBAoMCkFw
cGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTI0MDYwOTEyMDc1MVoXDTI1MDcwOTEy
MDc1MFowga0xKzApBgoJkiaJk/IsZAEBDBtjb20uSE1HLkhNRy1TbWFydHBob25l
LnZvaXAxLjAsBgNVBAMMJVZvSVAgU2VydmljZXM6IGNvbS5ITUcuSE1HLVNtYXJ0
cGhvbmUxEzARBgNVBAsMCjNBMzU5RTg2WkYxLDAqBgNVBAoMI0RyIFN1bGFpbWFu
IEFsIEhhYmliIE1lZGljYWwgQ2VudGVyMQswCQYDVQQGEwJTQTCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMdp0ARHraZJ/7A7E+72sXUS+J8PFsAS/rOd
kge/CKaBKF08stKuQV03hWlIczOsBKqkeeVIvfDE7p7Kb2kBMfdZ8u8ohDGef06Q
7l9JyNCLRGQVt7QmpOo3YtoXGtIWuGpD/Wn+LOvr3QeqOt+q5Ejy3x69q3JOS7rv
/FwKPq5IhUt8mhLxgINWfRj7D2fZXD/6QeI1jo/3qqn8J9dmAwsWlS7SapyZmX3u
G1+YH0Afa0LjnKGYrEMmIoSeTr3NUKH9uRz20UTW1QOSQpuUlMITJZ90NRRgzgRP
e3d8GpYHvwXgneZeCUHIZmYeBjb7uexJAGKruT20U3ZzsVn0EPcCAwEAAaOCAuIw
ggLeMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUW9n6HeeaGgujmXYiUIY+kchb
d6gwcAYIKwYBBQUHAQEEZDBiMC0GCCsGAQUFBzAChiFodHRwOi8vY2VydHMuYXBw
bGUuY29tL3d3ZHJnNC5kZXIwMQYIKwYBBQUHMAGGJWh0dHA6Ly9vY3NwLmFwcGxl
LmNvbS9vY3NwMDMtd3dkcmc0MDUwggEeBgNVHSAEggEVMIIBETCCAQ0GCSqGSIb3
Y2QFATCB/zCBwwYIKwYBBQUHAgIwgbYMgbNSZWxpYW5jZSBvbiB0aGlzIGNlcnRp
ZmljYXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRo
ZW4gYXBwbGljYWJsZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1
c2UsIGNlcnRpZmljYXRlIHBvbGljeSBhbmQgY2VydGlmaWNhdGlvbiBwcmFjdGlj
ZSBzdGF0ZW1lbnRzLjA3BggrBgEFBQcCARYraHR0cHM6Ly93d3cuYXBwbGUuY29t
L2NlcnRpZmljYXRlYXV0aG9yaXR5LzATBgNVHSUEDDAKBggrBgEFBQcDAjAyBgNV
HR8EKzApMCegJaAjhiFodHRwOi8vY3JsLmFwcGxlLmNvbS93d2RyZzQtNi5jcmww
HQYDVR0OBBYEFHBKmQP415L69y/dO9i/LPC9ziHIMA4GA1UdDwEB/wQEAwIHgDAQ
BgoqhkiG92NkBgMBBAIFADAQBgoqhkiG92NkBgMCBAIFADBDBgoqhkiG92NkBgME
BDUMM2NvbS5ITUcuSE1HLVNtYXJ0cGhvbmUsIGNvbS5ITUcuSE1HLVNtYXJ0cGhv
bmUudm9pcDAQBgoqhkiG92NkBgMFBAIFADAmBgoqhkiG92NkBgMDBBgMFmNvbS5I
TUcuSE1HLVNtYXJ0cGhvbmUwDQYJKoZIhvcNAQELBQADggEBAJAcIzSskk8/GbxQ
7nGUPPEWFswL66xTt3GusHmeXkKDXG3ac+4jLk8yU7gunos77CNDm+9TkShdJ2Rg
tTRopK4ockqwoPrCeEVrooHR4e42YvmkB6AfYKJRnQZQVJIpW0OES7vrtoWVGoNj
ktHOV+wFIuAQPI9P4z0RFyRw85MHr+jFqxeLU/1500PwCxIiNHkIcUtzZgrnr22R
7rgkxav+RrjLjXVQvC4VJispKCU7yR69Xv1rsC5zc7OTCuCkbQ9FvnfsiUz5ZDzp
3D0gGojU9wmJ1yVk9HiZsuiVwmg/LbDHI3pSYbxz3n1UHB6Pu0jX3c3Uxkx674HD
/0uvHzg=
-----END CERTIFICATE-----
Bag Attributes
localKeyID: 70 4A 99 03 F8 D7 92 FA F7 2F DD 3B D8 BF 2C F0 BD CE 21 C8
Key Attributes: <No Attributes>
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHadAER62mSf+w
OxPu9rF1EvifDxbAEv6znZIHvwimgShdPLLSrkFdN4VpSHMzrASqpHnlSL3wxO6e
ym9pATH3WfLvKIQxnn9OkO5fScjQi0RkFbe0JqTqN2LaFxrSFrhqQ/1p/izr690H
qjrfquRI8t8evatyTku67/xcCj6uSIVLfJoS8YCDVn0Y+w9n2Vw/+kHiNY6P96qp
/CfXZgMLFpUu0mqcmZl97htfmB9AH2tC45yhmKxDJiKEnk69zVCh/bkc9tFE1tUD
kkKblJTCEyWfdDUUYM4ET3t3fBqWB78F4J3mXglByGZmHgY2+7nsSQBiq7k9tFN2
c7FZ9BD3AgMBAAECggEBALTXH58SBcd86hS+rsgSDkJ2ruNIQsBzOWpYJjtCIi0l
ih5r0lu/TWWk2SbuXhLpF95MhILLIf18Ck4UlU5rmA2SE/6RBrkc3KS6SII/no6J
Db+Z9lu4g+wnyEyxkVAe7KTp/aGmsMROxMaTuQpnptkE8BSnuxhRKtpfksNBQzC2
19OkEy4JAO7xWbm9w/ASiCtYf0Vj26DQo982Fe44cpG08iB2v1uUJINQkGzmg+85
vvn5A1ECpSpgd/eOa68ojxeNSU7iFGZPbpjuincLPBFlC5zp9KD1Bt6p2KwIizBl
GPYTp6a1DnWly6n0PuLN0fl/nRmI6ar48Ja1Qzk8NvECgYEA5iQo9lnjNOHjT6bk
hj5QXMz3MDMCPdJo6jQyADtmsC/F4RjufujfXPhMv2v8JLAjQjNMgfhTSF68zYHf
i1qW8e/CgWu7mGQEIhWtxiTkLou8zW3VjxwpgfeUsGI5L+PxoN53ZUVcetLz4Y58
8ATEhlxh02uGmG2k3HbvFu9NBT8CgYEA3dHJfFX2xv53ZD1E2IE1rM3j7a32s7VB
k/YX8ODrAJxwNmy/vm4gd5h6ofqVS1/IV4NHFbmQ5c1tzB44YGOEZH5Ta9hhHgHU
xoa3q6t+kjR9KrQvxjTSe9mW5x/jAgU0Wp/XrAfMZxc2eukb4/sJAGKG0kyFeX5O
5abVixWj7kkCgYAafd8ZPI+i7r2z1YpIybOGezGZIsYHR8k77HY1AKF5doZYuv35
LeVIVmy/PDbyIjRs0mrkKymrEvy4y1JoQC1P/EFvlG8rw5eWNNikDmsV0JATNal3
p84/X7iF9UiP8rVFx1YHGkzi9pWMSVKobmQQ82FvbNk5gqWPm0E6aqF7EQKBgQDB
mE0PlT9SIdk1xTuG8g5UiUV6tS/xXCql5kyy0LqJx/8voO4gV6FCf/PX1wnhxPDn
YA30agaKaiZ/1YhCp9hulMpd/3WTaOm5cu5uh7hqBiGP2b8wb/2cViWcBnpr0vsE
dSkYXZ4KA3pq/3R2HyyWB2e/t0Vu6cwWJuuM/hAa8QKBgGNRStNVSMPvzx2X7mB6
EqdlWqVbfSTHJiZKyNPWHlSuZgdQ14BRwq7KZ0ysZy+kOX4rh1rIfqzrKc62xEXB
E+fmIpu+DUOM5ojEPCf9Om87r3fMJ54SjM7z1dtVc+Muy4TnFZ4UQcN9txWbnkAo
++H5gC9DBedOEXkwoCYjoeuM
-----END PRIVATE KEY-----

Binary file not shown.

@ -36,13 +36,14 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
configurations.all { configurations.all {
c -> c.resolutionStrategy.eachDependency { c ->
DependencyResolveDetails dependency -> c.resolutionStrategy.eachDependency {
println dependency.requested.group DependencyResolveDetails dependency ->
if (dependency.requested.group == 'org.bouncycastle') { println dependency.requested.group
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68' if (dependency.requested.group == 'org.bouncycastle') {
} dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68'
} }
}
} }
//configurations.all { //configurations.all {
@ -53,6 +54,7 @@ configurations.all {
android { android {
compileSdkVersion 34 compileSdkVersion 34
// ndkVersion "24.0.8215888"
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
@ -62,7 +64,7 @@ android {
disable 'MissingTranslation' disable 'MissingTranslation'
checkReleaseBuilds false checkReleaseBuilds false
} }
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
@ -74,6 +76,11 @@ android {
multiDexEnabled true multiDexEnabled true
} }
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
signingConfigs { signingConfigs {
release { release {
keyAlias keystoreProperties['keyAlias'] keyAlias keystoreProperties['keyAlias']
@ -87,10 +94,13 @@ android {
debug { debug {
debuggable true debuggable true
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
} }
release { release {
debuggable false debuggable false
signingConfig signingConfigs.debug signingConfig signingConfigs.release
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@ -134,7 +144,7 @@ dependencies {
// }) // })
implementation 'pub.devrel:easypermissions:0.4.0' implementation 'pub.devrel:easypermissions:0.4.0'
// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' // implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
// implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0' // implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
implementation 'com.google.guava:guava:27.0.1-android' implementation 'com.google.guava:guava:27.0.1-android'
// Dependency on local binaries // Dependency on local binaries
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
@ -149,6 +159,14 @@ dependencies {
implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1" implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1"
// Native Dependency // Native Dependency
// implementation "us.zoom.videosdk:ZoomVideoSDK:1.10.11"
// implementation group: 'us.zoom.videosdk', name: 'zoomvideosdk-core', version: '1.10.11'
implementation "us.zoom.videosdk:zoomvideosdk-core:1.10.1"
implementation "us.zoom.videosdk:zoomvideosdk-annotation:1.10.1"
implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1"
implementation "org.jetbrains.anko:anko-commons:0.10.4" implementation "org.jetbrains.anko:anko-commons:0.10.4"
implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0' implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'

@ -37,5 +37,20 @@
-keep class com.opentok.otc.** { *; } -keep class com.opentok.otc.** { *; }
-keep class org.otwebrtc.** { *; } -keep class org.otwebrtc.** { *; }
##Flutter Zoom
-keep class us.zoom**{
*;
}
-keep interface us.zoom**{
*;
}
-keep class org.webrtc**{
*;
}
-keep class com.zipow**{
*;
}
-dontwarn com.opentok.android.** -dontwarn com.opentok.android.**
-dontwarn com.opentok.otc.** -dontwarn com.opentok.otc.**

@ -1,5 +1,14 @@
buildscript { buildscript {
ext.kotlin_version = '1.8.0' ext.kotlin_version = '1.8.0'
// if (System.properties['os.arch'] == "aarch64") {
// // For M1 Users we need to use the NDK 24 which added support for aarch64
// ndkVersion = "24.0.8215888"
// } else {
// // Otherwise we default to the side-by-side NDK version from AGP.
// ndkVersion = "21.4.7075529"
// }
repositories { repositories {
google() google()
jcenter() jcenter()

@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2048m org.gradle.jvmargs=-Xmx4096m
#android.enableR8=true #android.enableR8=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

@ -0,0 +1,22 @@
export const icons = {
chatSend: require('./chat-send.png'),
defaultAvatar: require('./default-avatar.png'),
locked: require('./locked.png'),
more: require('./more.png'),
mute: require('./mute.png'),
muted: require('./muted.png'),
shareOn: require('./share-on.png'),
shareOff: require('./share-off.png'),
speakerOn: require('./speaker-on.png'),
speakerOff: require('./speaker-off.png'),
switchCamera: require('./switch-camera.png'),
hamburger: require('./hamburger.png'),
questionBalloon: require('./question-ballon.png'),
talking: require('./talking.png'),
unmute: require('./unmute.png'),
unlocked: require('./unlocked.png'),
videoOn: require('./video-on.png'),
videoOff: require('./video-off.png'),
};
export type IconTypes = keyof typeof icons;

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

@ -0,0 +1,11 @@
-----BEGIN PUBLIC KEY-----
MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEApKqued5RaqBjKntLoVhj
rflB5NpGELhAftnKrXO+0lCQGm0huxWeb/KtSgniJpPQ1LXfhGKqjaZwu3zd2xsU
9D6i7Ie1QJvIJlxHwi/zKdBX7nSHx5phK+yRJF+Fnt5wieZ8bzT4Eqn31J6Cdahl
0sZDTjixl/fhM2G+E8gYNsWMihcWnMXejHdKT2yHG+rJXt4FvYYAuwIW/S75vSOM
L4CE4JS5D9UcYpNxU4Cv6KxiAAK/oQmzrrSoU9lJ6mp5wrwJDsBUgwOrXxYPct9N
FoqYgh54fs9xuh5fvHozst8wFY8Kf4hPVmOdPtcUlWQSbtRf0CehJ9yuftHmFxWX
yjyoa9X3MK7yHoZIAFXvbh1n+QUWGMNrCNIdqDtPEtjVBtSAGL5x+lxqfFMMRKJA
OfOtzjG1QDPP3EPrw/vfU2hCXZ75wlOoqEy6vmrVaYWJ5Apx0ftujtUxslSJ15Zz
CghYLtu/JolJT1Hxg5uOFpLaX3VoAs+y9e7+oRgPPVtHAgMBAAE=
-----END PUBLIC KEY-----

@ -69,6 +69,9 @@
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>"; };
762D738D274E42650063CE73 /* ring_30Sec.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = ring_30Sec.mp3; path = ../../assets/sounds/ring_30Sec.mp3; sourceTree = "<group>"; }; 762D738D274E42650063CE73 /* ring_30Sec.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = ring_30Sec.mp3; path = ../../assets/sounds/ring_30Sec.mp3; 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>"; };
7643E4062BE0D0B400BD2F25 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; 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>"; };
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; };
@ -287,6 +290,7 @@
knownRegions = ( knownRegions = (
en, en,
Base, Base,
ar,
); );
mainGroup = 97C146E51CF9000F007C117D; mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */; productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@ -442,6 +446,7 @@
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
97C146FB1CF9000F007C117D /* Base */, 97C146FB1CF9000F007C117D /* Base */,
7643E4052BE0D0B400BD2F25 /* ar */,
); );
name = Main.storyboard; name = Main.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
@ -450,6 +455,7 @@
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
97C147001CF9000F007C117D /* Base */, 97C147001CF9000F007C117D /* Base */,
7643E4062BE0D0B400BD2F25 /* ar */,
); );
name = LaunchScreen.storyboard; name = LaunchScreen.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
@ -458,6 +464,7 @@
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
E91B53A2256AAD8200E96549 /* Base */, E91B53A2256AAD8200E96549 /* Base */,
7643E4042BE0D0B400BD2F25 /* ar */,
); );
name = Main_Custom.storyboard; name = Main_Custom.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
@ -469,6 +476,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
@ -557,6 +565,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
@ -612,6 +621,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";

@ -20,13 +20,11 @@ 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:4422/'; // 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 = 'https://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 = 'http://10.20.200.111:1010/';
// 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/';
@ -346,7 +344,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
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 = 15.7; var VERSION_ID = 15.8;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;
@ -670,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'
//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";
var payFortEnvironment = FortEnvironment.production; // var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices"; // var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test; var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal { class AppGlobal {
static var context; static var context;

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -201,11 +202,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
if (AppGlobal.isNetworkDebugEnabled) { // if (AppGlobal.isNetworkDebugEnabled) {
// print("URL : $url"); print("URL : $url");
// final jsonBody = json.encode(body); final jsonBody = json.encode(body);
// print(jsonBody); print(jsonBody);
} // }
if (await Utils.checkConnection( if (await Utils.checkConnection(
bypassConnectionCheck: bypassConnectionCheck)) { bypassConnectionCheck: bypassConnectionCheck)) {
@ -559,7 +560,7 @@ class BaseAppClient {
Future navigateToAppUpdate(context, String text) async { Future navigateToAppUpdate(context, String text) async {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, locator<NavigationService>().navigatorKey.currentContext!,
MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)), MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)),
(Route<dynamic> route) => false, (Route<dynamic> route) => false,
); );

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
@ -7,18 +8,14 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/splashPage.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; 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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';
@ -90,6 +87,7 @@ class _MyApp extends State<MyApp> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
PlatformBridge.init(context); PlatformBridge.init(context);
AppGlobal.context = context;
// SystemChrome.setPreferredOrientations([ // SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp, // DeviceOrientation.portraitUp,

@ -10,7 +10,7 @@ class IncomingCallData {
String? title; String? title;
String? projectID; String? projectID;
String? notificationType; String? notificationType;
String? background; String? background; // 0 for Zoom, 1 for OpenTok
String? doctorname; String? doctorname;
String? clinicname; String? clinicname;
String? speciality; String? speciality;

@ -205,7 +205,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
callDoctorsSearchAPI() { callDoctorsSearchAPI() {
int languageID = projectViewModel.isArabic ? 1 : 2; int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<String> arr = []; List<String> arr = [];
List<String> arrDistance = []; List<String> arrDistance = [];

@ -231,7 +231,7 @@ class DoctorView extends StatelessWidget {
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
print(err); print(err);
}); });
} }

@ -462,7 +462,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// Utils.showProgressDialog(context); // Utils.showProgressDialog(context);
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, languageID, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) { this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, languageID, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) {
print("err:$err"); print("err:$err");
AppToast.showErrorToast(message: err.toString()); AppToast.showErrorToast(message: err.toString(), localContext: context);
Navigator.of(context).pop(); Navigator.of(context).pop();
}); });
} }

@ -66,7 +66,7 @@ class _SchedulePageState extends State<SchedulePage> {
this.generateWeeksSchedules(); this.generateWeeksSchedules();
} else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) { } else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) {
AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule); AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule, localContext: context);
Navigator.pop(context); Navigator.pop(context);
} }
return AppScaffold( return AppScaffold(

@ -425,7 +425,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: TranslationBase.of(context).noResultFound); AppToast.showErrorToast(message: TranslationBase.of(context).noResultFound, localContext: context);
}); });
} }
@ -500,7 +500,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
if (res['PatientDoctorAppointmentResultList'].length != 0) { if (res['PatientDoctorAppointmentResultList'].length != 0) {
getCallRequestType(); getCallRequestType();
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed); AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed, localContext: context);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -55,6 +55,7 @@ import 'package:provider/provider.dart';
class ToDo extends StatefulWidget { class ToDo extends StatefulWidget {
PatientShareResponse? patientShareResponse; PatientShareResponse? patientShareResponse;
var languageID; var languageID;
// MyInAppBrowser? browser; // MyInAppBrowser? browser;
bool? isShowAppBar = true; bool? isShowAppBar = true;
Function()? onBackClick; Function()? onBackClick;
@ -176,189 +177,206 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
title: TranslationBase.of(context).appointments, title: TranslationBase.of(context).appointments,
bodyWidget: appoList.length != 0 bodyWidget: appoList.length != 0
? ListView.builder( ? ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: appoList.length, itemCount: appoList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12), decoration: cardRadius(12),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Expanded(
padding: const EdgeInsets.only(top: 4.0), flex: 2,
child: appoList[index].clinicID == 265 child: Row(
? Container( crossAxisAlignment: CrossAxisAlignment.start,
margin: EdgeInsets.only(left: 5.0, right: 5.0), children: [
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0), Padding(
) padding: const EdgeInsets.only(top: 4.0),
: appoList[index].isLiveCareAppointment! child: appoList[index].clinicID == 265
? SvgPicture.asset("assets/images/new/virtual.svg") ? Container(
: SvgPicture.asset("assets/images/new/hospital-visit.svg"), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
)
: appoList[index].isLiveCareAppointment!
? SvgPicture.asset("assets/images/new/virtual.svg")
: SvgPicture.asset("assets/images/new/hospital-visit.svg"),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
appoList[index].clinicID == 265
? TranslationBase.of(context).covidTestTodo
: appoList[index].isLiveCareAppointment!
? TranslationBase.of(context).liveCareAppo
: TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: CountdownTimer(
controller:
new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (appoList[index].remaniningHoursTocanPay! * 1000) * 60),
widgetBuilder: (_, CurrentRemainingTime? time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} \n' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
),
),
],
),
],
),
), ),
Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: [ child: InkWell(
Padding( onTap: () {
padding: const EdgeInsets.only(left: 8.0, right: 8.0), performNextAction(appoList[index]);
child: Text( },
appoList[index].clinicID == 265 child: Container(
? TranslationBase.of(context).covidTestTodo padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
: appoList[index].isLiveCareAppointment! decoration: BoxDecoration(
? TranslationBase.of(context).liveCareAppo color: getNextActionButtonColor(appoList[index].nextAction),
: TranslationBase.of(context).walkinAppo, border: Border.all(color: Colors.white, width: 1),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), borderRadius: BorderRadius.circular(6),
), ),
Padding( child: Text(
padding: const EdgeInsets.only(left: 8.0, right: 8.0), getNextActionText(appoList[index].nextAction),
child: CountdownTimer( textAlign: TextAlign.center,
controller: style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (appoList[index].remaniningHoursTocanPay! * 1000) * 60), ),
widgetBuilder: (_, CurrentRemainingTime? time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} \n' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
), ),
), ),
], ),
), ),
], ],
), ),
), Padding(
Expanded( padding: const EdgeInsets.only(top: 8.0),
child: Container( child: Text(
child: InkWell( appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
onTap: () { style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
performNextAction(appoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: getNextActionButtonColor(appoList[index].nextAction),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
getNextActionText(appoList[index].nextAction),
textAlign: TextAlign.center,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
), ),
), ),
), Row(
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
url: appoList[index].doctorImageURL,
width: 52,
height: 52,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic), LargeAvatar(
// MyRichText(TranslationBase.of(context).appointmentDate + ": ", name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), url: appoList[index].doctorImageURL,
width: 52,
// Timezone changes height: 52,
appoList[index].isLiveCareAppointment! ),
? MyRichText( SizedBox(width: 11),
TranslationBase.of(context).appointmentDate + ": ", Expanded(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + child: Column(
" " + crossAxisAlignment: CrossAxisAlignment.start,
DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5), mainAxisSize: MainAxisSize.min,
projectViewModel.isArabic) children: <Widget>[
: MyRichText( MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic),
TranslationBase.of(context).appointmentDate + ": ", // MyRichText(TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic),
" " +
appoList[index].startTime!.substring(0, 5), // Timezone changes
projectViewModel.isArabic), appoList[index].isLiveCareAppointment!
? MyRichText(
MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic), TranslationBase.of(context).appointmentDate + ": ",
Row( DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
mainAxisAlignment: MainAxisAlignment.spaceBetween, " " +
mainAxisSize: MainAxisSize.max, DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5),
children: <Widget>[ projectViewModel.isArabic)
RatingBar( : MyRichText(
initialRating: appoList[index].actualDoctorRate.toDouble(), TranslationBase.of(context).appointmentDate + ": ",
itemSize: 16.0, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
glowColor: Color(0XFFD02127), " " +
unratedColor: Color(0XFFD02127), appoList[index].startTime!.substring(0, 5),
allowHalfRating: true, ratingWidget: RatingWidget(full:Icon(Icons.star), half: Icon(Icons.star_half), empty: Icon( Icons.star_border)), onRatingUpdate: (double value) { }, projectViewModel.isArabic),
// : Icons.star_half,
// ic: Icons.star, MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic),
// emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { }, Row(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
], mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar(
initialRating: appoList[index].actualDoctorRate.toDouble(),
itemSize: 16.0,
glowColor: Color(0XFFD02127),
unratedColor: Color(0XFFD02127),
ignoreGestures: true,
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.accentColor,
),
),
tapOnlyMode: true,
allowHalfRating: true,
onRatingUpdate: (double value) {},
// : Icons.star_half,
// ic: Icons.star,
// emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { },
),
],
),
],
),
), ),
], ],
), ),
), Padding(
], padding: const EdgeInsets.only(top: 12.0),
), child: Text(
Padding( getNextActionDescription(appoList[index].nextAction),
padding: const EdgeInsets.only(top: 12.0), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16),
child: Text( ),
getNextActionDescription(appoList[index].nextAction), ),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16), InkWell(
), onTap: () {
), navigateToAppointmentDetails(context, appoList[index]);
InkWell( },
onTap: () { child: Padding(
navigateToAppointmentDetails(context, appoList[index]); padding: const EdgeInsets.only(top: 0.0),
}, child: Text(
child: Padding( TranslationBase.of(context).moreDetails,
padding: const EdgeInsets.only(top: 0.0), style: TextStyle(
child: Text( fontSize: 10,
TranslationBase.of(context).moreDetails, fontWeight: FontWeight.w600,
style: TextStyle( color: CustomColors.accentColor,
fontSize: 10, letterSpacing: -0.48,
fontWeight: FontWeight.w600, height: 25 / 16,
color: CustomColors.accentColor, decoration: TextDecoration.underline),
letterSpacing: -0.48, ),
height: 25 / 16, ),
decoration: TextDecoration.underline), ),
), ],
), ),
), );
], },
), )
);
},
)
: getNoDataWidget(context), : getNoDataWidget(context),
), ),
), ),
@ -371,28 +389,28 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
title: TranslationBase.of(context).anicllaryOrders, title: TranslationBase.of(context).anicllaryOrders,
bodyWidget: ancillaryLists.length != 0 bodyWidget: ancillaryLists.length != 0
? Container( ? Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: ListView.separated( child: ListView.separated(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
reverse: true, reverse: true,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return DoctorCard( return DoctorCard(
onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID), onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID),
isInOutPatient: true, isInOutPatient: true,
name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""), name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""),
billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(), billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: ancillaryLists[0].projectName, subName: ancillaryLists[0].projectName,
isLiveCareAppointment: false, isLiveCareAppointment: false,
date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate), date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate),
isSortByClinic: true, isSortByClinic: true,
); );
}, },
itemCount: ancillaryLists[0].ancillaryOrderList!.length, itemCount: ancillaryLists[0].ancillaryOrderList!.length,
separatorBuilder: (context, index) => SizedBox(height: 14), separatorBuilder: (context, index) => SizedBox(height: 14),
), ),
) )
: getNoDataWidget(context), : getNoDataWidget(context),
)), )),
], ],
@ -401,104 +419,104 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
Container( Container(
child: obGyneAppoList.length != 0 child: obGyneAppoList.length != 0
? ListView.builder( ? ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: obGyneAppoList.length, itemCount: obGyneAppoList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12), decoration: cardRadius(12),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.only(top: 0.0), padding: const EdgeInsets.only(top: 0.0),
child: Container( child: Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0), child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
),
],
),
],
), ),
), Container(
Column( child: InkWell(
crossAxisAlignment: CrossAxisAlignment.start, onTap: () {
children: [ getOBGyneDoctorsList(obGyneAppoList[index].projectID!, obGyneAppoList[index].setupID!, obGyneAppoList[index]);
Padding( },
padding: const EdgeInsets.only(left: 8.0, right: 8.0), child: Container(
child: Text(TranslationBase.of(context).walkinAppo, padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), decoration: BoxDecoration(
color: CustomColors.green,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
), ),
],
),
],
),
Container(
child: InkWell(
onTap: () {
getOBGyneDoctorsList(obGyneAppoList[index].projectID!, obGyneAppoList[index].setupID!, obGyneAppoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: CustomColors.green,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
), ),
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
), ),
), ),
), Row(
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
url: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
width: 52,
height: 52,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", obGyneAppoList[index].clinicDescription!, projectViewModel.isArabic), LargeAvatar(
MyRichText( name: TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
TranslationBase.of(context).orderDate + ": ", url: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(obGyneAppoList[index].orderDate)).split(" ")[0], width: 52,
projectViewModel.isArabic), height: 52,
MyRichText(TranslationBase.of(context).branch, obGyneAppoList[index].projectDescription!, projectViewModel.isArabic), ),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", obGyneAppoList[index].clinicDescription!, projectViewModel.isArabic),
MyRichText(
TranslationBase.of(context).orderDate + ": ",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(obGyneAppoList[index].orderDate)).split(" ")[0],
projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, obGyneAppoList[index].projectDescription!, projectViewModel.isArabic),
],
),
),
], ],
), ),
), ],
], ),
), );
], },
), )
);
},
)
: getNoDataWidget(context), : getNoDataWidget(context),
), ),
], ],
@ -552,7 +570,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
performNextAction(AppoitmentAllHistoryResultList appo) { performNextAction(AppoitmentAllHistoryResultList appo) {
switch (appo.nextAction) { switch (appo.nextAction) {
case 0: case 0:
// getAppoQR(context, appo); // getAppoQR(context, appo);
break; break;
case 10: case 10:
confirmAppointment(appo); confirmAppointment(appo);
@ -1075,7 +1093,12 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse, isCashPatient: isCash, onPaymentMethodSelected: (){},), child: PaymentDialog(
appo: appo,
patientShareResponse: patientShareResponse,
isCashPatient: isCash,
onPaymentMethodSelected: () {},
),
), ),
); );
}, },
@ -1083,8 +1106,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
barrierDismissible: false, barrierDismissible: false,
barrierLabel: '', barrierLabel: '',
context: context, context: context,
pageBuilder: (context, animation1, animation2) =>SizedBox()) pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) {
.then((value) {
if (value != null) { if (value != null) {
navigateToPaymentMethod(context, value as PatientShareResponse, appo); navigateToPaymentMethod(context, value as PatientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo);
@ -1328,13 +1350,13 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: PaymentMethod( page: PaymentMethod(
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {}); setState(() {});
}, },
patientShare: widget.patientShareResponse!.patientShareWithTax))) patientShare: widget.patientShareResponse!.patientShareWithTax)))
.then((value) { .then((value) {
print(value); print(value);
selectedPaymentMethod = value[0] ?? ""; selectedPaymentMethod = value[0] ?? "";
@ -1414,26 +1436,26 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment", orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID, merchantReference: transID,
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()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo); checkPaymentStatus(appo);
}, },
projectId: appo.projectID, projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment, serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
); );
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request"); AppToast.showErrorToast(message: "An error occurred while processing your request");
@ -1472,7 +1494,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!,
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), projectViewModel.isArabic ? 1 : 2, context) Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), projectViewModel.isArabic ? 1 : 2, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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:in_app_update/in_app_update.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppUpdatePage extends StatefulWidget { class AppUpdatePage extends StatefulWidget {
@ -57,10 +58,10 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
minWidth: MediaQuery.of(context).size.width, minWidth: MediaQuery.of(context).size.width,
height: 45.0, height: 45.0,
child: CustomTextButton( child: CustomTextButton(
backgroundColor: Colors.red[800]!, backgroundColor: Colors.red[800]!,
disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38),
disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0, elevation: 0,
onPressed: () { onPressed: () {
openAppUpdateLink(); openAppUpdateLink();
}, },
@ -78,16 +79,17 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
openAppUpdateLink() { openAppUpdateLink() {
if (Platform.isAndroid) { if (Platform.isAndroid) {
// _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); // _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
// InAppUpdate.checkForUpdate().then((info) { InAppUpdate.checkForUpdate().then((info) {
// print("checkForUpdate!!!"); print("checkForUpdate!!!");
// print(info.toString()); print(info.toString());
// if (info.immediateUpdateAllowed) { if (info.immediateUpdateAllowed) {
// print("Immediate Allowed!!!"); print("Immediate Allowed!!!");
// InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
// } }
// }).catchError((e) { }).catchError((e) {
// print(e.toString()); print(e.toString());
// }); _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
});
} }
if (Platform.isIOS) { if (Platform.isIOS) {
_launchURL("https://itunes.apple.com/app/id733503978"); _launchURL("https://itunes.apple.com/app/id733503978");

@ -154,7 +154,7 @@ class _CallScreenState extends State<CallScreen> {
var videoOn = await mySelf.videoStatus?.isOn(); var videoOn = await mySelf.videoStatus?.isOn();
var speakerOn = await zoom.audioHelper.getSpeakerStatus(); var speakerOn = await zoom.audioHelper.getSpeakerStatus();
// fullScreenUser.value = mySelf; // fullScreenUser.value = mySelf;
fullScreenUser.value = remoteUsers![0]; fullScreenUser.value = remoteUsers!.isNotEmpty ? remoteUsers![0] : mySelf;
remoteUsers?.insert(0, mySelf); remoteUsers?.insert(0, mySelf);
users.value = remoteUsers!; users.value = remoteUsers!;
isMuted.value = muted!; isMuted.value = muted!;
@ -168,6 +168,8 @@ class _CallScreenState extends State<CallScreen> {
isInSession.value = false; isInSession.value = false;
users.value = <ZoomVideoSdkUser>[]; users.value = <ZoomVideoSdkUser>[];
fullScreenUser.value = null; fullScreenUser.value = null;
await zoom.leaveSession(false);
Navigator.pop(context);
}); });
final sessionNeedPasswordListener = emitter.on(EventType.onSessionNeedPassword, (data) async { final sessionNeedPasswordListener = emitter.on(EventType.onSessionNeedPassword, (data) async {
@ -265,6 +267,7 @@ class _CallScreenState extends State<CallScreen> {
List<ZoomVideoSdkUser> remoteUserList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); List<ZoomVideoSdkUser> remoteUserList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList();
remoteUserList.insert(0, mySelf!); remoteUserList.insert(0, mySelf!);
users.value = remoteUserList; users.value = remoteUserList;
fullScreenUser.value = remoteUserList[1];
}); });
final userLeaveListener = emitter.on(EventType.onUserLeave, (data) async { final userLeaveListener = emitter.on(EventType.onUserLeave, (data) async {
@ -330,43 +333,45 @@ class _CallScreenState extends State<CallScreen> {
ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf();
if (data['status'] == RecordingStatus.Start) { if (data['status'] == RecordingStatus.Start) {
if (mySelf != null && !mySelf.isHost!) { if (mySelf != null && !mySelf.isHost!) {
showDialog<String>( await zoom.acceptRecordingConsent();
context: context, // isRecordingStarted.value = true;
builder: (BuildContext context) => AlertDialog( // showDialog<String>(
content: const Text('The session is being recorded.'), // context: context,
actions: <Widget>[ // builder: (BuildContext context) => AlertDialog(
TextButton( // content: const Text('The session is being recorded.'),
onPressed: () async { // actions: <Widget>[
await zoom.acceptRecordingConsent(); // TextButton(
// if (context.mounted) { // onPressed: () async {
Navigator.pop(context); // await zoom.acceptRecordingConsent();
// }; // // if (context.mounted) {
}, // Navigator.pop(context);
child: const Text('accept'), // // };
), // },
TextButton( // child: const Text('accept'),
onPressed: () async { // ),
String currentConsentType = await zoom.getRecordingConsentType(); // TextButton(
if (currentConsentType == ConsentType.ConsentType_Individual) { // onPressed: () async {
await zoom.declineRecordingConsent(); // String currentConsentType = await zoom.getRecordingConsentType();
Navigator.pop(context); // if (currentConsentType == ConsentType.ConsentType_Individual) {
} else { // await zoom.declineRecordingConsent();
await zoom.declineRecordingConsent(); // Navigator.pop(context);
zoom.leaveSession(false); // } else {
// if (!context.mounted) return; // await zoom.declineRecordingConsent();
// Navigator.popAndPushNamed( // zoom.leaveSession(false);
// context, // // if (!context.mounted) return;
// "Join", // // Navigator.popAndPushNamed(
// arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), // // context,
// ); // // "Join",
Navigator.pop(context); // // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role),
} // // );
}, // Navigator.pop(context);
child: const Text('decline'), // }
), // },
], // child: const Text('decline'),
), // ),
); // ],
// ),
// );
} }
isRecordingStarted.value = true; isRecordingStarted.value = true;
} else { } else {
@ -1153,79 +1158,81 @@ class _CallScreenState extends State<CallScreen> {
void onLeaveSession(bool isEndSession) async { void onLeaveSession(bool isEndSession) async {
await zoom.leaveSession(isEndSession); await zoom.leaveSession(isEndSession);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); // Navigator.pop(context);
} }
void showLeaveOptions() async { void showLeaveOptions() async {
ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf();
bool isHost = await mySelf!.getIsHost(); bool isHost = await mySelf!.getIsHost();
Widget endSession; onLeaveSession(true);
Widget leaveSession;
Widget cancel = TextButton( // Widget endSession;
child: const Text('Cancel'), // Widget leaveSession;
onPressed: () { // Widget cancel = TextButton(
Navigator.pop(context); //close Dialog // child: const Text('Cancel'),
}, // onPressed: () {
); // Navigator.pop(context); //close Dialog
// },
switch (defaultTargetPlatform) { // );
case TargetPlatform.android:
endSession = TextButton( // switch (defaultTargetPlatform) {
child: const Text('End Session'), // case TargetPlatform.android:
onPressed: () => onLeaveSession(true), // endSession = TextButton(
); // child: const Text('End Session'),
leaveSession = TextButton( // onPressed: () => onLeaveSession(true),
child: const Text('Leave Session'), // );
onPressed: () => onLeaveSession(false), // leaveSession = TextButton(
); // child: const Text('Leave Session'),
break; // onPressed: () => onLeaveSession(false),
default: // );
endSession = CupertinoActionSheetAction( // break;
isDestructiveAction: true, // default:
child: const Text('End Session'), // endSession = CupertinoActionSheetAction(
onPressed: () => onLeaveSession(true), // isDestructiveAction: true,
); // child: const Text('End Session'),
leaveSession = CupertinoActionSheetAction( // onPressed: () => onLeaveSession(true),
child: const Text('Leave Session'), // );
onPressed: () => onLeaveSession(false), // leaveSession = CupertinoActionSheetAction(
); // child: const Text('Leave Session'),
break; // onPressed: () => onLeaveSession(false),
} // );
// break;
List<Widget> options = [ // }
leaveSession, //
cancel, // List<Widget> options = [
]; // leaveSession,
// cancel,
if (Platform.isAndroid) { // ];
if (isHost) { //
options.removeAt(1); // if (Platform.isAndroid) {
options.insert(0, endSession); // if (isHost) {
} // options.removeAt(1);
showDialog( // options.insert(0, endSession);
context: context, // }
builder: (context) { // showDialog(
return AlertDialog( // context: context,
content: const Text("Do you want to leave this session?"), // builder: (context) {
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), // return AlertDialog(
actions: options, // content: const Text("Do you want to leave this session?"),
); // shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))),
}); // actions: options,
} else { // );
options.removeAt(1); // });
if (isHost) { // } else {
options.insert(1, endSession); // options.removeAt(1);
} // if (isHost) {
showCupertinoModalPopup( // options.insert(1, endSession);
context: context, // }
builder: (context) => CupertinoActionSheet( // showCupertinoModalPopup(
message: const Text('Are you sure that you want to leave the call?'), // context: context,
actions: options, // builder: (context) => CupertinoActionSheet(
cancelButton: cancel, // message: const Text('Are you sure that you want to leave the call?'),
), // actions: options,
); // cancelButton: cancel,
} // ),
// );
// }
} }
final chatMessageController = TextEditingController(); final chatMessageController = TextEditingController();
@ -1350,154 +1357,154 @@ class _CallScreenState extends State<CallScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( // Container(
height: 70, // height: 70,
width: 150, // width: 150,
margin: const EdgeInsets.only(top: 16, left: 8), // margin: const EdgeInsets.only(top: 16, left: 8),
padding: const EdgeInsets.all(8), // padding: const EdgeInsets.all(8),
alignment: Alignment.topLeft, // alignment: Alignment.topLeft,
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8.0)), // borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: buttonBackgroundColor, // color: buttonBackgroundColor,
), // ),
child: InkWell( // child: InkWell(
onTap: () async { // onTap: () async {
showDialog( // showDialog(
context: context, // context: context,
builder: (context) { // builder: (context) {
return Dialog( // return Dialog(
elevation: 0.0, // elevation: 0.0,
insetPadding: const EdgeInsets.symmetric(horizontal: 40), // insetPadding: const EdgeInsets.symmetric(horizontal: 40),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
child: SizedBox( // child: SizedBox(
height: 280, // height: 280,
width: 200, // width: 200,
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, // crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ // children: [
ListView( // ListView(
shrinkWrap: true, // shrinkWrap: true,
children: ListTile.divideTiles( // children: ListTile.divideTiles(
context: context, // context: context,
tiles: [ // tiles: [
ListTile( // ListTile(
title: Text( // title: Text(
'Session Information', // 'Session Information',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 18, // fontSize: 18,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
), // ),
), // ),
), // ),
), // ),
ListTile( // ListTile(
title: Text( // title: Text(
'Session Name', // 'Session Name',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 14, // fontSize: 14,
), // ),
), // ),
), // ),
subtitle: Text( // subtitle: Text(
sessionName.value, // sessionName.value,
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 12, // fontSize: 12,
), // ),
), // ),
), // ),
), // ),
ListTile( // ListTile(
title: Text( // title: Text(
'Session Password', // 'Session Password',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 14, // fontSize: 14,
), // ),
), // ),
), // ),
subtitle: Text( // subtitle: Text(
sessionPassword.value, // sessionPassword.value,
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 12, // fontSize: 12,
), // ),
), // ),
), // ),
), // ),
ListTile( // ListTile(
title: Text( // title: Text(
'Participants', // 'Participants',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 14, // fontSize: 14,
), // ),
), // ),
), // ),
subtitle: Text( // subtitle: Text(
'${users.value.length}', // '${users.value.length}',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 12, // fontSize: 12,
), // ),
), // ),
), // ),
), // ),
], // ],
).toList(), // ).toList(),
), // ),
], // ],
), // ),
)); // ));
}); // });
}, // },
child: Stack( // child: Stack(
children: [ // children: [
Column( // // Column(
children: [ // // children: [
const Padding(padding: EdgeInsets.symmetric(vertical: 3)), // // const Padding(padding: EdgeInsets.symmetric(vertical: 3)),
Align( // // Align(
alignment: Alignment.centerLeft, // // alignment: Alignment.centerLeft,
child: Text( // // child: Text(
sessionName.value, // // sessionName.value,
overflow: TextOverflow.ellipsis, // // overflow: TextOverflow.ellipsis,
style: GoogleFonts.lato( // // style: GoogleFonts.lato(
textStyle: const TextStyle( // // textStyle: const TextStyle(
fontSize: 14, // // fontSize: 14,
fontWeight: FontWeight.w600, // // fontWeight: FontWeight.w600,
color: Colors.white, // // color: Colors.white,
), // // ),
), // // ),
), // // ),
), // // ),
const Padding(padding: EdgeInsets.symmetric(vertical: 5)), // // const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
Align( // // Align(
alignment: Alignment.centerLeft, // // alignment: Alignment.centerLeft,
child: Text( // // child: Text(
"Participants: ${users.value.length}", // // "Participants: ${users.value.length}",
style: GoogleFonts.lato( // // style: GoogleFonts.lato(
textStyle: const TextStyle( // // textStyle: const TextStyle(
fontSize: 14, // // fontSize: 14,
fontWeight: FontWeight.w600, // // fontWeight: FontWeight.w600,
color: Colors.white, // // color: Colors.white,
), // // ),
), // // ),
), // // ),
) // // )
], // // ],
), // // ),
// Container( // // Container(
// alignment: Alignment.centerRight, // // alignment: Alignment.centerRight,
// child: Image.asset( // // child: Image.asset(
// "assets/icons/unlocked@2x.png", // // "assets/icons/unlocked@2x.png",
// height: 22, // // height: 22,
// )), // // )),
], // ],
), // ),
), // ),
), // ),
TextButton( TextButton(
onPressed: (showLeaveOptions), onPressed: (showLeaveOptions),
child: Container( child: Container(
@ -1544,7 +1551,11 @@ class _CallScreenState extends State<CallScreen> {
IconButton( IconButton(
onPressed: onPressCameraChange, onPressed: onPressCameraChange,
iconSize: circleButtonSize, iconSize: circleButtonSize,
icon: const Icon(Icons.cameraswitch_sharp, size: 45.0, color: Colors.white,), icon: const Icon(
Icons.cameraswitch_sharp,
size: 45.0,
color: Colors.white,
),
), ),
// IconButton( // IconButton(
// onPressed: onPressMore, // onPressed: onPressMore,

@ -28,6 +28,7 @@ String generateJwt(String sessionName, String roleType) {
'tpc': sessionName, 'tpc': sessionName,
'role_type': int.parse(roleType), 'role_type': int.parse(roleType),
'cloud_recording_option': 1, 'cloud_recording_option': 1,
'cloud_recording_election': 1,
}, },
); );
var token = jwt.sign(SecretKey(configs["ZOOM_SDK_SECRET"])); var token = jwt.sign(SecretKey(configs["ZOOM_SDK_SECRET"]));

@ -49,12 +49,13 @@ class _HomePageState2 extends State<HomePage2> {
HomePageFragment2( HomePageFragment2(
model, model,
onLoginClick: () { onLoginClick: () {
// widget.onLoginClick!(); widget.onLoginClick!();
Navigator.pushNamed(
context, // Navigator.pushNamed(
"zoom_call_page", // context,
arguments: CallArguments("hoover-dam-4", "", "Patient", "40", "0", true), // "zoom_call_page",
); // arguments: CallArguments("h9qkpf02", "123", "Patient", "40", "1", false),
// );
}, },
onPharmacyClick: () { onPharmacyClick: () {
// getPharmacyToken(model); // getPharmacyToken(model);

@ -322,15 +322,20 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// HMGNetworkConnectivity(context).start(); // HMGNetworkConnectivity(context).start();
_firebaseMessaging.getToken().then((String? token) { _firebaseMessaging.getToken().then((String? token) {
// print("Firebase Token: " + token!); print("Firebase Token: " + token!);
// sharedPref.setString(PUSH_TOKEN, token!); sharedPref.setString(PUSH_TOKEN, token!);
// if (Platform.isIOS) { if (Platform.isIOS) {
// voIPKit.getVoIPToken().then((value) { FirebaseMessaging.instance.getAPNSToken().then((value) {
// print('🎈 example: getVoIPToken: $value'); print("Push APNS getToken: " + value!);
// AppSharedPreferences().setString(APNS_TOKEN, value!); AppSharedPreferences().setString(APNS_TOKEN, value);
// // getOneSignalVOIPToken(value); AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value);
// }); });
// } // voIPKit.getVoIPToken().then((value) {
// print('🎈 example: getVoIPToken: $value');
// AppSharedPreferences().setString(APNS_TOKEN, value!);
// // getOneSignalVOIPToken(value);
// });
}
if (token != null) { if (token != null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
if (!projectViewModel.isLoginChild) { if (!projectViewModel.isLoginChild) {
@ -394,8 +399,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} else { } else {
// AppGlobal.context = context; // AppGlobal.context = context;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) { authService.selectDeviceImei(DEVICE_TOKEN).then((value) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
var data = await sharedPref.getObject(IMEI_USER_DATA);
if (value != null) { if (value != null) {
setUserValues(value); setUserValues(value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN); Navigator.of(context).pushNamed(CONFIRM_LOGIN);
@ -732,7 +738,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
if (Platform.isIOS) { if (Platform.isIOS) {
String voipToken = await sharedPref.getString(APNS_TOKEN); String voipToken = await sharedPref.getString(APNS_TOKEN);
getOneSignalVOIPToken(voipToken); // getOneSignalVOIPToken(voipToken);
} }
// registerGeofences(); // registerGeofences();
} }

@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:camera/camera.dart'; import 'package:camera/camera.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/conference/widgets/platform_exception_alert_dialog.dart'; import 'package:diplomaticquarterapp/pages/conference/widgets/platform_exception_alert_dialog.dart';
import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart'; import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart';
import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart';
@ -16,11 +17,10 @@ import 'package:just_audio/just_audio.dart';
import '../../config/config.dart'; import '../../config/config.dart';
class IncomingCall extends StatefulWidget { class IncomingCall extends StatefulWidget {
IncomingCallData? incomingCallData; IncomingCallData? incomingCallData;
IncomingCall({ this.incomingCallData}); IncomingCall({this.incomingCallData});
@override @override
_IncomingCallState createState() => _IncomingCallState(); _IncomingCallState createState() => _IncomingCallState();
@ -34,6 +34,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
late CameraController _controller; late CameraController _controller;
late Future<void> _initializeControllerFuture; late Future<void> _initializeControllerFuture;
bool isCameraReady = false; bool isCameraReady = false;
// Signaling signaling = Signaling()..init(); // Signaling signaling = Signaling()..init();
@override @override
@ -59,140 +60,138 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
isShowDecPage: false, isShowDecPage: false,
body: Stack( body: Stack(alignment: FractionalOffset.center, children: <Widget>[
alignment: FractionalOffset.center, // new Positioned.fill(
children: <Widget>[ // child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
// new Positioned.fill( // ),
// child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)), new Positioned.fill(
// ), child: new ClipRect(
new Positioned.fill( // child: new BackdropFilter(
child: new ClipRect( // filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
// child: new BackdropFilter( child: new Container(
// filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), decoration: new BoxDecoration(color: Colors.grey[800]!.withOpacity(0.8)),
child: new Container( child: Column(
decoration: new BoxDecoration(color: Colors.grey[800]!.withOpacity(0.8)), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start, children: [
mainAxisSize: MainAxisSize.max, Container(
children: [ margin: const EdgeInsets.all(21.0),
Container( child: Row(
margin: const EdgeInsets.all(21.0), children: [
child: Row( Image.asset(
children: [ "assets/images/new/logo.png",
Image.asset( height: 70,
"assets/images/new/logo.png", width: 70,
height: 70, ),
width: 70, Container(
), margin: const EdgeInsets.only(left: 10.0, right: 10.0),
Container( child: Column(
margin: const EdgeInsets.only(left: 10.0, right: 10.0), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceAround,
mainAxisSize: MainAxisSize.min, children: [
mainAxisAlignment: MainAxisAlignment.spaceAround, Text(
children: [ widget.incomingCallData!.doctorname!,
Text( style: TextStyle(fontSize: 21, fontWeight: FontWeight.bold, color: Colors.white, letterSpacing: -1.26, height: 23 / 12),
widget.incomingCallData!.doctorname!,
style: TextStyle(fontSize: 21, fontWeight: FontWeight.bold, color: Colors.white, letterSpacing: -1.26, height: 23 / 12),
),
Text(
TranslationBase.of(context).videoAppo,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xffC6C6C6), letterSpacing: -0.48, height: 23 / 24),
),
SizedBox(height: 2),
],
),
),
],
), ),
), Text(
Container( TranslationBase.of(context).videoAppo,
margin: const EdgeInsets.all(21.0), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xffC6C6C6), letterSpacing: -0.48, height: 23 / 24),
width: MediaQuery.of(context).size.width,
decoration: cardRadius(15.0, color: Colors.black),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 6.0),
child: Text(
TranslationBase.of(context).appoInfo,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 23 / 12),
),
),
Container(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
child: Text(
widget.incomingCallData!.appointmentdate! + ", " + widget.incomingCallData!.appointmenttime!,
style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
),
),
Container(
padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 21.0),
child: Text(
widget.incomingCallData!.clinicname!,
style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
),
),
],
), ),
), SizedBox(height: 2),
Spacer(), ],
Container( ),
margin: EdgeInsets.only(bottom: 70.0, left: 49, right: 49), ),
child: Row( ],
mainAxisSize: MainAxisSize.max, ),
mainAxisAlignment: MainAxisAlignment.spaceBetween, ),
children: <Widget>[ Container(
RotationTransition( margin: const EdgeInsets.all(21.0),
turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController), width: MediaQuery.of(context).size.width,
child: Container( decoration: cardRadius(15.0, color: Colors.black),
child: RawMaterialButton( child: Column(
onPressed: () { crossAxisAlignment: CrossAxisAlignment.start,
_submit(); mainAxisSize: MainAxisSize.min,
}, children: [
elevation: 2.0, Container(
fillColor: Colors.green, padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 6.0),
child: Icon( child: Text(
Icons.call, TranslationBase.of(context).appoInfo,
color: Colors.white, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 23 / 12),
size: 35.0, ),
), ),
padding: EdgeInsets.all(15.0), Container(
shape: CircleBorder(), padding: const EdgeInsets.only(left: 16.0, right: 16.0),
), child: Text(
)), widget.incomingCallData!.appointmentdate! + ", " + widget.incomingCallData!.appointmenttime!,
Container( style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
child: RawMaterialButton( ),
onPressed: () { ),
backToHome(); Container(
}, padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 21.0),
elevation: 2.0, child: Text(
fillColor: Colors.red, widget.incomingCallData!.clinicname!,
child: Icon( style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
Icons.call_end, ),
color: Colors.white, ),
size: 35.0, ],
), ),
padding: EdgeInsets.all(15.0), ),
shape: CircleBorder(), Spacer(),
), Container(
), margin: EdgeInsets.only(bottom: 70.0, left: 49, right: 49),
], child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
RotationTransition(
turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController),
child: Container(
child: RawMaterialButton(
onPressed: () {
_submit();
},
elevation: 2.0,
fillColor: Colors.green,
child: Icon(
Icons.call,
color: Colors.white,
size: 35.0,
),
padding: EdgeInsets.all(15.0),
shape: CircleBorder(),
), ),
)),
Container(
child: RawMaterialButton(
onPressed: () {
backToHome();
},
elevation: 2.0,
fillColor: Colors.red,
child: Icon(
Icons.call_end,
color: Colors.white,
size: 35.0,
), ),
], padding: EdgeInsets.all(15.0),
shape: CircleBorder(),
),
), ),
), ],
), ),
), ),
// ), ],
] ),
),
),
),
// ),
]
// } else { // } else {
// return const Center(child: CircularProgressIndicator()); // return const Center(child: CircularProgressIndicator());
// } // }
), ),
); );
} }
@ -213,31 +212,34 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
// backToHome(); // backToHome();
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity); // final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
// await _controller.dispose(); // await _controller.dispose();
changeCallStatusAPI(4);
await Navigator.of(context).pushReplacement(
MaterialPageRoute(
// fullscreenDialog: true,
builder: (BuildContext context) {
// final caller = widget.incomingCallData.callerID;
// final receiver = widget.incomingCallData.receiverID;
// final host = widget.incomingCallData.server;
// if(widget.incomingCallData.isWebRTC == "true"){
// return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host);
// }else{
return OpenTokConnectCallPage(
apiKey: OPENTOK_API_KEY,
sessionId: widget.incomingCallData!.sessionId!,
token: widget.incomingCallData!.token!
);
// }
// return VideoCallWebPage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // Web WebRTC VideoCall
// return CallHomePage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // App WebRTC VideoCall LandingPage.isOpenCallPage = false;
player.stop();
changeCallStatusAPI(4);
}, if (widget.incomingCallData!.background == "0") {
), // Navigator.of(context).pop();
); Navigator.pushReplacementNamed(
context,
"zoom_call_page",
arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false),
);
} else {
await Navigator.of(context).pushReplacement(
MaterialPageRoute(
// fullscreenDialog: true,
builder: (BuildContext context) {
// final caller = widget.incomingCallData.callerID;
// final receiver = widget.incomingCallData.receiverID;
// final host = widget.incomingCallData.server;
// if(widget.incomingCallData.isWebRTC == "true"){
// return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host);
// }else{
return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.incomingCallData!.sessionId!, token: widget.incomingCallData!.token!);
},
),
);
}
} catch (err) { } catch (err) {
print(err); print(err);
await PlatformExceptionAlertDialog( await PlatformExceptionAlertDialog(
@ -248,8 +250,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
void changeCallStatusAPI(int sessionStatus) { void changeCallStatusAPI(int sessionStatus) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
service.endCallAPI(widget.incomingCallData!.sessionId!, sessionStatus, context).then((res) { service.endCallAPI(widget.incomingCallData!.sessionId!, sessionStatus, context).then((res) {}).catchError((err) {
}).catchError((err) {
print(err); print(err);
}); });
} }

@ -40,6 +40,7 @@ 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';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -145,7 +146,7 @@ class _clinic_listState extends State<ClinicList> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
isError = true; isError = true;
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
}); });
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName); projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
} }
@ -666,7 +667,7 @@ class _clinic_listState extends State<ClinicList> {
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
print(err); print(err);
}); });
} }

@ -788,7 +788,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
sharedPref.remove(FAMILY_FILE), sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false, result.list.isFamily = false,
userData = result.list, userData = result.list,
sharedPref.setString(BLOOD_TYPE, result.patientBloodType), sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
//Remove o+ from here Added by Aamir //Remove o+ from here Added by Aamir
authenticatedUserObject.user = result.list, authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res), projectViewModel.setPrivilege(privilegeList: res),

@ -78,7 +78,7 @@ class ContactLensPage extends StatelessWidget {
), ),
), ),
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription!.brand}'), getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription!.brand}'),
getRow('B.C', '${listHISGetContactLensPerscription!.baseCurve!}'), getRow('B.C', '${listHISGetContactLensPerscription!.baseCurve ?? "-"}'),
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription!.power}'), getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription!.power}'),
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription!.diameter}'), getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription!.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription!.oZ}'), getRow('OZ', '${listHISGetContactLensPerscription!.oZ}'),

@ -65,7 +65,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
isSortByClinic: false, isSortByClinic: false,
isInOutPatient: model.sickLeaveList[index].isInOutPatient, isInOutPatient: model.sickLeaveList[index].isInOutPatient,
isSickLeave: true, isSickLeave: true,
sickLeaveStatus: model.sickLeaveList[index].status!, sickLeaveStatus: model.sickLeaveList[index].status ?? 0,
onEmailTap: () { onEmailTap: () {
showConfirmMessage(model, index); showConfirmMessage(model, index);
}, },

@ -45,12 +45,12 @@ class PrescriptionDetailsPageINP extends StatelessWidget {
prescriptions.doctorName!, prescriptions.doctorName!,
prescriptions.doctorID!, prescriptions.doctorID!,
prescriptions.doctorImageURL!, prescriptions.doctorImageURL!,
prescriptions.speciality!, prescriptions.speciality ?? [""],
"", "",
prescriptions.name!, prescriptions.name!,
DateUtil.convertStringToDate(prescriptions.appointmentDate!), DateUtil.convertStringToDate(prescriptions.appointmentDate!),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions.appointmentDate!)), DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions.appointmentDate!)),
prescriptions.nationalityFlagURL!, prescriptions.nationalityFlagURL ?? "",
prescriptions.doctorRate, prescriptions.doctorRate,
prescriptions.actualDoctorRate, prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate, prescriptions.noOfPatientsRate,

@ -65,7 +65,7 @@ class PrescriptionItemsPage extends StatelessWidget {
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,
prescriptions.actualDoctorRate, prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate, prescriptions.noOfPatientsRate,

@ -67,6 +67,7 @@ class RadiologyDetailsPage extends StatelessWidget {
}, },
buttonTitle: TranslationBase.of(context).sendCopyRad, buttonTitle: TranslationBase.of(context).sendCopyRad,
isNeedToShowButton: projectViewModel.havePrivilege(8), isNeedToShowButton: projectViewModel.havePrivilege(8),
showConfirmMessageDialog: false,
), ),
Container( Container(
margin: EdgeInsets.all(24), margin: EdgeInsets.all(24),

@ -1,6 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
@ -22,7 +22,7 @@ class SmartWatchInstructions extends StatefulWidget {
} }
class _SmartWatchInstructionsState extends State<SmartWatchInstructions> { class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
CarouselController buttonCarouselController = CarouselController(); // CarouselController buttonCarouselController = CarouselController();
bool hasAlreadySynced = false; bool hasAlreadySynced = false;

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart' as grid_view; // import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart' as grid_view;
import 'CreateCustomerDailogPage.dart'; import 'CreateCustomerDailogPage.dart';
@ -37,8 +37,7 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayou
if (viewModel!.service.customer != null) { if (viewModel!.service.customer != null) {
var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service!.customer!.id); var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service!.customer!.id);
await viewModel!.service.addProductToCart(request, context: context).then((response) { await viewModel!.service.addProductToCart(request, context: context).then((response) {}).catchError((error) {
}).catchError((error) {
utils.Utils.showErrorToast(error); utils.Utils.showErrorToast(error);
}); });
} }
@ -73,21 +72,22 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayou
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
child:grid_view.AlignedGridView.count( // child: grid_view.AlignedGridView.count(
crossAxisCount: 4, // crossAxisCount: 4,
itemCount: _products.length, // itemCount: _products.length,
itemBuilder: (BuildContext context, int index) => new Container( // itemBuilder: (BuildContext context, int index) => new Container(
color: Colors.transparent, // color: Colors.transparent,
child: PackagesItemCard( // child: PackagesItemCard(
itemContentPadding: 10, // itemContentPadding: 10,
itemModel: _products[index], // itemModel: _products[index],
onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel){}, // onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel) {},
)), // )),
// staggeredTileBuilder: (int index) => StaggeredTile.fit(2), // // staggeredTileBuilder: (int index) => StaggeredTile.fit(2),
mainAxisSpacing: 20, // mainAxisSpacing: 20,
crossAxisSpacing: 10, // crossAxisSpacing: 10,
)), // ),
),
), ),
); );
} }

@ -1,5 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
@ -32,47 +32,47 @@ class _BannerPagerState extends State<BannerPager> {
return Container( return Container(
child: Column( child: Column(
children: [ children: [
CarouselSlider( // CarouselSlider(
options: CarouselOptions( // options: CarouselOptions(
aspectRatio: 5 / 2, // aspectRatio: 5 / 2,
enlargeCenterPage: true, // enlargeCenterPage: true,
enableInfiniteScroll: false, // enableInfiniteScroll: false,
viewportFraction: 1.0, // viewportFraction: 1.0,
initialPage: 0, // initialPage: 0,
autoPlay: true, // autoPlay: true,
autoPlayInterval: Duration(seconds: 3), // autoPlayInterval: Duration(seconds: 3),
autoPlayAnimationDuration: Duration(milliseconds: 800), // autoPlayAnimationDuration: Duration(milliseconds: 800),
autoPlayCurve: Curves.decelerate, // autoPlayCurve: Curves.decelerate,
onPageChanged: (index, reason) { // onPageChanged: (index, reason) {
setState(() { // setState(() {
_current = index; // _current = index;
}); // });
}, // },
), // ),
items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed( // items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed(
(item, index) { // (item, index) {
return InkWell( // return InkWell(
onTap: () { // onTap: () {
bannerNavigator(index); // bannerNavigator(index);
}, // },
child: Container( // child: Container(
margin: EdgeInsets.symmetric(horizontal: 1.0), // margin: EdgeInsets.symmetric(horizontal: 1.0),
child: ClipRRect( // child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5.0)), // borderRadius: BorderRadius.all(Radius.circular(5.0)),
child: Center( // child: Center(
child: index == 0 || index == 1 // child: index == 0 || index == 1
? Image.asset( // ? Image.asset(
item, // item,
fit: BoxFit.cover, // fit: BoxFit.cover,
) // )
: CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()), // : CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()),
), // ),
), // ),
), // ),
); // );
}, // },
).toList(), // ).toList(),
), // ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Row( child: Row(

@ -1,4 +1,4 @@
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -24,231 +24,231 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
return Container( return Container(
child: Stack( child: Stack(
children: [ children: [
CarouselSlider( // CarouselSlider(
options: CarouselOptions( // options: CarouselOptions(
enableInfiniteScroll: false, // enableInfiniteScroll: false,
enlargeCenterPage: false, // enlargeCenterPage: false,
viewportFraction: 1.0, // viewportFraction: 1.0,
scrollPhysics: widget.isLacumHomePage // scrollPhysics: widget.isLacumHomePage
? ScrollPhysics() // ? ScrollPhysics()
: NeverScrollableScrollPhysics(), // : NeverScrollableScrollPhysics(),
initialPage: 0, // initialPage: 0,
onPageChanged: (index, reason) { // onPageChanged: (index, reason) {
setState(() { // setState(() {
_current = index; // _current = index;
}); // });
}, // },
), // ),
items: [ // items: [
Container( // Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Container( // Container(
margin: EdgeInsets.fromLTRB(12, 75, 12, 0), // margin: EdgeInsets.fromLTRB(12, 75, 12, 0),
child: Column( // child: Column(
children: [ // children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
"${widget.model.lacumInformation!.yahalaAccountNo}", // "${widget.model.lacumInformation!.yahalaAccountNo}",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
BorderedButton( // BorderedButton(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
? TranslationBase.of(context).active // ? TranslationBase.of(context).active
: TranslationBase.of(context).inactive, // : TranslationBase.of(context).inactive,
textColor: widget.model.lacumInformation! // textColor: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
hasBorder: true, // hasBorder: true,
borderColor: widget.model.lacumInformation! // borderColor: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
radius: 16, // radius: 16,
rPadding: 16, // rPadding: 16,
icon: widget.model.lacumInformation! // icon: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Icon( // ? Icon(
Icons.check_circle, // Icons.check_circle,
size: 25, // size: 25,
color: Colors.green, // color: Colors.green,
) // )
: Image.asset( // : Image.asset(
"assets/images/pharmacy_module/lakum/inactive_cross.png", // "assets/images/pharmacy_module/lakum/inactive_cross.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: 25, // width: 25,
height: 25, // height: 25,
), // ),
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts(TranslationBase.of(context).identificationNumber, // Texts(TranslationBase.of(context).identificationNumber,
// "IDENTIFICATION #", // // "IDENTIFICATION #",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation! // widget.model.lacumInformation!
.identificationNo, // .identificationNo,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts(TranslationBase.of(context).MEMBERSINCE, // Texts(TranslationBase.of(context).MEMBERSINCE,
// "MEMBER SINCE", // // "MEMBER SINCE",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.formatCreatedDateToString(), // widget.model.formatCreatedDateToString(),
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts(TranslationBase.of(context).lakumMobile, // Texts(TranslationBase.of(context).lakumMobile,
// "MOBILE #", // // "MOBILE #",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts( // Texts(
TranslationBase.of(context).language, // TranslationBase.of(context).language,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation!.prefLang == // widget.model.lacumInformation!.prefLang ==
"2" // "2"
? TranslationBase.of(context).lanEnglish // ? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic, // : TranslationBase.of(context).lanArabic,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
], // ],
), // ),
), // ),
], // ],
), // ),
), // ),
widget.isLacumHomePage // widget.isLacumHomePage
? Container( // ? Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Center( // Center(
child: Container( // child: Container(
margin: EdgeInsets.fromLTRB(5, 70, 5, 4), // margin: EdgeInsets.fromLTRB(5, 70, 5, 4),
child: widget.model.convertBase64ToBarCodeImage() != // child: widget.model.convertBase64ToBarCodeImage() !=
null // null
? Image.memory( // ? Image.memory(
widget.model.convertBase64ToBarCodeImage(), // widget.model.convertBase64ToBarCodeImage(),
fit: BoxFit.fill, // fit: BoxFit.fill,
height: 100.0, // height: 100.0,
width: 180.0 // width: 180.0
) // )
: Container(), // : Container(),
), // ),
), // ),
], // ],
), // ),
) // )
: Container(), // : Container(),
], // ],
), // ),
widget.isLacumHomePage widget.isLacumHomePage
? Positioned( ? Positioned(
bottom: 1, bottom: 1,

@ -1,4 +1,4 @@
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -24,225 +24,225 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
return Container( return Container(
child: Stack( child: Stack(
children: [ children: [
CarouselSlider( // CarouselSlider(
options: CarouselOptions( // options: CarouselOptions(
enableInfiniteScroll: false, // enableInfiniteScroll: false,
enlargeCenterPage: false, // enlargeCenterPage: false,
viewportFraction: 1.0, // viewportFraction: 1.0,
scrollPhysics: widget.isLacumHomePage // scrollPhysics: widget.isLacumHomePage
? ScrollPhysics() // ? ScrollPhysics()
: NeverScrollableScrollPhysics(), // : NeverScrollableScrollPhysics(),
initialPage: 0, // initialPage: 0,
onPageChanged: (index, reason) { // onPageChanged: (index, reason) {
setState(() { // setState(() {
_current = index; // _current = index;
}); // });
}, // },
), // ),
items: [ // items: [
Container( // Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Container( // Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), // margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
child: Column( // child: Column(
children: [ // children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
"${widget.model.lacumInformation!.yahalaAccountNo}", // "${widget.model.lacumInformation!.yahalaAccountNo}",
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
BorderedButton( // BorderedButton(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
? TranslationBase.of(context).active // ? TranslationBase.of(context).active
: TranslationBase.of(context).inactive, // : TranslationBase.of(context).inactive,
textColor: widget.model.lacumInformation! // textColor: widget.model.lacumInformation!
.accountStatus! == // .accountStatus! ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
hasBorder: true, // hasBorder: true,
borderColor: widget.model.lacumInformation! // borderColor: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
radius: 16, // radius: 16,
rPadding: 16, // rPadding: 16,
icon: widget.model.lacumInformation! // icon: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Icon( // ? Icon(
Icons.check_circle, // Icons.check_circle,
size: 25, // size: 25,
color: Colors.green, // color: Colors.green,
) // )
: Image.asset( // : Image.asset(
"assets/images/pharmacy_module/lakum/inactive_cross.png", // "assets/images/pharmacy_module/lakum/inactive_cross.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: 25, // width: 25,
height: 25, // height: 25,
), // ),
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
"IDENTIFICATION #", // "IDENTIFICATION #",
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation! // widget.model.lacumInformation!
.identificationNo, // .identificationNo,
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts( // Texts(
"MEMBER SINCE", // "MEMBER SINCE",
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.formatCreatedDateToString(), // widget.model.formatCreatedDateToString(),
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
"MOBILE #", // "MOBILE #",
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts( // Texts(
TranslationBase.of(context).language, // TranslationBase.of(context).language,
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation!.prefLang == // widget.model.lacumInformation!.prefLang ==
"1" // "1"
? TranslationBase.of(context).lanEnglish // ? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic, // : TranslationBase.of(context).lanArabic,
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
], // ],
), // ),
), // ),
], // ],
), // ),
), // ),
widget.isLacumHomePage // widget.isLacumHomePage
? Container( // ? Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Container( // Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), // margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
child: widget.model.convertBase64ToBarCodeImage() != // child: widget.model.convertBase64ToBarCodeImage() !=
null // null
? Image.memory( // ? Image.memory(
widget.model.convertBase64ToBarCodeImage()) // widget.model.convertBase64ToBarCodeImage())
: Container(), // : Container(),
), // ),
], // ],
), // ),
) // )
: Container(), // : Container(),
], // ],
), // ),
widget.isLacumHomePage widget.isLacumHomePage
? Positioned( ? Positioned(
bottom: 1, bottom: 1,

@ -33,48 +33,35 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AppGlobal appGlobal = AppGlobal(); AppGlobal appGlobal = AppGlobal();
const String INSERT_DEVICE_IMEI = const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI';
'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; const String SELECT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String SELECT_DEVICE_IMEI = const String CHECK_PATIENT_AUTH = 'Services/Authentication.svc/REST/CheckPatientAuthentication';
'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String CHECK_PATIENT_AUTH =
'Services/Authentication.svc/REST/CheckPatientAuthentication';
const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo'; const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo';
const SEND_ACTIVATION_CODE = const SEND_ACTIVATION_CODE = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
const SEND_ACTIVATION_CODE_REGISTER = const SEND_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration';
'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration'; const CHECK_ACTIVATION_CODE = 'Services/Authentication.svc/REST/CheckActivationCode';
const CHECK_ACTIVATION_CODE = const CHECK_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration';
'Services/Authentication.svc/REST/CheckActivationCode';
const CHECK_ACTIVATION_CODE_REGISTER =
'Services/Authentication.svc/REST/CheckActivationCodeForRegistration';
const FORGOT_PASSWORD = const FORGOT_PASSWORD = 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo';
'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo'; const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration";
const CHECK_PATIENT_FOR_REGISTRATION =
"Services/Authentication.svc/REST/CheckPatientForRegisteration";
const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo"; const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo";
const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration'; const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration';
const LOGGED_IN_USER_URL = const LOGGED_IN_USER_URL = 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo';
'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo';
const FORGOT_PATIENT_ID = const FORGOT_PATIENT_ID = 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber';
'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber';
const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate'; const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate';
const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo'; const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo';
const DEACTIVATE_ACCOUNT = const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate';
'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate';
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
bool isLoading = true; bool isLoading = true;
dynamic authenticatedUser; dynamic authenticatedUser;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
var languageID; var languageID;
AuthProvider() { AuthProvider() {
@ -130,17 +117,14 @@ class AuthProvider with ChangeNotifier {
var lastLogin = lstLogin; //await sharedPref.getInt( var lastLogin = lstLogin; //await sharedPref.getInt(
// LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false); // LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
var request = var request = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
var newRequest = INSERTDeviceIMEIRequest(); var newRequest = INSERTDeviceIMEIRequest();
var imei = await sharedPref.getString(PUSH_TOKEN); var imei = await sharedPref.getString(PUSH_TOKEN);
// if (!request.) { // if (!request.) {
newRequest.iMEI = imei; //imei!=null ? imei : ''; newRequest.iMEI = imei; //imei!=null ? imei : '';
newRequest.firstName = newRequest.firstName = request.firstName ?? "" + " " + request.lastName! ?? "";
request.firstName ?? "" + " " + request.lastName! ?? ""; newRequest.firstNameN = request.firstNameN ?? "" + " " + request.lastNameN! ?? "";
newRequest.firstNameN =
request.firstNameN ?? "" + " " + request.lastNameN! ?? "";
newRequest.lastNameN = request.lastNameN ?? ""; newRequest.lastNameN = request.lastNameN ?? "";
newRequest.outSA = request.outSA == 1 ? true : false; newRequest.outSA = request.outSA == 1 ? true : false;
newRequest.biometricEnabled = false; newRequest.biometricEnabled = false;
@ -155,8 +139,7 @@ class AuthProvider with ChangeNotifier {
newRequest.tokenID = await sharedPref.getString(TOKEN); newRequest.tokenID = await sharedPref.getString(TOKEN);
// } // }
await new BaseAppClient().post(INSERT_DEVICE_IMEI, await new BaseAppClient().post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -168,8 +151,8 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future<SelectDeviceIMEIRES?> selectDeviceImei(imei, Future<SelectDeviceIMEIRES?> selectDeviceImei(imei, {int languageID = 1}) async {
{int languageID = 1}) async { SelectDeviceIMEIRES? selectDeviceIMEIRES;
try { try {
// SelectDeviceIMEIRES? localRes; // SelectDeviceIMEIRES? localRes;
print(imei); print(imei);
@ -177,21 +160,15 @@ class AuthProvider with ChangeNotifier {
request['IMEI'] = imei; request['IMEI'] = imei;
request['LanguageID'] = languageID; request['LanguageID'] = languageID;
await BaseAppClient().post(SELECT_DEVICE_IMEI, await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async {
onSuccess: (dynamic response, int statusCode) async {
// localRes = Map(); // localRes = Map();
print( print("Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}");
"Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}");
if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) { if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) {
selectDeviceIMEIRES = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
sharedPref.setObject( sharedPref.setObject(IMEI_USER_DATA, selectDeviceIMEIRES);
IMEI_USER_DATA,
SelectDeviceIMEIRES.fromJson(
response['Patient_SELECTDeviceIMEIbyIMEIList'][0]));
return SelectDeviceIMEIRES.fromJson(
response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
} else { } else {
print("ELSE TRIGERRED!!!!!!!!!"); print("ELSE TRIGERRED!!!!!!!!!");
selectDeviceIMEIRES = null;
} }
// await new BaseAppClient().post(SELECT_DEVICE_IMEI, // await new BaseAppClient().post(SELECT_DEVICE_IMEI,
// onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
@ -207,21 +184,19 @@ class AuthProvider with ChangeNotifier {
print("in the error"); print("in the error");
// return Future.error(error); // return Future.error(error);
} }
return Future.value(selectDeviceIMEIRES);
} }
Future<dynamic> checkPatientAuthentication( Future<dynamic> checkPatientAuthentication(CheckPatientAuthenticationReq request) async {
CheckPatientAuthenticationReq request) async {
request.versionID = VERSION_ID; request.versionID = VERSION_ID;
request.channel = CHANNEL; request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS; request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID; request.generalid = GENERAL_ID;
request.languageID = (languageID == 'ar' ? 1 : 2); request.languageID = (languageID == 'ar' ? 1 : 2);
request.patientOutSA = request.patientOutSA = (request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1;
(request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1;
try { try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH, await new BaseAppClient().post(CHECK_PATIENT_AUTH, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -245,8 +220,7 @@ class AuthProvider with ChangeNotifier {
// request.patientTypeID = request.patientType; // request.patientTypeID = request.patientType;
// request.patientType = request.patientType; // request.patientType = request.patientType;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(GET_MOBILE_INFO, await new BaseAppClient().post(GET_MOBILE_INFO, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -266,8 +240,7 @@ class AuthProvider with ChangeNotifier {
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE, await new BaseAppClient().post(SEND_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
authenticatedUser = CheckActivationCode.fromJson(localRes); authenticatedUser = CheckActivationCode.fromJson(localRes);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -287,8 +260,7 @@ class AuthProvider with ChangeNotifier {
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
authenticatedUser = CheckActivationCode.fromJson(localRes); authenticatedUser = CheckActivationCode.fromJson(localRes);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -311,13 +283,11 @@ class AuthProvider with ChangeNotifier {
neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true;
neRequest.isDentalAllowedBackend = false; neRequest.isDentalAllowedBackend = false;
// neRequest.deviceToken = null; // neRequest.deviceToken = null;
neRequest.forRegisteration = neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister = false; neRequest.isRegister = false;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_ACTIVATION_CODE, await new BaseAppClient().post(CHECK_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -345,13 +315,11 @@ class AuthProvider with ChangeNotifier {
neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true;
neRequest.isDentalAllowedBackend = false; neRequest.isDentalAllowedBackend = false;
// neRequest.deviceToken = null; // neRequest.deviceToken = null;
neRequest.forRegisteration = neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister = false; neRequest.isRegister = false;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -371,8 +339,7 @@ class AuthProvider with ChangeNotifier {
return authenticatedUser; return authenticatedUser;
} }
Future<dynamic> checkPatientForRegisteration( Future<dynamic> checkPatientForRegisteration(CheckPatientForRegistration request) async {
CheckPatientForRegistration request) async {
request.versionID = VERSION_ID; request.versionID = VERSION_ID;
request.channel = CHANNEL; request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS; request.iPAdress = IP_ADDRESS;
@ -383,8 +350,7 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -407,8 +373,7 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_USER_STATUS, await new BaseAppClient().post(CHECK_USER_STATUS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -434,9 +399,7 @@ class AuthProvider with ChangeNotifier {
final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
if (nhic != null) { if (nhic != null) {
requestN.dob = nhic['IsHijri'] requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
? nhic['DateOfBirth']
: dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
requestN.isHijri = nhic['IsHijri'] ? 1 : 0; requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
requestN.healthId = requestN.patientobject!.eHealthIDField!; requestN.healthId = requestN.patientobject!.eHealthIDField!;
} }
@ -447,8 +410,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(REGISTER_USER, await new BaseAppClient().post(REGISTER_USER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -460,23 +422,17 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future registeredAuthenticatedUser( Future registeredAuthenticatedUser(AuthenticatedUser user, deviceToken, lat, long) async {
AuthenticatedUser user, deviceToken, lat, long) async {
var request = new RegisteredAuthenticatedUserRequest(); var request = new RegisteredAuthenticatedUserRequest();
request.deviceToken = deviceToken; request.deviceToken = deviceToken;
request.voipToken = request.voipToken = ""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false);
""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false);
request.deviceType = Platform.isIOS ? "1" : "2"; request.deviceType = Platform.isIOS ? "1" : "2";
request.patientMobileNumber = user.mobileNumber![0] == '0' request.patientMobileNumber = user.mobileNumber![0] == '0' ? user.mobileNumber : '0' + user.mobileNumber!;
? user.mobileNumber
: '0' + user.mobileNumber!;
request.nationalID = user.patientIdentificationNo; request.nationalID = user.patientIdentificationNo;
request.gender = user.gender; request.gender = user.gender;
request.patientID = user.patientID; request.patientID = user.patientID;
request.patientOutSA = user.outSA; request.patientOutSA = user.outSA;
request.loginType = await sharedPref.getInt(LAST_LOGIN) != null request.loginType = await sharedPref.getInt(LAST_LOGIN) != null ? await sharedPref.getInt(LAST_LOGIN) : 1;
? await sharedPref.getInt(LAST_LOGIN)
: 1;
request.mACAddress = '00:00:00:00:00:00'; request.mACAddress = '00:00:00:00:00:00';
request.latitude = lat; request.latitude = lat;
request.longitude = long; request.longitude = long;
@ -485,8 +441,7 @@ class AuthProvider with ChangeNotifier {
request.patientType = user.patientType; request.patientType = user.patientType;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(LOGGED_IN_USER_URL, await new BaseAppClient().post(LOGGED_IN_USER_URL, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -512,8 +467,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(FORGOT_PATIENT_ID, await new BaseAppClient().post(FORGOT_PATIENT_ID, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -531,8 +485,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(FORGOT_PASSWORD, await new BaseAppClient().post(FORGOT_PASSWORD, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -551,8 +504,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DASHBOARD, await new BaseAppClient().post(DASHBOARD, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -569,8 +521,7 @@ class AuthProvider with ChangeNotifier {
getSettings() async { getSettings() async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(PROFILE_SETTING, await new BaseAppClient().post(PROFILE_SETTING, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -585,8 +536,7 @@ class AuthProvider with ChangeNotifier {
Future saveSettings(request) async { Future saveSettings(request) async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(SAVE_SETTING, await new BaseAppClient().post(SAVE_SETTING, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -601,8 +551,7 @@ class AuthProvider with ChangeNotifier {
Future deactivateAccount(request, bool isLogin) async { Future deactivateAccount(request, bool isLogin) async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DEACTIVATE_ACCOUNT, await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -618,8 +567,7 @@ class AuthProvider with ChangeNotifier {
Future activateAccount(request) async { Future activateAccount(request) async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DEACTIVATE_ACCOUNT, await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -636,10 +584,8 @@ class AuthProvider with ChangeNotifier {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID); await sharedPref.remove(PHARMACY_CUSTOMER_ID);
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
false; var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
var model =
Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
model.setState(0, 0, false, null); model.setState(0, 0, false, null);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }

@ -214,7 +214,8 @@ class LiveCareService extends BaseService {
String? deviceToken; String? deviceToken;
String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)): ""; // String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)) : "";
String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(APNS_TOKEN)) : "";
getDeviceToken().then((value) { getDeviceToken().then((value) {
print(value); print(value);
deviceToken = value; deviceToken = value;
@ -337,7 +338,8 @@ class LiveCareService extends BaseService {
Future<Map> getOneSignalVOIPToken(String voipToken, BuildContext context) async { Future<Map> getOneSignalVOIPToken(String voipToken, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0}; // request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0};
request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0, "test_type": 1};
dynamic localRes; dynamic localRes;

@ -36,14 +36,14 @@ class _SplashScreenState extends State<SplashScreen> {
void initState() { void initState() {
AppGlobal.context = context; AppGlobal.context = context;
super.initState(); super.initState();
print("Splash init called............."); print("Splash init called.............");
Timer( Timer(
Duration(seconds: 1, milliseconds: 500), Duration(seconds: 1, milliseconds: 500),
() async { () async {
await loadPrivilege().then((value) { await loadPrivilege().then((value) {
LocalNotification.init(onNotificationClick: (payload) {}); LocalNotification.init(onNotificationClick: (payload) {});
// LocalNotification.getInstance().showNow(title: "Payload", subtitle: "Subtitle", payload: "Payload"); // LocalNotification.getInstance().showNow(title: "Payload", subtitle: "Subtitle", payload: "Payload");
if(!_privilegeService.hasError) { if (!_privilegeService.hasError) {
Navigator.of(context).pushReplacement( Navigator.of(context).pushReplacement(
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => LandingPage(), builder: (BuildContext context) => LandingPage(),
@ -54,7 +54,12 @@ class _SplashScreenState extends State<SplashScreen> {
}, },
); );
// startZoom(); var zoom = ZoomVideoSdk();
InitConfig initConfig = InitConfig(
domain: "zoom.us",
enableLog: true,
);
zoom.initSdk(initConfig);
// AppSharedPreferences().getAll().then((value) { // AppSharedPreferences().getAll().then((value) {
// debugPrint("ALL SHARED PREFERENCES!!!!!"); // debugPrint("ALL SHARED PREFERENCES!!!!!");
@ -62,15 +67,6 @@ class _SplashScreenState extends State<SplashScreen> {
// }); // });
} }
// void startZoom(){
// var zoom = ZoomVideoSdk();
// InitConfig initConfig = InitConfig(
// domain: "zoom.us",
// enableLog: true,
// );
// zoom.initSdk(initConfig);
// }
/// load the Privilege from service /// load the Privilege from service
Future loadPrivilege() async { Future loadPrivilege() async {
await _privilegeService.getPrivilege(); await _privilegeService.getPrivilege();

@ -17,13 +17,7 @@ class AppToast {
int? imageSize, int? imageSize,
}) { }) {
Fluttertoast.showToast( Fluttertoast.showToast(
msg: message, msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds!, backgroundColor: backgroundColor, textColor: textColor, fontSize: fontSize);
toastLength: toastLength,
gravity: toastGravity,
timeInSecForIosWeb: timeInSeconds!,
backgroundColor: backgroundColor,
textColor: textColor,
fontSize: fontSize);
} }
static void showSuccessToast({ static void showSuccessToast({
@ -38,28 +32,22 @@ class AppToast {
int imageSize = 32, int imageSize = 32,
}) { }) {
Fluttertoast.showToast( Fluttertoast.showToast(
msg: message, msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds ?? 0, backgroundColor: Colors.green, textColor: textColor, fontSize: fontSize);
toastLength: toastLength,
gravity: toastGravity,
timeInSecForIosWeb: timeInSeconds ?? 0,
backgroundColor: Colors.green,
textColor: textColor,
fontSize: fontSize);
} }
static void showErrorToast({ static void showErrorToast(
required String message, {required String message,
Toast toastLength = Toast.LENGTH_LONG, Toast toastLength = Toast.LENGTH_LONG,
int timeInSeconds = 2, int timeInSeconds = 2,
double fontSize = 16, double fontSize = 16,
ToastGravity toastGravity = ToastGravity.TOP, ToastGravity toastGravity = ToastGravity.TOP,
Color textColor = Colors.white, Color textColor = Colors.white,
int radius = 15, int radius = 15,
int? elevation, int? elevation,
int imageSize = 32, int imageSize = 32,
}) { BuildContext? localContext}) {
FToast fToast = FToast(); FToast fToast = FToast();
fToast.init(AppGlobal.context); fToast.init(localContext != null ? localContext : AppGlobal.context);
Widget toast = Container( Widget toast = Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
@ -93,8 +81,7 @@ class AppToast {
} }
void backWithEmpty() { void backWithEmpty() {
AppToast.showErrorToast( AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).empty);
message: TranslationBase.of(AppGlobal.context).empty);
Navigator.of(AppGlobal.context).pop(); Navigator.of(AppGlobal.context).pop();
} }

@ -5,8 +5,10 @@ import 'dart:io';
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/core/model/notifications/get_notifications_response_model.dart'; import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart';
import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart';
@ -19,8 +21,8 @@ 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';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
@ -178,7 +180,7 @@ class PushNotificationHandler {
late HmsApiAvailability hmsApiAvailability; late HmsApiAvailability hmsApiAvailability;
final voIPKit = FlutterIOSVoIPKit.instance; // final voIPKit = FlutterIOSVoIPKit.instance;
late Timer timeOutTimer; late Timer timeOutTimer;
bool isTalking = false; bool isTalking = false;
@ -209,14 +211,73 @@ class PushNotificationHandler {
static PushNotificationHandler getInstance() => _instance; static PushNotificationHandler getInstance() => _instance;
// void _timeOut({
// int seconds = 30,
// }) async {
// timeOutTimer = Timer(Duration(seconds: seconds), () async {
// print('🎈 example: timeOut');
// final incomingCallerName = await voIPKit.getIncomingCallerName();
// voIPKit.unansweredIncomingCall(
// skipLocalNotification: false,
// missedCallTitle: '📞 Missed call',
// missedCallBody: 'There was a call from $incomingCallerName',
// );
// });
// }
init(BuildContext context) async { init(BuildContext context) async {
this.context = context; this.context = context;
if (Platform.isIOS) { if (Platform.isIOS) {
voIPKit.getVoIPToken().then((value) { // voIPKit.getVoIPToken().then((value) {
print("APNS VOIP KIT TOKEN: $value"); // print("APNS VOIP KIT TOKEN: $value");
AppSharedPreferences().setString(APNS_TOKEN, value!); // AppSharedPreferences().setString(APNS_TOKEN, value!);
}); // });
//
// voIPKit.onDidUpdatePushToken = (String token) {
// print('🎈 example: onDidUpdatePushToken: $token');
// };
//
// voIPKit.onDidReceiveIncomingPush = (
// Map<String, dynamic> payload,
// ) async {
// print('🎈 example: onDidReceiveIncomingPush $payload');
// _timeOut();
// };
//
// voIPKit.onDidRejectIncomingCall = (
// String uuid,
// String callerId,
// ) async {
// try {
// print('🎈 example: onDidRejectIncomingCall $uuid - $callerId');
// timeOutTimer.cancel();
// } catch (err) {}
// };
//
// voIPKit.onDidAcceptIncomingCall = (
// String uuid,
// String callerId,
// ) async {
// print('🎈 example: onDidAcceptIncomingCall $uuid - $callerId');
// await voIPKit.acceptIncomingCall(callerState: CallStateType.calling);
// await voIPKit.callConnected();
// await Future.delayed(Duration(seconds: 1));
//
// Navigator.pushNamed(
// locator<NavigationService>().navigatorKey.currentContext!,
// "zoom_call_page",
// arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false),
// );
//
// await voIPKit.endCall();
//
// // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN,
// // arguments: VideoArgus(
// // reservationId: int.parse(callerId), token: null, isVideo: true));
//
// timeOutTimer.cancel();
// };
} }
if (Platform.isAndroid) { if (Platform.isAndroid) {
@ -311,8 +372,7 @@ class PushNotificationHandler {
onToken(token!); onToken(token!);
}); });
if (Platform.isIOS) {
if(Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) { FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value!); print("Push APNS getToken: " + value!);
}); });
@ -372,7 +432,6 @@ class PushNotificationHandler {
].request(); ].request();
print("=-=-=-=-=-=-=-=-=-=-"); print("=-=-=-=-=-=-=-=-=-=-");
print(statuses[Permission.location]); print(statuses[Permission.location]);
} }
} catch (_) { } catch (_) {
debugPrint(_.toString()); debugPrint(_.toString());

@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart'; // import 'package:shimmer/shimmer.dart';
class ShimmerLoadingWidget extends StatefulWidget { class ShimmerLoadingWidget extends StatefulWidget {
Future<void> Function()? onPreProccess; Future<void> Function()? onPreProccess;
@ -46,7 +46,7 @@ class _ShimmerLoadingWidgetState extends State<ShimmerLoadingWidget> {
case ConnectionState.active: case ConnectionState.active:
break; break;
case ConnectionState.waiting: case ConnectionState.waiting:
widget = Shimmer.fromColors(child: super.widget.loadingWidget!(), baseColor: Colors.red, highlightColor: Colors.yellow); // widget = Shimmer.fromColors(child: super.widget.loadingWidget!(), baseColor: Colors.red, highlightColor: Colors.yellow);
break; break;
case ConnectionState.done: case ConnectionState.done:
widget = super.widget.realWidget!(); widget = super.widget.realWidget!();

@ -1,5 +1,5 @@
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart';
import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart';
@ -32,20 +32,20 @@ class _OffersAndPackagesWidgetState extends State<OffersAndPackagesWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// TODO: implement build // TODO: implement build
var option = CarouselOptions( // var option = CarouselOptions(
height: HEIGHT, // height: HEIGHT,
aspectRatio: 16 / 9, // aspectRatio: 16 / 9,
viewportFraction: 1, // viewportFraction: 1,
initialPage: 0, // initialPage: 0,
enableInfiniteScroll: true, // enableInfiniteScroll: true,
reverse: false, // reverse: false,
autoPlay: true, // autoPlay: true,
autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL), // autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL),
autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION), // autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION),
autoPlayCurve: Curves.fastOutSlowIn, // autoPlayCurve: Curves.fastOutSlowIn,
enlargeCenterPage: true, // enlargeCenterPage: true,
scrollDirection: Axis.horizontal, // scrollDirection: Axis.horizontal,
); // );
// return Container( // return Container(
// height: HEIGHT, // height: HEIGHT,
@ -102,13 +102,13 @@ class _OffersAndPackagesWidgetState extends State<OffersAndPackagesWidget> {
realWidget: () { realWidget: () {
if (widget.models.isNotEmpty) { if (widget.models.isNotEmpty) {
return Container( return Container(
child: CarouselSlider.builder( // child: CarouselSlider.builder(
itemCount: widget.models.length, // itemCount: widget.models.length,
itemBuilder: (BuildContext context, int itemIndex,int realIndex) { // itemBuilder: (BuildContext context, int itemIndex,int realIndex) {
var item = widget.models[itemIndex]; // var item = widget.models[itemIndex];
return OfferPackagesItemWidget(model: item); // return OfferPackagesItemWidget(model: item);
}, // },
options: option), // options: option),
); );
} else { } else {
return Container(); return Container();

Binary file not shown.

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.5.73+1 version: 4.5.054+4050054
environment: environment:
sdk: ">=3.0.0 <3.13.0" sdk: ">=3.0.0 <3.13.0"
@ -143,18 +143,18 @@ dependencies:
#geofencing: any #geofencing: any
speech_to_text: ^6.1.1 speech_to_text: ^6.1.1
#in_app_update: ^4.2.2 in_app_update: ^4.2.2
in_app_review: ^2.0.3 in_app_review: ^2.0.3
badges: ^3.1.2 badges: ^3.1.2
flutter_app_icon_badge: ^2.0.0 flutter_app_icon_badge: ^2.0.0
dropdown_search: 5.0.6 # dropdown_search: 5.0.6
youtube_player_flutter: ^8.1.2 youtube_player_flutter: ^8.1.2
shimmer: ^3.0.0 # shimmer: ^3.0.0
carousel_slider: ^4.0.0 carousel_slider: ^4.0.0
flutter_staggered_grid_view: ^0.7.0 # flutter_staggered_grid_view: ^0.7.0
huawei_hmsavailability: ^6.11.0+301 huawei_hmsavailability: ^6.11.0+301
huawei_location: ^6.11.0+301 huawei_location: ^6.11.0+301
share_plus: ^6.3.4 share_plus: ^6.3.4
@ -163,7 +163,7 @@ dependencies:
equatable: ^2.0.3 equatable: ^2.0.3
wave: ^0.2.0 wave: ^0.2.0
sms_otp_auto_verify: ^2.1.0 sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.1.0 # flutter_ios_voip_kit: ^0.1.0
google_api_availability: ^5.0.0 google_api_availability: ^5.0.0
open_filex: ^4.3.2 open_filex: ^4.3.2
path_provider: ^2.0.8 path_provider: ^2.0.8

Loading…
Cancel
Save