Compare commits

...

80 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
FaizHashmiCS22 3025c26d94 Till AlJazan Demo 2 years ago
FaizHashmiCS22 0027f88df5 Structure Update 2 years ago
FaizHashmiCS22 f524cee132 Structure Update 2 years ago
FaizHashmiCS22 1a3ed42951 Before changing into provider! 2 years ago
FaizHashmiCS22 0ac7d68a65 Made the Strings Dynamic 3 years ago
FaizHashmiCS22 941ca2ff0e Reformatted Code 3 years ago
FaizHashmiCS22 017f01621e API Updations 3 years ago
FaizHashmiCS22 01bf6736c6 added call_config 3 years ago
FaizHashmiCS22 e82f908885 final push till demo 3 years ago
FaizHashmiCS22 14f1268f66 Final testing done 3 years ago
FaizHashmiCS22 a15aaa4db9 Updated before Merging List 3 years ago
FaizHashmiCS22 5379fdc6a6 Updated Endpoints and DataModels 3 years ago
FaizHashmiCS22 a44f58280d Added the wakelock 3 years ago
Faiz Hashmi 9384853027 Added the auto open applicatioun after reboot 3 years ago
FaizHashmiCS22 e44286a527 Made the IP Address Dynamic 3 years ago
FaizHashmiCS22 c1a92764f2 Made the IP Address Dynamic 3 years ago
FaizHashmiCS22 61261d9412 Made the IP Address Dynamic 3 years ago
FaizHashmiCS22 64e9d48d82 test commit 3 years ago
FaizHashmiCS22 5ce26032e7 resolved lint errors 3 years ago
Faiz Hashmi d9881cf98f Added trrriiiinngg tone before voice call and few other changes 3 years ago
Faiz Hashmi 81fa1ea80d Added trrriiiinngg tone before voice call and few other changes 3 years ago
Faiz Hashmi 595af7d09e Added ISQueue and QueueDuration 3 years ago
Faiz Hashmi 482f83c35d Added ISQueue and QueueDuration 3 years ago
Faiz Hashmi 16f3bfc221 Pushing till working demo 3 years ago
Faiz Hashmi 18eabcb3b8 Pushing till working demo 3 years ago
Faiz Hashmi c275818ff4 Merge branch 'dev_faiz' 3 years ago
Faiz Hashmi c9f978f0eb Pushing till working demo 3 years ago
Faiz Hashmi c73daeb8e8 Pushing till working demo 3 years ago
Faiz Hashmi 54f6c7c185 Pushing after Testing on Panel 3 years ago
Faiz Hashmi 7e82746ce3 Pushing after callType Testing 3 years ago
haroon amjad a6537f1658 Merge branch 'zik' into 'development'
Updates

See merge request Cloud_Solution/queuing_system!6
3 years ago
FaizHashmiCS22 3295bbc9e1 resolved lint errors 3 years ago
Zohaib Iqbal Kambrani d20a45208a no message 3 years ago
Zohaib Iqbal Kambrani 1428fd6480 Updates 3 years ago
Elham Ali 7587bc0062 Merge branch 'fonts_fixes' into 'development'
my last comment :)

See merge request Cloud_Solution/queuing_system!5
4 years ago
Elham Rababh e996efcb52 my last comment :) 4 years ago
Elham Ali 938a19d7db Merge branch 'fonts_fixes' into 'development'
fix signal R code

See merge request Cloud_Solution/queuing_system!4
4 years ago
Elham Rababh 2dbb83f54f fix signal R code 4 years ago
Elham Ali af86cc7a10 Merge branch 'fonts_fixes' into 'development'
Fonts fixes

See merge request Cloud_Solution/queuing_system!3
4 years ago
RoaaGhali98 aad9f695ff Fixing some design issues 4 years ago
Elham Rababh 5adf4202f0 fix landscape issue 4 years ago
Elham Rababh 249f57ed85 return the timer 4 years ago
Elham Rababh 3f49de9c2c fix issue of design 4 years ago
Elham Rababh 507e3b0ac1 fix issue of design 4 years ago
Elham Rababh 5fe631c759 fix the header 4 years ago
Elham Rababh c83423bbc1 Fix the timer 4 years ago
Elham Ali 761687fe75 Merge branch 'queuing_system_third_page' into 'development'
Queuing system third page

See merge request Cloud_Solution/queuing_system!2
4 years ago
Elham Ali 79df7137c2 Merge branch 'singleR' into 'master'
Single r

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

@ -1,16 +1,44 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.queuing_system"> package="com.example.queuing_system">
<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>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
<application <application
android:label="queuing_system"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher"
android:label="queuing_system">
<receiver
android:name="BootReceiver"
android:enabled="true"
android:exported="true"
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>
</receiver>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true" android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="landscape"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
@ -18,11 +46,10 @@
to determine the Window background behind the Flutter UI. --> to determine the Window background behind the Flutter UI. -->
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme" />
/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<!-- Don't delete the meta-data below. <!-- Don't delete the meta-data below.

@ -0,0 +1,14 @@
package com.example.queuing_system
import android.content.BroadcastReceiver
import android.content.Context;
import android.content.Intent;
class BootReceiver: BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if (intent.action == Intent.ACTION_BOOT_COMPLETED) {
val i = Intent(context, MainActivity::class.java)
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(i)
}
}
}

@ -1,6 +1,24 @@
package com.example.queuing_system package com.example.queuing_system
import android.content.Intent
import android.net.Uri
import android.os.Build
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity
import android.os.Bundle
import android.provider.Settings
import androidx.annotation.RequiresApi
class MainActivity: FlutterActivity() { class MainActivity: FlutterActivity() {
@RequiresApi(Build.VERSION_CODES.M)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// var REQUEST_OVERLAY_PERMISSIONS = 100
// if (!Settings.canDrawOverlays(applicationContext)) {
// val myIntent = Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION)
// val uri: Uri = Uri.fromParts("package", packageName, null)
// myIntent.data = uri
// startActivityForResult(myIntent, REQUEST_OVERLAY_PERMISSIONS)
// return
// }
}
} }

@ -1,31 +1,40 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.9.10'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.0' classpath 'com.android.tools.build:gradle:8.7.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
allprojects { allprojects {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
} }
rootProject.buildDir = '../build' rootProject.buildDir = '../build'
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
task clean(type: Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir 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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

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

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.704" height="36.818" viewBox="0 0 28.704 36.818">
<g id="doctor_10_" data-name="doctor (10)" transform="translate(-5.291)">
<path id="Path_5102" data-name="Path 5102" d="M21.572,0a8,8,0,1,0,7.994,8A8,8,0,0,0,21.572,0Z" transform="translate(-1.931)" fill="#52964f"/>
<path id="Path_5103" data-name="Path 5103" d="M25.819,23.474a17.6,17.6,0,0,1,.584,4.767c1.176,1.042,4.261,4.115,3.59,7.147a3.551,3.551,0,0,1-2.485,2.52.767.767,0,0,1-.5-1.452,2.072,2.072,0,0,0,1.477-1.362c.459-2.079-1.842-4.6-3.122-5.726-1.531.743-4.426,2.567-4.538,4.654a2.057,2.057,0,0,0,1.055,1.742.767.767,0,1,1-.863,1.269A3.545,3.545,0,0,1,19.3,33.9c.174-3.241,4.41-5.449,5.592-6a20.9,20.9,0,0,0-.759-4.869.855.855,0,0,1-.008-.125,13.292,13.292,0,0,0-3.5-.48H18.657a13.318,13.318,0,0,0-3.9.585.7.7,0,0,1-.043.164,33.366,33.366,0,0,0-2.471,8.754,3.142,3.142,0,1,1-1.546-.035,37.409,37.409,0,0,1,2.081-8.085A13.373,13.373,0,0,0,5.291,35.793v5.482a.766.766,0,0,0,.767.767h27.17A.776.776,0,0,0,34,41.264V35.793a13.392,13.392,0,0,0-8.177-12.319Z" transform="translate(0 -5.223)" fill="#52964f"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="54.029" height="58" viewBox="0 0 54.029 58"> <svg xmlns="http://www.w3.org/2000/svg" width="54.029" height="58" viewBox="0 0 54.029 58">
<g id="doctor_2_" data-name="doctor (2)" transform="translate(-4.985 -3)"> <g id="doctor_2_" data-name="Doctor (2)" transform="translate(-4.985 -3)">
<path id="Path_57" data-name="Path 57" d="M49.73,40,47,39.43c1.51,3,.89,5.33,1,7.71a4,4,0,1,1-2,0c-.2-2.18.71-5.24-1.72-8.24l-6.36-1.23a13.83,13.83,0,0,1-11.84,0L19.72,38.9A7.68,7.68,0,0,0,18,43.77v.33a5.21,5.21,0,0,1,4.11,4.16l.95,5.2a3,3,0,0,1-.65,2.46c-1.19,1.44-2.83,1-3.41,1.08V55c.6-.07,1.42.21,1.87-.36a1,1,0,0,0,.22-.82l-.95-5.2a3.19,3.19,0,0,0-6.28,0l-.95,5.2a1,1,0,0,0,1,1.18H15v2H13.9a3.006,3.006,0,0,1-2.96-3.54l1-5.2A5.21,5.21,0,0,1,16,44.1v-.33a9.61,9.61,0,0,1,1-4.34L14.27,40A9.05,9.05,0,0,0,7.1,47.32L5,59.83A1,1,0,0,0,6,61H27.42a1,1,0,0,0,1-1.16l-3-18.57,5.83,4.32a1,1,0,0,0,1.18,0l6.24-4.42-3,18.65a1,1,0,0,0,1,1.16H58a1,1,0,0,0,1-1.17L56.9,47.32A9.05,9.05,0,0,0,49.73,40Z" fill="#ec1c2b"/> <path id="Path_57" data-name="Path 57" d="M49.73,40,47,39.43c1.51,3,.89,5.33,1,7.71a4,4,0,1,1-2,0c-.2-2.18.71-5.24-1.72-8.24l-6.36-1.23a13.83,13.83,0,0,1-11.84,0L19.72,38.9A7.68,7.68,0,0,0,18,43.77v.33a5.21,5.21,0,0,1,4.11,4.16l.95,5.2a3,3,0,0,1-.65,2.46c-1.19,1.44-2.83,1-3.41,1.08V55c.6-.07,1.42.21,1.87-.36a1,1,0,0,0,.22-.82l-.95-5.2a3.19,3.19,0,0,0-6.28,0l-.95,5.2a1,1,0,0,0,1,1.18H15v2H13.9a3.006,3.006,0,0,1-2.96-3.54l1-5.2A5.21,5.21,0,0,1,16,44.1v-.33a9.61,9.61,0,0,1,1-4.34L14.27,40A9.05,9.05,0,0,0,7.1,47.32L5,59.83A1,1,0,0,0,6,61H27.42a1,1,0,0,0,1-1.16l-3-18.57,5.83,4.32a1,1,0,0,0,1.18,0l6.24-4.42-3,18.65a1,1,0,0,0,1,1.16H58a1,1,0,0,0,1-1.17L56.9,47.32A9.05,9.05,0,0,0,49.73,40Z" fill="#ec1c2b"/>
<path id="Path_58" data-name="Path 58" d="M39.77,34.13A11.94,11.94,0,0,0,44,25.9,5,5,0,0,0,46,17c.34-1.32,1.76-7.65-1.32-10.73-2.3-2.27-5.8-1.78-7.3-1.42C36.66,4.09,35.1,3,32,3,27.65,3,20.38,3,18.11,7.55c-1.79,3.57-1,8.35-.7,10a5,5,0,0,0,2.64,8.36,11.94,11.94,0,0,0,4.18,8.23,9.74,9.74,0,0,0-7.2,5.3l2.69-.53A7.73,7.73,0,0,1,25.77,36h1.45a12,12,0,0,0,9.56,0h1.45a7.73,7.73,0,0,1,6.05,2.9l2.69.52A9.77,9.77,0,0,0,39.77,34.13ZM44,18.35l.25-.08A3,3,0,0,1,44,23.82ZM20,23.82a3,3,0,0,1-1-5.07l1-.34ZM32,35A10,10,0,0,1,22,25V20a41.82,41.82,0,0,0,8.24-1,11.86,11.86,0,0,0,5.47-3.11c1.56,2.55,4.81,3.78,6.29,4.23V25A10,10,0,0,1,32,35Z" fill="#ec1c2b"/> <path id="Path_58" data-name="Path 58" d="M39.77,34.13A11.94,11.94,0,0,0,44,25.9,5,5,0,0,0,46,17c.34-1.32,1.76-7.65-1.32-10.73-2.3-2.27-5.8-1.78-7.3-1.42C36.66,4.09,35.1,3,32,3,27.65,3,20.38,3,18.11,7.55c-1.79,3.57-1,8.35-.7,10a5,5,0,0,0,2.64,8.36,11.94,11.94,0,0,0,4.18,8.23,9.74,9.74,0,0,0-7.2,5.3l2.69-.53A7.73,7.73,0,0,1,25.77,36h1.45a12,12,0,0,0,9.56,0h1.45a7.73,7.73,0,0,1,6.05,2.9l2.69.52A9.77,9.77,0,0,0,39.77,34.13ZM44,18.35l.25-.08A3,3,0,0,1,44,23.82ZM20,23.82a3,3,0,0,1-1-5.07l1-.34ZM32,35A10,10,0,0,1,22,25V20a41.82,41.82,0,0,0,8.24-1,11.86,11.86,0,0,0,5.47-3.11c1.56,2.55,4.81,3.78,6.29,4.23V25A10,10,0,0,1,32,35Z" fill="#ec1c2b"/>
</g> </g>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36.818" height="36.818" viewBox="0 0 36.818 36.818">
<g id="_x30_6" transform="translate(-2 -2)">
<path id="Path_5097" data-name="Path 5097" d="M7.26,16.753a3.945,3.945,0,1,1,5.26,0v3.389c4.5-.973,5.26-4.465,5.26-6.683C17.779,8.9,14.633,2,9.89,2S2,8.9,2,13.459c0,2.218.761,5.71,5.26,6.683Z" transform="translate(0 0)" fill="#3c86d0"/>
<path id="Path_5098" data-name="Path 5098" d="M19.149,31.354a2.63,2.63,0,1,0-2.264-3.945H12.575a2.632,2.632,0,0,1-2.63-2.63V23.464a1.315,1.315,0,0,0,1.315-1.315V19.52A1.315,1.315,0,0,0,9.945,18.2V14.26a1.267,1.267,0,0,0-.067-.33,2.63,2.63,0,1,0-2.5,0,1.267,1.267,0,0,0-.067.33V18.2A1.315,1.315,0,0,0,6,19.52v2.63a1.315,1.315,0,0,0,1.315,1.315v1.315a5.266,5.266,0,0,0,5.26,5.26h4.311A2.621,2.621,0,0,0,19.149,31.354Z" transform="translate(1.26 2.205)" fill="#3c86d0"/>
<path id="Path_5099" data-name="Path 5099" d="M31.409,18H16.945A3.949,3.949,0,0,0,13,21.945V23.26h1.026a3.945,3.945,0,1,1,0,5.26H13v1.315a3.949,3.949,0,0,0,3.945,3.945H31.409a3.949,3.949,0,0,0,3.945-3.945v-7.89A3.949,3.949,0,0,0,31.409,18Zm-5.26,10.52a2.63,2.63,0,1,1,2.63-2.63A2.632,2.632,0,0,1,26.149,28.52Zm5.26-.657a.657.657,0,0,1-1.315,0V23.917a.657.657,0,0,1,1.315,0Zm2.63,0a.657.657,0,0,1-1.315,0V23.917a.657.657,0,1,1,1.315,0Z" transform="translate(3.464 5.039)" fill="#3c86d0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="34.908" height="36.818" viewBox="0 0 34.908 36.818">
<path id="blood-test" d="M33.07,14.711H24.688v3.537H26.1a.522.522,0,0,1,0,1.043H24.688v2.618H27.95a.522.522,0,0,1,0,1.043H24.688V25.57H26.1a.522.522,0,0,1,0,1.043H24.688V30.6h4.62a10.235,10.235,0,0,0,4.806,5.97v4.011a5.235,5.235,0,0,1-10.47,0V14.7a2.079,2.079,0,0,1-1.829-2.06V11.075A2.078,2.078,0,0,1,23.89,9h9.978a2.078,2.078,0,0,1,2.075,2.075v1.562a2.079,2.079,0,0,1-1.829,2.06v4.042a10.224,10.224,0,0,0-1.043.669v-4.7ZM46.976,36.933l1.384-1.384a1.179,1.179,0,0,1,1.662,0l6.359,6.359a1.179,1.179,0,0,1,0,1.662L55,44.954a1.179,1.179,0,0,1-1.662,0l-6.359-6.359a1.179,1.179,0,0,1,0-1.662ZM39.082,21.193a6.463,6.463,0,1,0,6.463,6.463,6.463,6.463,0,0,0-6.463-6.463Zm1.5,9.109a2.125,2.125,0,0,1-3,0c-.824-.824-.609-2.474,0-3.468l1.5-2.442,1.5,2.442c.609.993.824,2.644,0,3.468Zm7.666-2.646a9.163,9.163,0,1,0-3.653,7.322l1.446,1.446a2.223,2.223,0,0,1,.2-.228l1.384-1.384a2.213,2.213,0,0,1,.228-.2L46.4,33.167a9.123,9.123,0,0,0,1.842-5.511Zm-9.164,7.506a7.506,7.506,0,1,1,7.506-7.506,7.506,7.506,0,0,1-7.506,7.506Z" transform="translate(-21.815 -9)" fill="#c99609" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36.819" height="36.819" viewBox="0 0 36.819 36.819">
<g id="syringe_3_" data-name="syringe (3)" transform="translate(0.002 0)">
<path id="Path_5100" data-name="Path 5100" d="M20.326,80.649A1.079,1.079,0,1,0,18.8,82.175l1.548,1.548L17.83,86.241l1.733,1.733A1.079,1.079,0,1,1,18.038,89.5L16.3,87.767l-2.518,2.518,1.733,1.733a1.079,1.079,0,1,1-1.525,1.525l-1.733-1.733L9.743,94.329l1.733,1.733A1.079,1.079,0,0,1,9.95,97.588L8.217,95.854,6.768,97.3a3.367,3.367,0,0,0-.993,2.4v4.373L.314,109.534A1.079,1.079,0,0,0,1.84,111.06L7.3,105.6h4.373a3.368,3.368,0,0,0,2.4-.993l13.58-13.581L29.2,92.573a1.079,1.079,0,0,0,1.525-1.525Z" transform="translate(0 -74.556)" fill="#ea2864"/>
<path id="Path_5101" data-name="Path 5101" d="M375.793,7.669,368.441.316a1.079,1.079,0,1,0-1.526,1.525l2.914,2.914L365.58,9l1.525,1.525,4.249-4.249,2.914,2.914a1.079,1.079,0,0,0,1.526-1.526Z" transform="translate(-339.292 0)" fill="#ea2864"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 985 B

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="58" height="36.818" viewBox="0 0 58 36.818">
<g id="heart-rate" transform="translate(-6.46 -15.787)">
<path id="Path_5093" data-name="Path 5093" d="M45.091,35.4,39.9,28.233l-5.416,6.781a2.626,2.626,0,0,1-3.743.364l-4.858-4.1L23.814,35.64a4.3,4.3,0,0,1-3.869,2.446H19.16l12.88,12.88L46.422,36.584A4.254,4.254,0,0,1,45.091,35.4Z" transform="translate(1.694 1.639)" fill="#d02127"/>
<path id="Path_5094" data-name="Path 5094" d="M23.617,31.245A3.427,3.427,0,0,1,28.93,30.1l4.255,3.6,4.927-6.167a3.427,3.427,0,0,1,5.462.125l5.518,7.623h1.183a11.817,11.817,0,0,0-17.352-16.02A11.819,11.819,0,0,0,16.21,35.966l.228.228h4.824Z" transform="translate(0.866 0)" fill="#d02127"/>
<path id="Path_5095" data-name="Path 5095" d="M8.258,33.723a1.8,1.8,0,0,0,0,3.607H20.91L17.3,33.723Z" transform="translate(0 2.425)" fill="#d02127"/>
<path id="Path_5096" data-name="Path 5096" d="M57.729,32.913H46.09l-2.97,3.027a4.208,4.208,0,0,0,2.128.58H57.729a1.8,1.8,0,0,0,0-3.607Z" transform="translate(4.933 2.316)" fill="#d02127"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 297 297" style="enable-background:new 0 0 297 297;" xml:space="preserve">
<path d="M251.01,277.015h-17.683l-0.002-31.559c0-31.639-17.358-60.726-48.876-81.901c-3.988-2.682-6.466-8.45-6.466-15.055
s2.478-12.373,6.464-15.053c31.52-21.178,48.878-50.264,48.88-81.904V19.985h17.683c5.518,0,9.992-4.475,9.992-9.993
c0-5.518-4.475-9.992-9.992-9.992H45.99c-5.518,0-9.992,4.475-9.992,9.992c0,5.519,4.475,9.993,9.992,9.993h17.683v31.558
c0,31.642,17.357,60.729,48.875,81.903c3.989,2.681,6.467,8.448,6.467,15.054c0,6.605-2.478,12.373-6.466,15.053
c-31.519,21.176-48.876,50.263-48.876,81.903v31.559H45.99c-5.518,0-9.992,4.475-9.992,9.993c0,5.519,4.475,9.992,9.992,9.992
h205.02c5.518,0,9.992-4.474,9.992-9.992C261.002,281.489,256.527,277.015,251.01,277.015z M138.508,110.362
c0-5.518,4.474-9.993,9.992-9.993s9.992,4.475,9.992,9.993v17.664c0,5.519-4.474,9.992-9.992,9.992s-9.992-4.474-9.992-9.992
V110.362z M141.433,173.956c1.858-1.857,4.436-2.927,7.064-2.927c2.628,0,5.206,1.069,7.064,2.927
c1.868,1.859,2.928,4.438,2.928,7.065s-1.06,5.206-2.928,7.064c-1.858,1.858-4.436,2.928-7.064,2.928
c-2.628,0-5.206-1.069-7.064-2.928c-1.859-1.858-2.928-4.437-2.928-7.064S139.573,175.816,141.433,173.956z M86.94,277.112
c8.152-30.906,50.161-64.536,55.405-68.635c3.614-2.826,8.692-2.828,12.309,0c5.244,4.1,47.252,37.729,55.404,68.635H86.94z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>9.0</string> <string>11.0</string>
</dict> </dict>
</plist> </plist>

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# platform :ios, '9.0' # platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -1,29 +1,47 @@
PODS: PODS:
- audio_session (0.0.1):
- Flutter
- connectivity (0.0.1): - connectivity (0.0.1):
- Flutter - Flutter
- Reachability - Reachability
- Flutter (1.0.0) - Flutter (1.0.0)
- just_audio (0.0.1):
- Flutter
- path_provider_ios (0.0.1):
- Flutter
- Reachability (3.2) - Reachability (3.2)
DEPENDENCIES: DEPENDENCIES:
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`) - connectivity (from `.symlinks/plugins/connectivity/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- just_audio (from `.symlinks/plugins/just_audio/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
SPEC REPOS: SPEC REPOS:
trunk: trunk:
- Reachability - Reachability
EXTERNAL SOURCES: EXTERNAL SOURCES:
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
connectivity: connectivity:
:path: ".symlinks/plugins/connectivity/ios" :path: ".symlinks/plugins/connectivity/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
just_audio:
:path: ".symlinks/plugins/just_audio/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
COCOAPODS: 1.11.2 COCOAPODS: 1.11.3

@ -340,7 +340,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -418,7 +418,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -467,7 +467,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;

@ -43,5 +43,7 @@
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<true/> <true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict> </dict>
</plist> </plist>

@ -0,0 +1,167 @@
import 'dart:developer';
import 'dart:io';
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
HttpClient createHttpClient(SecurityContext? context) {
return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
}
}
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 = false;
if (isDevMode) {
final Map<String, dynamic> response = testPatientsData["data"] as Map<String, dynamic>;
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;
}
BaseAppClient.post(_getCallRequestInfoByClinicInfo,
body: body,
onSuccess: (apiResp, status) {
if (status == 200) {
final response = apiResp["data"];
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();
callPatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp));
isQueuePatients.sort((a, b) => a.editedOnTimeStamp.compareTo(b.editedOnTimeStamp));
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);
}
},
onFailure: (error, status) => onFailure(error));
}
static callUpdateNotIsQueueRecordByIDAsync(
String deviceIp, {
required PatientTicketModel ticket,
required Function(List<PatientTicketModel>) onSuccess,
required Function(dynamic) onFailure,
}) async {
List<PatientTicketModel> _ticketsUpdated = [];
// for (var ticket in tickets) {
final body = {"id": ticket.id, "apiKey": apiKey, "ipAddress": deviceIp, "callType": ticket.callType};
await BaseAppClient.post(_callUpdateNotIsQueueRecordByIDAsync,
body: body,
onSuccess: (response, status) {
if (status == 200) {
ticket.callUpdated = true;
_ticketsUpdated.add(ticket);
}
log("here response: $response");
},
onFailure: (error, status) => onFailure(error));
// }
if (_ticketsUpdated.isNotEmpty) {
onSuccess(_ticketsUpdated);
} else {
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;
}
}

@ -1,97 +1,54 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/core/base/project_view_model.dart';
import 'package:queuing_system/widget/app_loader_widget.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
import 'base_view_model.dart';
import 'network_base_view.dart';
class AppScaffold extends StatelessWidget { class AppScaffold extends StatelessWidget {
final String appBarTitle; final String appBarTitle;
final Widget body; final Widget body;
final bool isLoading; final bool isLoading;
final bool isShowAppBar; final bool isShowAppBar;
final BaseViewModel baseViewModel; final Widget? bottomSheet;
final Widget bottomSheet; final Color? backgroundColor;
final Color backgroundColor; final PreferredSizeWidget appBar;
final Widget appBar;
final Widget drawer; final Widget drawer;
final Widget bottomNavigationBar; final Widget bottomNavigationBar;
final String subtitle; final String subtitle;
final bool isHomeIcon; final bool isHomeIcon;
final bool extendBody; final bool extendBody;
final AppProvider appProvider;
AppScaffold( const AppScaffold(
{this.appBarTitle = '', {Key? key,
this.body, this.appBarTitle = '',
required this.body,
this.isLoading = false, this.isLoading = false,
this.isShowAppBar = true, this.isShowAppBar = true,
this.baseViewModel,
this.bottomSheet, this.bottomSheet,
this.backgroundColor, this.backgroundColor,
this.isHomeIcon = true, this.isHomeIcon = true,
this.appBar, required this.appBar,
this.subtitle, this.subtitle = "",
this.drawer, this.drawer = const SizedBox.shrink(),
this.extendBody = false, this.extendBody = false,
this.bottomNavigationBar}); required this.appProvider,
required this.bottomNavigationBar})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectProvider = Provider.of(context);
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
FocusScope.of(context).requestFocus(new FocusNode()); FocusScope.of(context).requestFocus(FocusNode());
}, },
child: Scaffold( child: Scaffold(
backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor,
,
drawer: drawer, drawer: drawer,
extendBody: extendBody, extendBody: extendBody,
bottomNavigationBar: bottomNavigationBar, bottomNavigationBar: bottomNavigationBar,
appBar: isShowAppBar appBar: isShowAppBar ? appBar : null,
? appBar ??
AppBar(
elevation: 0,
backgroundColor: Colors.white,
//HexColor('#515B5D'),
textTheme: TextTheme(
headline6: TextStyle(
color: Colors.black87,
fontSize: 16.8,
)),
title: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(appBarTitle.toUpperCase()),
if (subtitle != null)
Text(
subtitle,
style: TextStyle(fontSize: 12, color: Colors.red),
),
],
),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
],
)
: null,
bottomSheet: bottomSheet, bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection body: appProvider.isInternetConnectionAvailable
? baseViewModel != null ? body
? NetworkBaseView(
baseViewModel: baseViewModel,
child: body,
)
: Stack(
children: <Widget>[body, buildAppLoaderWidget(isLoading)])
: Center( : Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -101,15 +58,11 @@ class AppScaffold extends StatelessWidget {
"assets/images/undraw_connected_world_wuay.png", "assets/images/undraw_connected_world_wuay.png",
height: 250, height: 250,
), ),
AppText('No Internet Connection') const AppText('No Internet Connection')
], ],
), ),
), ),
), ),
); );
} }
Widget buildAppLoaderWidget(bool isLoading) {
return isLoading ? AppLoaderWidget() : Container();
}
} }

@ -1,88 +1,86 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io' show Platform; import 'dart:developer';
import 'package:http/http.dart' as http;
import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/main.dart';
import 'package:queuing_system/utils/Utils.dart'; import 'package:queuing_system/utils/Utils.dart';
import 'package:http/http.dart' as http;
class BaseAppClient { class BaseAppClient {
static post(String endPoint, static post(String endPoint, {Map<String, dynamic>? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async {
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure}) async {
String url; String url;
url = BASE_URL + endPoint; url = "$BASE_URL/api/PatientCall" + endPoint;
try {
print("URL : $url"); // try {
print("Body : ${json.encode(body)}"); logger.i("URL : $url");
var asd = json.encode(body); logger.i("Body : ${json.encode(body)}");
var asd2;
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url), body: json.encode(body), headers: {
final response = await http.post(Uri.parse(url),
body: json.encode(body),
headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json', 'Accept': 'application/json',
}); });
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
logger.i("statusCode : $statusCode");
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
if (onFailure != null) {
onFailure(Utils.generateContactAdminMsg(), statusCode); onFailure(Utils.generateContactAdminMsg(), statusCode);
}
} else { } else {
print(response.body.toString()); logger.i("Response: ${response.body.toString()}");
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (onSuccess != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} }
}
} else { } else {
if (onFailure != null) {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
} catch (e) {
print(e);
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 {
static get(String endPoint,
{Map<String, dynamic> body,
Function(dynamic response, int statusCode) onSuccess,
Function(String error, int statusCode) onFailure}) async {
String url; String url;
url = BASE_URL + endPoint; url = "$BASE_URL/api/PatientCall" + endPoint;
try { try {
// String token = await sharedPref.getString(TOKEN); // String token = await sharedPref.getString(TOKEN);
print("URL : $url"); logger.i("URL GET: $url");
print("Body : ${json.encode(body)}"); logger.i("Body GET: ${json.encode(body)}");
var asd = json.encode(body);
var asd2;
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
final response = await http.get(Uri.parse(url), final response = await http.get(Uri.parse(url), headers: {'Content-Type': 'application/json', 'Accept': 'application/json'});
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
final int statusCode = response.statusCode; final int statusCode = response.statusCode;
if (statusCode < 200 || statusCode >= 400) { if (statusCode < 200 || statusCode >= 400) {
if (onFailure != null) {
onFailure(Utils.generateContactAdminMsg(), statusCode); onFailure(Utils.generateContactAdminMsg(), statusCode);
}
} else { } else {
var parsed = json.decode(response.body.toString()); var parsed = json.decode(response.body.toString());
if (onSuccess != null) {
onSuccess(parsed, statusCode); onSuccess(parsed, statusCode);
} }
}
} else { } else {
if (onFailure != null) {
onFailure('Please Check The Internet Connection', -1); onFailure('Please Check The Internet Connection', -1);
} }
}
} catch (e) { } catch (e) {
print(e); if (onFailure != null) {
onFailure(e.toString(), -1); onFailure(e.toString(), -1);
} }
} }
}
String getError(parsed) { String getError(parsed) {
//TODO change this fun //TODO change this fun
@ -90,14 +88,9 @@ class BaseAppClient {
if (parsed["ValidationErrors"] != null) { if (parsed["ValidationErrors"] != null) {
error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n"; error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n";
if (parsed["ValidationErrors"]["ValidationErrors"] != null && if (parsed["ValidationErrors"]["ValidationErrors"] != null && parsed["ValidationErrors"]["ValidationErrors"].length != 0) {
parsed["ValidationErrors"]["ValidationErrors"].length != 0) { for (var i = 0; i < parsed["ValidationErrors"]["ValidationErrors"].length; i++) {
for (var i = 0; error = error + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + "\n";
i < parsed["ValidationErrors"]["ValidationErrors"].length;
i++) {
error = error +
parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] +
"\n";
} }
} }
} }

@ -1,9 +0,0 @@
class BaseService {
String error;
bool hasError = false;
BaseService() {
}
}

@ -1,50 +0,0 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'base_view_model.dart';
import 'locater.dart';
class BaseView<T extends BaseViewModel> extends StatefulWidget {
final Widget Function(BuildContext context, T model, Widget child) builder;
final Function(T) onModelReady;
BaseView({
this.builder,
this.onModelReady,
});
@override
_BaseViewState<T> createState() => _BaseViewState<T>();
}
class _BaseViewState<T extends BaseViewModel> extends State<BaseView<T>> {
T model = locator<T>();
bool isLogin = false;
@override
void initState() {
if (widget.onModelReady != null) {
widget.onModelReady(model);
}
super.initState();
}
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<T>.value(
value: model,
child: Consumer<T>(builder: widget.builder),
);
}
@override
void dispose() {
if (model != null) {
model = null;
}
super.dispose();
}
}

@ -1,40 +0,0 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/material.dart';
import 'package:queuing_system/core/base/view_state.dart';
class BaseViewModel extends ChangeNotifier {
ViewState _state = ViewState.Idle;
bool isInternetConnection = true;
StreamSubscription subscription;
ViewState get state => _state;
String error = "";
void setState(ViewState viewState) {
_state = viewState;
notifyListeners();
}
BaseViewModel(){
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
break;
case ConnectivityResult.mobile:
isInternetConnection = true;
break;
case ConnectivityResult.none:
isInternetConnection = false;
break;
}
notifyListeners();
});
}
}

@ -1,11 +0,0 @@
import 'package:get_it/get_it.dart';
GetIt locator = GetIt.instance;
///di
void setupLocator() {
/// Services
/// View Model
}

@ -1,40 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:queuing_system/core/base/view_state.dart';
import 'package:queuing_system/widget/app_loader_widget.dart';
import 'package:queuing_system/widget/errors/error_message.dart';
import 'base_view_model.dart';
class NetworkBaseView extends StatelessWidget {
final BaseViewModel baseViewModel;
final Widget child;
NetworkBaseView({Key key, this.baseViewModel, this.child});
@override
Widget build(BuildContext context) {
return Container(
color: Colors.grey[100],
child: buildBaseViewWidget(),
);
}
buildBaseViewWidget() {
switch (baseViewModel.state) {
case ViewState.ErrorLocal:
case ViewState.Idle:
case ViewState.BusyLocal:
return child;
break;
case ViewState.Busy:
return AppLoaderWidget();
break;
case ViewState.Error:
return ErrorMessage(
error: baseViewModel.error,
);
break;
}
}
}

@ -1,51 +0,0 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:flutter/cupertino.dart';
import 'package:queuing_system/core/base/base_app_client.dart';
class ProjectViewModel with ChangeNotifier {
Locale _appLocale;
String currentLanguage = 'ar';
bool _isArabic = false;
bool isInternetConnection = true;
bool isLoading = false;
bool isError = false;
String error = '';
BaseAppClient baseAppClient = BaseAppClient();
Locale get appLocal => _appLocale;
bool get isArabic => _isArabic;
StreamSubscription subscription;
ProjectViewModel() {
subscription = Connectivity()
.onConnectivityChanged
.listen((ConnectivityResult result) {
switch (result) {
case ConnectivityResult.wifi:
isInternetConnection = true;
break;
case ConnectivityResult.mobile:
isInternetConnection = true;
break;
case ConnectivityResult.none:
isInternetConnection = false;
break;
}
notifyListeners();
});
}
@override
void dispose() {
if (subscription != null) subscription.cancel();
super.dispose();
}
}

@ -1 +0,0 @@
enum ViewState { Idle, Busy, Error, BusyLocal, ErrorLocal }

@ -4,21 +4,66 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]"; const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; // const BASE_URL = 'https://ms.hmg.com/nscapi'; // UAT
const BASE_URL = 'https://hmgwebservices.com/'; 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/';
/// Timer Info /// Timer Info
const TIMER_MIN = 10; const TIMER_MIN = 10;
class AppGlobal { class AppGlobal {
static var CONTEX; static var CONTEX;
static Color appRedColor = const Color(0xFFD02127);
static Color appGreenColor = const Color(0xFF359846); // static Color appRedColor = const Color(0xFFD02127);
// static Color appGreenColor = const Color(0xFF359846);
static Color appTextColor = const Color(0xFF2B353E); static Color appTextColor = const Color(0xFF2B353E);
static Color scheduleTextColor = const Color(0xFF2E303A); static Color appRssFeed = const Color(0x3A1E2326);
static Color inProgressColor = const Color(0xFFCC9B14);
static Color appGreyColor = const Color(0xFF575757); //TextColors
static Color appLightGreyColor = const Color(0xFFE6E6E6); 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
),
],
);
} }

File diff suppressed because it is too large Load Diff

@ -1,16 +0,0 @@
const TOKEN = 'token';
const PROJECT_ID = 'projectID';
const VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID';
const VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID';
const LOGIN_TOKEN_ID = 'LogInToken';
const DOCTOR_ID = 'doctorID';
const SLECTED_PATIENT_TYPE = 'slectedPatientType';
const APP_Language = 'language';
const DOCTOR_PROFILE = 'doctorProfile';
const LIVE_CARE_PATIENT = 'livecare-patient-profile';
const LOGGED_IN_USER = 'loggedUser';
const EMPLOYEE_ID = 'EmployeeID';
const DASHBOARD_DATA = 'dashboard-data';
const OTP_TYPE = 'otp-type';
const LAST_LOGIN_USER = 'last-login-user';
const CLINIC_NAME = 'clinic-name';

@ -5,15 +5,15 @@ class SizeConfig {
static double _blockWidth = 0; static double _blockWidth = 0;
static double _blockHeight = 0; static double _blockHeight = 0;
static double realScreenWidth; static double realScreenWidth = 0.0;
static double realScreenHeight; static double realScreenHeight = 0.0;
static double screenWidth; static double screenWidth = 0.0;
static double screenHeight; static double screenHeight = 0.0;
static double textMultiplier; static double? textMultiplier;
static double imageSizeMultiplier; static double? imageSizeMultiplier;
static double heightMultiplier; static double? heightMultiplier;
static bool isPortrait = true; static bool isPortrait = true;
static double widthMultiplier; static double? widthMultiplier;
static bool isMobilePortrait = false; static bool isMobilePortrait = false;
static bool isMobile = false; static bool isMobile = false;
static bool isHeightShort = false; static bool isHeightShort = false;
@ -67,17 +67,17 @@ class SizeConfig {
heightMultiplier = _blockHeight; heightMultiplier = _blockHeight;
widthMultiplier = _blockWidth; widthMultiplier = _blockWidth;
print('realScreenWidth $realScreenWidth'); // print('realScreenWidth $realScreenWidth');
print('realScreenHeight $realScreenHeight'); // print('realScreenHeight $realScreenHeight');
print('textMultiplier $textMultiplier'); // print('textMultiplier $textMultiplier');
print('imageSizeMultiplier $imageSizeMultiplier'); // print('imageSizeMultiplier $imageSizeMultiplier');
print('heightMultiplier$heightMultiplier'); // print('heightMultiplier$heightMultiplier');
print('widthMultiplier $widthMultiplier'); // print('widthMultiplier $widthMultiplier');
print('isPortrait $isPortrait'); // print('isPortrait $isPortrait');
print('isMobilePortrait $isMobilePortrait'); // print('isMobilePortrait $isMobilePortrait');
} }
static getTextMultiplierBasedOnWidth({double width}) { static getTextMultiplierBasedOnWidth({required double width}) {
// TODO handel LandScape case // TODO handel LandScape case
if (width != null) { if (width != null) {
return width / 100; return width / 100;
@ -85,7 +85,7 @@ class SizeConfig {
return widthMultiplier; return widthMultiplier;
} }
static getWidthMultiplier({double width}) { static getWidthMultiplier({double? width}) {
// TODO handel LandScape case // TODO handel LandScape case
if (width != null) { if (width != null) {
return width / 100; return width / 100;
@ -93,7 +93,7 @@ class SizeConfig {
return widthMultiplier; return widthMultiplier;
} }
static getHeightMultiplier({double height}) { static getHeightMultiplier({double? height}) {
// TODO handel LandScape case // TODO handel LandScape case
if (height != null) { if (height != null) {
return height / 100; return height / 100;

@ -1,6 +0,0 @@
enum FontType {
Poppins_Bold,
poppins_Medium,
poppins_Regular,
poppins_SemiBold,
}

@ -0,0 +1,216 @@
import 'dart:ui';
var data = {
"roomText": "غرفة",
"queueNoText": "رقم قائمة الانتظار",
"callForText": "يدعو إلى",
"currentServeText": "العرض الحالي",
"callTypeVitalSignText": "علامة حيوية",
"callTypeDoctorText": "طبيب",
"callTypeProcedureText": "إجراء",
"callTypeVaccinationText": "تلقيح",
"callTypeNebulizationText": "الإرذاذ",
};
class CallConfig {
late int id;
late bool globalClinicPrefixReq;
late bool clinicPrefixReq;
late int concurrentCallDelaySec;
late int voiceType;
late int screenLanguage;
late int voiceLanguage;
late int screenMaxDisplayPatients;
late int prioritySMS;
late int priorityWhatsApp;
late int priorityEmail;
late String vitalSignText;
late String doctorText;
late String procedureText;
late String vaccinationText;
late String nebulizationText;
late int createdBy;
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,
this.globalClinicPrefixReq = false,
this.clinicPrefixReq = false,
this.concurrentCallDelaySec = 8,
this.voiceType = 0,
this.screenLanguage = 1,
this.voiceLanguage = 1,
this.screenMaxDisplayPatients = 5,
this.prioritySMS = 1,
this.priorityWhatsApp = 1,
this.priorityEmail = 1,
this.vitalSignText = "",
this.doctorText = "",
this.procedureText = "",
this.vaccinationText = "",
this.nebulizationText = "",
this.createdBy = 0,
this.createdOn = "",
this.editedBy = 0,
this.editedOn = "",
this.preVoiceText = "",
this.roomText = "",
this.queueNoText = "",
this.callForText = "",
this.currentServeText = "Current Serving",
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) {
id = json['id'];
globalClinicPrefixReq = json['globalClinicPrefixReq'];
clinicPrefixReq = json['clinicPrefixReq'];
concurrentCallDelaySec = json['concurrentCallDelaySec'];
voiceType = json['voiceType'];
screenLanguage = json['screenLanguage'] ?? 1;
voiceLanguage = screenLanguage; // json['voiceLanguage'] ?? 1;
screenMaxDisplayPatients = json['screenMaxDisplayPatients'];
// screenMaxDisplayPatients = 3;
prioritySMS = json['prioritySMS'];
priorityWhatsApp = json['priorityWhatsApp'];
priorityEmail = json['priorityEmail'];
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['vitalSignText'];
callTypeDoctorText = json['doctorText'];
callTypeProcedureText = json['procedureText'];
callTypeVaccinationText = json['vaccinationText'];
callTypeNebulizationText = json['nebulizationText'];
textDirection = json['textDirection'] == 2 ? TextDirection.rtl : 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": 1,
"voiceType": 1,
"voiceTypeText": "Male",
"screenLanguage": 1,
"screenLanguageText": "English",
"voiceLanguage": 1,
"voiceLanguageText": "English",
"screenMaxDisplayPatients": 6,
"isNotiReq": true,
"prioritySMS": 2,
"priorityWhatsApp": 3,
"priorityEmail": 1,
"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",
"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-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;
}
}
}

@ -0,0 +1,248 @@
import 'dart:math';
import 'package:queuing_system/core/response_models/call_config_model.dart';
import 'package:queuing_system/utils/call_type.dart';
class PatientTicketModel {
late int id;
late int patientID;
late String mobileNo;
late String doctorName;
late String doctorNameN;
late int patientGender;
late int callType;
late int editedOnTimeStamp;
late int concurrentCallDelaySec;
late String roomNo;
late String createdOn;
late String editedOn;
late String queueNo;
late String callNoStr;
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,
this.patientID = 0,
this.mobileNo = "",
this.doctorName = "",
this.doctorNameN = "",
this.patientGender = 1,
this.callType = 1,
this.editedOnTimeStamp = 0,
this.roomNo = "",
this.createdOn = "",
this.editedOn = "",
this.queueNo = "",
this.callNoStr = "",
this.isQueue = false,
this.isToneReq = false,
this.isVoiceReq = false,
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);
}
PatientTicketModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
patientID = json['patientID'];
mobileNo = json['mobileNo'] ?? "";
doctorName = json['doctorName'] ?? "";
doctorNameN = json['doctorNameN'] ?? "";
patientGender = json['patientGender'] ?? "";
callType = json['callType'];
editedOnTimeStamp = DateTime.parse(json['editedOn']).millisecondsSinceEpoch;
roomNo = json['roomNo'];
createdOn = json['createdOn'];
editedOn = json['editedOn'];
queueNo = json['queueNoM'];
callNoStr = json['callNoStr'];
isQueue = json['isQueue'];
isToneReq = json['isToneReq'];
isVoiceReq = json['isVoiceReq'];
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();
}
// "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() {
return (queueNo).toString();
}
CallType getCallType() {
if (callType == 1) return CallType.vitalSign;
if (callType == 2) return CallType.doctor;
if (callType == 3) return CallType.procedure;
if (callType == 4) return CallType.vaccination;
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,
// ),
// ];
}

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

@ -1,44 +1,111 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/config/size_config.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'; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// return SizedBox();
return Consumer(
builder: (BuildContext context, AppProvider appProvider, Widget? child) {
return Container( return Container(
padding: const EdgeInsets.only( height: 100,
left: 0, padding: const EdgeInsets.only(left: 20, right: 20),
right: 5, decoration: BoxDecoration(color: AppGlobal.vitalSignColor),
bottom: 5, child: Directionality(
), textDirection: appProvider.patientCallConfigurations.textDirection,
decoration: BoxDecoration(
color: AppGlobal.appRedColor
,
border: const Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
child: Container(
padding: const EdgeInsets.only(left: 30, right: 50, bottom: 0,),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
AppText( InkWell(
" Current Serving", onTap: () async {
// await appProvider.callPatientsAPI();
},
child: AppText(
appProvider.patientCallConfigurations.currentServeText,
color: Colors.white, color: Colors.white,
fontFamily: 'Poppins-SemiBold.ttf',
), ),
SvgPicture.asset( "assets/images/hmglogo.svg", height: 60,), ),
// getPrayerWidget(),
// getWeatherWidget(),
SvgPicture.asset(
"assets/images/hmglogo.svg",
height: Utils.getHeight() * 0.5,
),
], ],
), ),
), ),
); );
},
);
} }
@override @override
Size get preferredSize => Size( Size get preferredSize => Size(double.maxFinite, Utils.getHeight());
double.maxFinite,
SizeConfig.getHeightMultiplier()*8);
} }

@ -0,0 +1,581 @@
import 'dart:async';
import 'dart:developer';
import 'dart:io';
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() {
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();
final AudioPlayer audioPlayer = AudioPlayer();
FlutterTts flutterTts = FlutterTts();
CallConfig patientCallConfigurations = CallConfig();
List<PatientTicketModel> patientTickets = [];
List<PatientTicketModel> isQueuePatients = [];
String currentDeviceIp = "";
bool isCallingInProgress = false;
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) {
if (interface.name == "eth0") {
for (var address in interface.addresses) {
currentDeviceIp = address.address;
notifyListeners();
}
}
if (interface.name == "wlan0") {
for (var address in interface.addresses) {
currentDeviceIp = address.address;
notifyListeners();
}
}
}
}
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(
currentDeviceIp,
onUpdateAvailable: onPingReceived,
onConnect: onConnect,
onConnecting: onConnecting,
onDisconnect: onDisconnect,
));
}
}
Future<void> callPatientsAPI() async {
logger.i("calling callPatientsAPI");
patientTickets.clear();
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) {
updateCurrentScreenRotation(patientTickets.first.screenRotationEnum);
await voiceCallPatientTicket(patientTickets.first, "callPatientsAPI");
updatePatientTicket(patientTickets.first);
}
},
onFailure: (error) => logger.i("Api call failed with this error: ${error.toString()}"));
}
onPingReceived(data) async {
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;
} else {
await callPatientsAPI();
}
} else {
await callPatientsAPI();
}
}
String getCallTypeText(PatientTicketModel ticket) {
final callType = ticket.getCallType();
switch (callType) {
case CallType.vitalSign:
return ticket.callForVitalSignText;
case CallType.doctor:
return ticket.callForDoctorText;
case CallType.procedure:
return ticket.callForProcedureText;
case CallType.vaccination:
return ticket.callForVaccinationText;
case CallType.nebulization:
return ticket.callForNebulizationText;
default:
return ticket.callForVitalSignText;
}
}
CallByVoice? voiceCaller;
PatientTicketModel currentPatient = PatientTicketModel();
// 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;
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: 2));
}
if (patientTicket.isVoiceReq && voiceCaller == null && !patientTicket.isQueue) {
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;
onVoiceCompleted();
logger.i("Completed Calling!! ${isQueuePatients.length}");
});
} else {
isCallingInProgress = false;
logger.i("Setting isCallingInProgress : $isCallingInProgress");
if (isApiCallNeeded) {
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
isApiCallNeeded = false;
});
}
}
}
Future<void> listenAudioPlayerEvents() async {
audioPlayer.playerStateStream.listen((playerState) async {
if (playerState.processingState == ProcessingState.completed) {
logger.i("Tone Completed");
if (currentPatient.isVoiceReq) {
isCallingInProgress = true;
return;
}
if (isQueuePatients.isNotEmpty) {
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 && 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();
logger.i("isQueuePatients.length 2: ${isQueuePatients.length}");
if (isQueuePatients.isNotEmpty) {
await voiceCallPatientTicket(patientTickets.first, "listenAudioPlayerEvents");
updatePatientTicket(patientTickets.first);
}
});
// }
}
if (isQueuePatients.isEmpty) {
isCallingInProgress = false;
}
if (isApiCallNeeded && isQueuePatients.isEmpty) {
logger.i("Setting isCallingInProgress : $isCallingInProgress");
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
isApiCallNeeded = false;
});
}
}
});
}
// updatePatientTickets() {
// if (patientTickets.isNotEmpty) {
// List<Tickets> _ticketsToUpdate = patientTickets.where((t) => t.callUpdated == false).toList();
// API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: _ticketsToUpdate.first, onSuccess: (ticketsUpdated) {
// logger.i("[${ticketsUpdated.length}] Tickets Updated: $ticketsUpdated");
// }, onFailure: (e) {
// logger.i(" Tickets Update Failed with : ${e.toString()}");
// });
// }
// }
updatePatientTicket(PatientTicketModel patientTicket) {
if (!patientTicket.isQueue) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) {
logger.i("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated");
}, onFailure: (e) {
logger.i(" Tickets Update ${patientTicket.callNoStr} Failed with Error : ${e.toString()}");
});
}
}
onConnect() {
logger.i("SignalR: onConnect");
}
onDisconnect(exception) {
logger.i("SignalR: onDisconnect");
signalRHelper.startSignalRConnection(
currentDeviceIp,
onUpdateAvailable: onPingReceived,
onConnect: onConnect,
onConnecting: onConnecting,
onDisconnect: onDisconnect,
);
}
onConnecting() {
logger.i("SignalR: onConnecting");
}
listenNetworkConnectivity() async {
Connectivity().onConnectivityChanged.listen((List<ConnectivityResult> event) async {
switch (event.first) {
case ConnectivityResult.wifi:
case ConnectivityResult.ethernet:
updateInternetConnection(true);
await getCurrentIP();
if (signalRHelper.connection != null) {
if (signalRHelper.connection!.state != HubConnectionState.connected) signalRHelper.connection!.start();
}
break;
case ConnectivityResult.none:
updateInternetConnection(false);
signalRHelper.closeConnection();
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,109 +1,174 @@
import 'dart:developer';
import 'package:flutter/material.dart'; 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/base/app_scaffold_widget.dart';
import 'package:queuing_system/core/config/config.dart'; import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/config/size_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/header/app_header.dart';
import 'package:queuing_system/home/que_item/que_item.dart'; import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/home/que_item_list.dart'; import 'package:queuing_system/home/priority_calls_components.dart';
import 'package:queuing_system/utils/signalR_utils.dart';
import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class MyHomePage extends StatefulWidget { class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key}) : super(key: key);
String title ="MyHomePage";
bool haveOnePatient = true;
bool have3Patient = false;
bool haveListOfPatient = true;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> { getWeatherWidget() {
@override return Consumer(builder: (BuildContext context, AppProvider appProvider, Widget? child) {
Widget build(BuildContext context) { if (appProvider.currentWeathersWidgetModel.maxTemp == null || appProvider.currentWeathersWidgetModel.minTemp == null || appProvider.currentWeathersWidgetModel.iconPhrase == null) {
SignalRHelper signalRHelper= SignalRHelper(); return const SizedBox.shrink();
return AppScaffold( }
appBar: AppHeader(), return Container(
body: Column( 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: [ children: [
SizedBox(height: SizeConfig.getHeightMultiplier() * (widget.haveOnePatient?20: 2)), Column(
widget.haveListOfPatient? crossAxisAlignment: CrossAxisAlignment.start,
Row(
children: [ children: [
FirstColumn( AppText(
have3Patient: widget.have3Patient, appProvider.patientCallConfigurations.weatherText,
color: Colors.grey,
fontSize: SizeConfig.getWidthMultiplier() * 1.5,
), ),
const SizedBox( AppText(
width: 40, // "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,
), ),
if(widget.haveListOfPatient) ],
Container(
width: 10,
height:SizeConfig.getHeightMultiplier()*40,
color: AppGlobal.appLightGreyColor,
), ),
if(widget.haveListOfPatient) const SizedBox(width: 15),
const SizedBox( SvgPicture.asset(
width: 40, appProvider.currentWeathersWidgetModel.weatherIconPath ?? AppGlobal.weatherIcon,
height: SizeConfig.getHeightMultiplier() * 3,
), ),
if(widget.haveListOfPatient)
const QueItemList()
],
): FirstColumn(have3Patient: widget.have3Patient,),
], ],
), ),
bottomSheet: Container( ),
color: Colors.transparent, );
height: Utils.getHeight()* 0.9, });
width: double.infinity, }
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( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( AppText(
padding: const EdgeInsets.only(top: 30, left: 30), appProvider.patientCallConfigurations.nextPrayerText,
child: AppText( color: Colors.grey,
"Powered By", fontSize: SizeConfig.getWidthMultiplier() * 1.5,
letterSpacing: -1.1,
color: AppGlobal.appTextColor,
fontSize: SizeConfig.getWidthMultiplier() * 2.5,
fontFamily: 'Poppins-Medium.ttf',
), ),
AppText(
appProvider.nextPrayerToShowWithTime,
fontSize: SizeConfig.getHeightMultiplier() * 1.3,
fontHeight: 1,
),
],
), ),
Padding( const SizedBox(width: 15),
padding: const EdgeInsets.only(top: 40, left: 18), SvgPicture.asset(
child: Image.asset( "assets/images/cloud_logo.png", height: SizeConfig.getHeightMultiplier()*5,), AppGlobal.mosqueIcon,
height: SizeConfig.getHeightMultiplier() * 3,
), ),
], ],
), ),
),// This trailing comma makes auto-formatting nicer for build methods. ),
); );
});
} }
}
class FirstColumn extends StatelessWidget { getBody(AppProvider appProvider, context) {
final bool have3Patient; 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),
),
],
);
}
const FirstColumn({Key key, this.have3Patient = false}) : super(key: key); 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( final appProvider = context.watch<AppProvider>();
mainAxisAlignment: MainAxisAlignment.start, log(appProvider.currentScreenRotation.toString());
children: <Widget>[ // appProvider.isCallingInProgress = false;
const QueItem(queNo: "OBG-T45", isFirstLine: true, isNurseVisit: true, haveListOfPatient: true,), return RotatedBox(
SizedBox( // quarterTurns: 3,
height: SizeConfig.getHeightMultiplier() * 5,), quarterTurns: getTurnsByOrientation(appProvider.currentScreenRotation),
if(have3Patient) child: AppScaffold(
Row( appProvider: appProvider,
mainAxisAlignment: MainAxisAlignment.spaceAround, appBar: const AppHeader(),
children: const [ body: getBody(appProvider, context),
QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: true, haveListOfPatient: true,), bottomNavigationBar: const AppFooter(),
QueItem(queNo: "OBG-T45", isSecondLine: true, isNurseVisit: false, haveListOfPatient: true,),
],
), ),
],
); );
} }
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(screenOrientationEnum: appProvider.currentScreenRotation);
} else if (appProvider.patientTickets.length > 3) {
// Return Content With Side List
return priorityTicketsWithSideList(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations, context: context);
} else {
// Return Content In Center Aligned
return PriorityTickets(tickets: appProvider.patientTickets, callConfig: appProvider.patientCallConfigurations);
}
}
} }

@ -0,0 +1,360 @@
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';
class PriorityTickets extends StatelessWidget {
final List<PatientTicketModel> tickets;
final CallConfig callConfig;
const PriorityTickets({required this.tickets, required this.callConfig, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final firstTicket = tickets[0];
final otherTickets = tickets.sublist(1, tickets.length);
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 50),
TicketItem(
ticketNo: firstTicket.queueNo ?? '',
callType: firstTicket.getCallType(),
scale: 1.2,
blink: true,
roomNo: firstTicket.roomNo,
isClinicAdded: firstTicket.callNoStr != firstTicket.queueNo,
callConfig: callConfig,
),
const SizedBox(height: 50),
if (tickets.length > 1) ...[
SizedBox(height: SizeConfig.getHeightMultiplier() * 1.8),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: otherTickets
.map((ticket) => Padding(
padding: EdgeInsets.only(top: SizeConfig.getHeightMultiplier() * 2),
child: TicketItem(
ticketNo: ticket.queueNo ?? '',
callType: ticket.getCallType(),
scale: 0.8,
roomNo: ticket.roomNo,
isClinicAdded: ticket.callNoStr != ticket.queueNo,
callConfig: callConfig,
),
))
.toList(),
)
]
],
);
}
}
class TicketItem extends StatelessWidget {
final String ticketNo;
final String roomNo;
final CallType callType;
final bool blink;
final double scale;
final bool isClinicAdded;
final CallConfig callConfig;
const TicketItem({
Key? key,
required this.isClinicAdded,
required this.ticketNo,
required this.roomNo,
required this.callType,
required this.callConfig,
required this.scale,
this.blink = false,
}) : super(key: key);
String getFormattedTicket(String ticketNo, bool isClinicAdded) {
if (isClinicAdded) {
var formattedString = ticketNo.split(" ");
return formattedString[0] + " " + formattedString[1];
}
return ticketNo;
}
@override
Widget build(BuildContext context) {
return Transform.scale(
scale: scale,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
BlinkText(getFormattedTicket(ticketNo, isClinicAdded),
style: TextStyle(
fontSize: SizeConfig.getWidthMultiplier() * 10,
letterSpacing: -1,
height: 0.5,
fontWeight: FontWeight.bold,
),
beginColor: Colors.black,
endColor: blink ? Colors.black.withOpacity(0.1) : Colors.black,
// endColor: blink ? AppGlobal.appRedColor : Colors.black,
times: 0,
duration: const Duration(seconds: 1)),
const SizedBox(height: 13),
Directionality(
textDirection: callConfig.textDirection,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(bottom: callType == CallType.vitalSign ? 0 : 8),
child: callType.icon(SizeConfig.getHeightMultiplier() * 3),
),
const SizedBox(width: 13),
AppText(
callType.message(callConfig),
color: callType.color(),
letterSpacing: -1,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
fontWeight: FontWeight.w600,
fontHeight: 1,
),
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Container(
color: Colors.grey.withOpacity(0.5),
width: 5,
height: SizeConfig.getHeightMultiplier() * 2,
margin: const EdgeInsets.symmetric(horizontal: 15),
),
),
AppText(
callConfig.textDirection == TextDirection.ltr ? "${callConfig.roomText}: $roomNo" : " $roomNo : ${callConfig.roomText}",
color: callType.color(),
letterSpacing: -1,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
fontWeight: FontWeight.w600,
fontHeight: 1,
),
],
),
),
],
),
);
}
}
Widget noPatientInQueue({required ScreenOrientationEnum screenOrientationEnum}) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: AppText(
"Awaiting Patients Arrival",
fontFamily: 'Poppins-SemiBold.ttf',
fontSize: (screenOrientationEnum == ScreenOrientationEnum.portraitDown || screenOrientationEnum == ScreenOrientationEnum.portraitUp) ? SizeConfig.getWidthMultiplier() * 9 : SizeConfig.getWidthMultiplier() * 7,
),
),
],
);
}
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);
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(
flex: 6,
child: ListView(
children: [
Padding(
padding: EdgeInsets.fromLTRB(10, SizeConfig.getHeightMultiplier() * 3.3, 10, 10),
child: Directionality(
textDirection: callConfig.textDirection,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
callConfig.queueNoText,
letterSpacing: -2,
fontHeight: 0.5,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
textAlign: TextAlign.center,
),
],
),
),
Container(
color: Colors.grey.withOpacity(0.5),
width: 5,
height: SizeConfig.getHeightMultiplier() * 2,
margin: const EdgeInsets.symmetric(horizontal: 15),
),
Expanded(
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
callConfig.callForText,
letterSpacing: -2,
fontHeight: 0.5,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
textAlign: TextAlign.center,
),
],
),
),
Container(
color: Colors.grey.withOpacity(0.5),
width: 5,
height: SizeConfig.getHeightMultiplier() * 2,
margin: const EdgeInsets.symmetric(horizontal: 15),
),
Expanded(
flex: 3,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
callConfig.roomText,
letterSpacing: -2,
fontHeight: 0.5,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
textAlign: TextAlign.center,
),
],
),
),
],
),
),
),
ListView.builder(
shrinkWrap: true,
itemCount: otherTickets.length,
itemBuilder: (ctx, idx) {
final itm = otherTickets[idx];
return Padding(
padding: const EdgeInsets.all(8),
child: Directionality(
textDirection: callConfig.textDirection,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
itm.queueNo.toString(),
letterSpacing: -1,
fontHeight: 0.5,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 3.5,
textAlign: TextAlign.center,
),
],
),
),
Container(
color: Colors.grey.withOpacity(0.5),
width: 5,
height: SizeConfig.getHeightMultiplier() * 2,
margin: const EdgeInsets.symmetric(horizontal: 15),
),
Expanded(
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 10),
child: SizedBox(
width: SizeConfig.getWidthMultiplier() * 3.5,
child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5),
),
),
const SizedBox(width: 15),
AppText(
itm.getCallType().message(callConfig, isListView: true),
color: itm.getCallType().color(),
letterSpacing: -1,
fontSize: SizeConfig.getWidthMultiplier() * 3,
fontWeight: FontWeight.w600,
fontHeight: 0.5,
),
],
),
),
Container(
color: Colors.grey.withOpacity(0.5),
width: 5,
height: SizeConfig.getHeightMultiplier() * 2,
margin: const EdgeInsets.symmetric(horizontal: 15),
),
Expanded(
flex: 3,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
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,
fontWeight: FontWeight.w600,
fontHeight: 0.5,
),
],
),
)
],
),
),
);
},
),
],
),
)
];
return (appProvider.currentScreenRotation == ScreenOrientationEnum.portraitUp || appProvider.currentScreenRotation == ScreenOrientationEnum.portraitDown) ? Row(children: children) : Column(children: children);
}

@ -1,90 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/home/que_item/que_item_widget.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class QueItem extends StatelessWidget {
const QueItem({
Key key,
this.isFirstLine = false,
this.isSecondLine = false,
this.isInListLine = false,
this.queNo,
this.isNurseVisit = false,
this.idDoctorVisit = false, this.haveListOfPatient
}) : super(key: key);
final bool isFirstLine;
final bool isSecondLine;
final bool isInListLine;
final bool isNurseVisit;
final bool idDoctorVisit;
final String queNo;
final bool haveListOfPatient;
@override
Widget build(BuildContext context) {
return haveListOfPatient?
Padding(
padding: const EdgeInsets.all(45.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
QueItemWidget(
isFirstLine: isFirstLine,
isNurseVisit: isNurseVisit,
isSecondLine: isSecondLine,
queNo: queNo,
),
],
),
)
:Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(right: 20.0, left: 20.0),
child: AppText(
queNo,
fontSize: SizeConfig.getWidthMultiplier() *
(isFirstLine
? 13
: isSecondLine
? 8.5
: 5.5),
letterSpacing: -2.6,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins',
),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(
isNurseVisit
? "assets/images/nurseicon.svg"
: "assets/images/doctoricon.svg", height:(isFirstLine
? SizeConfig.getHeightMultiplier()*3
: isSecondLine
? SizeConfig.getHeightMultiplier()*3
: SizeConfig.getHeightMultiplier()*3) ,),
const SizedBox(width: 8,),
AppText(
isNurseVisit ? " Please visit Nurse" : " Please visit doctor",
color: AppGlobal.appGreyColor,
fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine
? 3.3
: isSecondLine
? 3.3
: 3.3),
letterSpacing: -1.6,
fontFamily: 'Poppins-Medium.ttf',
),
],
)
],
);
}
}

@ -1,70 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/config/size_config.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
class QueItemWidget extends StatelessWidget {
const QueItemWidget({
Key key,
this.isFirstLine = false,
this.isSecondLine = false,
this.queNo,
this.isNurseVisit = false,
}) : super(key: key);
final bool isFirstLine;
final bool isSecondLine;
final bool isNurseVisit;
final String queNo;
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
AppText(
queNo,
fontSize: SizeConfig.getWidthMultiplier() *
(isFirstLine
? 13
: isSecondLine
? 7.5
: 5.5),
letterSpacing: -5.00,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins-Bold.ttf',
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
isNurseVisit
? "assets/images/nurseicon.svg"
: "assets/images/doctoricon.svg", height:(isFirstLine
? SizeConfig.getHeightMultiplier()*3
: isSecondLine
? SizeConfig.getHeightMultiplier()*3
: SizeConfig.getHeightMultiplier()*3) ,),
const SizedBox(width: 8,),
AppText(
isNurseVisit ? "Please visit Nurse" : "Please visit doctor",
color: isNurseVisit
? AppGlobal.appGreenColor
: AppGlobal.appRedColor,
fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine
? 3.3
: isSecondLine
? 3.3
: 3.3),
letterSpacing: -2.6,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins-Bold.ttf',
),
],
),
],
);
}
}

@ -1,26 +0,0 @@
import 'package:flutter/material.dart';
import 'package:queuing_system/home/que_item/que_item.dart';
class QueItemList extends StatelessWidget {
const QueItemList({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return SizedBox(
child: Expanded(
child: Column(
children: const [
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
QueItem(queNo: "OBG-T45", isInListLine: true, isNurseVisit: true, haveListOfPatient: false,),
],),
),
);
}
}

@ -1,15 +1,38 @@
import 'dart:developer';
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'core/base/project_view_model.dart'; import 'package:queuing_system/core/api.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
import 'core/config/size_config.dart'; import 'core/config/size_config.dart';
import 'home/home_screen.dart'; import 'home/home_screen.dart';
Logger logger = Logger(
level: Level.debug,
printer: PrettyPrinter(
printEmojis: false,
colors: true,
printTime: false,
));
void main() { void main() {
//TODO: WE HAVE TO UPDATE THIS BEFORE GOING LIVE.
HttpOverrides.global = MyHttpOverrides();
WidgetsFlutterBinding.ensureInitialized();
WakelockPlus.enable();
runApp(const MyApp()); runApp(const MyApp());
} }
//test commit
//TODO: WE NEED TO IMPLEMENT THE AVAILABILITY MONITORING OF THE SCREENS LIKE IF THEY ARE TURNED ON OR NOT!!
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key); const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application. // This widget is the root of your application.
@override @override
@ -18,31 +41,27 @@ class MyApp extends StatelessWidget {
builder: (context, constraints) { builder: (context, constraints) {
return OrientationBuilder(builder: (context, orientation) { return OrientationBuilder(builder: (context, orientation) {
SizeConfig().init(constraints, orientation); SizeConfig().init(constraints, orientation);
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
return MultiProvider( return MultiProvider(
providers: [ providers: [
ChangeNotifierProvider<AppProvider>(create: (context) => AppProvider()),
ChangeNotifierProvider<ProjectViewModel>(
create: (context) => ProjectViewModel(),
),
], ],
child: Consumer<ProjectViewModel>( child: MaterialApp(
builder: (context, projectProvider, child) => MaterialApp(
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Doctors App', title: 'Doctors App',
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.grey,
primaryColor: Colors.grey, primaryColor: Colors.grey,
fontFamily: 'Poppins', fontFamily: 'Poppins',
dividerColor: Colors.grey[350], dividerColor: Colors.grey[350],
backgroundColor: Color.fromRGBO(255, 255, 255, 1), colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey).copyWith(background: const Color.fromRGBO(255, 255, 255, 1)),
), ),
home:MyHomePage() , home: MyHomePage(),
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
)), ));
);
}); });
}, },
); );
} }
} }

@ -0,0 +1,80 @@
import 'dart:developer';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:queuing_system/home/app_provider.dart';
class CallByVoice {
final String lang;
final String preVoice;
final String ticketNo;
final String postVoice;
final FlutterTts flutterTts;
CallByVoice({this.lang = 'en', required this.ticketNo, required this.preVoice, required this.postVoice, required this.flutterTts});
double volume = 1.0;
double pitch = 0.6;
double rate = 0.2;
Future<void> startCalling(bool isClinicNameAdded) async {
log("lang: $lang");
log("preVoice: $preVoice");
log("postVoice: $postVoice");
log("ticketNo: $ticketNo");
log("isClinicNameAdded: $isClinicNameAdded");
String clinicName = "";
String patientAlpha = "";
String patientNumeric = "";
if (isClinicNameAdded) {
var clinic = ticketNo.split(" ");
clinicName = clinic[0];
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 = queueNoArray[0];
patientNumeric = queueNoArray[1];
}
}
// 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);
isVoiceActualCompletedGlobally = true;
await flutterTts.awaitSpeakCompletion(true);
await flutterTts.speak(preVoice + " .. " + clinicName + " .. " + patientAlpha + " .. " + patientNumeric + " .. " + postVoice);
return;
}
flutterTts.setPitch(1.1);
flutterTts.setVolume(1.0);
await flutterTts.setLanguage(lang);
isVoiceActualCompletedGlobally = false;
await flutterTts.awaitSpeakCompletion(true);
// 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);
}
}
}

@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/core/response_models/call_config_model.dart';
enum CallType { vitalSign, doctor, procedure, vaccination, nebulization, none }
extension XCallType on CallType {
Color color() {
if (this == CallType.vitalSign) {
return AppGlobal.vitalSignColor;
} else if (this == CallType.doctor) {
return AppGlobal.doctorColor;
} else if (this == CallType.procedure) {
return AppGlobal.procedureColor;
} else if (this == CallType.vaccination) {
return AppGlobal.vaccinationColor;
} else if (this == CallType.nebulization) {
return AppGlobal.nebulizationColor;
} else {
return Colors.black54;
}
}
String message(CallConfig callConfig, {bool isListView = false}) {
switch (this) {
case CallType.vitalSign:
return isListView ? callConfig.callTypeVitalSignText : callConfig.vitalSignText;
case CallType.doctor:
return isListView ? callConfig.callTypeDoctorText : callConfig.doctorText;
case CallType.procedure:
return isListView ? callConfig.callTypeProcedureText : callConfig.procedureText;
case CallType.vaccination:
return isListView ? callConfig.callTypeVaccinationText : callConfig.vaccinationText;
case CallType.nebulization:
return isListView ? callConfig.callTypeNebulizationText : callConfig.nebulizationText;
case CallType.none:
return isListView ? callConfig.callTypeVitalSignText : callConfig.vitalSignText;
default:
return callConfig.callTypeVitalSignText;
}
}
SvgPicture icon(double height) {
if (this == CallType.vitalSign) {
return SvgPicture.asset(AppGlobal.vitalSignIcon, height: height, color: color());
} else if (this == CallType.doctor) {
return SvgPicture.asset(AppGlobal.doctorIcon, height: height, color: color());
} else if (this == CallType.procedure) {
return SvgPicture.asset(AppGlobal.procedureIcon, height: height, color: color());
} else if (this == CallType.vaccination) {
return SvgPicture.asset(AppGlobal.vaccinationIcon, height: height, color: color());
} else if (this == CallType.nebulization) {
return SvgPicture.asset(AppGlobal.nebulizationIcon, height: height, color: color());
}
return SvgPicture.asset("assets/images/wait.svg", height: height, color: color());
}
String audio(String lang) {
if (this == CallType.vitalSign) {
return "visit_nurse.mp3";
} else if (this == CallType.doctor) {
return "visit_doctor.mp3";
} else if (this == CallType.procedure) {
return "visit_doctor.mp3";
} else if (this == CallType.vaccination) {
return "visit_doctor.mp3";
} else if (this == CallType.nebulization) {
return "visit_doctor.mp3";
}
return "";
}
}

@ -1,29 +1,87 @@
import 'dart:developer';
import 'dart:io';
import 'package:flutter/material.dart'; 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'; import 'package:signalr_core/signalr_core.dart';
class SignalRHelper{ /*
https://vcallapi.hmg.com/patientcalling.html?IPAddress=10.10.14.20&Clinic=4&Project=15
String hubBaseURL =""; ---------------------------------------
String msg ="Awaiting Patients Arrival"; IP, Clinic, Project Mapping to SignalR
HubConnection connection; ---------------------------------------
SignalRHelper(){ (SignalR: 10.10.14.11) <<<< [IP=10.10.14.20 | Clinic=4 | Project=15]
(SignalR: 10.70.249.21) <<<< [IP=10.10.14.20 | Clinic=3 | Project=16]
---------------------------------------
*/
class SignalRHelper {
// String hubBaseURL = "https://vcallapi.hmg.com/PatientCallingHub";
// String hubBaseURL = "https://vcallapi.hmg.com/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";
HubConnection? connection;
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() connection = HubConnectionBuilder()
.withUrl( .withUrl(
hubBaseURL, url,
HttpConnectionOptions( HttpConnectionOptions(
logging: (level, message) { client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
msg = message;
print("$message"); //TODO: IT MUST BE WEB SOCKETS
}, transport: HttpTransportType.longPolling,
) logging: (level, message) => log(message),
).build(); ))
.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));
await connection!.start();
} }
void sendMessage(List<dynamic> args) async {
await connection!.invoke('SendMessage', args: args); //['Bob', 'Says hi!']
}
closeConnection(BuildContext context) async { bool getConnectionState() {
if(connection.state == HubConnectionState.connected) if (connection == null) return false;
{ logger.i("connectionState: ${connection!.state}");
await connection.stop(); if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) return true;
if (connection!.state == HubConnectionState.disconnected || connection!.state == HubConnectionState.disconnecting) return false;
return false;
} }
closeConnection() async {
if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
await connection!.stop();
} }
}
// startConnection(BuildContext context) async {
// if (connection!.state == HubConnectionState.connected || connection!.state == HubConnectionState.connecting) {
// connection!.off('addChatMessage');
// await connection!.start();
// }
// }
} }

@ -1,30 +1,12 @@
import 'package:connectivity/connectivity.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:queuing_system/core/base/locater.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:queuing_system/main.dart';
import 'package:flutter/material.dart';
class Utils { class Utils {
static getHeight() {
return SizeConfig.getHeightMultiplier() * 7;
static TextStyle textStyle(context) =>
TextStyle(color: Theme.of(context).primaryColor);
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true;
} else {
return false;
}
} }
static generateContactAdminMsg([err = null]) { static generateContactAdminMsg([err = null]) {
//TODO: Add translation //TODO: Add translation
String localMsg = 'Something wrong happened, please contact the admin'; String localMsg = 'Something wrong happened, please contact the admin';
@ -34,150 +16,159 @@ class Utils {
return localMsg; return localMsg;
} }
static Future<bool> checkConnection() async {
List<ConnectivityResult> connectivityResult = await (Connectivity().checkConnectivity());
int indexEthernet = connectivityResult.indexWhere((element) => element == ConnectivityResult.ethernet);
static getCardBoxDecoration() { if (indexEthernet != -1) {
return BoxDecoration( return true;
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [
BoxShadow(
color: Color(0xFF0000000D),
spreadRadius: 10,
blurRadius: 27,
offset: Offset(0, -3), // changes position of shadow
),
],
);
}
navigateToUpdatePage(String message, String androidLink, iosLink) {
// locator<NavigationService>().pushAndRemoveUntil(
// FadePage(
// page: UpdatePage(
// message: message,
// androidLink: androidLink,
// iosLink: iosLink,
// ),
// ),
// );
// Navigator.pushAndRemoveUntil(
// AppGlobal.CONTEX,
// FadePage(
// page: UpdatePage(
// message: message,
// androidLink: androidLink,
// iosLink: iosLink,
// ),
// ),
// (r) => false);
}
static InputDecoration textFieldSelectorDecoration(
String hintText, String selectedText, bool isDropDown,
{Icon suffixIcon, Color dropDownColor}) {
return InputDecoration(
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
disabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8),
),
hintText: selectedText != null ? selectedText : hintText,
suffixIcon: isDropDown
? suffixIcon != null
? suffixIcon
: Icon(
Icons.arrow_drop_down,
color: dropDownColor != null ? dropDownColor : Colors.black,
)
: null,
hintStyle: TextStyle(
fontSize: 14,
color: Colors.grey.shade600,
),
);
}
static BoxDecoration containerBorderDecoration(
Color containerColor, Color borderColor,
{double borderWidth = -1}) {
return BoxDecoration(
color: containerColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
border: Border.fromBorderSide(BorderSide(
color: borderColor,
width: borderWidth == -1 ? 2.0 : borderWidth,
)),
);
}
/// hides the keyboard if its already open
static hideKeyboard(BuildContext context) {
FocusScope.of(context).unfocus();
}
static String capitalize(str) {
if (str != "") {
return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}";
} else {
return str;
}
}
static bool isTextHtml(String text) {
var htmlRegex = RegExp("<(“[^”]*”|'[^]*|[^'”>])*>");
return htmlRegex.hasMatch(text);
}
static String timeFrom({Duration duration}) {
String twoDigits(int n) => n.toString().padLeft(2, "0");
String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
return "$twoDigitMinutes:$twoDigitSeconds";
}
static String convertToTitleCase(String text) {
if (text == null) {
return null;
}
if (text.length <= 1) {
return text.toUpperCase();
} }
// Split string into multiple words int indexWifi = connectivityResult.indexWhere((element) => element == ConnectivityResult.wifi);
final List<String> words = text.split(' ');
// Capitalize first letter of each words
final capitalizedWords = words.map((word) {
if (word.trim().isNotEmpty) {
final String firstLetter = word.trim().substring(0, 1).toUpperCase();
final String remainingLetters = word.trim().substring(1).toLowerCase();
return '$firstLetter$remainingLetters'; if (indexWifi != -1) {
} return true;
return '';
});
// Join/Merge all words back to one String
return capitalizedWords.join(' ');
} }
static getHeight() { return false;
return SizeConfig.getHeightMultiplier()*10;
} }
// static TextStyle textStyle(context) => TextStyle(color: Theme.of(context).primaryColor);
//
//
//
// static getCardBoxDecoration() {
// return BoxDecoration(
// borderRadius: BorderRadius.circular(10),
// color: Colors.white,
// shape: BoxShape.rectangle,
// boxShadow: [
// BoxShadow(
// color: Color(0xFF0000000D),
// spreadRadius: 10,
// blurRadius: 27,
// offset: Offset(0, -3), // changes position of shadow
// ),
// ],
// );
// }
//
// navigateToUpdatePage(String message, String androidLink, iosLink) {
// // locator<NavigationService>().pushAndRemoveUntil(
// // FadePage(
// // page: UpdatePage(
// // message: message,
// // androidLink: androidLink,
// // iosLink: iosLink,
// // ),
// // ),
// // );
//
// // Navigator.pushAndRemoveUntil(
// // AppGlobal.CONTEX,
// // FadePage(
// // page: UpdatePage(
// // message: message,
// // androidLink: androidLink,
// // iosLink: iosLink,
// // ),
// // ),
// // (r) => false);
// }
//
// static InputDecoration textFieldSelectorDecoration(String hintText, String selectedText, bool isDropDown, {Icon suffixIcon, Color dropDownColor}) {
// return InputDecoration(
// focusedBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
// borderRadius: BorderRadius.circular(8),
// ),
// enabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
// borderRadius: BorderRadius.circular(8),
// ),
// disabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
// borderRadius: BorderRadius.circular(8),
// ),
// hintText: selectedText != null ? selectedText : hintText,
// suffixIcon: isDropDown
// ? suffixIcon != null
// ? suffixIcon
// : Icon(
// Icons.arrow_drop_down,
// color: dropDownColor != null ? dropDownColor : Colors.black,
// )
// : null,
// hintStyle: TextStyle(
// fontSize: 14,
// color: Colors.grey.shade600,
// ),
// );
// }
//
// static BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor, {double borderWidth = -1}) {
// return BoxDecoration(
// color: containerColor,
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.all(Radius.circular(8)),
// border: Border.fromBorderSide(BorderSide(
// color: borderColor,
// width: borderWidth == -1 ? 2.0 : borderWidth,
// )),
// );
// }
//
// /// hides the keyboard if its already open
// static hideKeyboard(BuildContext context) {
// FocusScope.of(context).unfocus();
// }
//
// static String capitalize(str) {
// if (str != "") {
// return "${str[0].toUpperCase()}${str.substring(1).toLowerCase()}";
// } else {
// return str;
// }
// }
//
// static bool isTextHtml(String text) {
// var htmlRegex = RegExp("<(“[^”]*”|'[^]*|[^'”>])*>");
// return htmlRegex.hasMatch(text);
// }
//
// static String timeFrom({Duration duration}) {
// String twoDigits(int n) => n.toString().padLeft(2, "0");
// String twoDigitMinutes = twoDigits(duration.inMinutes.remainder(60));
// String twoDigitSeconds = twoDigits(duration.inSeconds.remainder(60));
// return "$twoDigitMinutes:$twoDigitSeconds";
// }
//
// static String convertToTitleCase(String text) {
// if (text == null) {
// return null;
// }
//
// if (text.length <= 1) {
// return text.toUpperCase();
// }
//
// // Split string into multiple words
// final List<String> words = text.split(' ');
//
// // Capitalize first letter of each words
// final capitalizedWords = words.map((word) {
// if (word.trim().isNotEmpty) {
// final String firstLetter = word.trim().substring(0, 1).toUpperCase();
// final String remainingLetters = word.trim().substring(1).toLowerCase();
//
// return '$firstLetter$remainingLetters';
// }
// return '';
// });
//
// // Join/Merge all words back to one String
// return capitalizedWords.join(' ');
// }
//
} }

@ -1,33 +1,32 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
// import 'package:queuing_system/widget/loader/gif_loader_container.dart';
import 'loader/gif_loader_container.dart'; //
// class AppLoaderWidget extends StatefulWidget {
class AppLoaderWidget extends StatefulWidget { // AppLoaderWidget({Key? key, this.title, this.containerColor}) : super(key: key);
AppLoaderWidget({Key key, this.title, this.containerColor}) : super(key: key); //
// final String title;
final String title; // final Color containerColor;
final Color containerColor; //
// @override
@override // _AppLoaderWidgetState createState() => _AppLoaderWidgetState();
_AppLoaderWidgetState createState() => new _AppLoaderWidgetState(); // }
} //
// class _AppLoaderWidgetState extends State<AppLoaderWidget> {
class _AppLoaderWidgetState extends State<AppLoaderWidget> { // @override
@override // Widget build(BuildContext context) {
Widget build(BuildContext context) { // return SizedBox(
return Container( // height: MediaQuery.of(context).size.height,
height: MediaQuery.of(context).size.height, // child: Stack(
child: Stack( // children: [
children: [ // Container(
Container( // color: widget.containerColor ?? Colors.grey.withOpacity(0.6),
color: widget.containerColor ?? Colors.grey.withOpacity(0.6), // ),
), // Container(
Container( // child: GifLoaderContainer(),
child: GifLoaderContainer(), // margin: EdgeInsets.only(
margin: EdgeInsets.only( // bottom: MediaQuery.of(context).size.height * 0.09))
bottom: MediaQuery.of(context).size.height * 0.09)) // ],
], // ),
), // );
); // }
} // }
}

@ -1,38 +1,39 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:queuing_system/core/config/size_config.dart'; import 'package:queuing_system/core/config/size_config.dart';
class AppText extends StatefulWidget { class AppText extends StatefulWidget {
final String text; final String text;
final String variant; final String? variant;
final Color color; final Color color;
final FontWeight fontWeight; final FontWeight? fontWeight;
final double fontSize; final double? fontSize;
final double fontHeight; final double? fontHeight;
final String fontFamily; final String fontFamily;
final int maxLength; final int maxLength;
final bool italic; final bool italic;
final double margin; final double? margin;
final double marginTop; final double marginTop;
final double marginRight; final double marginRight;
final double marginBottom; final double marginBottom;
final double marginLeft; final double marginLeft;
final double letterSpacing; final double? letterSpacing;
final TextAlign textAlign; final TextAlign? textAlign;
final bool bold; final bool? bold;
final bool regular; final bool? regular;
final bool medium; final bool? medium;
final int maxLines; final int? maxLines;
final bool readMore; final bool readMore;
final String style; final String? style;
final bool allowExpand; final bool allowExpand;
final bool visibility; final bool visibility;
final TextOverflow textOverflow; final TextOverflow? textOverflow;
final TextDecoration textDecoration; final TextDecoration? textDecoration;
final bool isCopyable; final bool isCopyable;
final TextDirection textDirection;
AppText( const AppText(
this.text, { this.text, {
Key? key,
this.color = Colors.black, this.color = Colors.black,
this.fontWeight, this.fontWeight,
this.variant, this.variant,
@ -59,7 +60,8 @@ class AppText extends StatefulWidget {
this.textDecoration, this.textDecoration,
this.letterSpacing, this.letterSpacing,
this.isCopyable = false, this.isCopyable = false,
}); this.textDirection = TextDirection.ltr,
}) : super(key: key);
@override @override
_AppTextState createState() => _AppTextState(); _AppTextState createState() => _AppTextState();
@ -72,9 +74,9 @@ class _AppTextState extends State<AppText> {
@override @override
void didUpdateWidget(covariant AppText oldWidget) { void didUpdateWidget(covariant AppText oldWidget) {
setState(() { setState(() {
if (widget.style == "overline") if (widget.style == "overline") {
text = widget.text.toUpperCase(); text = widget.text.toUpperCase();
else { } else {
text = widget.text; text = widget.text;
} }
}); });
@ -83,10 +85,9 @@ class _AppTextState extends State<AppText> {
@override @override
void initState() { void initState() {
hidden = widget.readMore; if (widget.style == "overline") {
if (widget.style == "overline")
text = widget.text.toUpperCase(); text = widget.text.toUpperCase();
else { } else {
text = widget.text; text = widget.text;
} }
super.initState(); super.initState();
@ -96,174 +97,67 @@ class _AppTextState extends State<AppText> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return GestureDetector(
child: Container( child: Container(
margin: widget.margin != null margin: widget.margin != null ? EdgeInsets.all(widget.margin!) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
? EdgeInsets.all(widget.margin)
: EdgeInsets.only(
top: widget.marginTop,
right: widget.marginRight,
bottom: widget.marginBottom,
left: widget.marginLeft),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Stack( Text(
children: [ text,
_textWidget(), textDirection: widget.textDirection,
if (widget.readMore && text.length > widget.maxLength && hidden)
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).backgroundColor,
Theme.of(context).backgroundColor.withOpacity(0),
],
begin: Alignment.bottomCenter,
end: Alignment.topCenter)),
height: 30,
),
)
],
),
if (widget.allowExpand &&
widget.readMore &&
text.length > widget.maxLength)
Padding(
padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0),
child: InkWell(
onTap: () {
setState(() {
hidden = !hidden;
});
},
child: Text(hidden ? "Read More" : "Read less",
style: _getFontStyle().copyWith(
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Poppins",
)),
),
),
],
),
),
// onLongPress: (){
// if(widget.isCopyable){
// DrAppToastMsg.showShortToast(TranslationBase.of(context).textCopiedSuccessfully);
// Clipboard.setData(new ClipboardData(text: widget.text));
// }
// },
);
}
Widget _textWidget() {
if (widget.isCopyable) {
return Theme(
data: ThemeData(
textSelectionColor: Colors.lightBlueAccent,
),
child: Container(
child: SelectableText(
!hidden
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
textAlign: widget.textAlign, textAlign: widget.textAlign,
// overflow: widget.maxLines != null overflow: widget.maxLines != null ? ((widget.maxLines! > 1) ? TextOverflow.fade : TextOverflow.ellipsis) : null,
// ? ((widget.maxLines > 1) maxLines: widget.maxLines,
// ? TextOverflow.fade
// : TextOverflow.ellipsis)
// : null,
maxLines: widget.maxLines ?? null,
style: widget.style != null style: widget.style != null
? _getFontStyle().copyWith( ? _getFontStyle()?.copyWith(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color, color: widget.color,
fontFamily: 'Poppins',
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight) height: widget.fontHeight,
)
: TextStyle( : TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null, fontStyle: widget.italic ? FontStyle.italic : null,
color: color: widget.color ?? Colors.black,
widget.color != null ? widget.color : Color(0xff2E303A),
fontSize: widget.fontSize ?? _getFontSize(), fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ?? letterSpacing: widget.letterSpacing ?? (widget.variant == "overline" ? 1.5 : null),
(widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins', fontFamily: 'Poppins',
decoration: widget.textDecoration, decoration: widget.textDecoration,
height: widget.fontHeight), height: widget.fontHeight),
)
],
), ),
), ),
); );
} else {
return Text(
!hidden
? text
: (text.substring(
0,
text.length > widget.maxLength
? widget.maxLength
: text.length)),
textAlign: widget.textAlign,
overflow: widget.maxLines != null
? ((widget.maxLines > 1)
? TextOverflow.fade
: TextOverflow.ellipsis)
: null,
maxLines: widget.maxLines ?? null,
style: widget.style != null
? _getFontStyle().copyWith(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color,
fontWeight: widget.fontWeight ?? _getFontWeight(),
height: widget.fontHeight)
: TextStyle(
fontStyle: widget.italic ? FontStyle.italic : null,
color: widget.color != null ? widget.color : Colors.black,
fontSize: widget.fontSize ?? _getFontSize(),
letterSpacing: widget.letterSpacing ??
(widget.variant == "overline" ? 1.5 : null),
fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: widget.fontFamily ?? 'Poppins',
decoration: widget.textDecoration,
height: widget.fontHeight),
);
}
} }
TextStyle _getFontStyle() { TextStyle? _getFontStyle() {
switch (widget.style) { switch (widget.style) {
case "headline2": case "headline2":
return Theme.of(context).textTheme.headline2; return Theme.of(context).textTheme.displayMedium;
case "headline3": case "headline3":
return Theme.of(context).textTheme.headline3; return Theme.of(context).textTheme.displaySmall;
case "headline4": case "headline4":
return Theme.of(context).textTheme.headline4; return Theme.of(context).textTheme.headlineMedium;
case "headline5": case "headline5":
return Theme.of(context).textTheme.headline5; return Theme.of(context).textTheme.headlineSmall;
case "headline6": case "headline6":
return Theme.of(context).textTheme.headline6; return Theme.of(context).textTheme.titleLarge;
case "bodyText2": case "bodyText2":
return Theme.of(context).textTheme.bodyText2; return Theme.of(context).textTheme.bodyMedium;
case "bodyText_15": case "bodyText_15":
return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0); return Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 15.0);
case "bodyText1": case "bodyText1":
return Theme.of(context).textTheme.bodyText1; return Theme.of(context).textTheme.bodyLarge;
case "caption": case "caption":
return Theme.of(context).textTheme.caption; return Theme.of(context).textTheme.bodySmall;
case "overline": case "overline":
return Theme.of(context).textTheme.overline; return Theme.of(context).textTheme.labelSmall;
case "button": case "button":
return Theme.of(context).textTheme.button; return Theme.of(context).textTheme.labelLarge;
default: default:
return TextStyle(); return const TextStyle();
} }
} }
@ -300,11 +194,11 @@ class _AppTextState extends State<AppText> {
case "date": case "date":
return 24.0; return 24.0;
default: default:
return SizeConfig.textMultiplier * 2.8; return SizeConfig.textMultiplier! * 2.8;
} }
} }
FontWeight _getFontWeight() { FontWeight? _getFontWeight() {
if (widget.bold ?? false) { if (widget.bold ?? false) {
return FontWeight.w900; return FontWeight.w900;
} else if (widget.regular ?? false) { } else if (widget.regular ?? false) {

@ -1,43 +1,36 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; // import 'package:flutter_svg/flutter_svg.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; // import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
//
// class ErrorMessage extends StatelessWidget {
class ErrorMessage extends StatelessWidget { // const ErrorMessage({Key? key, this.error = ''}) : super(key: key);
const ErrorMessage({ //
Key key, // final String error;
@required this.error, //
}) : super(key: key); // @override
// Widget build(BuildContext context) {
final String error; // return SingleChildScrollView(
// child: Center(
@override // child: Column(
Widget build(BuildContext context) { // crossAxisAlignment: CrossAxisAlignment.center,
return SingleChildScrollView( // children: [
child: Center( // const SizedBox(height: 100),
child: Column( // SvgPicture.asset('assets/images/svgs/no data.svg'),
crossAxisAlignment: CrossAxisAlignment.center, // Center(
children: [ // child: Center(
SizedBox( // child: Padding(
height: 100, // padding: const EdgeInsets.only(top: 12, bottom: 12, right: 20, left: 30),
), // child: Center(
SvgPicture.asset('assets/images/svgs/no data.svg'), // child: AppText(
Center( // error ?? '',
child: Center( // textAlign: TextAlign.center,
child: Padding( // )),
padding: const EdgeInsets.only( // ),
top: 12, bottom: 12, right: 20, left: 30), // ),
child: Center( // )
child: AppText( // ],
error ?? '', // ),
textAlign: TextAlign.center, // ),
)), // );
), // }
), // }
)
],
),
),
);
}
}

@ -1,43 +1,43 @@
import 'package:flutter/cupertino.dart'; // import 'package:flutter/cupertino.dart';
import 'package:flutter_gifimage/flutter_gifimage.dart'; // import 'package:flutter_gifimage/flutter_gifimage.dart';
//
class GifLoaderContainer extends StatefulWidget { // class GifLoaderContainer extends StatefulWidget {
@override // @override
_GifLoaderContainerState createState() => _GifLoaderContainerState(); // _GifLoaderContainerState createState() => _GifLoaderContainerState();
} // }
//
class _GifLoaderContainerState extends State<GifLoaderContainer> // class _GifLoaderContainerState extends State<GifLoaderContainer>
with TickerProviderStateMixin { // with TickerProviderStateMixin {
GifController controller1; // GifController controller1;
//
@override // @override
void initState() { // void initState() {
controller1 = GifController(vsync: this); // controller1 = GifController(vsync: this);
//
WidgetsBinding.instance.addPostFrameCallback((_) { // WidgetsBinding.instance.addPostFrameCallback((_) {
controller1.repeat( // controller1.repeat(
min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); // min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true);
}); // });
super.initState(); // super.initState();
} // }
//
@override // @override
void dispose() { // void dispose() {
controller1.dispose(); // controller1.dispose();
super.dispose(); // super.dispose();
} // }
//
@override // @override
Widget build(BuildContext context) { // Widget build(BuildContext context) {
return Center( // return Center(
//progress-loading.gif // //progress-loading.gif
child: Container( // child: Container(
// margin: EdgeInsets.only(bottom: 40), // // margin: EdgeInsets.only(bottom: 40),
child: GifImage( // child: GifImage(
controller: controller1, // controller: controller1,
image: AssetImage( // image: AssetImage(
"assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), // "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
), // ),
)); // ));
} // }
} // }

@ -1,13 +1,11 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
// import 'gif_loader_container.dart';
import 'gif_loader_container.dart'; // class GifLoaderDialogUtils {
// static showMyDialog(BuildContext context) {
class GifLoaderDialogUtils { // showDialog(context: context, builder: (ctx) => GifLoaderContainer());
static showMyDialog(BuildContext context) { // }
showDialog(context: context, builder: (ctx) => GifLoaderContainer()); //
} // static hideDialog(BuildContext context) {
// if (Navigator.canPop(context)) Navigator.of(context).pop();
static hideDialog(BuildContext context) { // }
if (Navigator.canPop(context)) Navigator.of(context).pop(); // }
}
}

@ -5,8 +5,22 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import connectivity_macos import audio_session
import connectivity_plus
import flutter_tts
import just_audio
import package_info_plus
import path_provider_foundation
import shared_preferences_foundation
import wakelock_plus
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
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"))
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. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 51; objectVersion = 54;
objects = { objects = {
/* Begin PBXAggregateTarget section */ /* Begin PBXAggregateTarget section */
@ -26,6 +26,7 @@
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
6AAE3FFB3F8FFB988FA76AB9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11DB0DA04C904ACC8281A43B /* Pods_Runner.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
@ -52,9 +53,10 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
11DB0DA04C904ACC8281A43B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* queuing_system.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "queuing_system.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10ED2044A3C60003C045 /* queuing_system.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = queuing_system.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@ -66,8 +68,11 @@
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; }; 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
48B59F1CA514D4FE4E3BDC17 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
B1FB68A5A367B781DB228777 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
B5F3688D63D2A57A68A0C215 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -75,12 +80,24 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
6AAE3FFB3F8FFB988FA76AB9 /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
03070B72BAE9950C266BFD12 /* Pods */ = {
isa = PBXGroup;
children = (
48B59F1CA514D4FE4E3BDC17 /* Pods-Runner.debug.xcconfig */,
B1FB68A5A367B781DB228777 /* Pods-Runner.release.xcconfig */,
B5F3688D63D2A57A68A0C215 /* Pods-Runner.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
33BA886A226E78AF003329D5 /* Configs */ = { 33BA886A226E78AF003329D5 /* Configs */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@ -99,6 +116,7 @@
33CEB47122A05771004F2AC0 /* Flutter */, 33CEB47122A05771004F2AC0 /* Flutter */,
33CC10EE2044A3C60003C045 /* Products */, 33CC10EE2044A3C60003C045 /* Products */,
D73912EC22F37F3D000D13A0 /* Frameworks */, D73912EC22F37F3D000D13A0 /* Frameworks */,
03070B72BAE9950C266BFD12 /* Pods */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -148,6 +166,7 @@
D73912EC22F37F3D000D13A0 /* Frameworks */ = { D73912EC22F37F3D000D13A0 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
11DB0DA04C904ACC8281A43B /* Pods_Runner.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -159,11 +178,13 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = ( buildPhases = (
AD55B7E3AC663188F5990F5E /* [CP] Check Pods Manifest.lock */,
33CC10E92044A3C60003C045 /* Sources */, 33CC10E92044A3C60003C045 /* Sources */,
33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EA2044A3C60003C045 /* Frameworks */,
33CC10EB2044A3C60003C045 /* Resources */, 33CC10EB2044A3C60003C045 /* Resources */,
33CC110E2044A8840003C045 /* Bundle Framework */, 33CC110E2044A8840003C045 /* Bundle Framework */,
3399D490228B24CF009A79C7 /* ShellScript */, 3399D490228B24CF009A79C7 /* ShellScript */,
E17CB185511E52C6C3C36151 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -182,7 +203,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0920; LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300; LastUpgradeCheck = 1430;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
33CC10EC2044A3C60003C045 = { 33CC10EC2044A3C60003C045 = {
@ -235,6 +256,7 @@
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
3399D490228B24CF009A79C7 /* ShellScript */ = { 3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
@ -270,6 +292,45 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
}; };
AD55B7E3AC663188F5990F5E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E17CB185511E52C6C3C36151 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -344,7 +405,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx; SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;
@ -423,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx; SDKROOT = macosx;
@ -470,7 +531,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11; MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx; SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule; SWIFT_COMPILATION_MODE = wholemodule;

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

@ -4,4 +4,7 @@
<FileRef <FileRef
location = "group:Runner.xcodeproj"> location = "group:Runner.xcodeproj">
</FileRef> </FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace> </Workspace>

@ -1,348 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
connectivity:
dependency: "direct main"
description:
name: connectivity
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.6"
connectivity_for_web:
dependency: transitive
description:
name: connectivity_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0+1"
connectivity_macos:
dependency: transitive
description:
name: connectivity_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1+2"
connectivity_platform_interface:
dependency: transitive
description:
name: connectivity_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
equatable:
dependency: transitive
description:
name: equatable
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_gifimage:
dependency: "direct main"
description:
name: flutter_gifimage
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
get_it:
dependency: "direct main"
description:
name: get_it
url: "https://pub.dartlang.org"
source: hosted
version: "7.2.0"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.4"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
provider:
dependency: "direct main"
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.2"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1+1"
signalr_core:
dependency: "direct main"
description:
name: signalr_core
url: "https://pub.dartlang.org"
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
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
sse_client:
dependency: transitive
description:
name: sse_client
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
tuple:
dependency: transitive
description:
name: tuple
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "5.3.1"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.4.0-0.0.pre"

@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 4.3.5+1 version: 4.3.5+1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
@ -33,16 +33,23 @@ dependencies:
# Base packages # Base packages
provider: ^6.0.1 provider: ^6.0.1
get_it: ^7.1.3 get_it: ^8.0.2
connectivity: ^3.0.6 connectivity_plus: ^6.1.0
flutter_gifimage: ^1.0.1 # flutter_gifimage: ^1.0.1
flutter_svg: ^1.0.3 flutter_svg: ^2.0.14
http: ^0.13.0 http: ^1.2.2
blinking_text: ^1.0.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
signalr_core: ^1.1.1 signalr_core: ^1.1.1
intl: ^0.19.0
marquee: ^2.2.3
logger: ^2.4.0
win32: ^5.8.0
@ -55,7 +62,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your # activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # 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 # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec
@ -71,6 +78,8 @@ flutter:
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
assets: assets:
- assets/images/ - assets/images/
- assets/tones/
- assets/icons/
fonts: fonts:

@ -6,6 +6,12 @@
#include "generated_plugin_registrant.h" #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) { void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
FlutterTtsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterTtsPlugin"));
} }

@ -3,6 +3,11 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
flutter_tts
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
) )
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
@ -13,3 +18,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

Loading…
Cancel
Save