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

dev_v3.13.6_BLE_Faiz
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 {
c -> c.resolutionStrategy.eachDependency {
DependencyResolveDetails dependency ->
println dependency.requested.group
if (dependency.requested.group == 'org.bouncycastle') {
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68'
}
}
c ->
c.resolutionStrategy.eachDependency {
DependencyResolveDetails dependency ->
println dependency.requested.group
if (dependency.requested.group == 'org.bouncycastle') {
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68'
}
}
}
//configurations.all {
@ -53,6 +54,7 @@ configurations.all {
android {
compileSdkVersion 34
// ndkVersion "24.0.8215888"
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -62,7 +64,7 @@ android {
disable 'MissingTranslation'
checkReleaseBuilds false
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
@ -74,6 +76,11 @@ android {
multiDexEnabled true
}
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
@ -87,10 +94,13 @@ android {
debug {
debuggable true
signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
release {
debuggable false
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@ -134,7 +144,7 @@ dependencies {
// })
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.guava:guava:27.0.1-android'
// Dependency on local binaries
implementation fileTree(dir: 'libs', include: ['*.jar'])
@ -149,6 +159,14 @@ dependencies {
implementation "us.zoom.videosdk:zoomvideosdk-videoeffects:1.10.1"
// 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 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'

@ -37,5 +37,20 @@
-keep class com.opentok.otc.** { *; }
-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.otc.**

@ -1,5 +1,14 @@
buildscript {
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 {
google()
jcenter()

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

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.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>"; };
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>"; };
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; };
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; };
@ -287,6 +290,7 @@
knownRegions = (
en,
Base,
ar,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@ -442,6 +446,7 @@
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
7643E4052BE0D0B400BD2F25 /* ar */,
);
name = Main.storyboard;
sourceTree = "<group>";
@ -450,6 +455,7 @@
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
7643E4062BE0D0B400BD2F25 /* ar */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
@ -458,6 +464,7 @@
isa = PBXVariantGroup;
children = (
E91B53A2256AAD8200E96549 /* Base */,
7643E4042BE0D0B400BD2F25 /* ar */,
);
name = Main_Custom.storyboard;
sourceTree = "<group>";
@ -469,6 +476,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -557,6 +565,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -612,6 +621,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";

@ -20,13 +20,11 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
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 = 'https://uat.hmgwebservices.com/';
//var BASE_URL = 'https://hmgwebservices.com/';
var BASE_URL = 'https://uat.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 = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.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 GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 15.7;
var VERSION_ID = 15.8;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -670,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'
//PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat";
// var payFortEnvironment = FortEnvironment.production;
// var applePayMerchantId = "merchant.com.hmgwebservices";
var payFortEnvironment = FortEnvironment.test;
var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal {
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/services/authentication/auth_provider.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/utils.dart';
import 'package:flutter/material.dart';
@ -201,11 +202,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null);
if (AppGlobal.isNetworkDebugEnabled) {
// print("URL : $url");
// final jsonBody = json.encode(body);
// print(jsonBody);
}
// if (AppGlobal.isNetworkDebugEnabled) {
print("URL : $url");
final jsonBody = json.encode(body);
print(jsonBody);
// }
if (await Utils.checkConnection(
bypassConnectionCheck: bypassConnectionCheck)) {
@ -559,7 +560,7 @@ class BaseAppClient {
Future navigateToAppUpdate(context, String text) async {
Navigator.pushAndRemoveUntil(
context,
locator<NavigationService>().navigatorKey.currentContext!,
MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)),
(Route<dynamic> route) => false,
);

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.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/robo_search/event_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_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart';
import 'config/size_config.dart';
@ -90,6 +87,7 @@ class _MyApp extends State<MyApp> {
@override
Widget build(BuildContext context) {
PlatformBridge.init(context);
AppGlobal.context = context;
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp,

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

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

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

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

@ -66,7 +66,7 @@ class _SchedulePageState extends State<SchedulePage> {
this.generateWeeksSchedules();
} 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);
}
return AppScaffold(

@ -425,7 +425,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
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) {
getCallRequestType();
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed);
AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed, localContext: context);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);

@ -55,6 +55,7 @@ import 'package:provider/provider.dart';
class ToDo extends StatefulWidget {
PatientShareResponse? patientShareResponse;
var languageID;
// MyInAppBrowser? browser;
bool? isShowAppBar = true;
Function()? onBackClick;
@ -176,189 +177,206 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
title: TranslationBase.of(context).appointments,
bodyWidget: appoList.length != 0
? ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: appoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: appoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(top: 4.0),
child: appoList[index].clinicID == 265
? Container(
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"),
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(top: 4.0),
child: appoList[index].clinicID == 265
? Container(
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(
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();
},
Expanded(
child: Container(
child: InkWell(
onTap: () {
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),
),
),
),
],
),
),
],
),
),
Expanded(
child: Container(
child: InkWell(
onTap: () {
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),
),
),
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),
),
),
),
],
),
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,
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic),
// MyRichText(TranslationBase.of(context).appointmentDate + ": ",
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic),
// Timezone changes
appoList[index].isLiveCareAppointment!
? MyRichText(
TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
" " +
DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5),
projectViewModel.isArabic)
: MyRichText(
TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
" " +
appoList[index].startTime!.substring(0, 5),
projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar(
initialRating: appoList[index].actualDoctorRate.toDouble(),
itemSize: 16.0,
glowColor: Color(0XFFD02127),
unratedColor: Color(0XFFD02127),
allowHalfRating: true, ratingWidget: RatingWidget(full:Icon(Icons.star), half: Icon(Icons.star_half), empty: Icon( Icons.star_border)), onRatingUpdate: (double value) { },
// : Icons.star_half,
// ic: Icons.star,
// emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { },
),
],
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,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic),
// MyRichText(TranslationBase.of(context).appointmentDate + ": ",
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic),
// Timezone changes
appoList[index].isLiveCareAppointment!
? MyRichText(
TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
" " +
DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5),
projectViewModel.isArabic)
: MyRichText(
TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
" " +
appoList[index].startTime!.substring(0, 5),
projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic),
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(
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]);
},
child: Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Text(
TranslationBase.of(context).moreDetails,
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 25 / 16,
decoration: TextDecoration.underline),
),
Padding(
padding: const EdgeInsets.only(top: 12.0),
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]);
},
child: Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Text(
TranslationBase.of(context).moreDetails,
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w600,
color: CustomColors.accentColor,
letterSpacing: -0.48,
height: 25 / 16,
decoration: TextDecoration.underline),
),
),
),
],
),
),
],
),
);
},
)
);
},
)
: getNoDataWidget(context),
),
),
@ -371,28 +389,28 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
title: TranslationBase.of(context).anicllaryOrders,
bodyWidget: ancillaryLists.length != 0
? Container(
padding: EdgeInsets.all(12),
child: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
reverse: true,
itemBuilder: (context, index) {
return DoctorCard(
onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID),
isInOutPatient: true,
name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""),
billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: ancillaryLists[0].projectName,
isLiveCareAppointment: false,
date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate),
isSortByClinic: true,
);
},
itemCount: ancillaryLists[0].ancillaryOrderList!.length,
separatorBuilder: (context, index) => SizedBox(height: 14),
),
)
padding: EdgeInsets.all(12),
child: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
reverse: true,
itemBuilder: (context, index) {
return DoctorCard(
onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID),
isInOutPatient: true,
name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""),
billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: ancillaryLists[0].projectName,
isLiveCareAppointment: false,
date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate),
isSortByClinic: true,
);
},
itemCount: ancillaryLists[0].ancillaryOrderList!.length,
separatorBuilder: (context, index) => SizedBox(height: 14),
),
)
: getNoDataWidget(context),
)),
],
@ -401,104 +419,104 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
Container(
child: obGyneAppoList.length != 0
? ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: obGyneAppoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0),
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: obGyneAppoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Container(
margin: EdgeInsets.only(left: 5.0, right: 5.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)),
),
],
),
],
),
),
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(
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),
),
),
),
],
),
],
),
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),
),
),
),
],
),
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,
Row(
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),
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,
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),
),
],
@ -552,7 +570,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
performNextAction(AppoitmentAllHistoryResultList appo) {
switch (appo.nextAction) {
case 0:
// getAppoQR(context, appo);
// getAppoQR(context, appo);
break;
case 10:
confirmAppointment(appo);
@ -1075,7 +1093,12 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
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,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) =>SizedBox())
.then((value) {
pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) {
if (value != null) {
navigateToPaymentMethod(context, value as PatientShareResponse, 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 {
Navigator.push(
context,
FadePage(
page: PaymentMethod(
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {});
},
patientShare: widget.patientShareResponse!.patientShareWithTax)))
context,
FadePage(
page: PaymentMethod(
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {});
},
patientShare: widget.patientShareResponse!.patientShareWithTax)))
.then((value) {
print(value);
selectedPaymentMethod = value[0] ?? "";
@ -1414,26 +1436,26 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
if (res["MessageStatus"] == 1) {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString());
},
onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo);
},
projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
);
} else {
GifLoaderDialogUtils.hideDialog(context);
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();
service
.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) {
GifLoaderDialogUtils.hideDialog(context);
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:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:in_app_update/in_app_update.dart';
import 'package:url_launcher/url_launcher.dart';
class AppUpdatePage extends StatefulWidget {
@ -57,10 +58,10 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
minWidth: MediaQuery.of(context).size.width,
height: 45.0,
child: CustomTextButton(
backgroundColor: Colors.red[800]!,
disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38),
disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0,
backgroundColor: Colors.red[800]!,
disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38),
disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0,
onPressed: () {
openAppUpdateLink();
},
@ -78,16 +79,17 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
openAppUpdateLink() {
if (Platform.isAndroid) {
// _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
// InAppUpdate.checkForUpdate().then((info) {
// print("checkForUpdate!!!");
// print(info.toString());
// if (info.immediateUpdateAllowed) {
// print("Immediate Allowed!!!");
// InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
// }
// }).catchError((e) {
// print(e.toString());
// });
InAppUpdate.checkForUpdate().then((info) {
print("checkForUpdate!!!");
print(info.toString());
if (info.immediateUpdateAllowed) {
print("Immediate Allowed!!!");
InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
}
}).catchError((e) {
print(e.toString());
_launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
});
}
if (Platform.isIOS) {
_launchURL("https://itunes.apple.com/app/id733503978");

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

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

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

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

@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:camera/camera.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.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/videocall-webrtc-rnd/webrtc/start_video_call.dart';
import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart';
@ -16,11 +17,10 @@ import 'package:just_audio/just_audio.dart';
import '../../config/config.dart';
class IncomingCall extends StatefulWidget {
IncomingCallData? incomingCallData;
IncomingCall({ this.incomingCallData});
IncomingCall({this.incomingCallData});
@override
_IncomingCallState createState() => _IncomingCallState();
@ -34,6 +34,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
late CameraController _controller;
late Future<void> _initializeControllerFuture;
bool isCameraReady = false;
// Signaling signaling = Signaling()..init();
@override
@ -59,140 +60,138 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
return AppScaffold(
isShowAppBar: false,
isShowDecPage: false,
body: Stack(
alignment: FractionalOffset.center,
children: <Widget>[
// new Positioned.fill(
// child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
// ),
new Positioned.fill(
child: new ClipRect(
// child: new BackdropFilter(
// filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: new Container(
decoration: new BoxDecoration(color: Colors.grey[800]!.withOpacity(0.8)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Container(
margin: const EdgeInsets.all(21.0),
child: Row(
children: [
Image.asset(
"assets/images/new/logo.png",
height: 70,
width: 70,
),
Container(
margin: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
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),
],
),
),
],
body: Stack(alignment: FractionalOffset.center, children: <Widget>[
// new Positioned.fill(
// child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
// ),
new Positioned.fill(
child: new ClipRect(
// child: new BackdropFilter(
// filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: new Container(
decoration: new BoxDecoration(color: Colors.grey[800]!.withOpacity(0.8)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Container(
margin: const EdgeInsets.all(21.0),
child: Row(
children: [
Image.asset(
"assets/images/new/logo.png",
height: 70,
width: 70,
),
Container(
margin: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
widget.incomingCallData!.doctorname!,
style: TextStyle(fontSize: 21, fontWeight: FontWeight.bold, color: Colors.white, letterSpacing: -1.26, height: 23 / 12),
),
),
Container(
margin: const EdgeInsets.all(21.0),
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),
),
),
],
Text(
TranslationBase.of(context).videoAppo,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xffC6C6C6), letterSpacing: -0.48, height: 23 / 24),
),
),
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(),
),
),
],
SizedBox(height: 2),
],
),
),
],
),
),
Container(
margin: const EdgeInsets.all(21.0),
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),
),
),
],
),
),
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 {
// return const Center(child: CircularProgressIndicator());
// }
),
),
);
}
@ -213,31 +212,34 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
// backToHome();
// final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
// 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) {
print(err);
await PlatformExceptionAlertDialog(
@ -248,8 +250,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
void changeCallStatusAPI(int sessionStatus) {
LiveCareService service = new LiveCareService();
service.endCallAPI(widget.incomingCallData!.sessionId!, sessionStatus, context).then((res) {
}).catchError((err) {
service.endCallAPI(widget.incomingCallData!.sessionId!, sessionStatus, context).then((res) {}).catchError((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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
@ -145,7 +146,7 @@ class _clinic_listState extends State<ClinicList> {
GifLoaderDialogUtils.hideDialog(context);
print(err);
isError = true;
AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err, localContext: context);
});
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
}
@ -666,7 +667,7 @@ class _clinic_listState extends State<ClinicList> {
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err, localContext: context);
print(err);
});
}

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

@ -78,7 +78,7 @@ class ContactLensPage extends StatelessWidget {
),
),
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).diameter, '${listHISGetContactLensPerscription!.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription!.oZ}'),

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

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

@ -65,7 +65,7 @@ class PrescriptionItemsPage extends StatelessWidget {
model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!,
) : DateTime.now(),
),
prescriptions.nationalityFlagURL!,
prescriptions.nationalityFlagURL ?? "",
prescriptions.doctorRate,
prescriptions.actualDoctorRate,
prescriptions.noOfPatientsRate,

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

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

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

@ -1,5 +1,5 @@
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/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
@ -32,47 +32,47 @@ class _BannerPagerState extends State<BannerPager> {
return Container(
child: Column(
children: [
CarouselSlider(
options: CarouselOptions(
aspectRatio: 5 / 2,
enlargeCenterPage: true,
enableInfiniteScroll: false,
viewportFraction: 1.0,
initialPage: 0,
autoPlay: true,
autoPlayInterval: Duration(seconds: 3),
autoPlayAnimationDuration: Duration(milliseconds: 800),
autoPlayCurve: Curves.decelerate,
onPageChanged: (index, reason) {
setState(() {
_current = index;
});
},
),
items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed(
(item, index) {
return InkWell(
onTap: () {
bannerNavigator(index);
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 1.0),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
child: Center(
child: index == 0 || index == 1
? Image.asset(
item,
fit: BoxFit.cover,
)
: CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()),
),
),
),
);
},
).toList(),
),
// CarouselSlider(
// options: CarouselOptions(
// aspectRatio: 5 / 2,
// enlargeCenterPage: true,
// enableInfiniteScroll: false,
// viewportFraction: 1.0,
// initialPage: 0,
// autoPlay: true,
// autoPlayInterval: Duration(seconds: 3),
// autoPlayAnimationDuration: Duration(milliseconds: 800),
// autoPlayCurve: Curves.decelerate,
// onPageChanged: (index, reason) {
// setState(() {
// _current = index;
// });
// },
// ),
// items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed(
// (item, index) {
// return InkWell(
// onTap: () {
// bannerNavigator(index);
// },
// child: Container(
// margin: EdgeInsets.symmetric(horizontal: 1.0),
// child: ClipRRect(
// borderRadius: BorderRadius.all(Radius.circular(5.0)),
// child: Center(
// child: index == 0 || index == 1
// ? Image.asset(
// item,
// fit: BoxFit.cover,
// )
// : CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()),
// ),
// ),
// ),
// );
// },
// ).toList(),
// ),
Padding(
padding: const EdgeInsets.all(8.0),
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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -24,231 +24,231 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
return Container(
child: Stack(
children: [
CarouselSlider(
options: CarouselOptions(
enableInfiniteScroll: false,
enlargeCenterPage: false,
viewportFraction: 1.0,
scrollPhysics: widget.isLacumHomePage
? ScrollPhysics()
: NeverScrollableScrollPhysics(),
initialPage: 0,
onPageChanged: (index, reason) {
setState(() {
_current = index;
});
},
),
items: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey,
width: 0.4,
)),
),
margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0,
),
Container(
margin: EdgeInsets.fromLTRB(12, 75, 12, 0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
"${widget.model.lacumInformation!.yahalaAccountNo}",
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
BorderedButton(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
? TranslationBase.of(context).active
: TranslationBase.of(context).inactive,
textColor: widget.model.lacumInformation!
.accountStatus ==
1
? Colors.green
: Colors.red,
hasBorder: true,
borderColor: widget.model.lacumInformation!
.accountStatus ==
1
? Colors.green
: Colors.red,
radius: 16,
rPadding: 16,
icon: widget.model.lacumInformation!
.accountStatus ==
1
? Icon(
Icons.check_circle,
size: 25,
color: Colors.green,
)
: Image.asset(
"assets/images/pharmacy_module/lakum/inactive_cross.png",
fit: BoxFit.fill,
width: 25,
height: 25,
),
),
],
),
SizedBox(
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).identificationNumber,
// "IDENTIFICATION #",
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumInformation!
.identificationNo,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Texts(TranslationBase.of(context).MEMBERSINCE,
// "MEMBER SINCE",
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.formatCreatedDateToString(),
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
],
),
SizedBox(
height: 5,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).lakumMobile,
// "MOBILE #",
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Texts(
TranslationBase.of(context).language,
fontSize: 13,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumInformation!.prefLang ==
"2"
? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic,
fontSize: 13,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
],
),
],
),
),
],
),
),
widget.isLacumHomePage
? Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey,
width: 0.4,
)),
),
margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0,
),
Center(
child: Container(
margin: EdgeInsets.fromLTRB(5, 70, 5, 4),
child: widget.model.convertBase64ToBarCodeImage() !=
null
? Image.memory(
widget.model.convertBase64ToBarCodeImage(),
fit: BoxFit.fill,
height: 100.0,
width: 180.0
)
: Container(),
),
),
],
),
)
: Container(),
],
),
// CarouselSlider(
// options: CarouselOptions(
// enableInfiniteScroll: false,
// enlargeCenterPage: false,
// viewportFraction: 1.0,
// scrollPhysics: widget.isLacumHomePage
// ? ScrollPhysics()
// : NeverScrollableScrollPhysics(),
// initialPage: 0,
// onPageChanged: (index, reason) {
// setState(() {
// _current = index;
// });
// },
// ),
// items: [
// Container(
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.circular(4),
// border: Border.fromBorderSide(BorderSide(
// color: Colors.grey,
// width: 0.4,
// )),
// ),
// margin: EdgeInsets.symmetric(horizontal: 16),
// child: Stack(
// children: [
// Image.asset(
// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
// fit: BoxFit.fill,
// width: widget.mediaQuery.size.width * 1.0,
// height: widget.mediaQuery.size.width * 1.0,
// ),
// Container(
// margin: EdgeInsets.fromLTRB(12, 75, 12, 0),
// child: Column(
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(
// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
// fontSize: 13,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// "${widget.model.lacumInformation!.yahalaAccountNo}",
// fontSize: 13,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// BorderedButton(
// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
// ? TranslationBase.of(context).active
// : TranslationBase.of(context).inactive,
// textColor: widget.model.lacumInformation!
// .accountStatus ==
// 1
// ? Colors.green
// : Colors.red,
// hasBorder: true,
// borderColor: widget.model.lacumInformation!
// .accountStatus ==
// 1
// ? Colors.green
// : Colors.red,
// radius: 16,
// rPadding: 16,
// icon: widget.model.lacumInformation!
// .accountStatus ==
// 1
// ? Icon(
// Icons.check_circle,
// size: 25,
// color: Colors.green,
// )
// : Image.asset(
// "assets/images/pharmacy_module/lakum/inactive_cross.png",
// fit: BoxFit.fill,
// width: 25,
// height: 25,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 5,
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(TranslationBase.of(context).identificationNumber,
// // "IDENTIFICATION #",
// fontSize: 13,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.lacumInformation!
// .identificationNo,
// fontSize: 13,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.end,
// children: [
// Texts(TranslationBase.of(context).MEMBERSINCE,
// // "MEMBER SINCE",
// fontSize: 13,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.formatCreatedDateToString(),
// fontSize: 13,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// ],
// ),
// SizedBox(
// height: 5,
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(TranslationBase.of(context).lakumMobile,
// // "MOBILE #",
// fontSize: 13,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
// fontSize: 13,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.end,
// children: [
// Texts(
// TranslationBase.of(context).language,
// fontSize: 13,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.lacumInformation!.prefLang ==
// "2"
// ? TranslationBase.of(context).lanEnglish
// : TranslationBase.of(context).lanArabic,
// fontSize: 13,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// ],
// ),
// ],
// ),
// ),
// ],
// ),
// ),
// widget.isLacumHomePage
// ? Container(
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.circular(4),
// border: Border.fromBorderSide(BorderSide(
// color: Colors.grey,
// width: 0.4,
// )),
// ),
// margin: EdgeInsets.symmetric(horizontal: 16),
// child: Stack(
// children: [
// Image.asset(
// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
// fit: BoxFit.fill,
// width: widget.mediaQuery.size.width * 1.0,
// height: widget.mediaQuery.size.width * 1.0,
// ),
// Center(
// child: Container(
// margin: EdgeInsets.fromLTRB(5, 70, 5, 4),
// child: widget.model.convertBase64ToBarCodeImage() !=
// null
// ? Image.memory(
// widget.model.convertBase64ToBarCodeImage(),
// fit: BoxFit.fill,
// height: 100.0,
// width: 180.0
// )
// : Container(),
// ),
// ),
// ],
// ),
// )
// : Container(),
// ],
// ),
widget.isLacumHomePage
? Positioned(
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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -24,225 +24,225 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
return Container(
child: Stack(
children: [
CarouselSlider(
options: CarouselOptions(
enableInfiniteScroll: false,
enlargeCenterPage: false,
viewportFraction: 1.0,
scrollPhysics: widget.isLacumHomePage
? ScrollPhysics()
: NeverScrollableScrollPhysics(),
initialPage: 0,
onPageChanged: (index, reason) {
setState(() {
_current = index;
});
},
),
items: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey,
width: 0.4,
)),
),
margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0,
),
Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
"${widget.model.lacumInformation!.yahalaAccountNo}",
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
BorderedButton(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
? TranslationBase.of(context).active
: TranslationBase.of(context).inactive,
textColor: widget.model.lacumInformation!
.accountStatus! ==
1
? Colors.green
: Colors.red,
hasBorder: true,
borderColor: widget.model.lacumInformation!
.accountStatus ==
1
? Colors.green
: Colors.red,
radius: 16,
rPadding: 16,
icon: widget.model.lacumInformation!
.accountStatus ==
1
? Icon(
Icons.check_circle,
size: 25,
color: Colors.green,
)
: Image.asset(
"assets/images/pharmacy_module/lakum/inactive_cross.png",
fit: BoxFit.fill,
width: 25,
height: 25,
),
),
],
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"IDENTIFICATION #",
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumInformation!
.identificationNo,
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Texts(
"MEMBER SINCE",
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.formatCreatedDateToString(),
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
],
),
SizedBox(
height: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"MOBILE #",
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Texts(
TranslationBase.of(context).language,
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black,
),
Texts(
widget.model.lacumInformation!.prefLang ==
"1"
? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic,
fontSize: 16,
fontWeight: FontWeight.normal,
color: Colors.black,
),
],
),
],
),
],
),
),
],
),
),
widget.isLacumHomePage
? Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide(
color: Colors.grey,
width: 0.4,
)),
),
margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0,
),
Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
child: widget.model.convertBase64ToBarCodeImage() !=
null
? Image.memory(
widget.model.convertBase64ToBarCodeImage())
: Container(),
),
],
),
)
: Container(),
],
),
// CarouselSlider(
// options: CarouselOptions(
// enableInfiniteScroll: false,
// enlargeCenterPage: false,
// viewportFraction: 1.0,
// scrollPhysics: widget.isLacumHomePage
// ? ScrollPhysics()
// : NeverScrollableScrollPhysics(),
// initialPage: 0,
// onPageChanged: (index, reason) {
// setState(() {
// _current = index;
// });
// },
// ),
// items: [
// Container(
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.circular(4),
// border: Border.fromBorderSide(BorderSide(
// color: Colors.grey,
// width: 0.4,
// )),
// ),
// margin: EdgeInsets.symmetric(horizontal: 16),
// child: Stack(
// children: [
// Image.asset(
// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
// fit: BoxFit.fill,
// width: widget.mediaQuery.size.width * 1.0,
// height: widget.mediaQuery.size.width * 1.0,
// ),
// Container(
// margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
// child: Column(
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(
// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
// fontSize: 14,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// "${widget.model.lacumInformation!.yahalaAccountNo}",
// fontSize: 16,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// BorderedButton(
// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
// ? TranslationBase.of(context).active
// : TranslationBase.of(context).inactive,
// textColor: widget.model.lacumInformation!
// .accountStatus! ==
// 1
// ? Colors.green
// : Colors.red,
// hasBorder: true,
// borderColor: widget.model.lacumInformation!
// .accountStatus ==
// 1
// ? Colors.green
// : Colors.red,
// radius: 16,
// rPadding: 16,
// icon: widget.model.lacumInformation!
// .accountStatus ==
// 1
// ? Icon(
// Icons.check_circle,
// size: 25,
// color: Colors.green,
// )
// : Image.asset(
// "assets/images/pharmacy_module/lakum/inactive_cross.png",
// fit: BoxFit.fill,
// width: 25,
// height: 25,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 10,
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(
// "IDENTIFICATION #",
// fontSize: 14,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.lacumInformation!
// .identificationNo,
// fontSize: 16,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.end,
// children: [
// Texts(
// "MEMBER SINCE",
// fontSize: 14,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.formatCreatedDateToString(),
// fontSize: 16,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// ],
// ),
// SizedBox(
// height: 10,
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Texts(
// "MOBILE #",
// fontSize: 14,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
// fontSize: 16,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.end,
// children: [
// Texts(
// TranslationBase.of(context).language,
// fontSize: 14,
// fontWeight: FontWeight.bold,
// color: Colors.black,
// ),
// Texts(
// widget.model.lacumInformation!.prefLang ==
// "1"
// ? TranslationBase.of(context).lanEnglish
// : TranslationBase.of(context).lanArabic,
// fontSize: 16,
// fontWeight: FontWeight.normal,
// color: Colors.black,
// ),
// ],
// ),
// ],
// ),
// ],
// ),
// ),
// ],
// ),
// ),
// widget.isLacumHomePage
// ? Container(
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.circular(4),
// border: Border.fromBorderSide(BorderSide(
// color: Colors.grey,
// width: 0.4,
// )),
// ),
// margin: EdgeInsets.symmetric(horizontal: 16),
// child: Stack(
// children: [
// Image.asset(
// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
// fit: BoxFit.fill,
// width: widget.mediaQuery.size.width * 1.0,
// height: widget.mediaQuery.size.width * 1.0,
// ),
// Container(
// margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
// child: widget.model.convertBase64ToBarCodeImage() !=
// null
// ? Image.memory(
// widget.model.convertBase64ToBarCodeImage())
// : Container(),
// ),
// ],
// ),
// )
// : Container(),
// ],
// ),
widget.isLacumHomePage
? Positioned(
bottom: 1,

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

@ -214,7 +214,8 @@ class LiveCareService extends BaseService {
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) {
print(value);
deviceToken = value;
@ -337,7 +338,8 @@ class LiveCareService extends BaseService {
Future<Map> getOneSignalVOIPToken(String voipToken, BuildContext context) async {
Map<String, dynamic> request;
request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0};
// 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;

@ -36,14 +36,14 @@ class _SplashScreenState extends State<SplashScreen> {
void initState() {
AppGlobal.context = context;
super.initState();
print("Splash init called.............");
print("Splash init called.............");
Timer(
Duration(seconds: 1, milliseconds: 500),
() async {
await loadPrivilege().then((value) {
LocalNotification.init(onNotificationClick: (payload) {});
// LocalNotification.getInstance().showNow(title: "Payload", subtitle: "Subtitle", payload: "Payload");
if(!_privilegeService.hasError) {
if (!_privilegeService.hasError) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
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) {
// 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
Future loadPrivilege() async {
await _privilegeService.getPrivilege();

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

@ -5,8 +5,10 @@ import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.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/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/livecare/incoming_call.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/foundation.dart';
import 'package:flutter/material.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/call_state_type.dart';
// import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:get_it/get_it.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
@ -178,7 +180,7 @@ class PushNotificationHandler {
late HmsApiAvailability hmsApiAvailability;
final voIPKit = FlutterIOSVoIPKit.instance;
// final voIPKit = FlutterIOSVoIPKit.instance;
late Timer timeOutTimer;
bool isTalking = false;
@ -209,14 +211,73 @@ class PushNotificationHandler {
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 {
this.context = context;
if (Platform.isIOS) {
voIPKit.getVoIPToken().then((value) {
print("APNS VOIP KIT TOKEN: $value");
AppSharedPreferences().setString(APNS_TOKEN, value!);
});
// voIPKit.getVoIPToken().then((value) {
// print("APNS VOIP KIT 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) {
@ -311,8 +372,7 @@ class PushNotificationHandler {
onToken(token!);
});
if(Platform.isIOS) {
if (Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value!);
});
@ -372,7 +432,6 @@ class PushNotificationHandler {
].request();
print("=-=-=-=-=-=-=-=-=-=-");
print(statuses[Permission.location]);
}
} catch (_) {
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 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

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
// import 'package:shimmer/shimmer.dart';
class ShimmerLoadingWidget extends StatefulWidget {
Future<void> Function()? onPreProccess;
@ -46,7 +46,7 @@ class _ShimmerLoadingWidgetState extends State<ShimmerLoadingWidget> {
case ConnectionState.active:
break;
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;
case ConnectionState.done:
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/OffersProductsRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart';
@ -32,20 +32,20 @@ class _OffersAndPackagesWidgetState extends State<OffersAndPackagesWidget> {
@override
Widget build(BuildContext context) {
// TODO: implement build
var option = CarouselOptions(
height: HEIGHT,
aspectRatio: 16 / 9,
viewportFraction: 1,
initialPage: 0,
enableInfiniteScroll: true,
reverse: false,
autoPlay: true,
autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL),
autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION),
autoPlayCurve: Curves.fastOutSlowIn,
enlargeCenterPage: true,
scrollDirection: Axis.horizontal,
);
// var option = CarouselOptions(
// height: HEIGHT,
// aspectRatio: 16 / 9,
// viewportFraction: 1,
// initialPage: 0,
// enableInfiniteScroll: true,
// reverse: false,
// autoPlay: true,
// autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL),
// autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION),
// autoPlayCurve: Curves.fastOutSlowIn,
// enlargeCenterPage: true,
// scrollDirection: Axis.horizontal,
// );
// return Container(
// height: HEIGHT,
@ -102,13 +102,13 @@ class _OffersAndPackagesWidgetState extends State<OffersAndPackagesWidget> {
realWidget: () {
if (widget.models.isNotEmpty) {
return Container(
child: CarouselSlider.builder(
itemCount: widget.models.length,
itemBuilder: (BuildContext context, int itemIndex,int realIndex) {
var item = widget.models[itemIndex];
return OfferPackagesItemWidget(model: item);
},
options: option),
// child: CarouselSlider.builder(
// itemCount: widget.models.length,
// itemBuilder: (BuildContext context, int itemIndex,int realIndex) {
// var item = widget.models[itemIndex];
// return OfferPackagesItemWidget(model: item);
// },
// options: option),
);
} else {
return Container();

Binary file not shown.

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.73+1
version: 4.5.054+4050054
environment:
sdk: ">=3.0.0 <3.13.0"
@ -143,18 +143,18 @@ dependencies:
#geofencing: any
speech_to_text: ^6.1.1
#in_app_update: ^4.2.2
in_app_update: ^4.2.2
in_app_review: ^2.0.3
badges: ^3.1.2
flutter_app_icon_badge: ^2.0.0
dropdown_search: 5.0.6
# dropdown_search: 5.0.6
youtube_player_flutter: ^8.1.2
shimmer: ^3.0.0
# shimmer: ^3.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_location: ^6.11.0+301
share_plus: ^6.3.4
@ -163,7 +163,7 @@ dependencies:
equatable: ^2.0.3
wave: ^0.2.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
open_filex: ^4.3.2
path_provider: ^2.0.8

Loading…
Cancel
Save