Compare commits

...

33 Commits

Author SHA1 Message Date
sultan khan 2dfaf356ff Merge branch 'master' of https://34.17.52.180/Haroon6138/queuing_system into development 1 year ago
FaizHashmiCS22 49d69ab809 Added Longpooling temporary as a transport type. Need to update that to websockets 1 year ago
FaizHashmiCS22 366541f20f Added connection checks 1 year ago
FaizHashmiCS22 ca664cda0f Added connection checks 1 year ago
FaizHashmiCS22 686f73a98b Upgraded to latest 1 year ago
Faiz Hashmi 291215907c Fixed VitalSign issue 2 years ago
Faiz Hashmi 6e5234ec07 streamed installed with adb 2 years ago
Faiz Hashmi 6bf23c9ca4 Fixed the issue of stucking at second patient call 2 years ago
Faiz Hashmi 759e9d388a changes from Mac 2 years ago
FaizHashmiCS22 582fb4ca86 Fixes Tone Repeat 2 years ago
FaizHashmiCS22 341337e566 Fixes Tone Repeat 2 years ago
Faiz Hashmi 6a60090f9a Tone Repetition Fixed 2 years ago
faizatflutter ffd9c8c990 Changed to Production 2 years ago
Faiz Hashmi 07b337ba70 Till the Khobar Team Demo 2 years ago
faizatflutter 3982491386 Fixed Repeating issue 2 years ago
faizatflutter 8bc4b08646 Fixes 2 years ago
faizatflutter 1205ae060b CALLING FIX 2 years ago
faizatflutter 1bd1abe01d orientation uopdated 2 years ago
faizatflutter 66010e4f5d FIXED THE LIST ISSUE FROM PERSONAL MAC 2 years ago
Faiz Hashmi 2398a67465 Added Waiting patient 2 years ago
Faiz Hashmi 6852ed87a9 Final testing after orientation 2 years ago
Faiz Hashmi ee3ff98b5d Added Screen orientation 2 years ago
Faiz Hashmi 867e2779e3 Added Screen orientation 2 years ago
FaizHashmiCS22 3b1966f819 Bug fixes AMG 2 years ago
FaizHashmiCS22 74ab4d5f84 Added the Arabic Language Support 2 years ago
FaizHashmiCS22 87ba49fe54 Counter Fix 2 years ago
FaizHashmiCS22 1c199f6351 Counter Fix 2 years ago
FaizHashmiCS22 1da3bcf843 Added RSS Feed Implementation 2 years ago
FaizHashmiCS22 98888a32f0 Updated Design for Info Widgets and RssFeed 2 years ago
FaizHashmiCS22 5262af379e Widgets Info Completed 2 years ago
FaizHashmiCS22 eea3394461 Widgets Info Completed 2 years ago
FaizHashmiCS22 74aefd4b05 Added Weather 2 years ago
haroon amjad a6537f1658 Merge branch 'zik' into 'development'
Updates

See merge request Cloud_Solution/queuing_system!6
3 years ago

@ -0,0 +1 @@
/Users/zik/fvm/versions/3.7.5

@ -0,0 +1,4 @@
{
"flutterSdkVersion": "3.7.5",
"flavors": {}
}

@ -21,14 +21,17 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace = "com.example.queuing_system"
compileSdkVersion flutter.compileSdkVersion
compileOptions {
compileSdkVersion 34
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
@ -44,10 +47,12 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.queuing_system"
minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger()
minSdkVersion 24
// minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger()
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
@ -65,4 +70,6 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}

@ -4,6 +4,7 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.INTERNET" />
<queries>
<intent>
@ -16,14 +17,15 @@
android:label="queuing_system">
<receiver
android:name="BootReceiver"
android:enabled="true"
android:exported="true"
android:name="BootReceiver"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

@ -6,26 +6,35 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:8.7.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
#Tue Nov 12 09:01:21 AST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip

@ -1,11 +1,26 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.7.0' apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"

@ -0,0 +1,33 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<g clip-rule="evenodd" fill-rule="evenodd">
<path
d="m10.5714 5.7738c-2.78119 0-5.03576 2.25457-5.03576 5.0357 0 .8311.20189 1.6171.55995 2.3098.12879.2491.3858.4056.66624.4056h8.09527c.4142 0 .75-.3358.75-.75v-1.4892-.4762c0-2.78113-2.2546-5.0357-5.0357-5.0357z"
fill="#E5B045" />
<path
d="m10.5 5.77429v7.22571h-4.46407c-.32074-.6631-.50029-1.4068-.50029-2.1905 0-2.75731 2.21611-4.99704 4.96436-5.03521z"
fill="#e5b045" />
<path
d="m11.5831 9.58331c-3.37338 0-6.18137 2.53149-6.39207 5.78539-1.68658.3293-2.98888 1.7661-2.98888 3.536 0 2.0208 1.69742 3.6072 3.72619 3.6072h1.78571 10.11905c.5478 0 1.0705-.1149 1.5418-.3225 1.9561-.7122 3.3749-2.5408 3.3749-4.7132 0-2.8097-2.3637-5.0357-5.2143-5.0357-.18 0-.358.0088-.5336.0261-1.1384-1.7391-3.1458-2.88329-5.4188-2.88329z"
fill="#cfd8dc" />
<path
d="m12 9.59621v12.91569h-4.28595-1.78571c-2.02877 0-3.72619-1.5864-3.72619-3.6072 0-1.7699 1.3023-3.2067 2.98888-3.536.2107-3.2539 3.01869-5.78539 6.39207-5.78539.14 0 .279.00435.4169.0129z"
fill="#cfd8dc" />
<path
d="m10.5714 1.4881c.4142 0 .75.33578.75.75v1.90476c0 .41421-.3358.75-.75.75s-.74997-.33579-.74997-.75v-1.90476c0-.41422.33577-.75.74997-.75z"
fill="#ff884d" />
<g fill="#e57a45">
<path
d="m10.5 1.49146v3.39805c-.3807-.03596-.67859-.35652-.67859-.74665v-1.90476c0-.39013.29789-.71068.67859-.74664z" />
<path
d="m1.25 10.3333c0-.41417.33579-.74996.75-.74996h1.90476c.41422 0 .75.33579.75.74996 0 .4143-.33578.75-.75.75h-1.90476c-.41421 0-.75-.3357-.75-.75z" />
<path
d="m3.85063 4.08872c.29289-.29289.76776-.29289 1.06066 0l1.34687 1.34687c.29289.29289.29289.76777 0 1.06066-.2929.29289-.76777.29289-1.06066 0l-1.34687-1.34687c-.2929-.29289-.2929-.76777 0-1.06066z" />
</g>
<path
d="m17.2104 4.08872c-.2929-.29289-.7678-.29289-1.0607 0l-1.3468 1.34687c-.2929.29289-.2929.76777 0 1.06066s.7677.29289 1.0606 0l1.3469-1.34687c.2929-.29289.2929-.76777 0-1.06066z"
fill="#ff884d" />
<path
d="m16.4881 10.3333c0-.41417.3358-.74996.75-.74996h1.9048c.4142 0 .75.33579.75.74996 0 .4143-.3358.75-.75.75h-1.9048c-.4142 0-.75-.3357-.75-.75z"
fill="#ff884d" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><g fill="#45B0E5"><path d="m12.0003 1.25c.4142 0 .75.33579.75.75v20c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-20c0-.41421.3358-.75.75-.75z"/><path d="m8.69303 1.87619c.33138-.24852.80148-.18137 1.05.15l2.25717 3.00953 2.2571-3.00953c.2485-.33137.7186-.39852 1.05-.15.3314.24853.3985.71863.15 1.05l-2.8467 3.79562c-.0237.03322-.0504.06479-.08.09431-.0627.06281-.1346.11257-.2119.14874-.1014.04773-.2103.07099-.3185.0709-.1082.00009-.2171-.02317-.3186-.0709-.0773-.03616-.1492-.08593-.2118-.14874-.0296-.02952-.0563-.06109-.08-.0943l-2.84677-3.79563c-.24852-.33137-.18137-.80147.15-1.05z"/><path d="m8.69303 22.1238c.33138.2485.80148.1814 1.05-.15l2.25717-3.0095 2.2571 3.0095c.2485.3314.7186.3985 1.05.15s.3985-.7186.15-1.05l-2.8467-3.7956c-.0237-.0332-.0504-.0648-.08-.0943-.0627-.0628-.1346-.1126-.2119-.1488-.1014-.0477-.2103-.0709-.3185-.0709s-.2171.0232-.3186.0709c-.0773.0362-.1492.086-.2118.1488-.0296.0295-.0563.0611-.08.0943l-2.84677 3.7956c-.24852.3314-.18137.8015.15 1.05z"/><path d="m2.69035 6.625c.2071-.35872.6658-.48162 1.02451-.27452l17.32054 10.00002c.3587.2071.4816.6658.2745 1.0245s-.6658.4816-1.0245.2745l-17.32054-9.99998c-.35871-.20711-.48162-.6658-.27451-1.02452z"/><path d="m1.57915 9.80218c-.04955-.41124.24366-.78478.6549-.83433l3.7349-.44998-1.47775-3.45951c-.16271-.38091.01418-.82161.39509-.98432.38092-.16272.82162.01418.98433.39509l1.86374 4.36314c.0169.03717.03089.07607.04166.11646.02307.08567.03022.17281.0229.25782-.0094.11175-.0437.21766-.09788.31134-.05404.09376-.12861.17642-.22069.24044-.06996.04884-.149.08622-.23473.10907-.04036.01087-.08104.01821-.12168.02216l-4.71046.56754c-.41124.0495-.78478-.2437-.83433-.65492z"/><path d="m19.1137 19.926c.3809-.1627.5578-.6034.3951-.9843l-1.4777-3.4596 3.7348-.4499c.4113-.0496.7045-.4231.655-.8344-.0496-.4112-.4231-.7044-.8344-.6549l-4.7104.5676c-.0407.0039-.0814.0112-.1217.0221-.0857.0229-.1648.0602-.2347.1091-.0921.064-.1667.1467-.2207.2404-.0542.0937-.0885.1996-.0979.3114-.0073.085-.0002.1721.0229.2578.0108.0404.0247.0793.0416.1164l1.8638 4.3632c.1627.3809.6034.5578.9843.3951z"/><path d="m2.69035 17.375c.2071.3587.6658.4816 1.02451.2745l17.32054-10.00001c.3587-.20711.4816-.6658.2745-1.02452s-.6658-.48163-1.0245-.27452l-17.32054 9.99995c-.35871.2072-.48162.6658-.27451 1.0246z"/><path d="m1.57915 14.1978c-.04955.4113.24366.7848.6549.8344l3.7349.4499-1.47775 3.4595c-.16271.381.01418.8217.39509.9844.38092.1627.82162-.0142.98433-.3951l1.86374-4.3632c.0169-.0371.03089-.076.04166-.1164.02307-.0857.03022-.1728.0229-.2578-.0094-.1118-.0437-.2177-.09788-.3114-.05404-.0938-.12861-.1764-.22069-.2404-.06996-.0489-.149-.0862-.23473-.1091-.04036-.0109-.08104-.0182-.12168-.0222l-4.71046-.5675c-.41124-.0495-.78478.2437-.83433.6549z"/><path d="m19.1137 4.07402c.3809.16271.5578.60341.3951.98433l-1.4777 3.4595 3.7348.44998c.4113.04955.7045.42309.655.83433-.0496.41124-.4231.70444-.8344.65494l-4.7104-.56756c-.0407-.00395-.0814-.01128-.1217-.02215-.0857-.02286-.1648-.06024-.2347-.10908-.0921-.06402-.1667-.14667-.2207-.24044-.0542-.09368-.0885-.19959-.0979-.31134-.0073-.08501-.0002-.17215.0229-.25782.0108-.04038.0247-.07928.0416-.11645l1.8638-4.36314c.1627-.38092.6034-.55781.9843-.3951z"/></g><path d="m12 1.25v21.5c-.4141-.0002-.7497-.3359-.7497-.75v-2.0358l-1.50726 2.0096c-.24853.3314-.71863.3985-1.05.15s-.39853-.7186-.15-1.05l2.70726-3.6096v-4.1653l-3.60728 2.0827-1.7724 4.1493c-.16271.3809-.60341.5578-.98433.3951-.38091-.1627-.5578-.6034-.39509-.9844l.98676-2.31-1.76308 1.0179c-.35872.2071-.81741.0842-1.02452-.2745-.20711-.3588-.0842-.8174.27452-1.0245l1.76296-1.0179-2.49378-.3004c-.41124-.0496-.70445-.4231-.65491-.8344.04955-.4112.42309-.7044.83433-.6549l4.47943.5397 3.60719-2.0826-3.60715-2.08261-4.47947.53971c-.41124.0495-.78478-.2437-.83433-.65493-.04954-.41124.24367-.78478.65491-.83432l2.49383-.30046-1.76301-1.01787c-.35872-.20711-.48163-.6658-.27452-1.02452s.6658-.48163 1.02452-.27452l1.76306 1.0179-.98674-2.31002c-.16271-.38092.01418-.82161.39509-.98432.38092-.16272.82162.01417.98433.39509l1.77238 4.14925 3.6073 2.08262v-4.16515l-2.70726-3.60965c-.24853-.33137-.18137-.80148.15-1.05.33137-.24853.80147-.18137 1.05.15l1.50726 2.00965v-2.03585c0-.41411.3356-.74984.7497-.75z" fill="#45b0e5"/></g></svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -0,0 +1 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m7.39024 1.73781c-2.03065 0-3.67683 1.64617-3.67683 3.67683v8.60306c-.90458.9259-1.46341 2.1941-1.46341 3.5921 0 2.8388 2.30137 5.1402 5.14024 5.1402 2.83886 0 5.14026-2.3014 5.14026-5.1402 0-1.398-.5588-2.6662-1.4634-3.5921v-8.60306c0-2.03066-1.6462-3.67683-3.67686-3.67683z" fill="#cfd8dc"/><path d="m7.5 1.73942v21.00948c-.03649.0007-.07308.0011-.10976.0011-2.83887 0-5.14024-2.3014-5.14024-5.1402 0-1.398.55883-2.6662 1.46341-3.5921v-8.60306c0-2.03066 1.64618-3.67683 3.67683-3.67683.03672 0 .07331.00054.10976.00161z" fill="#cfd8dc"/><path d="m7.39018 14.9085c-1.49184 0-2.70122 1.2094-2.70122 2.7013 0 1.4918 1.20938 2.7012 2.70122 2.7012 1.49185 0 2.70122-1.2094 2.70122-2.7012 0-1.4919-1.20937-2.7013-2.70122-2.7013z" fill="#ee4d4d"/><path d="m7.5 14.9107v5.3981c-.03642.0014-.07303.0022-.10982.0022-1.49184 0-2.70122-1.2094-2.70122-2.7012 0-1.4919 1.20938-2.7013 2.70122-2.7013.03679 0 .0734.0008.10982.0022z" fill="#d64545"/><path d="m15.1954 5.64024c-1.4919 0-2.7013 1.20938-2.7013 2.70122 0 1.49185 1.2094 2.70124 2.7013 2.70124 1.4918 0 2.7012-1.20939 2.7012-2.70124 0-1.49184-1.2094-2.70122-2.7012-2.70122z" fill="#E5B045"/><path d="m17.892 8.5h-5.3933c.0821 1.41805 1.258 2.5427 2.6967 2.5427 1.4386 0 2.6145-1.12465 2.6966-2.5427z" fill="#e5b045"/><path d="m15.1951 1.25c.4142 0 .75.33579.75.75v1.95122c0 .41421-.3358.75-.75.75s-.75-.33579-.75-.75v-1.95122c0-.41421.3358-.75.75-.75z" fill="#ff884d"/><path d="m15.1951 11.9817c.4142 0 .75.3358.75.75v1.9512c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-1.9512c0-.4142.3358-.75.75-.75z" fill="#e57a45"/><path d="m17.7693 10.9155c.2929-.2929.7678-.2929 1.0607 0l1.3797 1.3797c.2929.2929.2929.7678 0 1.0607s-.7678.2929-1.0607 0l-1.3797-1.3797c-.2929-.2929-.2929-.7678 0-1.0607z" fill="#e57a45"/><path d="m20.2095 3.32705c-.2929-.2929-.7677-.2929-1.0606 0l-1.3797 1.37972c-.2929.29289-.2929.76776 0 1.06066.2929.29289.7677.29289 1.0606 0l1.3797-1.37972c.2929-.2929.2929-.76777 0-1.06066z" fill="#ff884d"/><path d="m18.8354 8.34146c0-.41421.3357-.75.75-.75h1.9512c.4142 0 .75.33579.75.75s-.3358.75-.75.75h-1.9512c-.4143 0-.75-.33579-.75-.75z" fill="#ff884d"/><path d="m22.2698 8.5c-.0727.33807-.3734.59146-.7332.59146h-1.9512c-.3598 0-.6605-.25339-.7332-.59146z" fill="#e57a45"/></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1 @@
<svg height="512" viewBox="0 0 64 64" width="512" xmlns="http://www.w3.org/2000/svg"><g id="Ka_bah" data-name="Ka'bah"><path d="m57 12v39l-25 8-25-8v-39l25-7z" fill="#1a1a1a"/><path d="m7 12 25-7 25 7-25 8z" fill="#4d4d4d"/><path d="m32 20-18.33-5.87 18.33-5.13 18.33 5.13z" fill="#333"/><path d="m57 12v39l-12 3.84-9 2.88-4 1.28v-39z"/><path d="m45 38v16.84l-7.83 2.51-1.17.37v-16.72z" fill="#f8be31"/><path d="m36 29.62-4 1.28-4-1.28v4l4 1.28 4-1.28z" fill="#fbd63b"/><path d="m36 29.62-4 1.28v4l4-1.28z" fill="#f8be31"/><path d="m42 27.75-2 2.25 2 2 2-2z" fill="#f8be31"/><path d="m22 27.75-2 2.25 2 2 2-2z" fill="#fbd63b"/><path d="m54 23.86v4l-6 1.92v-4z" fill="#f8be31"/><path d="m10 23.86v4l6 1.92v-4z" fill="#fbd63b"/><path d="m57 14.9v4l-25 8-25-8v-4l25 8z" fill="#fbd63b"/><path d="m57 19-25 8v-4.1l25-7.9z" fill="#f8be31"/><path d="m45 38v16.84l-7.83 2.51a15.3966 15.3966 0 0 0 4.83-4.67 15.5638 15.5638 0 0 0 2.56-7.61z" fill="#f7a62b"/></g></svg>

After

Width:  |  Height:  |  Size: 959 B

@ -0,0 +1 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m11.1071 1.25c-3.37334 0-6.18133 2.53144-6.39203 5.78536-1.68658.32932-2.98888 1.76608-2.98888 3.53604 0 2.0208 1.69742 3.6072 3.72619 3.6072h1.78571 10.11901c.5479 0 1.0705-.1149 1.5419-.3225 1.956-.7122 3.3748-2.5408 3.3748-4.71324 0-2.80971-2.3637-5.03572-5.2143-5.03572-.1799 0-.358.00883-.5336.0261-1.1383-1.73901-3.1458-2.88324-5.4188-2.88324z" fill="#cfd8dc"/><path d="m12 1.30962v12.86898h-4.76191-1.78571c-2.02877 0-3.72619-1.5864-3.72619-3.6072 0-1.76996 1.3023-3.20672 2.98888-3.53604.2107-3.25392 3.01869-5.78536 6.39203-5.78536.3028 0 .6009.02031.8929.05962z" fill="#cfd8dc"/><path d="m7.57334 15.1387c.37049.1853.52065.6358.33541 1.0063l-1.42857 2.8571c-.18524.3705-.63575.5207-1.00623.3354-.37048-.1852-.52065-.6357-.33541-1.0062l1.42857-2.8572c.18524-.3704.63575-.5206 1.00623-.3354z" fill="#45b0e5"/><path d="m12.3356 15.1387c.3705.1853.5207.6358.3354 1.0063l-1.4285 2.8571c-.1853.3705-.6358.5207-1.0063.3354-.37044-.1852-.52061-.6357-.33537-1.0062l1.42857-2.8572c.1852-.3704.6357-.5206 1.0062-.3354z" fill="#4dc4ff"/><path d="m17.0975 15.1387c.3704.1853.5206.6358.3354 1.0063l-1.4286 2.8571c-.1853.3705-.6358.5207-1.0062.3354-.3705-.1852-.5207-.6357-.3355-1.0062l1.4286-2.8572c.1853-.3704.6358-.5206 1.0063-.3354z" fill="#4dc4ff"/><path d="m8.52609 18.472c.37048.1853.52065.6358.33541 1.0062l-1.42858 2.8572c-.18524.3705-.63574.5206-1.00623.3354-.37048-.1852-.52065-.6357-.33541-1.0062l1.42858-2.8572c.18524-.3705.63574-.5206 1.00623-.3354z" fill="#45b0e5"/><path d="m13.2879 18.472c.3705.1853.5207.6358.3354 1.0062l-1.4286 2.8572c-.1852.3705-.6357.5206-1.0062.3354s-.5206-.6357-.3354-1.0062l1.4286-2.8572c.1852-.3705.6357-.5206 1.0062-.3354z" fill="#4dc4ff"/><path d="m12 19.3708v3.209c-.2218.1819-.5384.2276-.8115.091-.3705-.1852-.5206-.6357-.3354-1.0062zm0-4.3114v2.4277l-.7575 1.515c-.1853.3705-.6358.5207-1.0063.3354-.37044-.1852-.52061-.6357-.33537-1.0062l1.42857-2.8572c.1313-.2625.3958-.4144.6706-.4147z" fill="#45b0e5"/><path d="m18.0497 18.472c.3705.1853.5207.6358.3354 1.0062l-1.4285 2.8572c-.1853.3705-.6358.5206-1.0063.3354s-.5206-.6357-.3354-1.0062l1.4286-2.8572c.1852-.3705.6357-.5206 1.0062-.3354z" fill="#4dc4ff"/></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m12 1.25c.4142 0 .75.33579.75.75v4.54545c0 .41422-.3358.75-.75.75s-.75-.33578-.75-.75v-4.54545c0-.41421.3358-.75.75-.75z" fill="#ff884d"/><path d="m12 16.7046c.4142 0 .75.3357.75.75v4.5454c0 .4142-.3358.75-.75.75s-.75-.3358-.75-.75v-4.5454c0-.4143.3358-.75.75-.75z" fill="#ff884d"/><g fill="#e57a45"><path d="m12 1.25c-.4142 0-.75.33579-.75.75v4.27273c0 .41421.3358.75.75.75z"/><path d="m12 16.9773c-.4142 0-.75.3358-.75.75v4.2727c0 .4142.3358.75.75.75z"/><path d="m4.39843 4.39859c.2929-.29289.76777-.29289 1.06066 0l3.21413 3.21413c.29289.29289.29289.76776 0 1.06066-.2929.29289-.76777.29289-1.06066 0l-3.21413-3.21413c-.29289-.29289-.29289-.76776 0-1.06066z"/></g><path d="m15.3266 15.3266c.2929-.2929.7678-.2929 1.0607 0l3.2141 3.2141c.2929.2929.2929.7678 0 1.0607-.2929.2928-.7678.2928-1.0607 0l-3.2141-3.2142c-.2929-.2929-.2929-.7677 0-1.0606z" fill="#ff884d"/><path d="m19.6011 4.39859c-.2929-.29289-.7678-.29289-1.0607 0l-3.2141 3.21413c-.2929.29289-.2929.76776 0 1.06066.2929.29289.7678.29289 1.0607 0l3.2141-3.21413c.2929-.29289.2929-.76776 0-1.06066z" fill="#ff884d"/><path d="m8.67337 15.3266c-.29289-.2929-.76776-.2929-1.06066 0l-3.21412 3.2141c-.29289.2929-.29289.7678 0 1.0607.2929.2928.76777.2928 1.06066 0l3.21412-3.2142c.2929-.2929.2929-.7677 0-1.0606z" fill="#e57a45"/><path d="m1.25 12c0-.4142.33579-.75.75-.75h4.54545c.41422 0 .75.3358.75.75s-.33578.75-.75.75h-4.54545c-.41421 0-.75-.3358-.75-.75z" fill="#e57a45"/><path d="m16.7043 12c0-.4142.3358-.75.75-.75h4.5455c.4142 0 .75.3358.75.75s-.3358.75-.75.75h-4.5455c-.4142 0-.75-.3358-.75-.75z" fill="#ff884d"/><path d="m12.0004 5.79544c-3.42663 0-6.2045 2.77787-6.2045 6.20456 0 3.4267 2.77787 6.2045 6.2045 6.2045 3.4267 0 6.2046-2.7778 6.2046-6.2045 0-3.42669-2.7779-6.20456-6.2046-6.20456z" fill="#E5B045"/><path d="m12 5.79547v12.40913c-3.42672 0-6.20459-2.7779-6.20459-6.2046 0-3.42666 2.77787-6.20453 6.20459-6.20453z" fill="#e5b045"/></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m10.5714 5.7738c-2.78119 0-5.03576 2.25457-5.03576 5.0357 0 .8311.20189 1.6171.55995 2.3098.12879.2491.3858.4056.66624.4056h8.09527c.4142 0 .75-.3358.75-.75v-1.4892-.4762c0-2.78113-2.2546-5.0357-5.0357-5.0357z" fill="#E5B045"/><path d="m10.5 5.77429v7.22571h-4.46407c-.32074-.6631-.50029-1.4068-.50029-2.1905 0-2.75731 2.21611-4.99704 4.96436-5.03521z" fill="#e5b045"/><path d="m11.5831 9.58331c-3.37338 0-6.18137 2.53149-6.39207 5.78539-1.68658.3293-2.98888 1.7661-2.98888 3.536 0 2.0208 1.69742 3.6072 3.72619 3.6072h1.78571 10.11905c.5478 0 1.0705-.1149 1.5418-.3225 1.9561-.7122 3.3749-2.5408 3.3749-4.7132 0-2.8097-2.3637-5.0357-5.2143-5.0357-.18 0-.358.0088-.5336.0261-1.1384-1.7391-3.1458-2.88329-5.4188-2.88329z" fill="#cfd8dc"/><path d="m12 9.59621v12.91569h-4.28595-1.78571c-2.02877 0-3.72619-1.5864-3.72619-3.6072 0-1.7699 1.3023-3.2067 2.98888-3.536.2107-3.2539 3.01869-5.78539 6.39207-5.78539.14 0 .279.00435.4169.0129z" fill="#cfd8dc"/><path d="m10.5714 1.4881c.4142 0 .75.33578.75.75v1.90476c0 .41421-.3358.75-.75.75s-.74997-.33579-.74997-.75v-1.90476c0-.41422.33577-.75.74997-.75z" fill="#ff884d"/><g fill="#e57a45"><path d="m10.5 1.49146v3.39805c-.3807-.03596-.67859-.35652-.67859-.74665v-1.90476c0-.39013.29789-.71068.67859-.74664z"/><path d="m1.25 10.3333c0-.41417.33579-.74996.75-.74996h1.90476c.41422 0 .75.33579.75.74996 0 .4143-.33578.75-.75.75h-1.90476c-.41421 0-.75-.3357-.75-.75z"/><path d="m3.85063 4.08872c.29289-.29289.76776-.29289 1.06066 0l1.34687 1.34687c.29289.29289.29289.76777 0 1.06066-.2929.29289-.76777.29289-1.06066 0l-1.34687-1.34687c-.2929-.29289-.2929-.76777 0-1.06066z"/></g><path d="m17.2104 4.08872c-.2929-.29289-.7678-.29289-1.0607 0l-1.3468 1.34687c-.2929.29289-.2929.76777 0 1.06066s.7677.29289 1.0606 0l1.3469-1.34687c.2929-.29289.2929-.76777 0-1.06066z" fill="#ff884d"/><path d="m16.4881 10.3333c0-.41417.3358-.74996.75-.74996h1.9048c.4142 0 .75.33579.75.74996 0 .4143-.3358.75-.75.75h-1.9048c-.4142 0-.75-.3357-.75-.75z" fill="#ff884d"/></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1 @@
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m14.1957 16.8961c-.394 0-.7135.3194-.7135.7134 0 .3941.3195.7135.7135.7135h7.3174c.4143 0 .75.3358.75.75s-.3357.75-.75.75h-7.3174c-1.2225 0-2.2135-.991-2.2135-2.2135 0-1.2224.991-2.2134 2.2135-2.2134h.4878c.4143 0 .75.3357.75.75 0 .4142-.3357.75-.75.75z" fill="#8b98a6"/><path d="m17.6105 21.25c-.394 0-.7135-.3194-.7135-.7135 0-.394.3195-.7135.7135-.7135h4.3905c.4142 0 .75-.3358.75-.75s-.3358-.75-.75-.75h-4.3905c-1.2225 0-2.2135.991-2.2135 2.2135s.991 2.2135 2.2135 2.2135h.4878c.4143 0 .75-.3358.75-.75s-.3357-.75-.75-.75z" fill="#8b98a6"/><path d="m12 17.8913v-.5635c.1384-1.0894 1.0687-1.9317 2.1957-1.9317h.4879c.4142 0 .75.3357.75.75 0 .4142-.3358.75-.75.75h-.4879c-.394 0-.7135.3194-.7135.7134 0 .3941.3195.7135.7135.7135h3.4119.0029 1.3895v1.5h-1.3911c-.3933.0009-.7119.32-.7119.7135 0 .3941.3195.7135.7135.7135h.4878c.4143 0 .75.3358.75.75s-.3357.75-.75.75h-.4878c-1.2225 0-2.2135-.991-2.2135-2.2135 0-.2496.0414-.4896.1175-.7135h-1.3188c-1.127 0-2.0573-.8423-2.1957-1.9317z" fill="#7d8995"/><path d="m3.70066 15.9224c.39295.131.60532.5557.47434.9487l-.97566 2.9269c-.13098.393-.55572.6054-.94868.4744s-.60533-.5558-.47434-.9487l.97565-2.927c.13099-.3929.55573-.6053.94869-.4743z" fill="#45b0e5"/><path d="m7.11546 15.9224c.39296.131.60533.5557.47434.9487l-.97566 2.9269c-.13098.393-.55572.6054-.94868.4744s-.60533-.5558-.47434-.9487l.97566-2.927c.13098-.3929.55572-.6053.94868-.4743z" fill="#4dc4ff"/><path d="m6.5 15.9863v4.0284c-.1889.2487-.52178.3619-.83452.2577-.39296-.131-.60533-.5558-.47434-.9487l.97565-2.927c.05995-.1798.18142-.3218.33321-.4104z" fill="#45b0e5"/><path d="m10.5303 15.9224c.3929.131.6053.5557.4743.9487l-.9757 2.9269c-.13094.393-.55568.6054-.94864.4744s-.60533-.5558-.47434-.9487l.97565-2.927c.13099-.3929.55573-.6053.94873-.4743z" fill="#4dc4ff"/><path d="m16.6342 1.24902c-3.647.00029-6.6034 2.95687-6.6034 6.60395 0 .18488.0076.36815.0225.54949.0094.11306.0442.22252.102.32016l2.5968 4.39048c.0575.0972.1363.1802.2303.2427 1.0464.6957 2.3032 1.1011 3.6523 1.1011 2.7484 0 5.103-1.6787 6.0976-4.0639.1243-.2981.0438-.64238-.1999-.85442-.2437-.21205-.5958-.24423-.8739-.07988-.614.36283-1.3299.5712-2.0968.5712-.1399 0-.2779-.0069-.4137-.0204-2.0854-.20702-3.7146-1.96764-3.7146-4.10785 0-1.34996.6472-2.54855 1.6513-3.30301.258-.19384.3631-.53101.2609-.83712s-.3887-.51252-.7114-.5125z" fill="#E5B045"/><path d="m16.3634 8.5h-6.2928c.0173.07382.0458.14481.0846.21044l2.5969 4.39046c.0575.0972.1362.1802.2303.2427 1.0464.6958 2.3031 1.1011 3.6523 1.1011 2.7484 0 5.103-1.6787 6.0975-4.0638.1244-.2982.0438-.64245-.1999-.8545-.2437-.21204-.5958-.24422-.8739-.07987-.6139.36282-1.3298.57127-2.0967.57127-.1399 0-.2779-.007-.4138-.02045-1.1205-.11126-2.1094-.67109-2.7845-1.49735z" fill="#e5b045"/><path d="m7.30514 6.1273c-2.11887 0-3.94284 1.49742-4.19586 3.51307-1.04955.29212-1.85928 1.20703-1.85928 2.35913 0 1.4051 1.2044 2.4574 2.57936 2.4574h1.09761 6.21983c.371 0 .7265-.075 1.0487-.2116 1.2952-.4623 2.2624-1.6542 2.2624-3.0995 0-1.87656-1.6139-3.3111-3.494-3.3111-.0636 0-.1268.00162-.1897.00481-.77-1.0448-2.04614-1.71221-3.46906-1.71221z" fill="#cfd8dc"/><path d="m8 6.16899v8.27571h-3.07303-1.09761c-1.37496 0-2.57936-1.0523-2.57936-2.4574 0-1.152.80973-2.06697 1.85928-2.35909.25302-2.01565 2.07699-3.51307 4.19586-3.51307.23621 0 .46838.0184.69486.05385z" fill="#cfd8dc"/></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -5,9 +5,18 @@ import 'package:queuing_system/core/base/base_app_client.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/core/response_models/patient_ticket_model.dart';
import 'package:queuing_system/core/response_models/prayers_widget_model.dart';
import 'package:queuing_system/core/response_models/rss_feed_model.dart';
import 'package:queuing_system/core/response_models/test_patients.dart';
import 'package:queuing_system/core/response_models/weathers_widget_model.dart';
import 'package:queuing_system/core/response_models/widgets_config_model.dart';
const _getCallRequestInfoByClinicInfo = "/GetCallRequestInfo_ByIP";
const _callUpdateNotIsQueueRecordByIDAsync = "/CallRequest_QueueUpdate";
const _waitingAreaScreenConfigGet = "/WaitingAreaScreen_Config_Get";
const _weatherForecastGetBy5Days = "/WeatherForecast_GetBy5Days";
const _prayerTimeToday = "/PrayerTime_Today";
const _rssFeedGet = "/RssFeed_Get";
class MyHttpOverrides extends HttpOverrides {
@override
@ -20,12 +29,15 @@ class API {
static getCallRequestInfoByClinicInfo(String deviceIp,
{required Function(List<PatientTicketModel>, List<PatientTicketModel>, CallConfig callConfig) onSuccess, required Function(dynamic) onFailure}) async {
final body = {"ipAdress": deviceIp, "apiKey": apiKey};
bool isDevMode = true;
bool isDevMode = false;
if (isDevMode) {
var callPatients = PatientTicketModel.testCallPatients;
CallConfig callConfig = CallConfig.testCallConfig;
final Map<String, dynamic> response = testPatientsData["data"] as Map<String, dynamic>;
var isQueuePatients = callPatients.where((element) => (element.isQueue == false)).toList();
CallConfig callConfig = CallConfig.fromJson(response["callConfig"]);
var callPatients = (response["callPatients"] as List).map((j) => PatientTicketModel.fromJson(j)).toList().where((element) => element.callType != 0).toList();
var isQueuePatients = callPatients.where((element) => (element.isQueue == false && element.callType != 0)).toList();
log("callPatients: ${callPatients.toString()}");
log("isQueuePatients: ${isQueuePatients.toString()}");
onSuccess(callPatients.reversed.toList(), isQueuePatients.reversed.toList(), callConfig);
return;
}
@ -41,9 +53,10 @@ class API {
var isQueuePatients = callPatients.where((element) => (element.isQueue == false && element.callType != 0)).toList();
callPatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp));
isQueuePatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp));
log("callPatients: ${callPatients.toString()}");
log("isQueuePatients: ${isQueuePatients.toString()}");
callPatients.removeWhere((element) => element.isQueue == false);
callPatients.addAll(isQueuePatients);
log("callPatients: ${callPatients.reversed.toList().toString()}");
log("isQueuePatients: ${isQueuePatients.reversed.toList().toString()}");
onSuccess(callPatients.reversed.toList(), isQueuePatients.reversed.toList(), callConfig);
} else {
onFailure(apiResp);
@ -80,4 +93,75 @@ class API {
onFailure(false);
}
}
static Future<WidgetsConfigModel> getWidgetConfigsFromServer(String deviceIp, {required Function(dynamic) onFailure}) async {
final body = {"ipAddress": deviceIp};
WidgetsConfigModel widgetsConfigModel = WidgetsConfigModel();
await BaseAppClient.post(_waitingAreaScreenConfigGet,
body: body,
onSuccess: (response, status) {
if (status == 200 && response["data"] != null) {
List list = (response["data"] as List).map((e) => WidgetsConfigModel.fromJson(e)).toList();
if (list.isNotEmpty) {
widgetsConfigModel = list.first;
}
}
},
onFailure: (error, status) => log("error: ${error.toString()}"));
return widgetsConfigModel;
}
static Future<WeathersWidgetModel?> getWeatherDetailsFromServer(String cityId, {required Function(dynamic) onFailure}) async {
final body = {"cityID": cityId};
WeathersWidgetModel weathersWidgetModel = WeathersWidgetModel();
await BaseAppClient.post(_weatherForecastGetBy5Days,
body: body,
onSuccess: (response, status) {
if (status == 200 && response["data"] != null && response["data"].isNotEmpty) {
weathersWidgetModel = (response["data"] as List).map((e) => WeathersWidgetModel.fromJson(e)).toList().first;
}
},
onFailure: (error, status) => log("error: ${error.toString()}"));
return weathersWidgetModel;
}
static Future<PrayersWidgetModel?> getPrayerDetailsFromServer({
required double latitude,
required double longitude,
required Function(dynamic) onFailure,
}) async {
final body = {"latitude": latitude, "longitude": longitude};
PrayersWidgetModel currentPrayersWidgetModel = PrayersWidgetModel();
await BaseAppClient.post(_prayerTimeToday,
body: body,
onSuccess: (response, status) {
if (status == 200 && response["data"] != null) {
final prayersWidgetModel = (response["data"] as List).map((e) => PrayersWidgetModel.fromJson(e)).toList().first;
currentPrayersWidgetModel = prayersWidgetModel;
}
},
onFailure: (error, status) => log("error: ${error.toString()}"));
return currentPrayersWidgetModel;
}
static Future<RssFeedModel?> getRssFeedDetailsFromServer({
required int languageId,
required Function(dynamic) onFailure,
}) async {
final body = {"languageID": languageId};
RssFeedModel rssFeedModel = RssFeedModel();
await BaseAppClient.post(_rssFeedGet,
body: body,
onSuccess: (response, status) {
if (status == 200 && response["data"] != null) {
final rssFeed = (response["data"] as List).map((e) => RssFeedModel.fromJson(e)).toList().first;
rssFeedModel = rssFeed;
}
},
onFailure: (error, status) => log("error: ${error.toString()}"));
return rssFeedModel;
}
}

@ -3,29 +3,33 @@ import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/main.dart';
import 'package:queuing_system/utils/Utils.dart';
class BaseAppClient {
static post(String endPoint, {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
String url;
url = BASE_URL + endPoint;
url = "$BASE_URL/api/PatientCall" + endPoint;
try {
log("URL : $url");
log("Body : ${json.encode(body)}");
// try {
logger.i("URL : $url");
logger.i("Body : ${json.encode(body)}");
if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
});
final int statusCode = response.statusCode;
logger.i("statusCode : $statusCode");
if (statusCode < 200 || statusCode >= 400) {
if (onFailure != null) {
onFailure(Utils.generateContactAdminMsg(), statusCode);
}
} else {
log("Response: ${response.body.toString()}");
logger.i("Response: ${response.body.toString()}");
var parsed = json.decode(response.body.toString());
if (onSuccess != null) {
onSuccess(parsed, statusCode);
@ -36,23 +40,23 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1);
}
}
} catch (e) {
if (onFailure != null) {
onFailure(e.toString(), -1);
}
}
// } catch (e) {
// if (onFailure != null) {
// onFailure(e.toString(), -1);
// }
// }
}
static get(String endPoint, {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
String url;
url = BASE_URL + endPoint;
url = "$BASE_URL/api/PatientCall" + endPoint;
try {
// String token = await sharedPref.getString(TOKEN);
log("URL GET: $url");
log("Body GET: ${json.encode(body)}");
logger.i("URL GET: $url");
logger.i("Body GET: ${json.encode(body)}");
if (await Utils.checkConnection()) {
final response = await http.get(Uri.parse(url), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
final int statusCode = response.statusCode;

@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
const BASE_URL = 'https://ms.hmg.com/nscapi/api/PatientCall'; // UAT
// const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
const BASE_URL = 'https://qline.hmg.com'; // LIVE
const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT
// const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST';
// const BASE_URL = 'https://hmgwebservices.com/';
@ -19,20 +19,51 @@ class AppGlobal {
// static Color appRedColor = const Color(0xFFD02127);
// static Color appGreenColor = const Color(0xFF359846);
static Color appTextColor = const Color(0xFF2B353E);
static Color appRssFeed = const Color(0x3A1E2326);
//TextColors
static Color nebulizationColor = const Color(0xFF3C86D0);
static Color vitalSignColor = const Color(0xFFD02127);
static Color doctorColor = const Color(0xFF52964F);
// static Color procedureColor = const Color(0xFFC99609);
static Color vaccinationColor = const Color(0xFFC99609);
static Color procedureColor = const Color(0xFF460707);
//IconPaths
static String vitalSignIcon = "assets/images/vitalsign_icon.svg";
static String nebulizationIcon = "assets/images/nebulization_icon.svg";
static String doctorIcon = "assets/images/doctor_icon.svg";
static String procedureIcon = "assets/images/procedure_icon.svg";
static String vaccinationIcon = "assets/images/vaccination_icon.svg";
//Widgets
static String mosqueIcon = "assets/icons/mosque.svg";
static String weatherIcon = "assets/icons/weather.svg";
static String cloudIcon = "assets/icons/cloudy.svg";
static String coldIcon = "assets/icons/cold.svg";
static String hotIcon = "assets/icons/hot.svg";
static String rainIcon = "assets/icons/rainy.svg";
static String sunnyIcon = "assets/icons/sunny.svg";
static String windIcon = "assets/icons/windy.svg";
//Decoration
static BoxDecoration configWidgetDecoration = BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.2),
blurRadius: 4,
offset: const Offset(4, 4), // Shadow position
),
BoxShadow(
color: Colors.grey.withOpacity(0.2),
blurRadius: 4,
offset: const Offset(-4, -4), // Shadow position
),
],
);
}

@ -33,16 +33,27 @@ class CallConfig {
late String createdOn;
late int editedBy;
late String editedOn;
late String preVoiceText;
late String roomText;
late String queueNoText;
late String callForText;
late String currentServeText;
late String nextPrayerText;
late String weatherText;
late String minText;
late String maxText;
late String fajrText;
late String dhuhrText;
late String asrText;
late String maghribText;
late String ishaText;
late String callTypeVitalSignText;
late String callTypeDoctorText;
late String callTypeProcedureText;
late String callTypeVaccinationText;
late String callTypeNebulizationText;
late TextDirection textDirection;
late ScreenOrientationEnum screenRotationEnum;
CallConfig({
this.id = 0,
@ -65,16 +76,26 @@ class CallConfig {
this.createdOn = "",
this.editedBy = 0,
this.editedOn = "",
this.preVoiceText = "",
this.roomText = "",
this.queueNoText = "",
this.callForText = "",
this.currentServeText = "Current Serving",
this.callTypeVitalSignText = "",
this.nextPrayerText = "Next Prayer",
this.weatherText = "Weather",
this.minText = "Min",
this.maxText = "Max",
this.fajrText = "Fajar",
this.dhuhrText = "Dhuhr",
this.asrText = "Asr",
this.maghribText = "Maghrib",
this.ishaText = "Isha",
this.callTypeDoctorText = "",
this.callTypeProcedureText = "",
this.callTypeVaccinationText = "",
this.callTypeNebulizationText = "",
this.textDirection = TextDirection.ltr,
this.screenRotationEnum = ScreenOrientationEnum.portraitUp,
});
CallConfig.fromJson(Map<String, dynamic> json) {
@ -84,41 +105,52 @@ class CallConfig {
concurrentCallDelaySec = json['concurrentCallDelaySec'];
voiceType = json['voiceType'];
screenLanguage = json['screenLanguage'] ?? 1;
voiceLanguage = json['voiceLanguage'];
voiceLanguage = screenLanguage; // json['voiceLanguage'] ?? 1;
screenMaxDisplayPatients = json['screenMaxDisplayPatients'];
// screenMaxDisplayPatients = 3;
prioritySMS = json['prioritySMS'];
priorityWhatsApp = json['priorityWhatsApp'];
priorityEmail = json['priorityEmail'];
vitalSignText = json['vitalSignText'];
doctorText = json['doctorText'];
procedureText = json['procedureText'];
vaccinationText = json['vaccinationText'];
nebulizationText = json['nebulizationText'];
vitalSignText = json['callForVitalSignText'];
doctorText = json['callForDoctorText'];
procedureText = json['callForProcedureText'];
vaccinationText = json['callForVaccinationText'];
nebulizationText = json['callForNebulizationText'];
createdBy = json['createdBy'];
createdOn = json['createdOn'];
editedBy = json['editedBy'];
editedOn = json['editedOn'];
preVoiceText = json['preVoiceText'] ?? (json['textDirection'] == 2 ? "رقم التذكرة" : "Ticket Number");
roomText = json['roomText'];
queueNoText = json['queueNoText'];
callForText = json['callForText'];
nextPrayerText = json['nextPrayerText'];
weatherText = json['weatherText'] ?? "Weather";
maxText = json['maxText'];
minText = json['minText'];
fajrText = json['fajarText'];
dhuhrText = json['dhuhrText'];
asrText = json['asarText'];
maghribText = json['maghribText'];
ishaText = json['ishaText'];
currentServeText = json['currentServeText'];
callTypeVitalSignText = json['callTypeVitalSignText'];
callTypeVitalSignText = json['callTypeVitalSignText'];
callTypeDoctorText = json['callTypeDoctorText'];
callTypeProcedureText = json['callTypeProcedureText'];
callTypeVaccinationText = json['callTypeVaccinationText'];
callTypeNebulizationText = json['callTypeNebulizationText'];
callTypeVitalSignText = json['vitalSignText'];
callTypeDoctorText = json['doctorText'];
callTypeProcedureText = json['procedureText'];
callTypeVaccinationText = json['vaccinationText'];
callTypeNebulizationText = json['nebulizationText'];
textDirection = json['textDirection'] == 2 ? TextDirection.rtl : TextDirection.ltr;
// textDirection = TextDirection.ltr;
screenRotationEnum = ((json['orientationType'] ?? 1) as int).toScreenOrientationEnum();
// screenRotationEnum = (json['screenRotationId'] as int).toScreenOrientationEnum();
}
static var data = {
"id": 1,
"globalClinicPrefixReq": true,
"clinicPrefixReq": true,
"concurrentCallDelaySec": 2,
"voiceType": 2,
"voiceTypeText": "Female",
"concurrentCallDelaySec": 1,
"voiceType": 1,
"voiceTypeText": "Male",
"screenLanguage": 1,
"screenLanguageText": "English",
"voiceLanguage": 1,
@ -128,28 +160,57 @@ class CallConfig {
"prioritySMS": 2,
"priorityWhatsApp": 3,
"priorityEmail": 1,
"textDirection": 2,
"vitalSignText": "Call For VitalSign",
"doctorText": "دعوة للحصول على علامة حيوية",
// "doctorText": "Call For Doctor",
"procedureText": "Call For Procedure",
"vaccinationText": "Call For Vaccination",
"nebulizationText": "Call For Nebulization",
"roomText": "غرفة",
// "roomText": "Room",
"queueNoText": "رقم الانتظار",
"callForText": "يدعو إلى",
"textDirection": 1,
"vitalSignText": "VitalSign",
"doctorText": "Doctor",
"procedureText": "Procedure",
"vaccinationText": "Vaccination",
"nebulizationText": "Nebulization",
"callForVitalSignText": "Call For VitalSign",
"callForDoctorText": "Call For Doctor",
"callForProcedureText": "Call For Procedure",
"callForVaccinationText": "Call For Vaccination",
"callForNebulizationText": "Call For Nebulization",
"roomText": "Room",
"queueNoText": "Queue No",
"callForText": "Call For",
"currentServeText": "Current Serving",
"callTypeVitalSignText": "علامة حيوية",
"callTypeDoctorText": "طبيب",
"callTypeProcedureText": "إجراء",
"callTypeVaccinationText": "تلقيح",
"callTypeNebulizationText": "الإرذاذ",
"maxText": "Max",
"minText": "Min",
"nextPrayerText": "Next Prayer",
"fajarText": "Fajar",
"dhuhrText": "Dhuhr",
"asarText": "Asar",
"maghribText": "Maghrib",
"ishaText": "Isha",
"createdBy": 101,
"createdOn": "2023-08-08T00:00:00",
"editedBy": 101,
"editedOn": "2023-09-26T16:30:41.92"
"editedOn": "2023-10-08T10:07:12.5"
};
static CallConfig testCallConfig = CallConfig.fromJson(data);
}
enum ScreenOrientationEnum {
landscapeRight,
landscapeLeft,
portraitUp,
portraitDown,
}
extension ScreenOrientationEnumExt on int {
ScreenOrientationEnum toScreenOrientationEnum() {
if (this == 1) {
return ScreenOrientationEnum.portraitUp;
} else if (this == 2) {
return ScreenOrientationEnum.portraitDown;
} else if (this == 3) {
return ScreenOrientationEnum.landscapeRight;
} else if (this == 4) {
return ScreenOrientationEnum.landscapeLeft;
} else {
return ScreenOrientationEnum.portraitUp;
}
}
}

@ -1,5 +1,6 @@
import 'dart:math';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/utils/call_type.dart';
class PatientTicketModel {
@ -20,10 +21,29 @@ class PatientTicketModel {
late bool isQueue;
late bool isToneReq;
late bool isVoiceReq;
late int voiceLanguage;
late String voiceLanguageText;
late String ticketNoText;
late String vitalSignText;
late String doctorText;
late String procedureText;
late String vaccinationText;
late String nebulizationText;
late String callForVitalSignText;
late String callForDoctorText;
late String callForProcedureText;
late String callForVaccinationText;
late String callForNebulizationText;
late String roomText;
late String queueNoText;
late String callForText;
late int orientationType;
late ScreenOrientationEnum screenRotationEnum;
late bool callUpdated = false;
PatientTicketModel(
{this.id = 0,
PatientTicketModel({
this.id = 0,
this.patientID = 0,
this.mobileNo = "",
this.doctorName = "",
@ -39,7 +59,26 @@ class PatientTicketModel {
this.isQueue = false,
this.isToneReq = false,
this.isVoiceReq = false,
this.concurrentCallDelaySec = 1});
this.concurrentCallDelaySec = 1,
this.voiceLanguage = 1,
this.voiceLanguageText = "English",
this.ticketNoText = "Ticket Number",
this.vitalSignText = "VitalSign",
this.doctorText = "Doctor",
this.procedureText = "Procedure",
this.vaccinationText = "Vaccination",
this.nebulizationText = "Nebulization",
this.callForVitalSignText = "Call For VitalSign",
this.callForDoctorText = "Call For Doctor",
this.callForProcedureText = "Call For Procedure",
this.callForVaccinationText = "Call For Vaccination",
this.callForNebulizationText = "Call For Nebulization",
this.roomText = "Room",
this.queueNoText = "Queue No",
this.callForText = "Call For",
this.orientationType = 1,
this.screenRotationEnum = ScreenOrientationEnum.portraitUp,
});
int getRandomNum() {
return Random().nextInt(9);
@ -57,34 +96,47 @@ class PatientTicketModel {
roomNo = json['roomNo'];
createdOn = json['createdOn'];
editedOn = json['editedOn'];
queueNo = json['queueNo'];
queueNo = json['queueNoM'];
callNoStr = json['callNoStr'];
isQueue = json['isQueue'];
isToneReq = json['isToneReq'];
isVoiceReq = json['isVoiceReq'];
concurrentCallDelaySec = json['concurrentCallDelaySec'];
voiceLanguage = json['voiceLanguage'];
voiceLanguageText = json['voiceLanguageText'] ?? "English";
ticketNoText = json['ticketNoText'];
vitalSignText = json['vitalSignText'];
doctorText = json['doctorText'];
procedureText = json['procedureText'];
vaccinationText = json['vaccinationText'];
nebulizationText = json['nebulizationText'];
callForVitalSignText = json['callForVitalSignText'];
callForDoctorText = json['callForDoctorText'];
callForProcedureText = json['callForProcedureText'];
callForVaccinationText = json['callForVaccinationText'];
callForNebulizationText = json['callForNebulizationText'];
roomText = json['roomText'];
queueNoText = json['queueNoText'];
callForText = json['callForText'];
orientationType = json['orientationType'] ?? 1;
screenRotationEnum = ((json['orientationType'] ?? 1) as int).toScreenOrientationEnum();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['patientID'] = patientID;
data['mobileNo'] = mobileNo;
data['doctorName'] = doctorName;
data['doctorNameN'] = doctorNameN;
data['patientGender'] = patientGender;
data['callType'] = callType;
data['roomNo'] = roomNo;
data['createdOn'] = createdOn;
data['editedOn'] = editedOn;
data['queueNo'] = queueNo;
data['callNoStr'] = callNoStr;
data['isQueue'] = isQueue;
data['isToneReq'] = isToneReq;
data['isVoiceReq'] = isVoiceReq;
data['concurrentCallDelaySec'] = concurrentCallDelaySec;
return data;
}
// "voiceLanguage": 1,
// "voiceLanguageText": null,
// "ticketNoText": "Ticket Number",
// "vitalSignText": "VitalSign",
// "doctorText": "Doctor",
// "procedureText": "Procedure",
// "vaccinationText": "Vaccination",
// "nebulizationText": "Nebulization",
// "callForVitalSignText": "Call For VitalSign",
// "callForDoctorText": "Call For Doctor",
// "callForProcedureText": "Call For Procedure",
// "callForVaccinationText": "Call For Vaccination",
// "callForNebulizationText": "Call For Nebulization",
// "roomText": "Room",
// "queueNoText": "Queue No",
// "callForText": "Call For"
@override
String toString() {
@ -99,98 +151,98 @@ class PatientTicketModel {
if (callType == 5) return CallType.nebulization;
return CallType.vitalSign;
}
static List<PatientTicketModel> testCallPatients = [
PatientTicketModel(
id: 1,
patientID: 112,
mobileNo: "112",
doctorName: "name",
doctorNameN: "nameN",
patientGender: 1,
callType: 1,
roomNo: "617",
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
editedOnTimeStamp: DateTime.now().millisecondsSinceEpoch,
queueNo: "B-89",
callNoStr: "B-89",
isQueue: true,
isToneReq: true,
isVoiceReq: true,
concurrentCallDelaySec: 8,
),
PatientTicketModel(
id: 1,
patientID: 112,
mobileNo: "112",
doctorName: "name",
doctorNameN: "nameN",
patientGender: 1,
callType: 1,
roomNo: "617",
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
queueNo: "B-89",
callNoStr: "B-89",
isQueue: true,
isToneReq: true,
isVoiceReq: true,
concurrentCallDelaySec: 8,
),
PatientTicketModel(
id: 1,
patientID: 112,
mobileNo: "112",
doctorName: "name",
doctorNameN: "nameN",
patientGender: 1,
callType: 1,
roomNo: "617",
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
queueNo: "B-89",
callNoStr: "B-89",
isQueue: true,
isToneReq: true,
isVoiceReq: true,
concurrentCallDelaySec: 8,
),
PatientTicketModel(
id: 1,
patientID: 112,
mobileNo: "112",
doctorName: "name",
doctorNameN: "nameN",
patientGender: 1,
callType: 1,
roomNo: "617",
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
queueNo: "B-89",
callNoStr: "B-89",
isQueue: true,
isToneReq: true,
isVoiceReq: true,
concurrentCallDelaySec: 8,
),
PatientTicketModel(
id: 1,
patientID: 112,
mobileNo: "112",
doctorName: "name",
doctorNameN: "nameN",
patientGender: 1,
callType: 1,
roomNo: "617",
createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
queueNo: "B-89",
callNoStr: "B-89",
isQueue: true,
isToneReq: true,
isVoiceReq: true,
concurrentCallDelaySec: 8,
),
];
//
// static List<PatientTicketModel> testCallPatients = [
// PatientTicketModel(
// id: 1,
// patientID: 112,
// mobileNo: "112",
// doctorName: "name",
// doctorNameN: "nameN",
// patientGender: 1,
// callType: 1,
// roomNo: "617",
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
// editedOnTimeStamp: DateTime.now().millisecondsSinceEpoch,
// queueNo: "B-89",
// callNoStr: "B-89",
// isQueue: true,
// isToneReq: true,
// isVoiceReq: true,
// concurrentCallDelaySec: 8,
// ),
// PatientTicketModel(
// id: 1,
// patientID: 112,
// mobileNo: "112",
// doctorName: "name",
// doctorNameN: "nameN",
// patientGender: 1,
// callType: 1,
// roomNo: "617",
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
// queueNo: "B-89",
// callNoStr: "B-89",
// isQueue: true,
// isToneReq: true,
// isVoiceReq: true,
// concurrentCallDelaySec: 8,
// ),
// PatientTicketModel(
// id: 1,
// patientID: 112,
// mobileNo: "112",
// doctorName: "name",
// doctorNameN: "nameN",
// patientGender: 1,
// callType: 1,
// roomNo: "617",
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
// queueNo: "B-89",
// callNoStr: "B-89",
// isQueue: true,
// isToneReq: true,
// isVoiceReq: true,
// concurrentCallDelaySec: 8,
// ),
// PatientTicketModel(
// id: 1,
// patientID: 112,
// mobileNo: "112",
// doctorName: "name",
// doctorNameN: "nameN",
// patientGender: 1,
// callType: 1,
// roomNo: "617",
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
// queueNo: "B-89",
// callNoStr: "B-89",
// isQueue: true,
// isToneReq: true,
// isVoiceReq: true,
// concurrentCallDelaySec: 8,
// ),
// PatientTicketModel(
// id: 1,
// patientID: 112,
// mobileNo: "112",
// doctorName: "name",
// doctorNameN: "nameN",
// patientGender: 1,
// callType: 1,
// roomNo: "617",
// createdOn: DateTime.now().millisecondsSinceEpoch.toString(),
// editedOn: DateTime.now().millisecondsSinceEpoch.toString(),
// queueNo: "B-89",
// callNoStr: "B-89",
// isQueue: true,
// isToneReq: true,
// isVoiceReq: true,
// concurrentCallDelaySec: 8,
// ),
// ];
}

@ -0,0 +1,49 @@
import 'package:intl/intl.dart';
class PrayersWidgetModel {
int? fajr;
String? sunrise;
int? dhuhr;
int? asr;
String? sunset;
int? maghrib;
int? isha;
String? imsak;
String? midnight;
String? firstthird;
String? lastthird;
String? dateFor;
PrayersWidgetModel({this.fajr, this.sunrise, this.dhuhr, this.asr, this.sunset, this.maghrib, this.isha, this.imsak, this.midnight, this.firstthird, this.lastthird, this.dateFor});
PrayersWidgetModel.fromJson(Map<String, dynamic> json) {
fajr = dateTimeConversion(json['dateFor'], json['fajr']);
sunrise = json['sunrise'];
dhuhr = dateTimeConversion(json['dateFor'], getDhuhrData(json), isForDhuhr: true);
asr = dateTimeConversion(json['dateFor'], json['asr']);
sunset = json['sunset'];
maghrib = dateTimeConversion(json['dateFor'], json['maghrib']);
isha = dateTimeConversion(json['dateFor'], json['isha']);
imsak = json['imsak'];
midnight = json['midnight'];
firstthird = json['firstthird'];
lastthird = json['lastthird'];
dateFor = json['dateFor'];
}
static String getDhuhrData(dynamic json) {
return (json['dhuhr'] as String).contains('PM') ? json['dhuhr'] : json['dhuhr'] + ' PM';
}
static dateTimeConversion(String date, String time, {bool isForDhuhr = false}) {
if (isForDhuhr) {
return DateFormat('DD MMM yyyy hh:mm a').parse("$date $time").millisecondsSinceEpoch;
}
return DateFormat('DD MMM yyyy hh:mm').parse("$date $time").millisecondsSinceEpoch;
}
@override
String toString() {
return 'PrayersWidgetModel{fajr: $fajr, sunrise: $sunrise, dhuhr: $dhuhr, asr: $asr, sunset: $sunset, maghrib: $maghrib, isha: $isha, imsak: $imsak, midnight: $midnight, firstthird: $firstthird, lastthird: $lastthird, dateFor: $dateFor}';
}
}

@ -0,0 +1,15 @@
class RssFeedModel {
String? rssFeed;
RssFeedModel({this.rssFeed});
RssFeedModel.fromJson(Map<String, dynamic> json) {
rssFeed = json['rssFeed'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['rssFeed'] = rssFeed;
return data;
}
}

@ -0,0 +1,378 @@
var testPatientsData = {
"totalItemsCount": null,
"data": {
"callPatients": [
{
"id": 3,
"patientID": 109436,
"mobileNo": null,
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:40:27.693",
"editedOn": "2023-12-27T10:46:32.86",
"queueNo": "IMD A-41",
"callNoStr": "A-41",
"patientEmail": "unknown@unknown.com",
"preferredLang": "1",
"isQueue": true,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": "10.20.10.42",
"voiceLanguage": 1,
"voiceLanguageText": null,
"ticketNoText": "Ticket Number",
"vitalSignText": "VitalSign",
"doctorText": "Doctor",
"procedureText": "Procedure",
"vaccinationText": "Vaccination",
"nebulizationText": "Nebulization",
"callForVitalSignText": "Call For VitalSign",
"callForDoctorText": "Call For Doctor",
"callForProcedureText": "Call For Procedure",
"callForVaccinationText": "Call For Vaccination",
"callForNebulizationText": "Call For Nebulization",
"roomText": "Room",
"queueNoText": "Queue No",
"callForText": "Call For"
},
{
"id": 4,
"patientID": 3120504,
"mobileNo": "0550004569",
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:45:45.15",
"editedOn": "2023-12-27T10:46:48.373",
"queueNo": "IMD A-43",
"callNoStr": "A-43",
"patientEmail": "unknown@unknown.com",
"preferredLang": "2",
"isQueue": false,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": null,
"voiceLanguage": 2,
"voiceLanguageText": null,
"ticketNoText": "رقم التذكرة",
"vitalSignText": "علامة حيوية",
"doctorText": "الطبيب",
"procedureText": "الاجراءات",
"vaccinationText": "المطاعيم",
"nebulizationText": "التنفس",
"callForVitalSignText": "التوجه الى غرفة قياس العلامات الحيوية",
"callForDoctorText": "التوجه الى الطبيب",
"callForProcedureText": "التوجه الى غرفة الإجراءات",
"callForVaccinationText": "التوجه الى غرفة المطاعيم",
"callForNebulizationText": "التوجه الى غرفة التنفس",
"roomText": "غرفة",
"queueNoText": "رقم الانتظار",
"callForText": "التوجه الى"
},
{
"id": 4,
"patientID": 3120505,
"mobileNo": "0550004569",
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:45:45.15",
"editedOn": "2023-12-27T10:46:48.373",
"queueNo": "IMD A-43",
"callNoStr": "A-43",
"patientEmail": "unknown@unknown.com",
"preferredLang": "2",
"isQueue": false,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": null,
"voiceLanguage": 2,
"voiceLanguageText": null,
"ticketNoText": "رقم التذكرة",
"vitalSignText": "علامة حيوية",
"doctorText": "الطبيب",
"procedureText": "الاجراءات",
"vaccinationText": "المطاعيم",
"nebulizationText": "التنفس",
"callForVitalSignText": "التوجه الى غرفة قياس العلامات الحيوية",
"callForDoctorText": "التوجه الى الطبيب",
"callForProcedureText": "التوجه الى غرفة الإجراءات",
"callForVaccinationText": "التوجه الى غرفة المطاعيم",
"callForNebulizationText": "التوجه الى غرفة التنفس",
"roomText": "غرفة",
"queueNoText": "رقم الانتظار",
"callForText": "التوجه الى"
},
{
"id": 4,
"patientID": 3120506,
"mobileNo": "0550004569",
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:45:45.15",
"editedOn": "2023-12-27T10:46:48.373",
"queueNo": "IMD A-43",
"callNoStr": "A-43",
"patientEmail": "unknown@unknown.com",
"preferredLang": "2",
"isQueue": false,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": null,
"voiceLanguage": 2,
"voiceLanguageText": null,
"ticketNoText": "رقم التذكرة",
"vitalSignText": "علامة حيوية",
"doctorText": "الطبيب",
"procedureText": "الاجراءات",
"vaccinationText": "المطاعيم",
"nebulizationText": "التنفس",
"callForVitalSignText": "التوجه الى غرفة قياس العلامات الحيوية",
"callForDoctorText": "التوجه الى الطبيب",
"callForProcedureText": "التوجه الى غرفة الإجراءات",
"callForVaccinationText": "التوجه الى غرفة المطاعيم",
"callForNebulizationText": "التوجه الى غرفة التنفس",
"roomText": "غرفة",
"queueNoText": "رقم الانتظار",
"callForText": "التوجه الى"
},
{
"id": 4,
"patientID": 3120507,
"mobileNo": "0550004569",
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:45:45.15",
"editedOn": "2023-12-27T10:46:48.373",
"queueNo": "IMD A-43",
"callNoStr": "A-43",
"patientEmail": "unknown@unknown.com",
"preferredLang": "2",
"isQueue": false,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": null,
"voiceLanguage": 2,
"voiceLanguageText": null,
"ticketNoText": "رقم التذكرة",
"vitalSignText": "علامة حيوية",
"doctorText": "الطبيب",
"procedureText": "الاجراءات",
"vaccinationText": "المطاعيم",
"nebulizationText": "التنفس",
"callForVitalSignText": "التوجه الى غرفة قياس العلامات الحيوية",
"callForDoctorText": "التوجه الى الطبيب",
"callForProcedureText": "التوجه الى غرفة الإجراءات",
"callForVaccinationText": "التوجه الى غرفة المطاعيم",
"callForNebulizationText": "التوجه الى غرفة التنفس",
"roomText": "غرفة",
"queueNoText": "رقم الانتظار",
"callForText": "التوجه الى"
},
{
"id": 4,
"patientID": 3120508,
"mobileNo": "0550004569",
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:45:45.15",
"editedOn": "2023-12-27T10:46:48.373",
"queueNo": "IMD A-43",
"callNoStr": "A-43",
"patientEmail": "unknown@unknown.com",
"preferredLang": "2",
"isQueue": false,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": null,
"voiceLanguage": 2,
"voiceLanguageText": null,
"ticketNoText": "رقم التذكرة",
"vitalSignText": "علامة حيوية",
"doctorText": "الطبيب",
"procedureText": "الاجراءات",
"vaccinationText": "المطاعيم",
"nebulizationText": "التنفس",
"callForVitalSignText": "التوجه الى غرفة قياس العلامات الحيوية",
"callForDoctorText": "التوجه الى الطبيب",
"callForProcedureText": "التوجه الى غرفة الإجراءات",
"callForVaccinationText": "التوجه الى غرفة المطاعيم",
"callForNebulizationText": "التوجه الى غرفة التنفس",
"roomText": "غرفة",
"queueNoText": "رقم الانتظار",
"callForText": "التوجه الى"
},
{
"id": 4,
"patientID": 3120509,
"mobileNo": "0550004569",
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:45:45.15",
"editedOn": "2023-12-27T10:46:48.373",
"queueNo": "IMD A-43",
"callNoStr": "A-43",
"patientEmail": "unknown@unknown.com",
"preferredLang": "2",
"isQueue": false,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": null,
"voiceLanguage": 2,
"voiceLanguageText": null,
"ticketNoText": "رقم التذكرة",
"vitalSignText": "علامة حيوية",
"doctorText": "الطبيب",
"procedureText": "الاجراءات",
"vaccinationText": "المطاعيم",
"nebulizationText": "التنفس",
"callForVitalSignText": "التوجه الى غرفة قياس العلامات الحيوية",
"callForDoctorText": "التوجه الى الطبيب",
"callForProcedureText": "التوجه الى غرفة الإجراءات",
"callForVaccinationText": "التوجه الى غرفة المطاعيم",
"callForNebulizationText": "التوجه الى غرفة التنفس",
"roomText": "غرفة",
"queueNoText": "رقم الانتظار",
"callForText": "التوجه الى"
},
{
"id": 3,
"patientID": 109510,
"mobileNo": null,
"doctorName": "",
"doctorNameN": null,
"patientGender": 1,
"callType": 1,
"roomNo": "1",
"createdOn": "2023-12-27T10:40:27.693",
"editedOn": "2023-12-27T10:46:32.86",
"queueNo": "IMD A-41",
"callNoStr": "A-41",
"patientEmail": "unknown@unknown.com",
"preferredLang": "1",
"isQueue": true,
"isToneReq": true,
"isVoiceReq": true,
"orientationType": 1,
"isTurnOn": true,
"concurrentCallDelaySec": 1,
"crVerifiedIP": null,
"crTypeAckIP": "10.20.10.42",
"voiceLanguage": 1,
"voiceLanguageText": null,
"ticketNoText": "Ticket Number",
"vitalSignText": "VitalSign",
"doctorText": "Doctor",
"procedureText": "Procedure",
"vaccinationText": "Vaccination",
"nebulizationText": "Nebulization",
"callForVitalSignText": "Call For VitalSign",
"callForDoctorText": "Call For Doctor",
"callForProcedureText": "Call For Procedure",
"callForVaccinationText": "Call For Vaccination",
"callForNebulizationText": "Call For Nebulization",
"roomText": "Room",
"queueNoText": "Queue No",
"callForText": "Call For"
},
],
"drCallPatients": [],
"nurseCallPatients": [],
"callConfig": {
"id": 1,
"globalClinicPrefixReq": true,
"clinicPrefixReq": true,
"concurrentCallDelaySec": 1,
"voiceType": 1,
"voiceTypeText": "Male",
"screenLanguage": 1,
"screenLanguageText": "English",
"voiceLanguage": 2,
"voiceLanguageText": "Arabic",
"screenMaxDisplayPatients": 7,
"isNotiReq": false,
"prioritySMS": 2,
"priorityWhatsApp": 3,
"priorityEmail": 1,
"textDirection": 1,
"orientationType": 1,
"ticketNoText": "Ticket Number",
"vitalSignText": "VitalSign",
"doctorText": "Doctor",
"procedureText": "Procedure",
"vaccinationText": "Vaccination",
"nebulizationText": "Nebulization",
"callForVitalSignText": "Call For VitalSign",
"callForDoctorText": "Call For Doctor",
"callForProcedureText": "Call For Procedure",
"callForVaccinationText": "Call For Vaccination",
"callForNebulizationText": "Call For Nebulization",
"roomText": "Room",
"queueNoText": "Queue No",
"callForText": "Call For",
"currentServeText": "Current Serving",
"maxText": "Max",
"minText": "Min",
"nextPrayerText": "Next Prayer",
"fajarText": "Fajar",
"dhuhrText": "Dhuhr",
"asarText": "Asar",
"maghribText": "Maghrib",
"ishaText": "Isha",
"lastPatientServedTimeMin": 5,
"createdBy": 101,
"createdOn": "2023-08-08T00:00:00",
"editedBy": 101,
"editedOn": "2023-12-26T17:30:47.62"
}
},
"messageStatus": 1,
"message": "Success"
};

@ -0,0 +1,87 @@
import 'package:queuing_system/core/config/config.dart';
class WeathersWidgetModel {
int? id;
String? headline;
double? maxTemp;
double? minTemp;
String? iconPhrase;
String? forecastDate;
int? cityID;
String? forecastDay;
String? createDateTime;
double? windSpeed;
String? windDirection;
double? windDegrees;
String? weatherIconPath;
WeathersWidgetModel({
this.id,
this.headline,
this.maxTemp,
this.minTemp,
this.iconPhrase,
this.forecastDate,
this.cityID,
this.forecastDay,
this.createDateTime,
this.windSpeed,
this.windDirection,
this.windDegrees,
this.weatherIconPath,
});
WeathersWidgetModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
headline = json['headline'];
maxTemp = json['maxTemp'];
minTemp = json['minTemp'];
iconPhrase = json['iconPhrase'];
forecastDate = json['forecastDate'];
cityID = json['cityID'];
forecastDay = json['forecastDay'];
createDateTime = json['createDateTime'];
windSpeed = json['windSpeed'];
windDirection = json['windDirection'];
windDegrees = json['windDegrees'];
weatherIconPath = getWeatherIconPath(json['iconPhrase']);
}
String getWeatherIconPath(String iconPhrase) {
if (iconPhrase == "Rain" || iconPhrase == "Showers" || iconPhrase == "ThunderStorms") {
return AppGlobal.rainIcon;
} else if (iconPhrase == "Hot") {
return AppGlobal.hotIcon;
} else if (iconPhrase == "Windy") {
return AppGlobal.windIcon;
} else if (iconPhrase == "Cloudy" || iconPhrase == "Mostly cloudy" || iconPhrase == "Intermittent clouds") {
return AppGlobal.cloudIcon;
} else if (iconPhrase == "Sunny" || iconPhrase == "Mostly sunny" || iconPhrase == "Partly sunny" || iconPhrase == "Hazy sunshine") {
return AppGlobal.sunnyIcon;
} else {
return AppGlobal.weatherIcon;
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['headline'] = headline;
data['maxTemp'] = maxTemp;
data['minTemp'] = minTemp;
data['iconPhrase'] = iconPhrase;
data['forecastDate'] = forecastDate;
data['cityID'] = cityID;
data['forecastDay'] = forecastDay;
data['createDateTime'] = createDateTime;
data['windSpeed'] = windSpeed;
data['windDirection'] = windDirection;
data['windDegrees'] = windDegrees;
return data;
}
@override
String toString() {
return 'WeathersWidgetModel{id: $id, headline: $headline, maxTemp: $maxTemp, minTemp: $minTemp, iconPhrase: $iconPhrase, forecastDate: $forecastDate, cityID: $cityID, forecastDay: $forecastDay, createDateTime: $createDateTime, windSpeed: $windSpeed, windDirection: $windDirection, windDegrees: $windDegrees}';
}
}

@ -0,0 +1,56 @@
class WidgetsConfigModel {
int? waitingAreaID;
String? waitingAreaName;
bool? isWeatherReq;
bool? isPrayerTimeReq;
bool? isRssFeedReq;
int? projectID;
double? projectLatitude;
double? projectLongitude;
int? cityKey;
WidgetsConfigModel({
this.waitingAreaID,
this.waitingAreaName,
this.isWeatherReq,
this.isPrayerTimeReq,
this.isRssFeedReq,
this.projectID,
this.projectLatitude,
this.projectLongitude,
this.cityKey,
});
WidgetsConfigModel.fromJson(Map<String, dynamic> json) {
waitingAreaID = json['waitingAreaID'];
waitingAreaName = json['waitingAreaName'];
// isWeatherReq = true;
// isPrayerTimeReq = true;
// isRssFeedReq = true;
isRssFeedReq = json['isRssFeedReq'];
isWeatherReq = json['isWeatherReq'];
isPrayerTimeReq = json['isPrayerTimeReq'];
projectID = json['projectID'];
projectLatitude = json['projectLatitude'];
projectLongitude = json['projectLongitude'];
cityKey = json['cityKey'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['waitingAreaID'] = waitingAreaID;
data['waitingAreaName'] = waitingAreaName;
data['isWeatherReq'] = isWeatherReq;
data['isPrayerTimeReq'] = isPrayerTimeReq;
data['projectID'] = projectID;
data['projectLatitude'] = projectLatitude;
data['projectLongitude'] = projectLongitude;
data['cityKey'] = cityKey;
return data;
}
@override
String toString() {
return 'WidgetsConfigModel{waitingAreaID: $waitingAreaID, waitingAreaName: $waitingAreaName, isWeatherReq: $isWeatherReq, isPrayerTimeReq: $isPrayerTimeReq, projectLatitude: $projectLatitude,projectLongitude: $projectLongitude, cityKey: $cityKey}';
}
}

@ -0,0 +1,104 @@
import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/utils/Utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class AppFooter extends StatelessWidget {
const AppFooter({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
return Container(
color: Colors.grey.withOpacity(0.1),
height: Utils.getHeight() * 0.95,
width: double.infinity,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
const SizedBox(width: 20),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () async {
// await context.read<AppProvider>().callPatientsAPI();
},
child: AppText(
"Powered By",
fontSize: SizeConfig.getWidthMultiplier() * 2.6,
fontFamily: 'Poppins-Medium.ttf',
),
),
Text(appProvider.currentDeviceIp,
style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)),
Row(
children: [
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.portraitUp);
},
child: const Icon(Icons.arrow_upward),
),
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.landscapeRight);
},
child: const Icon(Icons.arrow_forward),
),
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.portraitDown);
},
child: const Icon(Icons.arrow_downward),
),
InkWell(
onTap: () {
appProvider.updateCurrentScreenRotation(ScreenOrientationEnum.landscapeLeft);
},
child: const Icon(Icons.arrow_back),
),
],
),
],
),
const SizedBox(width: 10),
Image.asset(
"assets/images/cloud_logo.png",
height: SizeConfig.getHeightMultiplier() * 4,
),
],
),
Expanded(
child: (appProvider.currentRssFeedModel.rssFeed == null || appProvider.currentRssFeedModel.rssFeed!.isEmpty)
? const SizedBox()
: Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Marquee(
text: appProvider.currentRssFeedModel.rssFeed ?? "",
style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getHeightMultiplier() * 2),
scrollAxis: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.center,
blankSpace: 20.0,
velocity: 100.0,
pauseAfterRound: const Duration(seconds: 1),
startPadding: 10.0,
accelerationDuration: const Duration(seconds: 1),
accelerationCurve: Curves.linear,
decelerationDuration: const Duration(milliseconds: 500),
decelerationCurve: Curves.easeOut,
),
),
)
],
));
});
}
}

@ -6,25 +6,77 @@ import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class AppHeader extends StatelessWidget with PreferredSizeWidget {
class AppHeader extends StatelessWidget implements PreferredSizeWidget {
const AppHeader({Key? key}) : super(key: key);
// Widget getWeatherWidget() {
// return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
// if (appProvider.currentWeathersWidgetModel.maxTemp == null || appProvider.currentWeathersWidgetModel.minTemp == null || appProvider.currentWeathersWidgetModel.iconPhrase == null) {
// return const SizedBox.shrink();
// }
// return Directionality(
// textDirection: appProvider.patientCallConfigurations.textDirection,
// child: Row(
// children: [
// SvgPicture.asset(
// appProvider.currentWeathersWidgetModel.weatherIconPath ?? AppGlobal.weatherIcon,
// height: SizeConfig.getHeightMultiplier() * 2.5,
// color: Colors.white,
// ),
// const SizedBox(width: 10),
// Padding(
// padding: const EdgeInsets.only(top: 15),
// child: AppText(
// "${appProvider.patientCallConfigurations.maxText}: ${appProvider.currentWeathersWidgetModel.maxTemp}°C , ${appProvider.patientCallConfigurations.minText}: ${appProvider.currentWeathersWidgetModel.minTemp}°C",
// color: Colors.white,
// fontSize: SizeConfig.getHeightMultiplier() * 1.3,
// ),
// ),
// ],
// ),
// );
// });
// }
//
// Widget getPrayerWidget() {
// return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
// if (appProvider.nextPrayerToShowWithTime.isEmpty) {
// return const SizedBox.shrink();
// }
// return Directionality(
// textDirection: appProvider.patientCallConfigurations.textDirection,
// // textDirection: appProvider.patientCallConfigurations.textDirection,
// child: Row(
// children: [
// SvgPicture.asset(
// AppGlobal.mosqueIcon,
// height: SizeConfig.getHeightMultiplier() * 2.5,
// color: Colors.white,
// ),
// const SizedBox(width: 10),
// Padding(
// padding: const EdgeInsets.only(top: 15),
// child: AppText(
// "${appProvider.patientCallConfigurations.nextPrayerText}: ${appProvider.nextPrayerToShowWithTime}",
// color: Colors.white,
// fontSize: SizeConfig.getHeightMultiplier() * 1.3,
// ),
// ),
// ],
// ),
// );
// });
// }
@override
Widget build(BuildContext context) {
AppProvider appProvider = context.read<AppProvider>();
// return SizedBox();
return Consumer(
builder: (BuildContext context, AppProvider appProvider, Widget? child) {
return Container(
padding: const EdgeInsets.only(
left: 0,
right: 5,
),
decoration: BoxDecoration(color: AppGlobal.vitalSignColor, border: const Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
child: Container(
height: 100,
padding: const EdgeInsets.only(
left: 20,
right: 20,
bottom: 0,
),
padding: const EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(color: AppGlobal.vitalSignColor),
child: Directionality(
textDirection: appProvider.patientCallConfigurations.textDirection,
child: Row(
@ -32,13 +84,16 @@ class AppHeader extends StatelessWidget with PreferredSizeWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {},
onTap: () async {
// await appProvider.callPatientsAPI();
},
child: AppText(
appProvider.patientCallConfigurations.currentServeText,
color: Colors.white,
fontFamily: 'Poppins-SemiBold.ttf',
),
),
// getPrayerWidget(),
// getWeatherWidget(),
SvgPicture.asset(
"assets/images/hmglogo.svg",
height: Utils.getHeight() * 0.5,
@ -46,7 +101,8 @@ class AppHeader extends StatelessWidget with PreferredSizeWidget {
],
),
),
),
);
},
);
}

@ -2,22 +2,52 @@ import 'dart:async';
import 'dart:developer';
import 'dart:io';
import 'package:connectivity/connectivity.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:intl/intl.dart';
import 'package:just_audio/just_audio.dart';
import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/core/response_models/patient_ticket_model.dart';
import 'package:queuing_system/core/response_models/prayers_widget_model.dart';
import 'package:queuing_system/core/response_models/rss_feed_model.dart';
import 'package:queuing_system/core/response_models/weathers_widget_model.dart';
import 'package:queuing_system/core/response_models/widgets_config_model.dart';
import 'package:queuing_system/main.dart';
import 'package:queuing_system/utils/call_by_voice.dart';
import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:signalr_core/signalr_core.dart';
bool isVoiceActualCompletedGlobally = false;
class AppProvider extends ChangeNotifier {
AppProvider() {
startSignalHubConnection();
waitForIPAndCallInitializations();
}
Future<void> waitForIPAndCallInitializations() async {
while (currentDeviceIp == "") {
await getCurrentIP();
if (currentDeviceIp != "") {
await callInitializations();
} else {
await Future.delayed(const Duration(seconds: 2));
}
}
}
Future<void> callInitializations() async {
await startSignalHubConnection();
await getInfoWidgetsDetailsFromServer();
await getLastTimeUpdatedFromCache();
listenNetworkConnectivity();
listenAudioPlayerEvents();
getTheWidgetsConfigurationsEveryMidnight();
initializeFlutterTTS();
// await callPatientsAPI();
}
SignalRHelper signalRHelper = SignalRHelper();
@ -34,11 +64,66 @@ class AppProvider extends ChangeNotifier {
bool isInternetConnectionAvailable = true;
bool isApiCallNeeded = false;
initializeFlutterTTS() async {
flutterTts.setCompletionHandler(() => onVoiceCompleted());
}
Future<void> onVoiceCompleted() async {
logger.i("My Value is in setCompletionHandler: $isVoiceActualCompletedGlobally");
logger.i("isQueuePatients.length in setCompletionHandler: ${isQueuePatients.length}");
if (!isVoiceActualCompletedGlobally) {
return;
}
if (isQueuePatients.isNotEmpty) {
await Future.delayed(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec)).whenComplete(
() async {
PatientTicketModel temp = PatientTicketModel();
if (patientTickets.isNotEmpty && isQueuePatients.length > 1) {
temp = patientTickets.elementAt(0);
patientTickets.removeAt(0);
}
notifyListeners();
if (isQueuePatients.isNotEmpty) {
isQueuePatients.removeAt(0);
}
if (patientTickets.isNotEmpty && isQueuePatients.length > 1) {
patientTickets.add(temp);
}
notifyListeners();
if (isQueuePatients.isNotEmpty) {
await voiceCallPatientTicket(patientTickets.first, "setCompletionHandler");
updatePatientTicket(patientTickets.first);
}
},
);
}
logger.i("here logger.ig: ${isQueuePatients.length}");
if (isQueuePatients.isEmpty) {
isCallingInProgress = false;
}
if (isApiCallNeeded && isQueuePatients.isEmpty) {
logger.i("Setting isCallingInProgress : $isCallingInProgress");
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
isApiCallNeeded = false;
});
}
}
updateInternetConnection(bool value) {
isInternetConnectionAvailable = value;
notifyListeners();
}
ScreenOrientationEnum currentScreenRotation = ScreenOrientationEnum.portraitUp;
updateCurrentScreenRotation(ScreenOrientationEnum value) {
currentScreenRotation = value;
notifyListeners();
}
Future<void> getCurrentIP() async {
final ips = await NetworkInterface.list(type: InternetAddressType.IPv4);
for (var interface in ips) {
@ -57,6 +142,169 @@ class AppProvider extends ChangeNotifier {
}
}
WidgetsConfigModel? currentWidgetsConfigModel;
Future<void> getInfoWidgetsConfigurationsFromServer() async {
log(" errorHellpo:");
WidgetsConfigModel? widgetsConfigModel = await API.getWidgetConfigsFromServer(currentDeviceIp, onFailure: (error) {
logger.i("Api call failed with this error: ${error.toString()}");
});
if (widgetsConfigModel != null) currentWidgetsConfigModel = widgetsConfigModel;
notifyListeners();
}
WeathersWidgetModel currentWeathersWidgetModel = WeathersWidgetModel();
Future<void> getWeatherDetailsFromServer() async {
WeathersWidgetModel? weathersWidgetModel = await API.getWeatherDetailsFromServer(
(currentWidgetsConfigModel!.cityKey ?? "").toString(),
onFailure: (error) => logger.i("Api call failed with this error: ${error.toString()}"),
);
if (weathersWidgetModel != null) {
currentWeathersWidgetModel = weathersWidgetModel;
notifyListeners();
}
}
String nextPrayerToShowWithTime = '';
void getNextPrayerToShow() {
final current = DateTime.now();
logger.i("Checking Namaz time Locally at ${current.toString()} and ${current.timeZoneName} ");
if (DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.fajr!).isAfter(current)) {
final namazTime = DateFormat('hh:mm a').format(DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.fajr!));
nextPrayerToShowWithTime = "${patientCallConfigurations.fajrText} at $namazTime";
notifyListeners();
return;
}
if (DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.dhuhr!).isAfter(current)) {
final namazTime = DateFormat('hh:mm a').format(DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.dhuhr!));
nextPrayerToShowWithTime = "${patientCallConfigurations.dhuhrText} at $namazTime";
notifyListeners();
return;
}
if (DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.asr!).isAfter(current)) {
final namazTime = DateFormat('hh:mm a').format(DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.asr!));
nextPrayerToShowWithTime = "${patientCallConfigurations.asrText} at $namazTime";
notifyListeners();
return;
}
if (DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.maghrib!).isAfter(current)) {
final namazTime = DateFormat('hh:mm a').format(DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.maghrib!));
nextPrayerToShowWithTime = "${patientCallConfigurations.maghribText} at $namazTime";
notifyListeners();
return;
}
if (DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.isha!).isAfter(current)) {
final namazTime = DateFormat('hh:mm a').format(DateTime.fromMillisecondsSinceEpoch(currentPrayersWidgetModel.isha!));
nextPrayerToShowWithTime = "${patientCallConfigurations.ishaText} at $namazTime";
notifyListeners();
return;
}
}
PrayersWidgetModel currentPrayersWidgetModel = PrayersWidgetModel();
Future<void> getPrayerDetailsFromServer() async {
PrayersWidgetModel? prayersWidgetModel = await API.getPrayerDetailsFromServer(
latitude: currentWidgetsConfigModel!.projectLatitude ?? 0,
longitude: currentWidgetsConfigModel!.projectLongitude ?? 0,
onFailure: (error) => logger.i("Api call failed with this error: ${error.toString()}"));
if (prayersWidgetModel != null) {
currentPrayersWidgetModel = prayersWidgetModel;
logger.i("I got this data from Prayers: ${prayersWidgetModel.toString()}");
getNextPrayerToShow();
notifyListeners();
}
}
RssFeedModel currentRssFeedModel = RssFeedModel();
Future<void> getRssFeedDetailsFromServer() async {
RssFeedModel? rssFeedModel = await API.getRssFeedDetailsFromServer(languageId: 0, onFailure: (error) => logger.i("Api call failed with this error: ${error.toString()}"));
if (rssFeedModel != null) {
currentRssFeedModel = rssFeedModel;
logger.i("I got this data from RssFeed: ${currentRssFeedModel.rssFeed}");
notifyListeners();
}
}
Future<void> getInfoWidgetsDetailsFromServer() async {
// if (currentWidgetsConfigModel == null) return;
await getInfoWidgetsConfigurationsFromServer().whenComplete(() async {
if (currentWidgetsConfigModel == null) {
return;
}
if (currentWidgetsConfigModel!.isWeatherReq != null && currentWidgetsConfigModel!.isWeatherReq!) {
await getWeatherDetailsFromServer();
}
if (currentWidgetsConfigModel!.isPrayerTimeReq != null && currentWidgetsConfigModel!.isPrayerTimeReq!) {
await getPrayerDetailsFromServer();
}
if (currentWidgetsConfigModel!.isRssFeedReq != null && currentWidgetsConfigModel!.isRssFeedReq!) {
await getRssFeedDetailsFromServer();
}
});
int currentDate = DateTime.now().millisecondsSinceEpoch;
await setLastTimeUpdatedInCache(lasTimeUpdated: currentDate.toString());
}
int counter = 0;
Future<void> getTheWidgetsConfigurationsEveryMidnight() async {
if (currentWidgetsConfigModel == null) return;
if (!(currentWidgetsConfigModel!.isWeatherReq ?? false) && !(currentWidgetsConfigModel!.isPrayerTimeReq ?? false) && !(currentWidgetsConfigModel!.isRssFeedReq ?? false)) {
return;
}
if (!currentWidgetsConfigModel!.isWeatherReq! && !currentWidgetsConfigModel!.isPrayerTimeReq! && !currentWidgetsConfigModel!.isRssFeedReq!) {
return;
}
DateTime current = DateTime.now();
Stream timer = Stream.periodic(const Duration(minutes: 1), (i) {
current = current.add(const Duration(minutes: 1));
return current;
});
timer.listen((data) async {
DateTime dateTime = DateTime.parse(data.toString());
counter++;
logger.i("counterValue: $counter");
if (counter == 60 && currentWidgetsConfigModel!.isRssFeedReq!) {
await getRssFeedDetailsFromServer();
}
if (currentWidgetsConfigModel!.isWeatherReq!) {
if (dateTime.day > currentLastTimeUpdated.day) {
await getWeatherDetailsFromServer();
}
}
if (currentWidgetsConfigModel!.isPrayerTimeReq!) {
if (dateTime.day > currentLastTimeUpdated.day) {
await getPrayerDetailsFromServer();
}
}
if (currentWidgetsConfigModel!.isRssFeedReq!) {
if (dateTime.day > currentLastTimeUpdated.day) {
await getRssFeedDetailsFromServer();
}
}
getNextPrayerToShow();
});
}
Future<void> startSignalHubConnection() async {
if (!signalRHelper.getConnectionState()) {
await getCurrentIP().whenComplete(() => signalRHelper.startSignalRConnection(
@ -70,28 +318,35 @@ class AppProvider extends ChangeNotifier {
}
Future<void> callPatientsAPI() async {
logger.i("calling callPatientsAPI");
patientTickets.clear();
API.getCallRequestInfoByClinicInfo(currentDeviceIp, onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) async {
API.getCallRequestInfoByClinicInfo(currentDeviceIp,
onSuccess: (waitingCalls, isQueuePatientsCalls, callConfigs) async {
patientCallConfigurations = callConfigs;
if (waitingCalls.length > patientCallConfigurations.screenMaxDisplayPatients) {
patientTickets = waitingCalls.sublist(0, patientCallConfigurations.screenMaxDisplayPatients);
} else {
patientTickets = waitingCalls;
}
if (isQueuePatientsCalls.length > patientCallConfigurations.screenMaxDisplayPatients) {
isQueuePatients = isQueuePatientsCalls.sublist(0, patientCallConfigurations.screenMaxDisplayPatients);
} else {
isQueuePatients = isQueuePatientsCalls;
}
notifyListeners();
if (patientTickets.isNotEmpty) {
voiceCallPatientTicket(patientTickets.first);
updateCurrentScreenRotation(patientTickets.first.screenRotationEnum);
await voiceCallPatientTicket(patientTickets.first, "callPatientsAPI");
updatePatientTicket(patientTickets.first);
}
}, onFailure: (error) {
log("Api call failed with this error: ${error.toString()}");
});
},
onFailure: (error) => logger.i("Api call failed with this error: ${error.toString()}"));
}
onPingReceived(data) async {
log("isCallingInProgress: $isCallingInProgress");
log("isApiCallNeeded: $isApiCallNeeded");
logger.i("A new Ping Received when isQueuePatients: ${isQueuePatients.length}");
logger.i("isCallingInProgress from onPingReceived: $isCallingInProgress");
logger.i("isApiCallNeeded: $isApiCallNeeded");
if (patientTickets.isNotEmpty) {
if (isCallingInProgress) {
isApiCallNeeded = true;
@ -103,54 +358,77 @@ class AppProvider extends ChangeNotifier {
}
}
String getCallTypeText(PatientTicketModel ticket, CallConfig callConfig) {
String getCallTypeText(PatientTicketModel ticket) {
final callType = ticket.getCallType();
switch (callType) {
case CallType.vitalSign:
return callConfig.vitalSignText;
return ticket.callForVitalSignText;
case CallType.doctor:
return callConfig.doctorText;
return ticket.callForDoctorText;
case CallType.procedure:
return callConfig.procedureText;
return ticket.callForProcedureText;
case CallType.vaccination:
return callConfig.vaccinationText;
return ticket.callForVaccinationText;
case CallType.nebulization:
return callConfig.nebulizationText;
return ticket.callForNebulizationText;
default:
return callConfig.vitalSignText;
return ticket.callForVitalSignText;
}
}
CallByVoice? voiceCaller;
PatientTicketModel currentPatient = PatientTicketModel();
voiceCallPatientTicket(PatientTicketModel patientTicket) async {
// testCalling() async {
// voiceCaller = CallByVoice(
// preVoice: "رقم التذكرة",
// ticketNo: "AMG A-78",
// postVoice: "دعوة للتطعيم",
// lang: "ar",
// flutterTts: flutterTts,
// );
// await voiceCaller!.startCalling(true);
// }
voiceCallPatientTicket(PatientTicketModel patientTicket, String calledFrom) async {
logger.i("voiceCallPatientTicket calledFrom : $calledFrom");
currentPatient = patientTicket;
isCallingInProgress = true;
log("Setting isCallingInProgress : $isCallingInProgress");
logger.i("Setting isCallingInProgress : $isCallingInProgress");
logger.i("isVoiceReq: ${patientTicket.isVoiceReq}");
logger.i("voiceCaller: ${voiceCaller == null}");
logger.i("isQueue: ${patientTicket.isQueue}");
logger.i("isToneReq: ${patientTicket.isToneReq}");
if (patientTicket.isToneReq && !patientTicket.isQueue) {
audioPlayer.setAsset("assets/tones/call_tone.mp3");
await audioPlayer.play();
await Future.delayed(const Duration(seconds: 3));
await Future.delayed(const Duration(seconds: 2));
}
if (patientTicket.isVoiceReq && voiceCaller == null && !patientTicket.isQueue) {
final postVoice = getCallTypeText(patientTicket, patientCallConfigurations);
voiceCaller = CallByVoice(preVoice: "Ticket Number", ticketNo: patientTicket.queueNo.trim().toString(), postVoice: postVoice, lang: 'en', flutterTts: flutterTts);
await voiceCaller!.startCalling(patientTicket.queueNo.trim().toString() != patientTicket.callNoStr.trim().toString());
logger.i("patientTicket.voiceLanguage: ${patientTicket.voiceLanguage}");
final postVoice = getCallTypeText(patientTicket);
voiceCaller = CallByVoice(
preVoice: patientTicket.ticketNoText,
ticketNo: patientTicket.queueNo.trim().toString(),
postVoice: postVoice,
lang: patientTicket.voiceLanguage == 1 ? "en" : "ar",
flutterTts: flutterTts,
);
await voiceCaller!.startCalling(patientTicket.queueNo.trim().toString() != patientTicket.callNoStr.trim().toString()).whenComplete(() {
voiceCaller = null;
if (isQueuePatients.isNotEmpty) {
isQueuePatients.removeAt(0);
}
onVoiceCompleted();
logger.i("Completed Calling!! ${isQueuePatients.length}");
});
} else {
isCallingInProgress = false;
log("Setting isCallingInProgress : $isCallingInProgress");
logger.i("Setting isCallingInProgress : $isCallingInProgress");
if (isApiCallNeeded) {
log("I will start waiting!!");
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
log("Called the API after waiting!");
isApiCallNeeded = false;
});
}
@ -160,76 +438,52 @@ class AppProvider extends ChangeNotifier {
Future<void> listenAudioPlayerEvents() async {
audioPlayer.playerStateStream.listen((playerState) async {
if (playerState.processingState == ProcessingState.completed) {
// isCallingInProgress = false;
logger.i("Tone Completed");
if (currentPatient.isVoiceReq) return;
if (currentPatient.isVoiceReq) {
isCallingInProgress = true;
return;
}
if (isQueuePatients.isNotEmpty) {
log("isQueuePatients length : ${isQueuePatients.length}");
final length = isQueuePatients.length;
for (int i = 0; i < length; i++) {
isCallingInProgress = true;
logger.i("isQueuePatients.length 1: ${isQueuePatients.length}");
// for (int i = 0; i < length; i++) {
await Future.delayed(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec)).whenComplete(() async {
PatientTicketModel temp = PatientTicketModel();
if (patientTickets.isNotEmpty) {
if (patientTickets.isNotEmpty && isQueuePatients.length > 1) {
temp = patientTickets.elementAt(0);
patientTickets.removeAt(0);
}
notifyListeners();
if (isQueuePatients.isNotEmpty) {
isQueuePatients.removeAt(0);
patientTickets.add(temp);
notifyListeners();
await voiceCallPatientTicket(patientTickets.first);
updatePatientTicket(patientTickets.first);
});
}
}
isCallingInProgress = false;
log("Setting isCallingInProgress : $isCallingInProgress");
if (isApiCallNeeded) {
log("I will start waiting!!");
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
log("Called the API after waiting!");
isApiCallNeeded = false;
});
}
if (patientTickets.isNotEmpty && isQueuePatients.length > 1) {
patientTickets.add(temp);
}
});
flutterTts.setStartHandler(() {
// isCallingInProgress = true;
});
notifyListeners();
logger.i("isQueuePatients.length 2: ${isQueuePatients.length}");
flutterTts.setCompletionHandler(() async {
if (isQueuePatients.isNotEmpty) {
log("isQueuePatients length : ${isQueuePatients.length}");
final length = isQueuePatients.length;
for (int i = 0; i < length; i++) {
await Future.delayed(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec)).whenComplete(() async {
PatientTicketModel temp = PatientTicketModel();
if (patientTickets.isNotEmpty) {
temp = patientTickets.elementAt(0);
patientTickets.removeAt(0);
}
notifyListeners();
isQueuePatients.removeAt(0);
patientTickets.add(temp);
notifyListeners();
await voiceCallPatientTicket(patientTickets.first);
await voiceCallPatientTicket(patientTickets.first, "listenAudioPlayerEvents");
updatePatientTicket(patientTickets.first);
});
}
});
// }
}
if (isQueuePatients.isEmpty) {
isCallingInProgress = false;
log("Setting isCallingInProgress : $isCallingInProgress");
if (isApiCallNeeded) {
log("I will start waiting!!");
}
if (isApiCallNeeded && isQueuePatients.isEmpty) {
logger.i("Setting isCallingInProgress : $isCallingInProgress");
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
log("Called the API after waiting!");
isApiCallNeeded = false;
});
}
}
});
}
@ -237,9 +491,9 @@ class AppProvider extends ChangeNotifier {
// if (patientTickets.isNotEmpty) {
// List<Tickets> _ticketsToUpdate = patientTickets.where((t) => t.callUpdated == false).toList();
// API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: _ticketsToUpdate.first, onSuccess: (ticketsUpdated) {
// log("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated");
// logger.i("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated");
// }, onFailure: (e) {
// log(" Tickets Update Failed with : ${e.toString()}");
// logger.i(" Tickets Update Failed with : ${e.toString()}");
// });
// }
// }
@ -247,34 +501,41 @@ class AppProvider extends ChangeNotifier {
updatePatientTicket(PatientTicketModel patientTicket) {
if (!patientTicket.isQueue) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) {
log("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated");
logger.i("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated");
}, onFailure: (e) {
log(" Tickets Update ${patientTicket.callNoStr} Failed with Error : ${e.toString()}");
logger.i(" Tickets Update ${patientTicket.callNoStr} Failed with Error : ${e.toString()}");
});
}
}
onConnect() {
log("SignalR: onConnect");
logger.i("SignalR: onConnect");
}
onDisconnect(exception) {
log("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(currentDeviceIp, onUpdateAvailable: onPingReceived, onConnect: onConnect, onConnecting: onConnecting, onDisconnect: onDisconnect);
logger.i("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(
currentDeviceIp,
onUpdateAvailable: onPingReceived,
onConnect: onConnect,
onConnecting: onConnecting,
onDisconnect: onDisconnect,
);
}
onConnecting() {
log("SignalR: onConnecting");
logger.i("SignalR: onConnecting");
}
listenNetworkConnectivity() async {
Connectivity().onConnectivityChanged.listen((event) async {
switch (event) {
Connectivity().onConnectivityChanged.listen((List<ConnectivityResult> event) async {
switch (event.first) {
case ConnectivityResult.wifi:
case ConnectivityResult.ethernet:
updateInternetConnection(true);
await getCurrentIP();
if (signalRHelper.connection == null || signalRHelper.connection!.state != ConnectionState.active) {
signalRHelper.connection!.start();
if (signalRHelper.connection != null) {
if (signalRHelper.connection!.state != HubConnectionState.connected) signalRHelper.connection!.start();
}
break;
case ConnectivityResult.none:
@ -283,7 +544,38 @@ class AppProvider extends ChangeNotifier {
break;
case ConnectivityResult.mobile:
break;
case ConnectivityResult.bluetooth:
// TODO: Handle this case.
break;
// TODO: Handle this case.
case ConnectivityResult.vpn:
// TODO: Handle this case.
break;
case ConnectivityResult.other:
// TODO: Handle this case.
break;
}
});
}
//SHARED PREFERENCE HANDLING
DateTime currentLastTimeUpdated = DateTime.now();
Future<String?> getLastTimeUpdatedFromCache() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
if (prefs.containsKey("lastTimeUpdated")) {
String? lastTimeUpdated = prefs.getString("lastTimeUpdated");
currentLastTimeUpdated = DateTime.fromMillisecondsSinceEpoch(int.parse(lastTimeUpdated!));
return lastTimeUpdated;
} else {
return null;
}
}
Future<void> setLastTimeUpdatedInCache({required String lasTimeUpdated}) async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString("lastTimeUpdated", lasTimeUpdated);
}
}

@ -1,71 +1,171 @@
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/base/app_scaffold_widget.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/footer/app_footer.dart';
import 'package:queuing_system/header/app_header.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/home/priority_calls_components.dart';
import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final appProvider = context.watch<AppProvider>();
return AppScaffold(
appProvider: appProvider,
appBar: AppHeader(),
body: dataContent(appProvider: appProvider),
bottomNavigationBar: Container(
color: Colors.grey.withOpacity(0.1),
height: Utils.getHeight(),
width: double.infinity,
getWeatherWidget() {
return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
if (appProvider.currentWeathersWidgetModel.maxTemp == null || appProvider.currentWeathersWidgetModel.minTemp == null || appProvider.currentWeathersWidgetModel.iconPhrase == null) {
return const SizedBox.shrink();
}
return Container(
height: (appProvider.currentScreenRotation == ScreenOrientationEnum.portraitUp || appProvider.currentScreenRotation == ScreenOrientationEnum.portraitDown) ? SizeConfig.getHeightMultiplier() * 8 : SizeConfig.getHeightMultiplier() * 5,
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
decoration: AppGlobal.configWidgetDecoration,
child: Directionality(
textDirection: appProvider.patientCallConfigurations.textDirection,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
AppText(
appProvider.patientCallConfigurations.weatherText,
color: Colors.grey,
fontSize: SizeConfig.getWidthMultiplier() * 1.5,
),
AppText(
// "Max: 40C , Min: 38C",
"${appProvider.patientCallConfigurations.maxText}: ${appProvider.currentWeathersWidgetModel.maxTemp}°C , ${appProvider.patientCallConfigurations.minText}: ${appProvider.currentWeathersWidgetModel.minTemp}°C",
fontSize: SizeConfig.getHeightMultiplier() * 1.3,
fontHeight: 1,
),
],
),
const SizedBox(width: 15),
SvgPicture.asset(
appProvider.currentWeathersWidgetModel.weatherIconPath ?? AppGlobal.weatherIcon,
height: SizeConfig.getHeightMultiplier() * 3,
),
],
),
),
);
});
}
getPrayerWidget() {
return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
if (appProvider.nextPrayerToShowWithTime.isEmpty) {
return const SizedBox.shrink();
}
return Container(
height: (appProvider.currentScreenRotation == ScreenOrientationEnum.portraitUp || appProvider.currentScreenRotation == ScreenOrientationEnum.portraitDown) ? SizeConfig.getHeightMultiplier() * 8 : SizeConfig.getHeightMultiplier() * 5,
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
decoration: AppGlobal.configWidgetDecoration,
child: Directionality(
textDirection: appProvider.patientCallConfigurations.textDirection,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(width: 20),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () async {
await context.read<AppProvider>().callPatientsAPI();
},
child: AppText(
"Powered By",
fontSize: SizeConfig.getWidthMultiplier() * 2.6,
fontFamily: 'Poppins-Medium.ttf',
AppText(
appProvider.patientCallConfigurations.nextPrayerText,
color: Colors.grey,
fontSize: SizeConfig.getWidthMultiplier() * 1.5,
),
AppText(
appProvider.nextPrayerToShowWithTime,
fontSize: SizeConfig.getHeightMultiplier() * 1.3,
fontHeight: 1,
),
Text(appProvider.currentDeviceIp, style: TextStyle(fontWeight: FontWeight.w500, fontSize: SizeConfig.getWidthMultiplier() * 2.2)),
],
),
const SizedBox(width: 10),
Image.asset(
"assets/images/cloud_logo.png",
height: SizeConfig.getHeightMultiplier() * 4,
const SizedBox(width: 15),
SvgPicture.asset(
AppGlobal.mosqueIcon,
height: SizeConfig.getHeightMultiplier() * 3,
),
],
),
),
);
});
}
getBody(AppProvider appProvider, context) {
return Column(
children: [
const SizedBox(height: 12),
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 40),
child: Row(
children: [
getWeatherWidget(),
const SizedBox(width: 35),
getPrayerWidget(),
],
),
)),
const SizedBox(height: 20),
Expanded(
flex: 9,
child: dataContent(appProvider: appProvider, context: context),
),
],
);
}
int getTurnsByOrientation(ScreenOrientationEnum screenOrientationEnum) {
switch (screenOrientationEnum) {
case ScreenOrientationEnum.portraitUp:
return 0;
case ScreenOrientationEnum.portraitDown:
return 2;
case ScreenOrientationEnum.landscapeRight:
return 1;
case ScreenOrientationEnum.landscapeLeft:
return 3;
default:
return 0;
}
}
@override
Widget build(BuildContext context) {
final appProvider = context.watch<AppProvider>();
log(appProvider.currentScreenRotation.toString());
// appProvider.isCallingInProgress = false;
return RotatedBox(
// quarterTurns: 3,
quarterTurns: getTurnsByOrientation(appProvider.currentScreenRotation),
child: AppScaffold(
appProvider: appProvider,
appBar: const AppHeader(),
body: getBody(appProvider, context),
bottomNavigationBar: const AppFooter(),
),
);
}
Widget dataContent({required AppProvider appProvider}) {
Widget dataContent({required AppProvider appProvider, required BuildContext context}) {
log("isCallingInProgress from HomeScreen: ${appProvider.isCallingInProgress}");
// appProvider.voiceCallPatientTicket(appProvider.patientTickets.first);
// appProvider.testCalling();
if (appProvider.patientTickets.isEmpty) {
// No Patient in Queue
return noPatientInQueue();
return noPatientInQueue(screenOrientationEnum: appProvider.currentScreenRotation);
} else if (appProvider.patientTickets.length > 3) {
// Return Content With Side List
return priorityTicketsWithSideList(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations);
return priorityTicketsWithSideList(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations, context: context);
} else {
// Return Content In Center Aligned
return PriorityTickets(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations);

@ -1,8 +1,12 @@
import 'dart:developer';
import 'package:blinking_text/blinking_text.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/core/response_models/patient_ticket_model.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/utils/call_type.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
@ -102,7 +106,7 @@ class TicketItem extends StatelessWidget {
// endColor: blink ? AppGlobal.appRedColor : Colors.black,
times: 0,
duration: const Duration(seconds: 1)),
const SizedBox(height: 10),
const SizedBox(height: 13),
Directionality(
textDirection: callConfig.textDirection,
child: Row(
@ -110,10 +114,10 @@ class TicketItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 8),
padding: EdgeInsets.only(bottom: callType == CallType.vitalSign ? 0 : 8),
child: callType.icon(SizeConfig.getHeightMultiplier() * 3),
),
const SizedBox(width: 10),
const SizedBox(width: 13),
AppText(
callType.message(callConfig),
color: callType.color(),
@ -148,22 +152,40 @@ class TicketItem extends StatelessWidget {
}
}
Widget noPatientInQueue() {
Widget noPatientInQueue({required ScreenOrientationEnum screenOrientationEnum}) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: AppText("Awaiting Patients Arrival", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 9),
child: AppText(
"Awaiting Patients Arrival",
fontFamily: 'Poppins-SemiBold.ttf',
fontSize: (screenOrientationEnum == ScreenOrientationEnum.portraitDown || screenOrientationEnum == ScreenOrientationEnum.portraitUp) ? SizeConfig.getWidthMultiplier() * 9 : SizeConfig.getWidthMultiplier() * 7,
),
),
],
);
}
Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, required CallConfig callConfig}) {
Widget qamarsBirthdayWidget() {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText("Happy Birthday", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 15),
Center(
child: AppText("Syed Qamar 🎉", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 11),
),
],
);
}
Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, required CallConfig callConfig, required BuildContext context}) {
final priorityTickets = tickets.sublist(0, 3);
final otherTickets = tickets.sublist(3, tickets.length);
return Row(
children: [
final AppProvider appProvider = context.watch<AppProvider>();
log("appProvider.currentScreenRotation: ${appProvider.currentScreenRotation}");
final List<Widget> children = [
Expanded(flex: 7, child: PriorityTickets(callConfig: callConfig, tickets: priorityTickets)),
Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)),
Expanded(
@ -179,7 +201,7 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
flex: 3,
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -255,7 +277,7 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
flex: 3,
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -264,7 +286,7 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
letterSpacing: -1,
fontHeight: 0.5,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 4,
fontSize: SizeConfig.getWidthMultiplier() * 3.5,
textAlign: TextAlign.center,
),
],
@ -313,7 +335,8 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
itm.roomNo, // callConfig.textDirection == TextDirection.ltr ? "${callConfig.roomText}: ${itm.roomNo}" : " ${itm.roomNo} ${callConfig.roomText}: ",
itm.roomNo,
// callConfig.textDirection == TextDirection.ltr ? "${callConfig.roomText}: ${itm.roomNo}" : " ${itm.roomNo} ${callConfig.roomText}: ",
color: itm.getCallType().color(),
letterSpacing: -1.5,
fontSize: SizeConfig.getWidthMultiplier() * 3.3,
@ -332,6 +355,6 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
],
),
)
],
);
];
return (appProvider.currentScreenRotation == ScreenOrientationEnum.portraitUp || appProvider.currentScreenRotation == ScreenOrientationEnum.portraitDown) ? Row(children: children) : Column(children: children);
}

@ -1,20 +1,29 @@
import 'dart:developer';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:wakelock/wakelock.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
import 'core/config/size_config.dart';
import 'home/home_screen.dart';
// import 'home/home_screen_bkp.dart';
Logger logger = Logger(
level: Level.debug,
printer: PrettyPrinter(
printEmojis: false,
colors: true,
printTime: false,
));
void main() {
//TODO: WE HAVE TO UPDATE THIS BEFORE GOING LIVE.
HttpOverrides.global = MyHttpOverrides();
WidgetsFlutterBinding.ensureInitialized();
Wakelock.enable();
WakelockPlus.enable();
runApp(const MyApp());
}
@ -32,6 +41,9 @@ class MyApp extends StatelessWidget {
builder: (context, constraints) {
return OrientationBuilder(builder: (context, orientation) {
SizeConfig().init(constraints, orientation);
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
return MultiProvider(
providers: [
ChangeNotifierProvider<AppProvider>(create: (context) => AppProvider()),
@ -45,7 +57,7 @@ class MyApp extends StatelessWidget {
dividerColor: Colors.grey[350],
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)),
),
home: const MyHomePage(),
home: MyHomePage(),
debugShowCheckedModeBanner: false,
));
});

@ -1,4 +1,7 @@
import 'dart:developer';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:queuing_system/home/app_provider.dart';
class CallByVoice {
final String lang;
@ -14,12 +17,11 @@ class CallByVoice {
double rate = 0.2;
Future<void> startCalling(bool isClinicNameAdded) async {
// log("langs1: ${(await flutterTts.getVoices).toString()}");
// log("langs2: ${(await flutterTts.areLanguagesInstalled(["en-AU", "ar-AR"])).toString()}");
// log("langs3: ${(await flutterTts.getDefaultVoice).toString()}");
// log("langs3: ${(await flutterTts.getLanguages).toString()}");
// log("langs4: ${(await flutterTts.setVoice({"name": "kn-in-x-knf-network", "locale": "kn-IN"})).toString()}");
// log("langs5: ${(await flutterTts.getEngines).toString()}");
log("lang: $lang");
log("preVoice: $preVoice");
log("postVoice: $postVoice");
log("ticketNo: $ticketNo");
log("isClinicNameAdded: $isClinicNameAdded");
String clinicName = "";
String patientAlpha = "";
@ -28,45 +30,51 @@ class CallByVoice {
if (isClinicNameAdded) {
var clinic = ticketNo.split(" ");
clinicName = clinic[0];
patientAlpha = clinic[1].split("-")[0];
patientNumeric = clinic[1].split("-")[1];
var queueNoArray = clinic[1].split("-");
if (queueNoArray.length > 2) {
patientAlpha = "${queueNoArray[0]} .. ${queueNoArray[1]}";
patientNumeric = queueNoArray[2];
} else {
patientAlpha = queueNoArray[0];
patientNumeric = queueNoArray[1];
}
} else {
var queueNoArray = ticketNo.split("-");
if (queueNoArray.length > 2) {
patientAlpha = "${queueNoArray[0]} .. ${queueNoArray[1]}";
patientNumeric = queueNoArray[2];
} else {
patientAlpha = ticketNo.split("-")[0];
patientNumeric = ticketNo.split("-")[1];
patientAlpha = queueNoArray[0];
patientNumeric = queueNoArray[1];
}
}
// await flutterTts.setLanguage("en-US");
// Create Pre Voice Players
if (postVoice != null && postVoice.isNotEmpty) {
log('lang $lang');
flutterTts.setSpeechRate(0.45);
if (lang != "ar") {
await flutterTts.setLanguage(lang);
flutterTts.setPitch(0.9);
flutterTts.setVolume(1.0);
// await flutterTts.speak(clinicName + " .. " + patientAlpha + " .. " + patientNumeric + " .. " + postVoice);
isVoiceActualCompletedGlobally = true;
await flutterTts.awaitSpeakCompletion(true);
await flutterTts.speak(preVoice + " .. " + clinicName + " .. " + patientAlpha + " .. " + patientNumeric + " .. " + postVoice);
return;
}
// // Create Ticket Number Voice Players
// final characters = ticketNo.characters.toList();
// for (int i = 0; i < characters.length; i++) {
// final no = characters[i];
// if (no.isNotEmpty && no != "-" && no != "_" && no != " ") {
//
// await _player.stop();
// await _player.setAsset('assets/voice_$lang/${no.toUpperCase()}.mp3');
// await _player.play();
// }
// }
flutterTts.setPitch(1.1);
flutterTts.setVolume(1.0);
await flutterTts.setLanguage(lang);
isVoiceActualCompletedGlobally = false;
await flutterTts.awaitSpeakCompletion(true);
// Create Post Voice Players
// if (postVoice != null && postVoice.isNotEmpty) {
// await Future.delayed(const Duration(milliseconds: 1000));
//
// await _player.stop();
// await _player.setAsset('assets/voice_$lang/$postVoice');
// await _player.play();
// }
// await flutterTts.speak(preVoice + " .. " + clinicName + " .. " + patientAlpha + " .. " + patientNumeric + " .. " + postVoice);
await flutterTts.speak(preVoice + " .. ");
await flutterTts.setLanguage("en");
await flutterTts.speak(clinicName + " .. " + patientAlpha + " .. " + patientNumeric + " .. ");
await flutterTts.setLanguage(lang);
isVoiceActualCompletedGlobally = true;
await flutterTts.speak(postVoice);
}
}
// stop() async {
// await _player.stop();
// }
}

@ -1,8 +1,9 @@
import 'dart:developer';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:http/io_client.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/main.dart';
import 'package:signalr_core/signalr_core.dart';
/*
@ -19,32 +20,40 @@ https://vcallapi.hmg.com/patientcalling.html?IPAddress=10.10.14.20&Clinic=4&Proj
class SignalRHelper {
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub";
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub";
String hubBaseURL = "https://ms.hmg.com/nscapi/PatientCallingHub";
String hubBaseURL = "$BASE_URL/PatientCallingHub";
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub?IPAddress=10.10.14.20";
// "https://VCallApi.hmg.com/WebRTCHub?source=mobile&username=2001273";
String msg = "Awaiting Patients Arrival";
HubConnection? connection;
startSignalRConnection(String deviceIp,
{required Function(dynamic) onUpdateAvailable, required VoidCallback onConnect, required Function(dynamic) onDisconnect, required VoidCallback onConnecting}) async {
log("Connecting Signal R with: $deviceIp");
final url = hubBaseURL + "?IPAddress=$deviceIp";
startSignalRConnection(
String deviceIp, {
required Function(dynamic) onUpdateAvailable,
required VoidCallback onConnect,
required Function(dynamic) onDisconnect,
required VoidCallback onConnecting,
}) async {
logger.i("Connecting Signal R with: $deviceIp");
final url = "$hubBaseURL?IPAddress=$deviceIp";
// final url = hubBaseURL;
connection = HubConnectionBuilder()
.withUrl(
url,
HttpConnectionOptions(
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
transport: HttpTransportType.serverSentEvents,
//TODO: IT MUST BE WEB SOCKETS
transport: HttpTransportType.longPolling,
logging: (level, message) => log(message),
))
.withAutomaticReconnect()
.build();
connection!.serverTimeoutInMilliseconds = 120000;
connection!.onclose(onDisconnect);
connection!.onreconnecting((exception) => onConnecting());
connection!.onreconnected((connectionId) => onConnect());
connection!.onreconnected((connectionId) => onConnect());
connection!.on('addChatMessage', (message) => onUpdateAvailable(message));
@ -57,7 +66,7 @@ class SignalRHelper {
bool getConnectionState() {
if (connection == null) return false;
log("connectionState: ${connection!.state}");
logger.i("connectionState: ${connection!.state}");
if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) return true;
if (connection!.state == HubConnectionState.disconnected || connection!.state == HubConnectionState.disconnecting) return false;
return false;
@ -69,10 +78,10 @@ class SignalRHelper {
}
}
startConnection(BuildContext context) async {
if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
connection!.off('addChatMessage');
await connection!.start();
}
}
// startConnection(BuildContext context) async {
// if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
// connection!.off('addChatMessage');
// await connection!.start();
// }
// }
}

@ -1,5 +1,6 @@
import 'package:connectivity/connectivity.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/main.dart';
class Utils {
static getHeight() {
@ -16,12 +17,20 @@ class Utils {
}
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) {
List<ConnectivityResult> connectivityResult = await (Connectivity().checkConnectivity());
int indexEthernet = connectivityResult.indexWhere((element) => element == ConnectivityResult.ethernet);
if (indexEthernet != -1) {
return true;
}
int indexWifi = connectivityResult.indexWhere((element) => element == ConnectivityResult.wifi);
if (indexWifi != -1) {
return true;
} else {
return false;
}
return false;
}
// static TextStyle textStyle(context) => TextStyle(color: Theme.of(context).primaryColor);
//

@ -112,6 +112,7 @@ class _AppTextState extends State<AppText> {
? _getFontStyle()?.copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color,
fontFamily: 'Poppins',
fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight,
)
@ -121,7 +122,7 @@ class _AppTextState extends State<AppText> {
fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins',
fontFamily: 'Poppins',
decoration: widget.textDecoration,
height: widget.fontHeight),
)

@ -6,17 +6,21 @@ import FlutterMacOS
import Foundation
import audio_session
import connectivity_macos
import connectivity_plus
import flutter_tts
import just_audio
import package_info_plus
import path_provider_foundation
import wakelock_macos
import shared_preferences_foundation
import wakelock_plus
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
FlutterTtsPlugin.register(with: registry.registrar(forPlugin: "FlutterTtsPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
}

@ -1,4 +1,4 @@
platform :osx, '10.11'
platform :osx, '10.14'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {
/* Begin PBXAggregateTarget section */
@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
@ -256,6 +256,7 @@
/* Begin PBXShellScriptBuildPhase section */
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@ -404,7 +405,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@ -483,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@ -530,7 +531,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

@ -1,570 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
url: "https://pub.dev"
source: hosted
version: "2.10.0"
audio_session:
dependency: transitive
description:
name: audio_session
sha256: "8a2bc5e30520e18f3fb0e366793d78057fb64cd5287862c76af0c8771f2a52ad"
url: "https://pub.dev"
source: hosted
version: "0.1.16"
blinking_text:
dependency: "direct main"
description:
name: blinking_text
sha256: "3f0c300f9f67ff3455e303a7dea7825bd96965d17295e4e831f29040c0379e69"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.dev"
source: hosted
version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.dev"
source: hosted
version: "1.17.0"
connectivity:
dependency: "direct main"
description:
name: connectivity
sha256: a8e91263cf3e25fb5cc95e19dfde4999e32a648ac3b9e8a558a28165731678f8
url: "https://pub.dev"
source: hosted
version: "3.0.6"
connectivity_for_web:
dependency: transitive
description:
name: connectivity_for_web
sha256: "01a390c1d5adc2ed1fa1f52d120c07fe9fd01166a93f965a832fd6cfc0ea6482"
url: "https://pub.dev"
source: hosted
version: "0.4.0+1"
connectivity_macos:
dependency: transitive
description:
name: connectivity_macos
sha256: "51ae08d5162eca9669b9d8951ed83ce19c5355a81149f94e4dee2740beb93628"
url: "https://pub.dev"
source: hosted
version: "0.2.1+2"
connectivity_platform_interface:
dependency: transitive
description:
name: connectivity_platform_interface
sha256: "2d82e942df9d49f29a24bb07fb5ce085d4a53e47818c62364d2b6deb9e0d7a8e"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
crypto:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
url: "https://pub.dev"
source: hosted
version: "3.0.3"
equatable:
dependency: transitive
description:
name: equatable
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
url: "https://pub.dev"
source: hosted
version: "2.0.5"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
url: "https://pub.dev"
source: hosted
version: "2.0.2"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_gifimage:
dependency: "direct main"
description:
name: flutter_gifimage
sha256: "2c1b59e0b96d64ee0e073b70a376d6651d369b87880cdd1bf29f8466d5b0ad46"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
url: "https://pub.dev"
source: hosted
version: "1.0.4"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2"
url: "https://pub.dev"
source: hosted
version: "1.1.6"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_tts:
dependency: "direct main"
description:
name: flutter_tts
sha256: "23d47e1335c632228b80d9693e2494a834393fff5893b66e8ae494dcce4e9867"
url: "https://pub.dev"
source: hosted
version: "3.8.3"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
get_it:
dependency: "direct main"
description:
name: get_it
sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468"
url: "https://pub.dev"
source: hosted
version: "7.6.0"
http:
dependency: "direct main"
description:
name: http
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
url: "https://pub.dev"
source: hosted
version: "0.13.6"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
js:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dev"
source: hosted
version: "0.6.5"
just_audio:
dependency: "direct main"
description:
name: just_audio
sha256: "5ed0cd723e17dfd8cd4b0253726221e67f6546841ea4553635cf895061fc335b"
url: "https://pub.dev"
source: hosted
version: "0.9.35"
just_audio_platform_interface:
dependency: transitive
description:
name: just_audio_platform_interface
sha256: d8409da198bbc59426cd45d4c92fca522a2ec269b576ce29459d6d6fcaeb44df
url: "https://pub.dev"
source: hosted
version: "4.2.1"
just_audio_web:
dependency: transitive
description:
name: just_audio_web
sha256: ff62f733f437b25a0ff590f0e295fa5441dcb465f1edbdb33b3dea264705bc13
url: "https://pub.dev"
source: hosted
version: "0.4.8"
lints:
dependency: transitive
description:
name: lints
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
url: "https://pub.dev"
source: hosted
version: "1.0.1"
logging:
dependency: transitive
description:
name: logging
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
matcher:
dependency: transitive
description:
name: matcher
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
url: "https://pub.dev"
source: hosted
version: "0.12.13"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
name: path
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
url: "https://pub.dev"
source: hosted
version: "1.8.2"
path_drawing:
dependency: transitive
description:
name: path_drawing
sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_provider:
dependency: transitive
description:
name: path_provider
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
url: "https://pub.dev"
source: hosted
version: "2.1.1"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
url: "https://pub.dev"
source: hosted
version: "5.1.0"
platform:
dependency: transitive
description:
name: platform
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev"
source: hosted
version: "3.1.2"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
url: "https://pub.dev"
source: hosted
version: "2.1.6"
provider:
dependency: "direct main"
description:
name: provider
sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
url: "https://pub.dev"
source: hosted
version: "6.0.5"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
url: "https://pub.dev"
source: hosted
version: "0.27.7"
signalr_core:
dependency: "direct main"
description:
name: signalr_core
sha256: dca676372a00c051511591ed0e24521ff7aa4e9320a7fa778a1007f7f522c8c0
url: "https://pub.dev"
source: hosted
version: "1.1.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.9.1"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sse_client:
dependency: transitive
description:
name: sse_client
sha256: "71bd826430b41ab20a69d85bf2dfe9f11cfe222938e681ada1aea71fc8adf348"
url: "https://pub.dev"
source: hosted
version: "0.1.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
url: "https://pub.dev"
source: hosted
version: "0.4.16"
tuple:
dependency: transitive
description:
name: tuple
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
url: "https://pub.dev"
source: hosted
version: "2.0.2"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
version: "1.3.2"
uuid:
dependency: transitive
description:
name: uuid
sha256: e03928880bdbcbf496fb415573f5ab7b1ea99b9b04f669c01104d085893c3134
url: "https://pub.dev"
source: hosted
version: "4.0.0"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
wakelock:
dependency: "direct main"
description:
name: wakelock
sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db"
url: "https://pub.dev"
source: hosted
version: "0.6.2"
wakelock_macos:
dependency: transitive
description:
name: wakelock_macos
sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd"
url: "https://pub.dev"
source: hosted
version: "0.4.0"
wakelock_platform_interface:
dependency: transitive
description:
name: wakelock_platform_interface
sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
wakelock_web:
dependency: transitive
description:
name: wakelock_web
sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5"
url: "https://pub.dev"
source: hosted
version: "0.4.0"
wakelock_windows:
dependency: transitive
description:
name: wakelock_windows
sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
url: "https://pub.dev"
source: hosted
version: "2.4.0"
win32:
dependency: transitive
description:
name: win32
sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
url: "https://pub.dev"
source: hosted
version: "3.1.4"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
xml:
dependency: transitive
description:
name: xml
sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
url: "https://pub.dev"
source: hosted
version: "6.2.2"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.7.0"

@ -33,19 +33,23 @@ dependencies:
# Base packages
provider: ^6.0.1
get_it: ^7.1.3
connectivity: ^3.0.6
flutter_gifimage: ^1.0.1
flutter_svg: ^1.0.3
http: ^0.13.0
get_it: ^8.0.2
connectivity_plus: ^6.1.0
# flutter_gifimage: ^1.0.1
flutter_svg: ^2.0.14
http: ^1.2.2
blinking_text: ^1.0.2
just_audio: ^0.9.31
flutter_tts: ^3.6.3
wakelock: ^0.6.2
just_audio: ^0.9.42
flutter_tts: ^4.1.0
# flutter_tts: ^4.0.2
wakelock_plus: ^1.2.8
shared_preferences: ^2.3.5
#signalr core
signalr_core: ^1.1.1
intl: ^0.19.0
marquee: ^2.2.3
logger: ^2.4.0
win32: ^5.8.0
@ -58,7 +62,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^1.0.0
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
@ -75,6 +79,7 @@ flutter:
assets:
- assets/images/
- assets/tones/
- assets/icons/
fonts:

@ -6,9 +6,12 @@
#include "generated_plugin_registrant.h"
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <flutter_tts/flutter_tts_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
FlutterTtsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterTtsPlugin"));
}

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
flutter_tts
)

Loading…
Cancel
Save