commit c6468611859278ffbbc5a5a5ec2143b8d7618e56 Author: Elham Rababh Date: Wed Mar 16 14:00:26 2022 +0300 first step form the queuing_system diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fa6b67 --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..ee7f61d --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: cf4400006550b70f28e4b4af815151d1e74846c6 + channel: stable + +project_type: app diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c5587a --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# queuing_system + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..8a164e5 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,68 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.queuing_system" + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..a6469d2 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8117512 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/queuing_system/MainActivity.kt b/android/app/src/main/kotlin/com/example/queuing_system/MainActivity.kt new file mode 100644 index 0000000..a89caf2 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/queuing_system/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.queuing_system + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..3db14bb --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d460d1e --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..a6469d2 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..24047dc --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..bc6a58a --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..8d4492f --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..1e8c3c9 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..0cb89ab --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,29 @@ +PODS: + - connectivity (0.0.1): + - Flutter + - Reachability + - Flutter (1.0.0) + - Reachability (3.2) + +DEPENDENCIES: + - connectivity (from `.symlinks/plugins/connectivity/ios`) + - Flutter (from `Flutter`) + +SPEC REPOS: + trunk: + - Reachability + +EXTERNAL SOURCES: + connectivity: + :path: ".symlinks/plugins/connectivity/ios" + Flutter: + :path: Flutter + +SPEC CHECKSUMS: + connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 + +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c + +COCOAPODS: 1.11.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7046dae --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,552 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 70D39249DB7A3F38DEE79BBA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2AD545053EF3DD23E4B1618 /* Pods_Runner.framework */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 5A0CDD6D9E3A5EC80989C721 /* 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 = ""; }; + 67B625243BA81A062AD53AF5 /* 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 = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2AD545053EF3DD23E4B1618 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EC320CE9C913704F07EC9DBB /* 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 = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 70D39249DB7A3F38DEE79BBA /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + A5F2B8A010B8801DD28FCC66 /* Pods */, + CA25EED49D8F8EE362D0DA22 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + A5F2B8A010B8801DD28FCC66 /* Pods */ = { + isa = PBXGroup; + children = ( + EC320CE9C913704F07EC9DBB /* Pods-Runner.debug.xcconfig */, + 5A0CDD6D9E3A5EC80989C721 /* Pods-Runner.release.xcconfig */, + 67B625243BA81A062AD53AF5 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + CA25EED49D8F8EE362D0DA22 /* Frameworks */ = { + isa = PBXGroup; + children = ( + E2AD545053EF3DD23E4B1618 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 8AC1CF76335D3AB7F332D485 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ABC3BA0044F47468F42574B1 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 8AC1CF76335D3AB7F332D485 /* [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; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + ABC3BA0044F47468F42574B1 /* [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 */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = YBCNBY2J8V; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.queuingSystem; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = YBCNBY2J8V; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.queuingSystem; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = YBCNBY2J8V; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.queuingSystem; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..81eb537 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Queuing System + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + queuing_system + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/lib/core/base/app_scaffold_widget.dart b/lib/core/base/app_scaffold_widget.dart new file mode 100644 index 0000000..6d457ee --- /dev/null +++ b/lib/core/base/app_scaffold_widget.dart @@ -0,0 +1,118 @@ + +import 'package:flutter/material.dart'; +import 'package:provider/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 'base_view_model.dart'; +import 'network_base_view.dart'; + +class AppScaffold extends StatelessWidget { + final String appBarTitle; + final Widget body; + final bool isLoading; + final bool isShowAppBar; + final BaseViewModel baseViewModel; + final Widget bottomSheet; + final Color backgroundColor; + final Widget appBar; + final Widget drawer; + final Widget bottomNavigationBar; + final String subtitle; + final bool isHomeIcon; + final bool extendBody; + + AppScaffold( + {this.appBarTitle = '', + this.body, + this.isLoading = false, + this.isShowAppBar = true, + this.baseViewModel, + this.bottomSheet, + this.backgroundColor, + this.isHomeIcon = true, + this.appBar, + this.subtitle, + this.drawer, + this.extendBody = false, + this.bottomNavigationBar}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + return GestureDetector( + onTap: () { + FocusScope.of(context).requestFocus(new FocusNode()); + }, + child: Scaffold( + backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor + , + drawer: drawer, + extendBody: extendBody, + bottomNavigationBar: bottomNavigationBar, + appBar: isShowAppBar + ? 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: [ + ], + ) + : null, + bottomSheet: bottomSheet, + body: projectProvider.isInternetConnection + ? baseViewModel != null + ? NetworkBaseView( + baseViewModel: baseViewModel, + child: body, + ) + : Stack( + children: [body, buildAppLoaderWidget(isLoading)]) + : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + "assets/images/undraw_connected_world_wuay.png", + height: 250, + ), + AppText('No Internet Connection') + ], + ), + ), + ), + ); + } + + Widget buildAppLoaderWidget(bool isLoading) { + return isLoading ? AppLoaderWidget() : Container(); + } +} diff --git a/lib/core/base/base_app_client.dart b/lib/core/base/base_app_client.dart new file mode 100644 index 0000000..a4eeabc --- /dev/null +++ b/lib/core/base/base_app_client.dart @@ -0,0 +1,109 @@ + +import 'dart:convert'; +import 'dart:io' show Platform; +import 'package:queuing_system/core/config/config.dart'; +import 'package:queuing_system/utils/Utils.dart'; +import 'package:http/http.dart' as http; + +class BaseAppClient { + static post(String endPoint, + {Map body, + Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure}) async { + String url; + + url = BASE_URL + endPoint; + + try { + + print("URL : $url"); + print("Body : ${json.encode(body)}"); + var asd = json.encode(body); + var asd2; + if (await Utils.checkConnection()) { + + final response = await http.post(Uri.parse(url), + body: json.encode(body), + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + }); + final int statusCode = response.statusCode; + if (statusCode < 200 || statusCode >= 400) { + onFailure(Utils.generateContactAdminMsg(), statusCode); + } else { + print(response.body.toString()); + var parsed = json.decode(response.body.toString()); + onSuccess(parsed, statusCode); + } + } else { + onFailure('Please Check The Internet Connection', -1); + } + } catch (e) { + print(e); + onFailure(e.toString(), -1); + } + } + + + static get(String endPoint, + {Map body, + Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure}) async { + String url; + + url = BASE_URL + endPoint; + + try { + // String token = await sharedPref.getString(TOKEN); + + print("URL : $url"); + print("Body : ${json.encode(body)}"); + var asd = json.encode(body); + var asd2; + if (await Utils.checkConnection()) { + final response = await http.get(Uri.parse(url), + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json' + }); + final int statusCode = response.statusCode; + if (statusCode < 200 || statusCode >= 400) { + onFailure(Utils.generateContactAdminMsg(), statusCode); + } else { + var parsed = json.decode(response.body.toString()); + onSuccess(parsed, statusCode); + } + } else { + onFailure('Please Check The Internet Connection', -1); + } + } catch (e) { + print(e); + onFailure(e.toString(), -1); + } + } + + + String getError(parsed) { + //TODO change this fun + String error = parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']; + if (parsed["ValidationErrors"] != null) { + error = parsed["ValidationErrors"]["StatusMessage"].toString() + "\n"; + + if (parsed["ValidationErrors"]["ValidationErrors"] != null && + parsed["ValidationErrors"]["ValidationErrors"].length != 0) { + for (var i = 0; + i < parsed["ValidationErrors"]["ValidationErrors"].length; + i++) { + error = error + + parsed["ValidationErrors"]["ValidationErrors"][i]["Messages"][0] + + "\n"; + } + } + } + if (error == null || error == "null" || error == "null\n") { + return Utils.generateContactAdminMsg(); + } + return error; + } +} diff --git a/lib/core/base/base_service.dart b/lib/core/base/base_service.dart new file mode 100644 index 0000000..573f83e --- /dev/null +++ b/lib/core/base/base_service.dart @@ -0,0 +1,9 @@ + +class BaseService { + String error; + bool hasError = false; + + + BaseService() { + } +} diff --git a/lib/core/base/base_view.dart b/lib/core/base/base_view.dart new file mode 100644 index 0000000..4ffde3d --- /dev/null +++ b/lib/core/base/base_view.dart @@ -0,0 +1,50 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'base_view_model.dart'; +import 'locater.dart'; + +class BaseView extends StatefulWidget { + final Widget Function(BuildContext context, T model, Widget child) builder; + final Function(T) onModelReady; + + BaseView({ + this.builder, + this.onModelReady, + }); + + @override + _BaseViewState createState() => _BaseViewState(); +} + +class _BaseViewState extends State> { + T model = locator(); + + bool isLogin = false; + + @override + void initState() { + if (widget.onModelReady != null) { + widget.onModelReady(model); + } + + super.initState(); + } + + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider.value( + value: model, + child: Consumer(builder: widget.builder), + ); + } + + @override + void dispose() { + if (model != null) { + model = null; + } + + super.dispose(); + } +} diff --git a/lib/core/base/base_view_model.dart b/lib/core/base/base_view_model.dart new file mode 100644 index 0000000..aef84a0 --- /dev/null +++ b/lib/core/base/base_view_model.dart @@ -0,0 +1,40 @@ +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(); + }); + } + +} diff --git a/lib/core/base/locater.dart b/lib/core/base/locater.dart new file mode 100644 index 0000000..11a4f84 --- /dev/null +++ b/lib/core/base/locater.dart @@ -0,0 +1,11 @@ +import 'package:get_it/get_it.dart'; + +GetIt locator = GetIt.instance; + +///di +void setupLocator() { + /// Services + + /// View Model + +} \ No newline at end of file diff --git a/lib/core/base/network_base_view.dart b/lib/core/base/network_base_view.dart new file mode 100644 index 0000000..7b9c73f --- /dev/null +++ b/lib/core/base/network_base_view.dart @@ -0,0 +1,40 @@ +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; + } + } +} diff --git a/lib/core/base/project_view_model.dart b/lib/core/base/project_view_model.dart new file mode 100644 index 0000000..dfa7caf --- /dev/null +++ b/lib/core/base/project_view_model.dart @@ -0,0 +1,51 @@ +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(); + } +} diff --git a/lib/core/base/view_state.dart b/lib/core/base/view_state.dart new file mode 100644 index 0000000..94d79be --- /dev/null +++ b/lib/core/base/view_state.dart @@ -0,0 +1 @@ +enum ViewState { Idle, Busy, Error, BusyLocal, ErrorLocal } diff --git a/lib/core/config/config.dart b/lib/core/config/config.dart new file mode 100644 index 0000000..12ec7ca --- /dev/null +++ b/lib/core/config/config.dart @@ -0,0 +1,461 @@ +import 'package:flutter/material.dart'; + +const MAX_SMALL_SCREEN = 660; +const ONLY_NUMBERS = "[0-9]"; +const ONLY_LETTERS = "[a-zA-Z &'\"]"; +const ONLY_DATE = "[0-9/]"; +const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; +const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; +const PATIENT_PROGRESS_NOTE_URL = + "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; +const PATIENT_INSURANCE_APPROVALS_URL = + "Services/DoctorApplication.svc/REST/GetApprovalStatusForInpatient"; +const PATIENT_REFER_TO_DOCTOR_URL = + "Services/DoctorApplication.svc/REST/ReferToDoctor"; +const PATIENT_GET_DOCTOR_BY_CLINIC_URL = + "Services/DoctorApplication.svc/REST/GetDoctorsByClinicID"; + +const PATIENT_GET_DOCTOR_BY_CLINIC_Hospital = + "Services/Doctors.svc/REST/SearchDoctorsByTime"; + +const GET_CLINICS_FOR_DOCTOR = + 'Services/DoctorApplication.svc/REST/GetClinicsForDoctor'; +const PATIENT_GET_LIST_REFERAL_URL = + "Services/Lists.svc/REST/GetList_STPReferralFrequency"; +const PATIENT_GET_CLINIC_BY_PROJECT_URL = + "Services/DoctorApplication.svc/REST/GetClinicsByProjectID"; +const PROJECT_GET_INFO = "Services/DoctorApplication.svc/REST/GetProjectInfo"; +const GET_CLINICS = "Services/DoctorApplication.svc/REST/GetClinics"; + +const GET_REFERRAL_FACILITIES = + 'Services/DoctorApplication.svc/REST/GetReferralFacilities'; + +const GET_PROJECTS = 'Services/DoctorApplication.svc/REST/GetProjectInfo'; + +const GET_PATIENT_VITAL_SIGN = + 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; +const GET_PATIENT_VITAL_SIGN_DATA = + 'Services/DoctorApplication.svc/REST/GetVitalSigns'; +const GET_PATIENT_LAB_OREDERS = + 'Services/DoctorApplication.svc/REST/GetPatientLabOreders'; +const GET_PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; + +const GET_LIVECARE_PENDINGLIST = + 'Services/DoctorApplication.svc/REST/GetPendingPatientER'; +const START_LIVE_CARE_CALL = 'LiveCareApi/DoctorApp/CallPatient'; +const LIVE_CARE_STATISTICS_FOR_CERTAIN_DOCTOR_URL = + "Lists.svc/REST/DashBoard_GetLiveCareDoctorsStatsticsForCertainDoctor"; + +const GET_PRESCRIPTION_REPORT = + 'Services/Patients.svc/REST/GetPrescriptionReport'; + +const GT_MY_PATIENT_QUESTION = + 'Services/DoctorApplication.svc/REST/GtMyPatientsQuestions'; + +const PRM_SEARCH_PATIENT = + 'Services/Patients.svc/REST/GetPatientInformation_PRM'; + +const GET_PATIENT = 'Services/DoctorApplication.svc/REST/'; + +const GET_PRESCRIPTION_REPORT_FOR_IN_PATIENT = + 'Services/DoctorApplication.svc/REST/GetPrescriptionReportForInPatient'; + +const GET_MY_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/GtMyReferralPatient'; + +const REFER_TO_DOCTOR = 'Services/DoctorApplication.svc/REST/ReferToDoctor'; + +const ADD_REFERRED_DOCTOR_REMARKS = + 'Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks'; + +const GET_MY_REFERRED_PATIENT = + 'Services/DoctorApplication.svc/REST/GtMyReferredPatient'; + +const GET_MY_REFERRED_OUT_PATIENT = + 'Services/DoctorApplication.svc/REST/GtMyReferredOutPatient'; + +const GET_PENDING_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/PendingReferrals'; + +const CREATE_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/CreateReferral'; + +const RESPONSE_PENDING_REFERRAL_PATIENT = + 'Services/DoctorApplication.svc/REST/RespondReferral'; + +const GET_PATIENT_REFERRAL = 'Services/DoctorApplication.svc/REST/GetRefferal'; + +const POST_UCAF = 'Services/DoctorApplication.svc/REST/PostUCAF'; + +const GET_DOCTOR_WORKING_HOURS_TABLE = + 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; + +const GET_PATIENT_LAB_RESULTS = + 'Services/DoctorApplication.svc/REST/GetPatientLabResults'; +const LOGIN_URL = 'Services/Sentry.svc/REST/MemberLogIN_New'; +const INSERT_DEVICE_IMEI = + 'Services/DoctorApplication.svc/REST/DoctorApp_InsertOrUpdateDeviceDetails'; +// 'Services/Sentry.svc/REST/DoctorApplication_INSERTDeviceIMEI'; +// const SELECT_DEVICE_IMEI = +// 'Services/Sentry.svc/REST/DoctorApplication_SELECTDeviceIMEIbyIMEI'; + +const SELECT_DEVICE_IMEI = + 'Services/DoctorApplication.svc/REST/DoctorApp_GetDeviceDetailsByIMEI'; + +const SEND_ACTIVATION_CODE_BY_OTP_NOTIFICATION_TYPE = + 'Services/Sentry.svc/REST/DoctorApplication_SendActivationCodebyOTPNotificationType'; + +const SEND_ACTIVATION_CODE_FOR_DOCTOR_APP = + 'Services/DoctorApplication.svc/REST/SendActivationCodeForDoctorApp'; + +const SEND_ACTIVATION_CODE_FOR_VERIFICATION_SCREEN = + 'Services/DoctorApplication.svc/REST/SendVerificationCode'; +const MEMBER_CHECK_ACTIVATION_CODE_NEW = + 'Services/Sentry.svc/REST/MemberCheckActivationCode_New'; + +const CHECK_ACTIVATION_CODE_FOR_DOCTOR_APP = + 'Services/DoctorApplication.svc/REST/CheckActivationCodeForDoctorApp'; + +const GET_DOC_PROFILES = 'Services/Doctors.svc/REST/GetDocProfiles'; +const TRANSFERT_TO_ADMIN = 'LiveCareApi/DoctorApp/TransferToAdmin'; +const SEND_SMS_INSTRUCTIONS = 'LiveCareApi/DoctorApp/SendSMSInstruction'; +const GET_ALTERNATIVE_SERVICE = 'LiveCareApi/DoctorApp/GetAlternativeServices'; +const END_CALL = 'LiveCareApi/DoctorApp/EndCall'; +const END_CALL_WITH_CHARGE = 'LiveCareApi/DoctorApp/CompleteCallWithCharge'; +const GET_DASHBOARD = + 'Services/DoctorApplication.svc/REST/GetDoctorDashboardKPI'; +const GET_SICKLEAVE_STATISTIC = + 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; +const ARRIVED_PATIENT_URL = + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; +const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; +const GET_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; +const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; + +const GET_MASTER_LOOKUP_LIST = 'Services/DoctorApplication.svc/REST/GetMasterLookUpList'; +const GET_COVERING_DOCTORS = + 'Services/DoctorApplication.svc/REST/GetCoveringDoctor'; +const ADD_RESCHDEULE = 'Services/DoctorApplication.svc/REST/PostRequisition'; +const UPDATE_RESCHDEULE = + 'Services/DoctorApplication.svc/REST/PatchRequisition'; +const GET_RESCHEDULE_LEAVE = + 'Services/DoctorApplication.svc/REST/GetRequisition'; +const GET_PRESCRIPTION_LIST = + 'Services/DoctorApplication.svc/REST/GetPrescription'; + +const POST_PRESCRIPTION_LIST = + 'Services/DoctorApplication.svc/REST/PostPrescription'; +const GET_PROCEDURE_LIST = + 'Services/DoctorApplication.svc/REST/GetOrderedProcedure'; +const POST_PROCEDURE_LIST = 'Services/DoctorApplication.svc/REST/PostProcedure'; + + +const GET_PATIENT_IN_PATIENT_LIST = + 'Services/DoctorApplication.svc/REST/GetMyInPatient'; + +const Verify_Referral_Doctor_Remarks = + 'Services/DoctorApplication.svc/REST/VerifyReferralDoctorRemarks'; + +///Lab Order +const GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; +const GET_Patient_LAB_SPECIAL_RESULT = + 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +const SEND_LAB_RESULT_EMAIL = + 'Services/Notifications.svc/REST/SendLabReportEmail'; +const GET_Patient_LAB_RESULT = + 'Services/Patients.svc/REST/GetPatientLabResults'; +const GET_Patient_LAB_ORDERS_RESULT = + 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +const GET_PATIENT_LAB_ORDERS_RESULT_HISTORY_BY_DESCRIPTION = + 'Services/Patients.svc/REST/GetPatientLabOrdersResultsHistoryByDescription'; + +// SOAP + +const GET_ALLERGIES = 'Services/DoctorApplication.svc/REST/GetAllergies'; + +const POST_EPISODE = 'Services/DoctorApplication.svc/REST/PostEpisode'; +const POST_EPISODE_FOR_IN_PATIENT = + 'Services/DoctorApplication.svc/REST/PostEpisodeForInpatient'; + +const POST_ALLERGY = 'Services/DoctorApplication.svc/REST/PostAllergies'; +const POST_HISTORY = 'Services/DoctorApplication.svc/REST/PostHistory'; +const POST_CHIEF_COMPLAINT = + 'Services/DoctorApplication.svc/REST/PostChiefcomplaint'; +const POST_PHYSICAL_EXAM = + 'Services/DoctorApplication.svc/REST/PostPhysicalExam'; +const POST_PROGRESS_NOTE = + '/Services/DoctorApplication.svc/REST/PostProgressNote'; +const POST_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PostAssessment'; + +const PATCH_ALLERGY = 'Services/DoctorApplication.svc/REST/PatchAllergies'; +const PATCH_HISTORY = 'Services/DoctorApplication.svc/REST/PatchHistory'; +const PATCH_CHIEF_COMPLAINT = + 'Services/DoctorApplication.svc/REST/PatchChiefcomplaint'; + +const PATCH_PHYSICAL_EXAM = + 'Services/DoctorApplication.svc/REST/PatchPhysicalExam'; +const PATCH_PROGRESS_NOTE = + 'Services/DoctorApplication.svc/REST/PatchProgressNote'; +const PATCH_ASSESSMENT = 'Services/DoctorApplication.svc/REST/PatchAssessment'; + +const GET_HISTORY = 'Services/DoctorApplication.svc/REST/GetHistory'; +const GET_CHIEF_COMPLAINT = + 'Services/DoctorApplication.svc/REST/GetChiefcomplaint'; +const GET_PHYSICAL_EXAM = 'Services/DoctorApplication.svc/REST/GetPhysicalExam'; +const GET_PROGRESS_NOTE = 'Services/DoctorApplication.svc/REST/GetProgressNote'; +const GET_ASSESSMENT = 'Services/DoctorApplication.svc/REST/GetAssessment'; + + +const GET_LIST_CATEGORISE = + 'Services/DoctorApplication.svc/REST/GetProcedureCategories'; + +const GET_CATEGORISE_PROCEDURE = + 'Services/DoctorApplication.svc/REST/GetProcedure'; +const UPDATE_PROCEDURE = 'Services/DoctorApplication.svc/REST/PatchProcedure'; +const UPDATE_PRESCRIPTION = + 'Services/DoctorApplication.svc/REST/PatchPrescription'; +const SEARCH_DRUG = 'Services/DoctorApplication.svc/REST/GetMedicationList'; +const DRUG_TO_DRUG = + 'Services/DoctorApplication.svc/REST/DrugToDrugInteraction'; +const GET_MEDICAL_FILE = 'Services/DoctorApplication.svc/REST/GetMedicalFile'; +const GET_FLOORS = 'Services/DoctorApplication.svc/REST/GetFloors'; +const GET_WARDS = 'Services/DoctorApplication.svc/REST/GetWards'; +const GET_ROOM_CATEGORIES = + 'Services/DoctorApplication.svc/REST/GetRoomCategories'; +const GET_DIAGNOSIS_TYPES = + 'Services/DoctorApplication.svc/REST/DiagnosisTypes'; +const GET_DIET_TYPES = 'Services/DoctorApplication.svc/REST/DietTypes'; +const GET_ICD_CODES = 'Services/DoctorApplication.svc/REST/GetICDCodes'; +const POST_ADMISSION_REQUEST = + 'Services/DoctorApplication.svc/REST/PostAdmissionRequest'; +const GET_ITEM_BY_MEDICINE = + 'Services/DoctorApplication.svc/REST/GetItemByMedicineCode'; + +const GET_PROCEDURE_VALIDATION = + 'Services/DoctorApplication.svc/REST/ValidateProcedures'; +const GET_BOX_QUANTITY = + 'Services/DoctorApplication.svc/REST/CalculateBoxQuantity'; + +///GET ECG +const GET_ECG = "Services/Patients.svc/REST/HIS_GetPatientMuseResults"; + +const GET_MY_REFERRAL_INPATIENT = + "Services/DoctorApplication.svc/REST/GtMyReferralPatient"; + +const GET_MY_REFERRAL_OUT_PATIENT = + "Services/DoctorApplication.svc/REST/GtMyReferralForOutPatient"; + +const GET_MY_DISCHARGE_PATIENT = + "Services/DoctorApplication.svc/REST/GtMyDischargeReferralPatient"; +const GET_DISCHARGE_PATIENT = + "Services/DoctorApplication.svc/REST/GtMyDischargePatient"; + +const GET_PAtIENTS_INSURANCE_APPROVALS = + "Services/Patients.svc/REST/GetApprovalStatus"; + +const GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; +const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; +const GET_IN_PATIENT_ORDERS = + 'Services/DoctorApplication.svc/REST/GetPatientRadResult'; + +///Prescriptions +const GET_PRESCRIPTIONS_ALL_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PRESCRIPTION_REPORT_NEW = + 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +const SEND_PRESCRIPTION_EMAIL = + 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +const GET_PRESCRIPTION_REPORT_ENH = + 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; +const UPDATE_PROGRESS_NOTE_FOR_INPATIENT = + "Services/DoctorApplication.svc/REST/UpdateProgressNoteForInPatient"; +const CREATE_PROGRESS_NOTE_FOR_INPATIENT = + "Services/DoctorApplication.svc/REST/CreateProgressNoteForInPatient"; + +const GET_SICK_LEAVE_PATIENT = "Services/Patients.svc/REST/GetPatientSickLeave"; +const GET_MY_OUT_PATIENT = + "Services/DoctorApplication.svc/REST/GetMyOutPatient"; + +const PATIENT_MEDICAL_REPORT_GET_LIST = + "Services/Patients.svc/REST/DAPP_ListMedicalReport"; +const PATIENT_MEDICAL_REPORT_GET_TEMPLATE = + "Services/Patients.svc/REST/DAPP_GetTemplateByID"; +const PATIENT_MEDICAL_REPORT_INSERT = + "Services/Patients.svc/REST/DAPP_InsertMedicalReport"; +const PATIENT_MEDICAL_REPORT_VERIFIED = + "Services/Patients.svc/REST/DAPP_VerifiedMedicalReport"; + +const GET_PROCEDURE_TEMPLETE = + 'Services/Doctors.svc/REST/DAPP_ProcedureTemplateGet'; + +const GET_TEMPLETE_LIST = 'Services/Doctors.svc/REST/DAPP_TemplateGet'; + +const GET_PROCEDURE_TEMPLETE_DETAILS = + "Services/Doctors.svc/REST/DAPP_ProcedureTemplateDetailsGet"; +const GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP = + 'Services/DoctorApplication.svc/REST/GetPendingPatientERForDoctorApp'; + +const DOCTOR_CHECK_HAS_LIVE_CARE = + "Services/DoctorApplication.svc/REST/CheckDoctorHasLiveCare"; + +const LIVE_CARE_IS_LOGIN = "LiveCareApi/DoctorApp/UseIsLogin"; +const ADD_REFERRED_REMARKS_NEW = + "Services/DoctorApplication.svc/REST/AddReferredDoctorRemarks_New"; +const GET_SPECIAL_CLINICAL_CARE_LIST = + "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareList"; +const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = + "Services/DoctorApplication.svc/REST/GetSpecialClinicalCareMappingList"; + +const INSERT_MEDICAL_REPORT = + "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; + +const UPDATE_MEDICAL_REPORT = + "Services/Patients.svc/REST/DAPP_UpdateMedicalReport"; +const GET_SICK_LEAVE_DOCTOR_APP = + "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; +const ADD_PATIENT_TO_DOCTOR = "LiveCareApi/DoctorApp/AssignPatientToDoctor"; +const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue"; +const CREATE_DOCTOR_RESPONSE = + "Services/DoctorApplication.svc/REST/CreateDoctorResponse"; +const GET_DOCTOR_NOT_REPLIED_COUNTS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDoctorNotRepliedCounts"; +const ALL_SPECIAL_LAB_RESULT = + "services/Patients.svc/REST/GetPatientLabSpecialResultsALL"; +const GET_MEDICATION_FOR_IN_PATIENT = + "Services/DoctorApplication.svc/REST/Doctor_GetMedicationForInpatient"; +const GET_EPISODE_FOR_INPATIENT = + "/Services/DoctorApplication.svc/REST/DoctorApp_GetEpisodeForInpatient"; + +///Operation Details Services + +const GET_RESERVATIONS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetReservationDetails"; +const GET_OPERATION_DETAILS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetOperationDetails"; +const UPDATE_OPERATION_REPORT = + "Services/DoctorApplication.svc/REST/DoctorApp_CreateUpdateOperationReport"; + +const NURSING_PROGRESS_NOTE = + "Services/DoctorApplication.svc/REST/DoctorApp_GetNursingProgressNote"; +const GET_DIAGNOSIS_FOR_IN_PATIENT = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDiagnosisForInPatient"; + +const GET_DIABETIC_CHART_VALUES = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDiabeticChartValues"; + +const GET_PENDING_ORDERS = + "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingOrdersForInPatient"; + +const GET_ADMISSION_ORDERS = + "/Services/DoctorApplication.svc/REST/DoctorApp_GetAdmissionOrders"; + +///Patient Registration Services +const CHECK_PATIENT_FOR_REGISTRATION = + "Services/Authentication.svc/REST/CheckPatientForRegisteration"; +const SEND_ACTIVATION_CODE_BY_OTP_NOT_TYPE_FOR_REGISTRATION = + "Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration"; +const CHECK_ACTIVATION_CODE_FOR_PATIENT = + "Services/Authentication.svc/REST/CheckActivationCode"; +const PATIENT_REGISTRATION = + "Services/Authentication.svc/REST/PatientRegistration"; +const GET_PATIENT_INFO = "Services/NHIC.svc/REST/GetPatientInfo"; + +/// Discharge Summary +const GET_PENDING_DISCHARGE_SUMMARY = + "Services/DoctorApplication.svc/REST/DoctorApp_GetPendingDischargeSummary"; +const GET_ALL_DISCHARGE_SUMMARY = + "Services/DoctorApplication.svc/REST/DoctorApp_GetDischargeSummary"; + +const VTE_ASSESSMENT = + "Services/Patients.svc/REST/INP_GetVTEHistoryByTransactionNo"; + +const GET_INTERVENTION_MEDICATION = + "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionMedications"; + +const GET_INTERVENTION_MEDICATION_HISTORY = + "Services/DoctorApplication.svc/REST/DoctorApp_GetInterventionHistory"; + +const SET_ACCEPTED_OR_REJECTED = + "Services/DoctorApplication.svc/REST/DoctorApp_AcceptOrRejectIntervention"; + +const GET_STP_MASTER_LIST = + "Services/DoctorApplication.svc/REST/DoctorApp_GetSTPMasterList"; + +var selectedPatientType = 1; + +//*********change value to decode json from Dropdown ************ +var SERVICES_PATIANT = [ + "GetMyOutPatient", + "GetMyInPatient", + "GtMyDischargePatient", + "GtMyReferredPatient", + "GtMyDischargeReferralPatient", + "GtMyTomorrowPatient", + "GtMyReferralPatient", + "PatientArrivalList" +]; +var SERVICES_PATIANT2 = [ + "List_MyOutPatient", + "List_MyInPatient", + "List_MyDischargePatient", + "List_MyReferredPatient", + "List_MyDischargeReferralPatient", + "List_MyTomorrowPatient", + "List_MyReferralPatient", + "patientArrivalList" +]; +var SERVICES_PATIANT_HEADER = [ + "My OutPatient", + "My InPatient", + "Discharge", + "Referred", + "Referral Discharge", + "Tomorrow", + "Referral", + "Arrival Patient" +]; +var SERVICES_PATIANT_HEADER_AR = [ + "المريض الخارجي", + "المريض المنوم", + "المريض المعافى", + "المريض المحول الي", + "المريض المحال المعافى", + "مريض الغد", + "المريض المحول مني", + "المريض الواصل" +]; + +const PRIMARY_COLOR = 0xff515B5D; + +const TRANSACTION_NO = 0; +const LANGUAGE_ID = 2; +const STAMP = '2020-04-27T12:17:17.721Z'; +const IP_ADDRESS = '9.9.9.9'; +const VERSION_ID = 6.7; +const CHANNEL = 9; +const SESSION_ID = 'BlUSkYymTt'; +const IS_LOGIN_FOR_DOCTOR_APP = true; +const PATIENT_OUT_SA = false; +const IS_DENTAL_ALLOWED_BACKEND = false; +const PATIENT_OUT_SA_PATIENT_REQ = 0; +const SETUP_ID = '91877'; +const GENERAL_ID = 'Cs2020@2016\$2958'; +const PATIENT_TYPE = 1; +const PATIENT_TYPE_ID = 1; + + +/// Timer Info +const TIMER_MIN = 10; + +class AppGlobal { + static var CONTEX; + static Color appRedColor = Color(0xFFD02127); + static Color appGreenColor = Color(0xFF359846); + static Color appTextColor = Color(0xFF2B353E); + static Color scheduleTextColor = Color(0xFF2E303A); + static Color inProgressColor = Color(0xFFCC9B14); + +} diff --git a/lib/core/config/localized_values.dart b/lib/core/config/localized_values.dart new file mode 100644 index 0000000..4225ed6 --- /dev/null +++ b/lib/core/config/localized_values.dart @@ -0,0 +1,1145 @@ +const Map> localizedValues = { + "dashboardScreenToolbarTitle": {"ar": "الرئيسة", "en": "Home"}, + "settings": {"en": "Settings", "ar": "الاعدادات"}, + "areYouSureYouWantTo": { + "en": "Are you sure you want to", + "ar": "هل انت متاكد من انك تريد أن" + }, + "language": {"en": "App Language", "ar": "لغة التطبيق"}, + "lanEnglish": {"en": "English", "ar": "English"}, + "lanArabic": {"en": "العربية", "ar": "العربية"}, + "theDoctor": {"en": "Doctor", "ar": "الطبيب"}, + "reply": {"en": "Reply", "ar": "رد"}, + "time": {"en": "Time", "ar": "الوقت"}, + "fileNo": {"en": "File No : ", "ar": "رقم الملف :"}, + "mobileNo": {"en": "Mobile No", "ar": "رقم الجوال"}, + "messagesScreenToolbarTitle": {"en": "Messages", "ar": "الرسائل"}, + "mySchedule": {"en": "Schedules", "ar": "جدولي"}, + "errorNoSchedule": { + "en": "You don't have any Schedule", + "ar": "ليس لديك أي جدول" + }, + "verify": {"en": "VERIFY", "ar": "تحقق"}, + "pharmacy-intervention": {"en": "Pharmacy Intervention", "ar": "التدخل الصيدلاني"}, + "referralDoctor": {"en": "Referral Doctor", "ar": "الطبيب المُحول إليه"}, + "referringClinic": {"en": "Referring Clinic", "ar": "العيادة المُحول إليها"}, + "frequency": {"en": "Frequency", "ar": "تكرر"}, + "priority": {"en": "Priority", "ar": "الأولوية"}, + "maxResponseTime": {"en": "Max Response Time", "ar": "الوقت الأقصى للرد"}, + "clinicDetailsandRemarks": { + "en": "Clinic Details and Remarks", + "ar": "ملاحضات وتفاصيل العيادة" + }, + "answerSuggestions": {"en": "Answer/Suggestions", "ar": "الرد / الاقتراحات"}, + "outPatients": {"en": "Out Patient", "ar": "العيادات الخارجية"}, + "myOutPatient": {"en": "My OutPatients", "ar": "مرضى العيادات الخارجية"}, + "myOutPatient_2lines": { + "en": "My\nOutPatients", + "ar": "مريض\nالعيادات الخارجية" + }, + "searchPatient": {"en": "Search Patients", "ar": "البحث عن مريض"}, + "searchPatientDashBoard": {"en": "Search\nPatients", "ar": "البحث\nعن مريض"}, + "searchAbout": {"en": "Search", "ar": "البحث عن"}, + "patient": {"en": "Patient", "ar": " مريض"}, + "patients": {"en": "Patients", "ar": "مرضى"}, + "labResult": {"en": "Lab Result", "ar": "نتيجة المختبر"}, + "lab": {"en": "Lab", "ar": "المختبر"}, + "result": {"en": "Result", "ar": "نتيجة"}, + "todayStatistics": {"en": "Today Statistics", "ar": "إحصائيات اليوم"}, + "arrived": {"en": "Arrival Patients", "ar": " المرضى الحاضرين"}, + "er": {"en": "ER", "ar": "حالة طوارئ"}, + "walkIn": {"en": "Walk-in", "ar": "ادخل"}, + "notArrived": {"en": "Not Arrived", "ar": "لم يحضر"}, + "radiology": {"en": "Radiology", "ar": "الأشعة"}, + "service": {"en": "Service", "ar": "خدمة"}, + "referral": {"en": "Referral", "ar": "الإحالة"}, + "inPatient": {"en": "In Patients", "ar": "مرضاي"}, + "myInPatient": {"en": "My\n In Patients", "ar": "مرضاي\nالمنومين"}, + "myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"}, + "inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"}, + "inPatientAll": {"en": "All Patients", "ar": "المرضى المنومين"}, + "operations": {"en": "Operations", "ar": "عمليات"}, + "patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"}, + "searchMedicineDashboard": { + "en": "Search\nMedicines", + "ar": "بحث\nعن الدواء" + }, + "searchMedicine": {"en": "Search Medicines", "ar": "بحث عن الدواء"}, + "myReferralPatient": {"en": "My Referral Patient", "ar": "مرضى الاحالة"}, + "referPatient": {"en": "Referral Patient", "ar": "إحالة مريض"}, + "myReferral": {"en": "My Referral", "ar": "إحالة"}, + "myReferredPatient": {"en": "Referred", "ar": "المحالين"}, + "referredPatient": {"en": "Referred Patient", "ar": "المرضى المحالين"}, + "referredOn": {"en": "referred On : ", "ar": " : تمت الإحالة في"}, + "firstName": {"en": "First Name", "ar": "الاسم الاول"}, + "middleName": {"en": "Middle Name", "ar": "اسم الاب"}, + "lastName": {"en": "Last Name", "ar": "اسم العائلة"}, + "phoneNumber": {"en": "Patients Phone Number ", "ar": "رقم الجوال"}, + "patientID": {"en": "Patient ID", "ar": "رقم المريض"}, + "patientFile": {"en": "Patient File", "ar": "ملف المريض"}, + "familyMedicine": {"en": "Family Medicine Clinic", "ar": "عيادة طب الأسرة"}, + "search": {"en": "Search", "ar": "بحث "}, + "onlyArrivedPatient": { + "en": "Only Arrived Patient", + "ar": "المريض الذي حضر للموعد" + }, + "searchMedicineNameHere": {"en": "Search Medicine ", "ar": "ابحث هنا"}, + "youCanFind": {"en": "You can find ", "ar": "تستطيع ان تجد "}, + "medicineSearchResult": {"en": "as a search result for", "ar": "كنتيجة بحث عن"}, + "qr": {"en": "QR", "ar": "QR"}, + "reader": {"en": "Reader", "ar": "قارىء رمز ال"}, + "startScanning": {"en": "Start Scanning", "ar": "بدء المسح"}, + "scanQrCode": { + "en": "scan Qr code to retrieve patient profile", + "ar": "مسح رمزاال QR لاسترداد ملف تعريف المريض" + }, + "scanQr": {"en": "Scan Qr", "ar": "اقراء ال QR"}, + "profile": {"en": "Profile", "ar": "ملفي الشخصي"}, + "gender": {"en": "Gender", "ar": "الجنس"}, + "clinic": {"en": "Clinic", "ar": "العيادة"}, + "hospital": {"en": "Hospital", "ar": "المستشفى"}, + "speciality": {"en": "Speciality", "ar": "التخصص"}, + "errorMessage": {"en": "Something went wrong", "ar": "حدث خطأ ما"}, + "patientProfile": {"en": "Patient Profile", "ar": "ملف المريض"}, + "vitalSign": {"en": "Vital Signs", "ar": "المؤشرات الحيوية"}, + "vital": {"en": "Vital", "ar": "الحيوية"}, + "signs": {"en": "Signs", "ar": "المؤشرات"}, + "labOrder": {"en": "Lab Order", "ar": "نتائج التحاليل"}, + "medicines": {"en": "Medicines", "ar": "الأدوية"}, + "prescription": {"en": "Prescription", "ar": "الوصفات"}, + "insuranceApprovals": {"en": "Insurance Approvals", "ar": "موافقات التأمين"}, + "insurance": {"en": "Insurance", "ar": "التأمين"}, + "approvals": {"en": "Approvals", "ar": "موافقات"}, + "bodyMeasurements": {"en": "Body Measurements", "ar": "قياسات الجسم"}, + "temperature": {"en": "Temperature", "ar": "درجة الحرارة"}, + "pulse": {"en": "Pulse", "ar": "النبض"}, + "respiration": {"en": "Respiration", "ar": "التنفس"}, + "bloodPressure": {"en": "Blood Pressure", "ar": "ضغط الدم"}, + "oxygenation": {"en": "Oxygenation", "ar": "الأوكسجين"}, + "painScale": {"en": "Pain Scale", "ar": "مقياس الألم"}, + "errorNoVitalSign": { + "en": "You don't have any Vital Sign", + "ar": "ليس لديك اي مؤشرات حيوية" + }, + "labOrders": {"en": "Lab Orders", "ar": "طلبات المختبر"}, + "errorNoLabOrders": { + "en": "You don\"t have any lab orders", + "ar": "ليس لديك اي طلبات للمختبر" + }, + "answerThePatient": {"en": "answer the patient", "ar": "الرد على المريض "}, + "pleaseEnterAnswer": {"en": "please enter answer", "ar": "الرجاء ادخال الرد"}, + "replay": {"en": "Reply", "ar": "تاكيد"}, + "progressNote": {"en": "Progress Note", "ar": "ملاحظات التقدم"}, + "progress": {"en": "Progress", "ar": "التقدم"}, + "note": {"en": "Note", "ar": "ملاحظة"}, + "searchNote": {"en": "Search Note", "ar": "بحث عن ملاحظة"}, + "errorNoProgressNote": { + "en": "You don\"t have any Progress Note", + "ar": "ليس لديك اي ملاحظة تقدم" + }, + "invoiceNo:": {"en": "Invoice No :", "ar": "رقم الفاتورة"}, + "generalResult": {"en": "General Result ", "ar": "النتيجة العامة"}, + "description": {"en": "Description", "ar": "الوصف"}, + "value": {"en": "Value", "ar": "القيمة"}, + "range": {"en": "Range", "ar": "النطاق"}, + "enterId": {"en": "User ID", "ar": "معرف المستخدم"}, + "pleaseEnterYourID": { + "en": "Please enter your ID", + "ar": "الرجاء ادخال الهوية" + }, + "enterPassword": {"en": "Password", "ar": "كلمه السر"}, + "pleaseEnterPassword": { + "en": "Please Enter Password", + "ar": "الرجاء ادخال الرقم السري" + }, + "selectYourProject": {"en": "Branch", "ar": "فرع"}, + "pleaseEnterYourProject": { + "en": "Please Enter Your Project", + "ar": "الرجاء ادخال مستشفى" + }, + "login": {"en": "Login", "ar": "تسجيل دخول"}, + "drSulaimanAlHabib": {"en": "Dr Sulaiman Al Habib", "ar": "د.سليمان الحبيب"}, + "welcomeTo": {"en": "Welcome to", "ar": "مرحبا بك"}, + "welcomeBackTo": {"en": "Welcome Back to", "ar": "مرحبًا بعودتك الى "}, + "home": {"en": "Home", "ar": "الرئيسية"}, + "services": {"en": "Services", "ar": "الخدمات"}, + "sms": {"en": "SMS", "ar": "رسالة قصيرة"}, + "fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, + "faceId": {"en": "Face ID", "ar": "معرف الوجه"}, + "whatsAppBy": {"en": "by WhatsApp", "ar": "عن طريق واتس اب"}, + "whatsApp": {"en": "WhatsApp", "ar": "واتس اب"}, + "pleaseChoose": { + "en": "Please choose one of the Following option to verify", + "ar": "يرجى اختيار أحد الخيارات التالية للتحقق" + }, + "choose": {"en": "Choose", "ar": "اختر"}, + "verification": {"en": "Verification", "ar": "طريقة التحقق"}, + "firstStep": { + "en": "As a first step, you need to verify by one of those methods", + "ar": "كخطوة أولى ، تحتاج إلى التحقق بإحدى هذه الطرق" + }, + "yourAccount!": {"en": "Your Account!", "ar": "حسابك!"}, + "verify1": {"en": "Verify", "ar": "ثبت"}, + "youWillReceiveA": {"en": "You will receive a", "ar": "سوف تتلقى "}, + "loginCode": {"en": "Login Code", "ar": "رمز تسجيل دخول"}, + "smsBy": {"en": "By SMS", "ar": "عن طريق رسالة قصيرة"}, + "pleaseEnterTheCode": { + "en": "Please enter the code", + "ar": "الرجاء ادخال الرمز" + }, + "youDontHaveAnyPatient": { + "en": "No data found for the selected search criteria", + "ar": "لا توجد بيانات لمعايير البحث المختارة" + }, + "age": {"en": "Age", "ar": "العمر"}, + "nationality": {"en": "Nationality", "ar": "الجنسية"}, + "today": {"en": "Today", "ar": "اليوم"}, + "yesterday": {"en": "Yesterday", "ar": "الأمس"}, + "tomorrow": {"en": "Tomorrow", "ar": "الغد"}, + "nextWeek": {"en": "Next Week", "ar": "الاسبوع القادم"}, + "all": {"en": "All", "ar": "الجميع"}, + "errorNoInsuranceApprovals": { + "en": "You don\"t have any Insurance Approvals", + "ar": "ليس لديك اي موفقات تأمين" + }, + "searchInsuranceApprovals": { + "en": "Search InsuranceApprovals", + "ar": "بحث عن موافقات التأمين" + }, + "status": {"en": "STATUS", "ar": "الحالة"}, + "expiryDate": {"en": "EXPIRY DATE", "ar": "تاريخ الانتهاء"}, + "producerName": {"en": "PRODUCER NAME", "ar": "اسم المنتج"}, + "receiptOn": {"en": "RECEIPT ON", "ar": "تاريخ الاستلام"}, + "approvalNo": {"en": "Approval No:", "ar": "رقم الموافقة:"}, + "doctor": {"en": "Doctor", "ar": "الدكتور"}, + "ext": {"en": "Ext#", "ar": "رقم التحويلة"}, + "veryUrgent": {"en": "Very Urgent", "ar": "عاجل جدا"}, + "urgent": {"en": "Urgent", "ar": "عاجل"}, + "routine": {"en": "Routine", "ar": "روتيني"}, + "send": {"en": "Send", "ar": "ارسال"}, + "referralFrequency": {"en": "Referral Frequency:", "ar": "تواتر الحالة:"}, + "selectReferralFrequency": { + "en": "Select Referral Frequency:", + "ar": "اختار تواتر الحالة:" + }, + "clinicalDetailsAndRemarks": { + "en": "Clinical Details and Remarks", + "ar": "التفاصيل السرسرية والملاحظات" + }, + "remarks": {"en": "Remarks", "ar": "ملاحظات"}, + "pleaseFill": { + "en": "Please fill all fields..!", + "ar": "الرجاء ملأ جميع الحقول..!" + }, + "replay2": {"en": "Reply", "ar": "رد الطبيب"}, + "logout": {"en": "Logout", "ar": "تسجيل خروج"}, + "pharmaciesList": {"en": "Pharmacies List", "ar": "قائمة الصيدليات"}, + "price": {"en": "Price", "ar": "السعر"}, + "youCanFindItIn": {"en": "You can Find it in", "ar": "تستطيع ان تجده هنا "}, + "radiologyReport": {"en": "Radiology Report", "ar": "تقرير الاشعة"}, + "orders": {"en": "Orders", "ar": "الطلبات"}, + "list": {"en": "List", "ar": "قائمة"}, + "searchOrders": {"en": "Search Orders", "ar": " بحث عن الطلبات"}, + "prescriptionDetails": {"en": "Prescription Details", "ar": "تفاصبل الوصفة"}, + "prescriptionInfo": {"en": "Prescription Info", "ar": "معلومات الوصفة"}, + "errorNoOrders": { + "en": "You don\"t have any Orders", + "ar": "لا يوجد لديك اي طلبات" + }, + "livecare": {"en": "Live Care", "ar": "Live Care"}, + "beingBad": {"en": "being bad", "ar": "سيء"}, + "beingGreat": {"en": "being great", "ar": "رائع"}, + "cancel": {"en": "CANCEL", "ar": "الغاء"}, + "ok": {"en": "OK", "ar": "موافق"}, + "done": {"en": "DONE", "ar": "تأكيد"}, + "resumecall": {"en": "Resume call", "ar": "استئناف المكالمة"}, + "endcallwithcharge": {"en": "End with charge", "ar": "انهاء مع خصم المبلغ"}, + "endcall": {"en": "End Call", "ar": "إنهاء المكالمة"}, + "transfertoadmin": {"en": "Transfer to admin", "ar": "تحويل للمشرف"}, + "searchMedicineImageCaption": { + "en": "Type the medicine name to search", + "ar": " اكتب اسم الدواء للبحث" + }, + "type": {"en": "Type", "ar": "اكتب"}, + "fromDate": {"en": "From Date", "ar": "من تاريخ"}, + "toDate": {"en": "To Date", "ar": "الى تاريخ"}, + "searchPatientImageCaptionTitle": { + "en": "SEARCH PATIENT", + "ar": "البحث عن المريض" + }, + "searchPatientImageCaptionBody": { + "en": "Add Details Of Patient To search", + "ar": " أضف تفاصيل المريض للبحث" + }, + "welcome": {"en": "Welcome", "ar": "أهلا بك"}, + "youDoNotHaveAnyItem": { + "en": "You don\"t have any Items", + "ar": "لا يوجد اي نتائج" + }, + "typeMedicineName": {"en": "Type Medicine Name", "ar": "اكتب اسم الدواء"}, + "moreThan3Letter": { + "en": "Medicine Name Should Be More Than 3 letter", + "ar": "يجب أن يكون اسم الدواء أكثر من 3 أحرف" + }, + "gender2": {"en": "Gender: ", "ar": "الجنس: "}, + "age2": {"en": "Age: ", "ar": "العمر: "}, + "replySuccessfully": {"en": "Reply Successfully", "ar": "تم الرد بنجاح"}, + "sick-leaves": {"en": "Patient Sick Leave", "ar": "الاجازات المرضية"}, + "patient-sick": {"en": "Patient Sick", "ar": "مرضية"}, + "leave": {"en": "Leave", "ar": "مغادره"}, + "submit": {"en": "Submit", "ar": "ارسال"}, + "doc-name": {"en": "Doctor Name", "ar": "اسم الطبيب"}, + "clinicname": {"en": "Clinic Name", "ar": "اسم العيادة"}, + "sick-leave-date": {"en": "Sick leave date ", "ar": "تاريخ الاجازة."}, + "sick-leave-days": {"en": "Leave Days: ", "ar": " :أيام الإجازة"}, + "admissionDetail": {"en": "ADMISSION DETAIL: ", "ar": "تفاصيل القبول: "}, + "dateTime": {"en": "DATE / TIME:", "ar": "التاريخ / الوقت:"}, + "date": {"en": "Date", "ar": "التاريخ"}, + "admissionNo": {"en": "ADMISSION #: ", "ar": "قبول #:"}, + "losNo": {"en": "LOS #:", "ar": "LOS #:"}, + "area": {"en": "AREA:", "ar": "المنطقة"}, + "room": {"en": "ROOM:", "ar": "الغرفة"}, + "bed": {"en": "BED:", "ar": "السرير"}, + "next": {"en": "Next", "ar": "التالي"}, + "previous": {"en": "Previous", "ar": "السابق"}, + "healthRecordInformation": { + "en": "HEALTH RECORD INFORMATION", + "ar": "معلومات السجل الصحي" + }, + "prevoius-sickleave-issed": { + "en": "Total previous sick leave issued by the doctor", + "ar": "مجموع الإجازات المرضية السابقة التي أصدرها الطبيب" + }, + "clinicSelect": {"en": "Select Clinic", "ar": "اختر عيادة"}, + "doctorSelect": {"en": "Select Doctor", "ar": "اختر طبيب"}, + "empty-message": { + "en": "Please enter this field", + "ar": "يرجى ادخال هذا الحقل" + }, + "no-sickleve-applied": { + "en": "No sick leave available, apply Now", + "ar": "لا توجد إجازة مرضية متاحة ، تقدم بطلب الآن" + }, + "no-sickleve": {"en": "No sick leave available", "ar": "لا توجد إجازة مرضية"}, + "applynow": {"en": "Apply Now", "ar": "التقدم بطلب الآن"}, + "add-sickleave": {"en": "Add Sick Leave", "ar": "أضف إجازة مرضية"}, + "add": {"en": "Add", "ar": "أضف"}, + "approved": {"en": "Approved", "ar": "موافق"}, + "extended": {"en": "Extended", "ar": "تمديد"}, + "pending": {"en": "Pending", "ar": "قيد الانتظار"}, + "leave-start-date": {"en": "Leave start date", "ar": "تاريخ بدء المغادرة"}, + "days-sick-leave": {"en": "Leave Days: ", "ar": "أيام الإجازة "}, + "extend": {"en": "Extend", "ar": "تمديد"}, + "extend-sickleave": { + "en": "Extend Sick Leave", + "ar": "قم بتمديد الإجازة المرضية" + }, + "chiefComplaintLength": { + "en": "Chief Complaint length should be greater than 25", + "ar": "يجب أن يكون طول شكوى الرئيسية أكبر من 25" + }, + "patient-target": {"en": "Target Patient", "ar": "المريض المستدف"}, + "no-priscription-listed": { + "en": "No Prescription Listed", + "ar": "لا يوجد وصفة طبية مدرجة" + }, + "referTo": {"en": "Refer To", "ar": "محال إلى"}, + "referredFrom": {"en": "From : ", "ar": " : من"}, + "branch": {"en": "Branch", "ar": "الفرع"}, + "chooseAppointment": {"en": "Choose Appointment", "ar": "اختر موعد"}, + "appointmentNo": {"en": "Appointment # : ", "ar": "# الموعد:"}, + "refer": {"en": "Refer", "ar": "إحالة"}, + "rejected": {"en": "Rejected", "ar": "مرفوض"}, + "sameBranch": {"en": "Same Branch", "ar": "نفس الفرع"}, + "otherBranch": {"en": "Other Branch", "ar": "فرع آخر"}, + "dr": {"en": "DR.", "ar": "د."}, + "previewHealth": {"en": "Health", "ar": "الصحة"}, + "summaryReport": {"en": "Summary", "ar": "ملخص"}, + "accept": {"en": "ACCEPT", "ar": "قبول"}, + "reject": {"en": "REJECT", "ar": "رفض"}, + "noAppointmentsErrorMsg": { + "en": "There is no appointments for at this date", + "ar": "لا توجد مواعيد في هذا التاريخ" + }, + "referralPatient": {"en": "Referral Patient", "ar": "المريض المحال "}, + "noPrescriptionListed": { + "en": "NO PRESCRIPTION LISTED", + "ar": "لأيوجد وصفة طبية" + }, + "addNow": {"en": "ADD Now", "ar": "اضف الآن"}, + "orderType": {"en": "Order Type", "ar": "نوع الطلب"}, + "strength": {"en": "Strength", "ar": "شديد"}, + "doseTime": {"en": "Dose Time", "ar": "وقت الجرعة"}, + "indication": {"en": "Indication", "ar": "دواعي الاستخدام"}, + "duration": {"en": "Duration", "ar": "الفترة"}, + "instruction": {"en": "Instructions", "ar": "إرشادات"}, + "addMedication": {"en": "Add Medication", "ar": "اضف دواء"}, + "route": {"en": "Route", "ar": "طريقة الاستخدام"}, + "reschedule-leave": { + "en": "Reschedule and leaves", + "ar": "إعادة الجدولة والمغادرة" + }, + "no-reschedule-leave": { + "en": "No Reschedule and leaves", + "ar": "لايوجد طلبات اعادة جدولة او مغادرة" + }, + "weight": {"en": "Weight", "ar": "الوزن"}, + "kg": {"en": "kg", "ar": "كغ"}, + "height": {"en": "Height", "ar": "الطول"}, + "cm": {"en": "cm", "ar": "سم"}, + "idealBodyWeight": {"en": "Ideal Body Weight", "ar": "وزن الجسم المثالي"}, + "waistSize": {"en": "Waist Size", "ar": "مقاس الخصر"}, + "inch": {"en": "Inch", "ar": "إنش"}, + "headCircum": {"en": "Head Circum", "ar": "محيط الرأس"}, + "leanBodyWeight": {"en": "Lean Body Weight", "ar": "وزن الجسم هزيل"}, + "bodyMassIndex": {"en": "Body Mass Index", "ar": "مؤشر كتلة الجسم"}, + "yourBodyMassIndex": {"en": "Body Mass Index is", "ar": "مؤشر كتلة الجسم هو"}, + "bmiUnderWeight": {"en": "UnderWeight", "ar": "اقل من الوزن المثالي"}, + "bmiHealthy": {"en": "Healthy", "ar": "صحي"}, + "bmiOverWeight": {"en": "OverWeight", "ar": "اعلى من الوزن المثالي"}, + "bmiObese": {"en": "Obese", "ar": "سمين"}, + "bmiObeseExtreme": {"en": "Extreme Obese", "ar": "سمنة مفرطة"}, + "method": {"en": "Method", "ar": "الطريقة"}, + "pulseBeats": {"en": "Pulse(beats/minute)", "ar": " (دقة/دقيقة)النبض"}, + "rhythm": {"en": "Rhythm", "ar": "الإيقاع"}, + "respBeats": {"en": "RESP (beats/minute)", "ar": " (دقة/دقيقة)التنفس"}, + "patternOfRespiration": {"en": "Pattern Of Respiration", "ar": "نمط التنفس"}, + "bloodPressureDiastoleAndSystole": { + "en": "Blood Pressure (Sys, Dias)", + "ar": "ضغط الدم (الانقباض, الإنبساط)" + }, + "cuffLocation": {"en": "Cuff Location", "ar": "موقع الكف"}, + "cuffSize": {"en": "Cuff Size", "ar": "حجم الكف"}, + "patientPosition": {"en": "Patient Position", "ar": "موقع المريض"}, + "fio2": {"en": "FIO2(%)", "ar": "FIO2(%)"}, + "sao2": {"en": "SAO2(%)", "ar": "SAO2(%)"}, + "painManagement": {"en": "Pain Management", "ar": "إدارة الألم"}, + "holiday": {"en": "Holiday", "ar": "عطلة"}, + "to": {"en": "To", "ar": "إلى"}, + "coveringDoctor": {"en": "Covering Doctor: ", "ar": " :تغطية دكتور"}, + "requestLeave": {"en": "Request Leave", "ar": "طلب إجازة"}, + "pleaseEnterDate": { + "en": "Please enter leave start date", + "ar": "الرجاء إدخال تاريخ بدء الإجازة" + }, + "pleaseEnterNoOfDays": { + "en": "Please enter sick leave days", + "ar": "الرجاء إدخال أيام الإجازة المرضية" + }, + "pleaseEnterRemarks": { + "en": "Please enter remarks", + "ar": "الرجاء إدخال الملاحظات" + }, + "update": {"en": "Update", "ar": "تحديث"}, + "admission": {"en": "Admission", "ar": "تنويم"}, + "request": {"en": "Request", "ar": "طلب"}, + "admissionRequest": {"en": "Admission Request", "ar": "طلب تنويم"}, + "patientDetails": {"en": "Patient Details", "ar": "تفاصيل المريض"}, + "specialityAndDoctorDetail": { + "en": "SPECIALITY AND DOCTOR DETAILS", + "ar": "تفاصيل التخصص والطبيب" + }, + "referringDate": {"en": "Referring Date", "ar": "تاريخ الإحالة"}, + "referringDoctor": {"en": "Referring Doctor", "ar": "دكتور الإحالة"}, + "otherInformation": {"en": "Other Information", "ar": "معلومات أخرى"}, + "expectedDays": {"en": "Expected Days", "ar": "الأيام المتوقعة"}, + "expectedAdmissionDate": { + "en": "Expected Admission Date", + "ar": "تاريخ التنويم المتوقع" + }, + "admissionDate": {"en": "Admission Date", "ar": "تاريخ التنويم"}, + "isSickLeaveRequired": { + "en": "Is Sick Leave Required", + "ar": "هل الإجازة المرضية مطلوبة" + }, + "patientPregnant": {"en": "Patient Pregnant", "ar": "المريض حامل"}, + "treatmentLine": { + "en": "Main line of treatment", + "ar": "الخط الرئيسي للعلاج" + }, + "ward": {"en": "Ward", "ar": "جناح"}, + "preAnesthesiaReferred": { + "en": "PRE ANESTHESIA REFERRED", + "ar": "الاحالة قبل التخدير" + }, + "admissionType": {"en": "Admission Type", "ar": "نوع التنويم"}, + "diagnosis": {"en": "Diagnosis", "ar": "التشخيص"}, + "allergies": {"en": "Allergies", "ar": "الحساسية"}, + "preOperativeOrders": { + "en": "Pre Operative Orders", + "ar": "أوامر ما قبل العملية" + }, + "elementForImprovement": { + "en": "Element For Improvement", + "ar": "عنصر للتحسين" + }, + "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ الخروج"}, + "dietType": {"en": "Diet Type", "ar": "نوع النظام الغذائي"}, + "dietTypeRemarks": { + "en": "Remarks on diet type", + "ar": "ملاحظات على نوع النظام الغذائي" + }, + "save": {"en": "SAVE", "ar": "حفظ"}, + "postPlansEstimatedCost": { + "en": "POST PLANS & ESTIMATED COST", + "ar": "خطط ما بعد العملية والتكلفة المقدرة" + }, + "postPlans": {"en": "POST PLANS", "ar": "ما بعد العملية"}, + "ucaf": {"en": "UCAF", "ar": "UCAF"}, + "emergencyCase": {"en": "Emergency Case", "ar": "حالة طارئة"}, + "durationOfIllness": {"en": "duration Of Illness", "ar": "مدة المرض"}, + "chiefComplaintsAndSymptoms": { + "en": "CHIEF COMPLAINTS", + "ar": "الشكوى الرئيسية" + }, + "patientFeelsPainInHisBackAndCough": { + "en": "Patient Feels pain in his back and cough", + "ar": "يشعر المريض بألم في ظهره ويسعل" + }, + "additionalTextComplaints": { + "en": "Additional text to add about Complaints", + "ar": "ملاحظات اخرى لإضافتها حول الشكوى" + }, + "otherConditions": {"en": "OTHER CONDITIONS", "ar": "شروط أخرى"}, + "other": {"en": "Other", "ar": "أخرى"}, + "how": {"en": "How", "ar": "كيف"}, + "when": {"en": "When", "ar": "متى"}, + "where": {"en": "Where", "ar": "أين"}, + "specifyPossibleLineManagement": { + "en": "Specify possible line of management", + "ar": "حدد خط الإدارة المحتمل" + }, + "significantSigns": {"en": "SIGNIFICANT SIGNS", "ar": "علامات مهمة"}, + "backAbdomen": {"en": "Back : Abdomen", "ar": "الظهر: البطن"}, + "reasons": {"en": "Reasons", "ar": "الأسباب"}, + "createNew": {"en": "Create", "ar": "انشاء "}, + "episode": {"en": "Episode", "ar": "الحدث"}, + "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكاوى"}, + "addChiefComplaints": {"en": "Add Chief Complaints", "ar": " اضافه الشكاوى"}, + "histories": {"en": "Histories", "ar": "التاريخ المرضي"}, + "allergiesSoap": {"en": "Allergies", "ar": "الحساسية"}, + "historyOfPresentIllness": { + "en": "History of Present Illness", + "ar": "تاريخ المرض الحالي" + }, + "requiredMsg": { + "en": "Please add required field correctly", + "ar": "الرجاء إضافة الحقل المطلوب بشكل صحيح" + }, + "addHistory": {"en": "Add History", "ar": "اضافه تاريخ مرضي"}, + "searchHistory": {"en": "Search History", "ar": " البحث"}, + "addSelectedHistories": { + "en": "Add Selected Histories", + "ar": " اضافه تاريخ مرضي" + }, + "addAllergies": {"en": "Add Allergies", "ar": "أضف الحساسية"}, + "itemExist": {"en": "This item already exist", "ar": "هذا العنصر موجود"}, + "selectAllergy": {"en": "Select Allergy", "ar": "أختر الحساسية"}, + "selectSeverity": {"en": "Select Severity", "ar": "حدد الخطورة"}, + "leaveCreated": {"en": "Leave has been created", "ar": "تم إنشاء الإجازة"}, + "medications": {"en": "Medications", "ar": "الأدوية"}, + "medication": {"en": "Medication", "ar": "الدواء"}, + "createdByName": {"en": "Created By Name", "ar": "الدواء"}, + "statusDescription": {"en": "Status Description", "ar": "وصف الحالة"}, + "doctorComments": {"en": "Doctor Comments", "ar": "تعليقات الطبيب"}, + "procedures": {"en": "Procedures", "ar": "الإجراءات"}, + "vitalSignEmptyMsg": { + "en": "There is no vital signs for this patient", + "ar": "لا توجد علامات حيوية لهذا المريض" + }, + "referralEmptyMsg": { + "en": "There is no referral data", + "ar": "لا توجد بيانات إحالة" + }, + "referralSuccessMsg": { + "en": "You make referral successfully", + "ar": "تمت الاحالة بنجاح" + }, + "fromTime": {"en": "From Time", "ar": "من وقت"}, + "toTime": {"en": "To Time", "ar": "الى وقت"}, + "diagnoseType": {"en": "Diagnose Type", "ar": "نوع التشخيص"}, + "condition": {"en": "Condition", "ar": "الحالة"}, + "id": {"en": "ID", "ar": "بطاقة هوية"}, + "quantity": {"en": "Quantity", "ar": "الكمية"}, + "durDays": {"en": "Dur.(days)", "ar": "الفترة(أيام)"}, + "codeNo": {"en": "Code #", "ar": "# الرمز"}, + "covered": {"en": "Covered", "ar": "مغطى"}, + "approvalRequired": {"en": "Approval Required", "ar": "الموافقة مطلوبة"}, + "uncoveredByDoctor": { + "en": "Uncovered By Doctor", + "ar": "غير مغطى من قبل الدكتور" + }, + "chiefComplaintEmptyMsg": { + "en": "There is no Chief Complaint", + "ar": "ليس هناك شكوى رئيسية" + }, + "more-verify": { + "en": "More Verification Options", + "ar": "المزيد من خيارات التحقق" + }, + "welcome-back": {"en": "Welcome back!", "ar": "مرحبا بك!"}, + "account-info": { + "en": "Would you like to login with current username?", + "ar": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟" + }, + "another-acc": {"en": "Use Another Account", "ar": "استخدم حساب آخر"}, + "verify-login-with": { + "en": "Please choose one of the following options to verify", + "ar": "الرجاء اختيار احدى الخيارات التالية لعملية التحقق" + }, + "register-user": {"en": "Register", "ar": "تسجيل"}, + "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة الاصبع"}, + "verify-with-faceid": {"en": "Face ID", "ar": "بصمة الوجه"}, + "verify-with-sms": {"en": " SMS", "ar": "الرسائل القصيرة"}, + "verify-with-whatsapp": {"en": "WhatsApp", "ar": " الواتس اب"}, + "verify-with": {"en": "Verify through ", "ar": " الواتس اب"}, + "last-login": { + "en": "Last login details:", + "ar": "تفاصيل تسجيل الدخول الأخير:" + }, + "last-login-with": {"en": "VERIFICATION TYPE:", "ar": "نوع التحقق:"}, + "verify-fingerprint": { + "en": + "To activate the fingerprint login service, please verify data by using one of the following options.", + "ar": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية" + }, + "verification_message": { + "en": "Please enter the Verification Code sent to", + "ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى" + }, + "validation_message": { + "en": "The verification code expires in", + "ar": "تنتهي صلاحية رمز التحقق خلال" + }, + "addAssessment": {"en": "Add Assessment", "ar": "أضف التقييم"}, + "assessment": {"en": "Assessment", "ar": " التقييم"}, + "physicalSystemExamination": { + "en": "Physical System / Examination", + "ar": "الفحص البدني / النظام" + }, + "searchExamination": {"en": "Search Examination", "ar": "بحث عن فحص"}, + "addExamination": {"en": "Add Examination", "ar": "اضافة فحص"}, + "doc": {"en": "Doc : ", "ar": " د : "}, + "patientNoDetailErrMsg": { + "en": "There is no detail for this patient", + "ar": "لا توجد تفاصيل لهذا المريض" + }, + "allergicTO": {"en": "ALLERGIC TO ", "ar": "حساس من"}, + "normal": {"en": "Normal", "ar": "عادي"}, + "abnormal": {"en": "Abnormal", "ar": " غير عادي"}, + "notExamined": {"en": "Not Examined", "ar": "لم يتم الفحص"}, + "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, + "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, + "mass": {"en": "Mass", "ar": "كتلة"}, + "temp-c": {"en": "°C", "ar": "°س"}, + "bpm": {"en": "bpm", "ar": "نبضة"}, + "respiration-signs": {"en": "Respiration", "ar": "تنفس"}, + "sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"}, + "body": {"en": "Body \n Mass", "ar": "كتلة\nالجسم"}, + "respirationRate": {"en": "Respiration Rate", "ar": "معدل التنفس"}, + "heart": {"en": "Heart rate", "ar": "معدل ضربات القلب"}, + "medicalReport": {"en": "medical Report", "ar": "تقرير طبي"}, + "visitDate": {"en": "Visit Date", "ar": "تاريخ الزيارة"}, + "test": {"en": "Procedures/Test", "ar": "اجراءات/تحاليل"}, + "regular": {"en": "Regular", "ar": "اعتيادي"}, + "addMoreProcedure": { + "en": "Add More Procedures", + "ar": "اضف المزيد من اجراءات" + }, + "searchProcedures": {"en": "Search Procedures", "ar": "البحث في اجراءات"}, + "selectProcedures": {"en": "Select procedure", "ar": "اختر الاجراء"}, + "procedureCategorise": { + "en": "Select Procedure Category", + "ar": "اختر نوع الاجراء " + }, + "addSelectedProcedures": { + "en": "add Selected Procedures", + "ar": "اضافة الاجراءات المختارة " + }, + "addProcedures": {"en": "Add Procedure", "ar": "اضافة اجراء"}, + "updateProcedure": {"en": "Update Procedure", "ar": "تحديث الاجراء"}, + "orderProcedure": {"en": "order procedure", "ar": "طلب اجراء"}, + "nameOrICD": {"en": "Name or ICD", "ar": "Name or ICD"}, + "dType": {"en": "Type", "ar": "النوع"}, + "addAssessmentDetails": { + "en": "Add Assessment Details", + "ar": "أضف تفاصيل التقييم" + }, + "progressNoteSOAP": {"en": "Progress Note", "ar": "ملاحظة التقدم"}, + "addProgressNote": {"en": "Add Progress Note", "ar": "أضف ملاحظة التقدم"}, + "createdBy": {"en": "Created By :", "ar": "أضيفت عن طريق: "}, + "riskScore": {"en": "Risk Score :", "ar": "درجة المخاطر"}, + "editedBy": {"en": "Edited By :", "ar": "عدلت من : "}, + "currentMedications": {"en": "Current Medications", "ar": "الأدوية الحالية"}, + "noItem": { + "en": "sorry, there is no items exists in this list", + "ar": "آسف ، لا توجد عناصر موجودة في هذه القائمة" + }, + "postUcafSuccessMsg": { + "en": "UCAF request send successfully", + "ar": "تم ارسال طلب UCAF بنجاح" + }, + "vitalSignDetailEmpty": { + "en": "There is no data for this vital sign", + "ar": "لا توجد بيانات لهذه العلامة الحيوية" + }, + "onlyOfftimeHoliday": { + "en": "You can only apply holiday or offtime from mobile app", + "ar": "يمكنك تقديم عطلة أو إجازة فقط" + }, + "active": {"en": "Active", "ar": "نشيط"}, + "hold": {"en": "Hold", "ar": "معلق"}, + "loading": {"en": "Loading...", "ar": "جار التحميل..."}, + "assessmentErrorMsg": { + "en": "You have to add at least one assessment.", + "ar": "يجب عليك إضافة تقييم واحد على الأقل." + }, + "examinationErrorMsg": { + "en": "You have to add at least one examination.", + "ar": "يجب عليك إضافة فحص واحد على الأقل." + }, + "progressNoteErrorMsg": { + "en": "You have to add progress Note.", + "ar": "يجب عليك إضافة ملاحظة التقدم." + }, + "chiefComplaintErrorMsg": { + "en": "You have to add chief complaint fields correctly .", + "ar": "يجب عليك إضافة الشكوى الرئيسية بشكل صحيح" + }, + "referralStatus": {"en": "Referral Status : ", "ar": "حالة الإحالة :"}, + "referralRemark": {"en": "Referral Remark : ", "ar": "ملاحظة الإحالة :"}, + "ICDName": {"en": "ICDName", "ar": "اسم ال ICD"}, + "offTime": {"en": "OffTime", "ar": "خارج الوقت"}, + "patient-name": {"en": "Patient Name", "ar": "اسم المريص"}, + "icd": {"en": "ICD", "ar": "التصنيف الدولي للأمراض"}, + "days": {"en": "Days", "ar": "أيام"}, + "months": {"en": "Months", "ar": "أشهر"}, + "years": {"en": "Years", "ar": "سنة"}, + "hr": {"en": "Hr", "ar": "س"}, + "min": {"en": "Min", "ar": "د"}, + "appointmentNumber": {"en": "Appointment Number", "ar": "رقم الموعد"}, + "referralStatusHold": {"en": "Hold", "ar": "معلق"}, + "referralStatusActive": {"en": "Active", "ar": "نشط"}, + "referralStatusCancelled": {"en": "Cancelled", "ar": "ملغي"}, + "referralStatusCompleted": {"en": "Completed", "ar": "مكتمل"}, + "referralStatusNotSeen": {"en": "NotSeen", "ar": "لم يحضر"}, + "clinicSearch": {"en": "Search Clinic", "ar": "بحث عن عيادة"}, + "doctorSearch": {"en": "Search Doctor", "ar": "بحث عن طبيب"}, + "referralResponse": { + "en": "Referral Response : ", + "ar": " : استجابة الإحالة" + }, + "estimatedCost": {"en": "Estimated Cost", "ar": "التكلفة المتوقعة"}, + "diagnosisDetail": {"en": "Diagnosis Details", "ar": "تفاصيل التشخيص"}, + "referralSuccessMsgAccept": { + "en": "Referral Accepted Successfully", + "ar": "تم قبول الإحالة بنجاح" + }, + "referralSuccessMsgReject": { + "en": "Referral Rejected Successfully", + "ar": "تم رفض الإحالة بنجاح" + }, + "sickLeaveComments": { + "en": "Sick leave comments", + "ar": "ملاحظات الإجازة المرضية" + }, + "pastMedicalHistory": {"en": "Past medical history", "ar": "التاريخ الطبي"}, + "pastSurgicalHistory": { + "en": "Past surgical history", + "ar": "التاريخ الجراحي" + }, + "complications": {"en": "Complications", "ar": "المضاعفات"}, + "floor": {"en": "Floor", "ar": "الطابق"}, + "roomCategory": {"en": "Room category", "ar": "فئة الغرفة"}, + "otherDepartmentsInterventions": { + "en": "Other departments interventions", + "ar": "ملاحظات الأقسام الأخرى" + }, + "otherProcedure": {"en": "Other procedure", "ar": "إجراء آخر"}, + "admissionRequestSuccessMsg": { + "en": "Admission Request Created Successfully", + "ar": "تم إنشاء طلب التنويم بنجاح" + }, + "orderNo": {"en": "Order No : ", "ar": "رقم الطلب"}, + "infoStatus": {"en": "Info Status", "ar": "حالة المعلومات"}, + "doctorResponse": {"en": "Doctor Response", "ar": "استجابة الطبيب"}, + "sickleaveonhold": { + "en": "A Sick leave is on Hold status for this patient", + "ar": "الإجازة المرضية في حالة الانتظار لهذا المريض" + }, + "no-clinic": {"en": "No Clinic", "ar": "لايوجد عيادة"}, + "otherStatistic": {"en": "Other Statistics", "ar": "إحصائيات أخرى"}, + "ptientsreferral": {"en": "Patients Referrals", "ar": "إحالات المريض"}, + "myPatientsReferral": {"en": "Patient's\nReferrals", "ar": "إحالات\nالمريض"}, + "arrivalpatient": {"en": "Arrival Patients", "ar": "المرضى الواصلون"}, + "searchmedicinepatient": { + "en": "Search patient or Medicines", + "ar": "ابحث عن المريض أو الأدوية" + }, + "appointmentDate": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, + "arrived_p": {"en": "Arrived", "ar": "وصل"}, + "details": {"en": "Details", "ar": "التفاصيل"}, + "liveCare": {"en": "LiveCare", "ar": "لايف كير"}, + "out-patient": {"en": "OutPatient", "ar": "عيادات خارجية"}, + "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, + "labResults": {"en": "Lab Result", "ar": "نتيجة المختبر"}, + "sendSuc": { + "en": "A copy has been sent to the email", + "ar": "تم إرسال نسخة إلى البريد الإلكتروني" + }, + "SpecialResult": {"en": "Special Result", "ar": "نتيجة خاصة"}, + "noDataAvailable": { + "en": "Sorry, no data is available", + "ar": " لا يوجد بيانات متاحة " + }, + "show-more-btn": {"en": "Flowchart", "ar": "النتائج التراكمية"}, + "open-rad": {"en": "Open Radiology Image", "ar": "فتح صور الاشعة"}, + "fileNumber": {"en": "File Number: ", "ar": "رقم الملف : "}, + "searchPatient-name": { + "en": "Search Name, Medical File, Phone Number", + "ar": "اسم البحث ، الملف الطبي ، رقم الهاتف" + }, + "reschedule": {"en": "Reschedule", "ar": "إعادة جدولة"}, + "leaves": {"en": "Leaves", "ar": "يغادر"}, + "totalApproval": { + "en": "Total approval unused", + "ar": "اجمالي الموافقات الغير مستخدمة" + }, + "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, + "unusedCount": {"en": "Unused Count: ", "ar": "غير مستخدم: "}, + "companyName": {"en": "Company Name ", "ar": "اسم الشركة: "}, + "procedureName": {"en": "Procedure Name", "ar": "اسم الاجراء"}, + "usageStatus": {"en": "Usage Status", "ar": "حالة الاستخدام"}, + "prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, + "notes": {"en": "Notes", "ar": "ملاحظات"}, + "dailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, + "searchWithOther": { + "en": "Search With Other Criteria", + "ar": "المزيد من خيارات البحث" + }, + "hideOtherCriteria": { + "en": "Hide Other Criteria", + "ar": "إخفاء الخيارات الأخرى" + }, + "applyForReschedule": { + "en": "Apply for leave or reschedule", + "ar": "تقدم بطلب للحصول على إجازة أو إعادة جدولة" + }, + "startDate": {"en": "Start Date: ", "ar": " :تاريخ البدء"}, + "endDate": {"en": "End Date: ", "ar": " :تاريخ الانتهاء"}, + "add-reschedule": {"en": "Add reschedule", "ar": "أضف إعادة الجدولة"}, + "update-reschedule": {"en": "Update reschedule", "ar": "تحديث إعادة الجدولة"}, + "sick_leave": {"en": "Sick Leave", "ar": "إجازة مرضية"}, + "addSickLeaveRequest": { + "en": "Add Sick Leave Request", + "ar": "إضافة طلب إجازة مرضية" + }, + "extendSickLeaveRequest": { + "en": "Extend Sick Leave Request", + "ar": "تمديد طلب الإجازة المرضية" + }, + "accepted": {"en": "Accepted", "ar": "موافق"}, + "cancelled": {"en": "Cancelled", "ar": "ألغي"}, + "unReplied": {"en": "UnReplied", "ar": "لم يتم الرد"}, + "searchHere": {"en": "Search here", "ar": "إبحث هنا"}, + "replied": {"en": "Replied", "ar": " تم الرد"}, + "typeHereToReply": {"en": "Type here to reply", "ar": "اكتب هنا للرد"}, + "remove": {"en": "Remove", "ar": "حذف"}, + "changeOfSchedule": {"en": "Change of Schedule", "ar": "تغيير الجدول"}, + "newSchedule": {"en": "New Schedule", "ar": "جدول جديد"}, + "enter_credentials": { + "en": "Enter the user credentials below", + "ar": "أدخل بيانات المستخدم أدناه" + }, + "step": {"en": "Step", "ar": "خطوة"}, + "fieldRequired": {"en": "This field is required", "ar": "هذه الخانة مطلوبه"}, + "applyOrRescheduleLeave": { + "en": "Apply Reschedule Leave", + "ar": "التقدم بطلب أو إعادة جدولة الإجازة" + }, + "myQRCode": {"en": "My QR Code", "ar": " كود QR "}, + "patientIDMobilenational": { + "en": "Patient ID, National ID, Mobile Number", + "ar": "هوية المريض ، الهوية الوطنية ، رقم الهاتف المحمول" + }, + "updateNow": {"en": "Update Now", "ar": "تحديث الان"}, + "updateTheApp": {"en": "Update The App", "ar": "تحديث التطبيق"}, + "admission-date": {"en": "Admission Date", "ar": "تاريخ التنويم"}, + "noOfDays": {"en": "No of days", "ar": "عدد الأيام"}, + "numOfDays": {"en": "Number of Days", "ar": "عدد الأيام"}, + "replayBefore": {"en": "Replay Before", "ar": "رد قبل"}, + "try-saying": {"en": "Try saying something", "ar": "حاول قول شيء ما"}, + "refClinic": {"en": "Ref Clinic", "ar": "العيادة المرجعية"}, + "acknowledged": {"en": "Acknowledged", "ar": "إقرار"}, + "didntCatch": { + "en": "Didn't catch that. Try Speaking again", + "ar": "لم يتم التقاط ذلك. حاول التحدث مرة أخرى" + }, + "showDetail": {"en": "Show Detail", "ar": "أظهر المعلومات"}, + "viewProfile": {"en": "View Profile", "ar": "إعرض الملف"}, + "pleaseEnterProcedure": { + "en": "Please Enter Procedure", + "ar": "الرجاء إدخال الإجراء " + }, + "fillTheMandatoryProcedureDetails": { + "en": "Fill The Mandatory Procedure Details", + "ar": "املأ تفاصيل الإجراء" + }, + "atLeastThreeCharacters": { + "en": "At least three Characters", + "ar": "ثلاثة أحرف على الأقل " + }, + "searchProcedureHere": { + "en": "Search Procedure here...", + "ar": "إجراء البحث هنا ... " + }, + "noInsuranceApprovalFound": { + "en": "No Insurance Approval Found", + "ar": "لم يتم العثور على موافقة التأمين" + }, + "procedure": {"en": "Procedure", "ar": "اجراء"}, + "stopDate": {"en": "Stop Date", "ar": "تاريخ التوقف"}, + "processed": {"en": "processed", "ar": "معالجتها"}, + "direction": {"en": "Direction", "ar": "توجيه"}, + "refill": {"en": "Refill", "ar": "اعادة تعبئه"}, + "medicationHasBeenAdded": { + "en": "Medication has been added", + "ar": "تمت إضافة الدواء" + }, + "newPrescriptionOrder": { + "en": "New Prescription Order", + "ar": "طلب وصفة طبية جديد " + }, + "pleaseFillAllFields": { + "en": "Please Fill All Fields", + "ar": "الرجاء أملأ جميع الحقول" + }, + "narcoticMedicineCanOnlyBePrescribedFromVida": { + "en": "Narcotic medicine can only be prescribed from VIDA", + "ar": "لا يمكن وصف الأدوية المخدرة إلا من VIDA " + }, + "only5DigitsAllowedForStrength": { + "en": "Only 5 Digits allowed for strength", + "ar": "يسمح فقط بـ 5 أرقام للقوة" + }, + "unit": {"en": "Unit", "ar": "وحدة"}, + "boxQuantity": {"en": "Box Quantity", "ar": "كمية العبوة "}, + "orderTestOr": {"en": "Order Test or", "ar": "اطلب اختبار أو"}, + "applyForRadiologyOrder": { + "en": "Apply for Radiology Order", + "ar": "التقدم بطلب للحصول على طلب الأشعة " + }, + "applyForNewLabOrder": { + "en": "Apply for New Lab Order", + "ar": "تقدم بطلب جديد للمختبر الأشعة" + }, + "addLabOrder": {"en": "Add Lab Order", "ar": "إضافة طلب مختبر"}, + "addRadiologyOrder": {"en": "Add Radiology Order", "ar": "إضافة اشعة"}, + "newRadiologyOrder": {"en": "New Radiology Order", "ar": "طلب أشعة جديد"}, + "orderDate": {"en": "Order Date", "ar": "تاريخ الطلب"}, + "examType": {"en": "Exam Type", "ar": "نوع الفحص"}, + "health": {"en": "Health", "ar": "صحي"}, + "summary": {"en": "Summary", "ar": "التقرير"}, + "applyForNewPrescriptionsOrder": { + "en": "Apply for New Prescriptions Order", + "ar": "التقدم بطلب للحصول على وصفات طبية جديدة " + }, + "noPrescriptionsFound": { + "en": "No Prescriptions Found", + "ar": "لم يتم العثور على وصفات طبية" + }, + "noMedicalFileFound": { + "en": "No Medical File Found", + "ar": "لم يتم العثور على ملف طبي" + }, + "insurance22": {"en": "Insurance", "ar": "موافقات"}, + "approvals22": {"en": "Approvals", "ar": "التامين"}, + "severe": {"en": "Severe", "ar": "الشدة"}, + "graphDetails": {"en": "Graph Details", "ar": "تفاصيل الرسم البياني"}, + "addNewOrderSheet": {"en": "Add a New Order Sheet", "ar": "أضف طلب جديد"}, + "addNewProgressNote": { + "en": "Add a New Progress Note", + "ar": "أضف ملاحظة جديدة" + }, + "notePending": {"en": "Pending", "ar": "قيد الانتظار"}, + "noteCanceled": {"en": "Canceled", "ar": "ألغي"}, + "noteVerified": {"en": "Verified", "ar": "تم التحقق"}, + "noteVerify": {"en": "Verify", "ar": "تحقق"}, + "noteConfirm": {"en": "Confirm", "ar": "تاكيد"}, + "noteAdd": {"en": "Add ", "ar": "اضف "}, + "noteUpdate": {"en": "Update ", "ar": "تحديث"}, + "orderSheet": {"en": "Order Sheet", "ar": "ورقة الطلب"}, + "order": {"en": "Order", "ar": "الطلب"}, + "sheet": {"en": "Sheet", "ar": "ورقة"}, + "medical": {"en": "Medical", "ar": "الطبي"}, + "report": {"en": "Report", "ar": "التقرير"}, + "discharge": {"en": "Discharge", "ar": "مغادرة"}, + "discharged": {"en": "Discharged", "ar": "المغادرين"}, + "none": {"en": "None", "ar": "لا شيء"}, + "notRepliedYet": {"en": "Not Replied yet", "ar": "لم يتم الرد بعد"}, + "clearText": {"en": "Clear Text", "ar": "نص واضح"}, + "medicalReportAdd": {"en": "Add Medical Report", "ar": "إضافة تقرير طبي"}, + "medicalReportVerify": { + "en": "Verify Medical Report", + "ar": "تحقق من التقرير الطبي" + }, + "comments": {"en": "Comments", "ar": "ملاحظات"}, + "initiateCall": {"en": "Initiate Call ", "ar": "بدء الاتصال"}, + "transferTo": {"en": "Transfer To ", "ar": "حول إلى"}, + "admin": {"en": "Admin", "ar": "مشرف"}, + "instructions": {"en": "Instructions", "ar": "تعليمات"}, + "sendLC": {"en": "Send", "ar": "تعليمات"}, + "endLC": {"en": "End", "ar": "انهاء"}, + "consultation": {"en": "Consultation", "ar": "استشارة"}, + "resume": {"en": "Resume", "ar": "استأنف"}, + "theCall": {"en": "The Call", "ar": "الاتصال"}, + "createNewMedicalReport": { + "en": "Create New Medical Report", + "ar": "إنشاء تقرير طبي جديد" + }, + "historyPhysicalFinding": { + "en": "History and Physical Finding", + "ar": "التاريخ" + }, + "laboratoryPhysicalData": { + "en": "Laboratory and Physical Data", + "ar": "المختبرات والبيانات الفيزيائية" + }, + "impressionRecommendation": { + "en": "Impression and Recommendation", + "ar": "الانطباع والتوصية" + }, + "onHold": {"en": "On Hold", "ar": "قيد الانتظار"}, + "verified": {"en": "Verified", "ar": "تم التحقق"}, + "endCall": {"en": "End Call", "ar": "انهاء"}, + "favoriteTemplates": {"en": "Favorite Templates", "ar": "القوالب المفضلة"}, + "allProcedures": {"en": "All Procedures", "ar": "جميع الإجراءات"}, + "allRadiology": {"en": "All Radiology", "ar": "جميع الأشعة"}, + "allLab": {"en": "All Lab", "ar": "جميع المختبرات"}, + "allPrescription": {"en": "All Prescription", "ar": "جميع الوصفات"}, + "addPrescription": {"en": "Add prescription", "ar": "إضافة الوصفات"}, + "edit": {"en": "Edit", "ar": "تعديل"}, + "summeryReply": {"en": "Summary Reply", "ar": "ملخص الرد"}, + "finish": {"en": "Finish", "ar": "انهاء"}, + "severityValidationError": { + "en": "Please add allergy severity", + "ar": "الرجاء إضافة شدة الحساسية" + }, + "inProgress": {"en": "inProgress", "ar": "تحت المعالجه"}, + "Completed": {"en": "Completed", "ar": "مكتمل"}, + "Locked": {"en": "Locked", "ar": "مقفل"}, + "textCopiedSuccessfully": { + "en": "Text copied successfully", + "ar": "تم نسخ النص بنجاح" + }, + "roomNo": {"en": "Room No", "ar": "رقم الغرفة"}, + "replayCallStatus": {"en": "Called", "ar": "تم الاتصال"}, + "patientArrived": {"en": "Patient Arrived", "ar": "وصل المريض"}, + "calledAndNoResponse": { + "en": "Called And No Response", + "ar": "تم الاتصال ولا يوجد رد" + }, + "underProcess": {"en": "Under Process", "ar": "تحت التجهيز"}, + "textResponse": {"en": "Text Response", "ar": "استجابة النص"}, + "notReplied": {"en": "Not Replied", "ar": "لم يتم يرد"}, + "requestType": {"en": "Request Type", "ar": "نوع الطلب"}, + "special": {"en": "Special", "ar": "خاص"}, + "allClinic": {"en": "All Clinics", "ar": "جميع العيادات"}, + "operationReports": {"en": "Operation Reports", "ar": "تقارير العملية"}, + "reports": {"en": "Reports", "ar": "تقارير "}, + "operation": {"en": "Operation", "ar": " العملية"}, + "registerNewPatient": { + "en": "Register\nNew Patient", + "ar": "تسجيل\n مريض جديد" + }, + "registeraPatient": {"en": "Register a Patient", "ar": "تسجيل المريض"}, + "occupation": {"en": "Occupation", "ar": "مهنة"}, + "healthID": {"en": "Health ID", "ar": "معرف الصحة"}, + "identityNumber": {"en": "Identity Number", "ar": "رقم الهوية"}, + "maritalStatus": {"en": "Marital Status", "ar": "الحالة الزوجية"}, + "nursing": {"en": "Nursing", "ar": "تمريض"}, + "diabetic": {"en": "Diabetic", "ar": "مرض السكري"}, + "pharmacy": {"en": "Pharmacy", "ar": "الصيدلاني"}, + "intervention": {"en": "Intervention", "ar": "التدخل"}, + "chart": {"en": "Chart", "ar": "جدول"}, + "operationTimeStart": { + "en": "Operation Time Start :", + "ar": "بدء وقت العملية:" + }, + "operationDate": {"en": "operation Date :", "ar": "تاريخ العملية:"}, + "reservation": {"en": "Reservation Number :", "ar": " رقم الحجز :"}, + "anesthetist": {"en": "Anesthetist", "ar": "طبيب تخدير "}, + "bloodTransfusedDetail": { + "en": "blood Transfused Detail", + "ar": "تفاصيل نقل الدم " + }, + "circulatingNurse": {"en": "circulating Nurse", "ar": "ممرضة عمومية"}, + "scrubNurse": {"en": "Scrub Nurse", "ar": "ممرضة تدليك"}, + "otherSpecimen": {"en": "Other Specimen", "ar": "عينة أخرى"}, + "microbiologySpecimen": { + "en": "Microbiology Specimen", + "ar": "عينة علم الأحياء الدقيقة" + }, + "histopathSpecimen": {"en": "Histopath Specimen", "ar": "عينة الأنسجة"}, + "bloodLossDetail": {"en": "Blood Loss Detail", "ar": "تفاصيل فقدان الدم"}, + "complicationDetails1": { + "en": "Complication Details", + "ar": "تفاصيل المضاعفات" + }, + "postOperationInstruction": { + "en": "Post Operation Instruction", + "ar": "تعليمات ما بعد العملية" + }, + "surgeryProcedure": {"en": "Surgery Procedures", "ar": "إجراءات الجراحة"}, + "finding": {"en": "Finding", "ar": "العثور على"}, + "preOperationDiagnosis": { + "en": "Pre OperationOperation Diagnosis", + "ar": "التشخيص قبل العملية" + }, + "postOperationDiagnosis": { + "en": "Post Operation Diagnosis", + "ar": "تشخيص ما بعد العملية" + }, + "surgeon": {"en": "surgeon", "ar": "دكتور جراح"}, + "assistant": {"en": "assistant", "ar": "مساعد"}, + "askForIdentification": { + "en": "Please enter a mobile number or Identification number", + "ar": "الرجاء إدخال رقم الهاتف المحمول أو رقم التعريف" + }, + "iDNumber": {"en": "ID Number", "ar": "رقم معرف"}, + "calender": {"en": "Calender", "ar": "التقويم"}, + "gregorian": {"en": "Gregorian", "ar": "ميلادي"}, + "hijri": {"en": "Hijri", "ar": "هجري"}, + "birthdate": {"en": "Birthdate", "ar": "تاريخ الولادة"}, + "activation": {"en": "Activation", "ar": "تفعيل"}, + "confirmation": {"en": "Confirmation", "ar": "تفعيل"}, + "firstNameInAr": {"en": "First Name In Arabic", "ar": "الاسم الاول بالعربية"}, + "middleNameInAr": { + "en": "Middle Name In Arabic", + "ar": "الاسم الأوسط بالعربية" + }, + "lastNameInAr": {"en": "Last Name In Arabic", "ar": "الاسم الأخير بالعربية"}, + "investigation": {"en": "investigation", "ar": "التحقيقات"}, + "conditionOnDischarge": { + "en": "Condition On Discharge", + "ar": "الحالة عند الاخراج" + }, + "planedProcedure": {"en": "Planed Procedure", "ar": "الإجراء المخطط"}, + "moreDetails": {"en": "More Details", "ar": "المزيد من التفاصيل"}, + "VTE_Type": {"en": "VTE Type", "ar": "VTE Type"}, + "pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"}, + "reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"}, + "youDoNotHaveFavoritePrescription": {"en": "You Don't Have Favorite Prescription", "ar": "ليس لديك وصفة طبية مفضلة"}, + "pleaseSelectItem": {"en": "please Select Item", "ar": "الرجاء اختيار عنصر"}, + "searchFavoriteTemplate": {"en": "search Favorites Template", "ar": "البحث في قالب المفضلة"}, + "sorryNoMatch": {"en": "Sorry No Match", "ar": "عذرا لا يوجد تطابق"}, + "thousandIsTheMAXForTheStrength": {"en": "1000 Is The MAX For The Strength", "ar": "ألف هو القيمة الأعلى"}, + "strengthCanNotBeZero": {"en": "Strength Can't Be Zero", "ar": "القوة لا يمكن أن تكون صفر "}, + "old": {"en": "Old", "ar":"القديمه"}, + "orderTypeDescription": {"en": "Order Type Description", "ar":"وصف نوع الطلب"}, + "doseDetails": {"en": "Dose Details", "ar":"تفاصيل الجرعة"}, + "selectCondition": {"en": "Select Condition", "ar":"قم بتحديد الشرط"}, + "yourOrderAddedSuccessfully": {"en": "Your Order Added Successfully", "ar":"تم إضافة طلبك بنجاح"}, + "youCannotAddOnlySpaces": {"en": "You Can't Add Only Spaces", "ar":""}, + "conditionDescription": {"en": "Condition Description", "ar":"لا يمكنك إضافة مسافات فقط"}, +}; diff --git a/lib/core/config/shared_pref_kay.dart b/lib/core/config/shared_pref_kay.dart new file mode 100644 index 0000000..628f5a0 --- /dev/null +++ b/lib/core/config/shared_pref_kay.dart @@ -0,0 +1,16 @@ +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'; diff --git a/lib/core/config/size_config.dart b/lib/core/config/size_config.dart new file mode 100644 index 0000000..681bf61 --- /dev/null +++ b/lib/core/config/size_config.dart @@ -0,0 +1,103 @@ +import 'package:flutter/cupertino.dart'; +import 'package:queuing_system/core/config/config.dart'; + +class SizeConfig { + static double _blockWidth = 0; + static double _blockHeight = 0; + + static double realScreenWidth; + static double realScreenHeight; + static double screenWidth; + static double screenHeight; + static double textMultiplier; + static double imageSizeMultiplier; + static double heightMultiplier; + static bool isPortrait = true; + static double widthMultiplier; + static bool isMobilePortrait = false; + static bool isMobile = false; + static bool isHeightShort = false; + static bool isHeightVeryShort = false; + static bool isHeightMiddle = false; + static bool isHeightLarge = false; + static bool isWidthLarge = false; + + void init(BoxConstraints constraints, Orientation orientation) { + realScreenHeight = constraints.maxHeight; + realScreenWidth = constraints.maxWidth; + if (constraints.maxWidth <= MAX_SMALL_SCREEN) { + isMobile = true; + } + if (constraints.maxHeight < 600) { + isHeightVeryShort = true; + } else if (constraints.maxHeight < 800) { + isHeightShort = true; + } else if (constraints.maxHeight < 1000) { + isHeightMiddle = true; + } else { + isHeightLarge = true; + } + + if (constraints.maxWidth > 600) { + isWidthLarge = true; + } + + if (orientation == Orientation.portrait) { + isPortrait = true; + if (realScreenWidth < 450) { + isMobilePortrait = true; + } + // textMultiplier = _blockHeight; + // imageSizeMultiplier = _blockWidth; + screenHeight = realScreenHeight; + screenWidth = realScreenWidth; + } else { + isPortrait = false; + isMobilePortrait = false; + // textMultiplier = _blockWidth; + // imageSizeMultiplier = _blockHeight; + screenHeight = realScreenWidth; + screenWidth = realScreenHeight; + } + _blockWidth = screenWidth / 100; + _blockHeight = screenHeight / 100; + + textMultiplier = _blockHeight; + imageSizeMultiplier = _blockWidth; + heightMultiplier = _blockHeight; + widthMultiplier = _blockWidth; + + print('realScreenWidth $realScreenWidth'); + print('realScreenHeight $realScreenHeight'); + print('textMultiplier $textMultiplier'); + print('imageSizeMultiplier $imageSizeMultiplier'); + print('heightMultiplier$heightMultiplier'); + print('widthMultiplier $widthMultiplier'); + print('isPortrait $isPortrait'); + print('isMobilePortrait $isMobilePortrait'); + } + + static getTextMultiplierBasedOnWidth({double width}) { + // TODO handel LandScape case + if (width != null) { + return width / 100; + } + return widthMultiplier; + } + + static getWidthMultiplier({double width}) { + // TODO handel LandScape case + if (width != null) { + return width / 100; + } + return widthMultiplier; + } + + static getHeightMultiplier({double height}) { + // TODO handel LandScape case + if (height != null) { + return height / 100; + } + return heightMultiplier; + } +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..d819906 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,104 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'core/base/app_scaffold_widget.dart'; +import 'core/base/project_view_model.dart'; +import 'core/config/size_config.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key key}) : super(key: key); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, constraints) { + return OrientationBuilder(builder: (context, orientation) { + SizeConfig().init(constraints, orientation); + return MultiProvider( + providers: [ + + ChangeNotifierProvider( + create: (context) => ProjectViewModel(), + ), + ], + child: Consumer( + builder: (context, projectProvider, child) => MaterialApp( + showSemanticsDebugger: false, + title: 'Doctors App', + theme: ThemeData( + primarySwatch: Colors.grey, + primaryColor: Colors.grey, + fontFamily: 'Poppins', + dividerColor: Colors.grey[350], + backgroundColor: Color.fromRGBO(255, 255, 255, 1), + ), + home:MyHomePage() , + debugShowCheckedModeBanner: false, + )), + ); + }); + }, + ); + } +} + +class MyHomePage extends StatefulWidget { + + // This widget is the home page of your application. It is stateful, meaning + // that it has a State object (defined below) that contains fields that affect + // how it looks. + + // This class is the configuration for the state. It holds the values (in this + // case the title) provided by the parent (in this case the App widget) and + // used by the build method of the State. Fields in a Widget subclass are + // always marked "final". + + String title ="MyHomePage"; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + void _incrementCounter() { + setState(() { + // This call to setState tells the Flutter framework that something has + // changed in this State, which causes it to rerun the build method below + // so that the display can reflect the updated values. If we changed + // _counter without calling setState(), then the build method would not be + // called again, and so nothing would appear to happen. + _counter++; + }); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBar: AppBar( + title: Text(widget.title), + ), + body: Center( + + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'You have pushed the button this many times:', + ), + Text( + '$_counter', + style: Theme.of(context).textTheme.headline4, + ), + ], + ), + ), // This trailing comma makes auto-formatting nicer for build methods. + ); + } +} diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart new file mode 100644 index 0000000..c585496 --- /dev/null +++ b/lib/utils/utils.dart @@ -0,0 +1,179 @@ +import 'package:connectivity/connectivity.dart'; +import 'package:queuing_system/core/base/locater.dart'; +import 'package:queuing_system/core/config/size_config.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + + + +class Utils { + + + static TextStyle textStyle(context) => + TextStyle(color: Theme.of(context).primaryColor); + + + static Future checkConnection() async { + ConnectivityResult connectivityResult = + await (Connectivity().checkConnectivity()); + if ((connectivityResult == ConnectivityResult.mobile) || + (connectivityResult == ConnectivityResult.wifi)) { + return true; + } else { + return false; + } + } + + + static generateContactAdminMsg([err = null]) { + //TODO: Add translation + String localMsg = 'Something wrong happened, please contact the admin'; + if (err != null) { + localMsg = localMsg + '\n \n' + err.toString(); + } + return localMsg; + } + + + 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().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 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(' '); + } +} diff --git a/lib/widget/app_loader_widget.dart b/lib/widget/app_loader_widget.dart new file mode 100644 index 0000000..6f6e27d --- /dev/null +++ b/lib/widget/app_loader_widget.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +import 'loader/gif_loader_container.dart'; + +class AppLoaderWidget extends StatefulWidget { + AppLoaderWidget({Key key, this.title, this.containerColor}) : super(key: key); + + final String title; + final Color containerColor; + + @override + _AppLoaderWidgetState createState() => new _AppLoaderWidgetState(); +} + +class _AppLoaderWidgetState extends State { + @override + Widget build(BuildContext context) { + return Container( + height: MediaQuery.of(context).size.height, + child: Stack( + children: [ + Container( + color: widget.containerColor ?? Colors.grey.withOpacity(0.6), + ), + Container( + child: GifLoaderContainer(), + margin: EdgeInsets.only( + bottom: MediaQuery.of(context).size.height * 0.09)) + ], + ), + ); + } +} diff --git a/lib/widget/data_display/app_texts_widget.dart b/lib/widget/data_display/app_texts_widget.dart new file mode 100644 index 0000000..90e5986 --- /dev/null +++ b/lib/widget/data_display/app_texts_widget.dart @@ -0,0 +1,353 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:queuing_system/core/config/size_config.dart'; + +class AppText extends StatefulWidget { + final String text; + final String variant; + final Color color; + final FontWeight fontWeight; + final double fontSize; + final double fontHeight; + final String fontFamily; + final int maxLength; + final bool italic; + final double margin; + final double marginTop; + final double marginRight; + final double marginBottom; + final double marginLeft; + final double letterSpacing; + final TextAlign textAlign; + final bool bold; + final bool regular; + final bool medium; + final int maxLines; + final bool readMore; + final String style; + final bool allowExpand; + final bool visibility; + final TextOverflow textOverflow; + final TextDecoration textDecoration; + final bool isCopyable; + + AppText( + this.text, { + this.color = Colors.black, + this.fontWeight, + this.variant, + this.fontSize, + this.fontHeight, + this.fontFamily = 'Poppins', + this.italic = false, + this.maxLength = 60, + this.margin, + this.marginTop = 0, + this.marginRight = 0, + this.marginBottom = 0, + this.marginLeft = 0, + this.textAlign, + this.bold, + this.regular, + this.medium, + this.maxLines, + this.readMore = false, + this.style, + this.allowExpand = true, + this.visibility = true, + this.textOverflow, + this.textDecoration, + this.letterSpacing, + this.isCopyable = false, + }); + + @override + _AppTextState createState() => _AppTextState(); +} + +class _AppTextState extends State { + bool hidden = false; + String text = ""; + + @override + void didUpdateWidget(covariant AppText oldWidget) { + setState(() { + if (widget.style == "overline") + text = widget.text.toUpperCase(); + else { + text = widget.text; + } + }); + super.didUpdateWidget(oldWidget); + } + + @override + void initState() { + hidden = widget.readMore; + if (widget.style == "overline") + text = widget.text.toUpperCase(); + else { + text = widget.text; + } + super.initState(); + } + + @override + Widget build(BuildContext context) { + return GestureDetector( + child: Container( + margin: widget.margin != null + ? EdgeInsets.all(widget.margin) + : EdgeInsets.only( + top: widget.marginTop, + right: widget.marginRight, + bottom: widget.marginBottom, + left: widget.marginLeft), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + _textWidget(), + 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, + // 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 : Color(0xff2E303A), + 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), + ), + ), + ); + } 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() { + switch (widget.style) { + case "headline2": + return Theme.of(context).textTheme.headline2; + case "headline3": + return Theme.of(context).textTheme.headline3; + case "headline4": + return Theme.of(context).textTheme.headline4; + case "headline5": + return Theme.of(context).textTheme.headline5; + case "headline6": + return Theme.of(context).textTheme.headline6; + case "bodyText2": + return Theme.of(context).textTheme.bodyText2; + case "bodyText_15": + return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0); + case "bodyText1": + return Theme.of(context).textTheme.bodyText1; + case "caption": + return Theme.of(context).textTheme.caption; + case "overline": + return Theme.of(context).textTheme.overline; + case "button": + return Theme.of(context).textTheme.button; + default: + return TextStyle(); + } + } + + double _getFontSize() { + switch (widget.variant) { + case "heading0": + return 40.0; + case "heading": + return 32.0; + case "heading2": + return 28.0; + case "heading3": + return 18.0; + case "body1": + return 18.0; + case "body2": + return 20.0; + case "body2Link": + return 16.0; + case "caption": + return 16.0; + case "caption2": + return 14.0; + case "bodyText": + return 15.0; + case "bodyText2": + return 17.0; + case "caption3": + return 12.0; + case "caption4": + return 9.0; + case "overline": + return 11.0; + case "date": + return 24.0; + default: + return SizeConfig.textMultiplier * 2; + } + } + + FontWeight _getFontWeight() { + if (widget.bold ?? false) { + return FontWeight.w900; + } else if (widget.regular ?? false) { + return FontWeight.w500; + } else if (widget.medium ?? false) { + return FontWeight.w800; + } else { + if (widget.style == null) { + switch (widget.variant) { + case "heading": + return FontWeight.w900; + case "heading2": + return FontWeight.w900; + case "heading3": + return FontWeight.w900; + case "body1": + return FontWeight.w800; + case "body2": + return FontWeight.w900; + case "body2Link": + return FontWeight.w800; + case "caption": + return FontWeight.w700; + case "caption2": + return FontWeight.w700; + case "bodyText": + return FontWeight.w500; + case "bodyText2": + return FontWeight.w500; + case "caption3": + return FontWeight.w600; + case "caption4": + return FontWeight.w600; + case "overline": + return FontWeight.w800; + case "date": + return FontWeight.w900; + default: + return FontWeight.w500; + } + } else { + return null; + } + } + } +} diff --git a/lib/widget/errors/error_message.dart b/lib/widget/errors/error_message.dart new file mode 100644 index 0000000..450e7d6 --- /dev/null +++ b/lib/widget/errors/error_message.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:queuing_system/widget/data_display/app_texts_widget.dart'; + + +class ErrorMessage extends StatelessWidget { + const ErrorMessage({ + Key key, + @required this.error, + }) : super(key: key); + + final String error; + + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 100, + ), + SvgPicture.asset('assets/images/svgs/no data.svg'), + Center( + child: Center( + child: Padding( + padding: const EdgeInsets.only( + top: 12, bottom: 12, right: 20, left: 30), + child: Center( + child: AppText( + error ?? '', + textAlign: TextAlign.center, + )), + ), + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/widget/loader/gif_loader_container.dart b/lib/widget/loader/gif_loader_container.dart new file mode 100644 index 0000000..eb9f251 --- /dev/null +++ b/lib/widget/loader/gif_loader_container.dart @@ -0,0 +1,43 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter_gifimage/flutter_gifimage.dart'; + +class GifLoaderContainer extends StatefulWidget { + @override + _GifLoaderContainerState createState() => _GifLoaderContainerState(); +} + +class _GifLoaderContainerState extends State + with TickerProviderStateMixin { + GifController controller1; + + @override + void initState() { + controller1 = GifController(vsync: this); + + WidgetsBinding.instance.addPostFrameCallback((_) { + controller1.repeat( + min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); + }); + super.initState(); + } + + @override + void dispose() { + controller1.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Center( + //progress-loading.gif + child: Container( + // margin: EdgeInsets.only(bottom: 40), + child: GifImage( + controller: controller1, + image: AssetImage( + "assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + )); + } +} diff --git a/lib/widget/loader/gif_loader_dialog_utils.dart b/lib/widget/loader/gif_loader_dialog_utils.dart new file mode 100644 index 0000000..1308a67 --- /dev/null +++ b/lib/widget/loader/gif_loader_dialog_utils.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +import 'gif_loader_container.dart'; + +class GifLoaderDialogUtils { + static showMyDialog(BuildContext context) { + showDialog(context: context, builder: (ctx) => GifLoaderContainer()); + } + + static hideDialog(BuildContext context) { + if (Navigator.canPop(context)) Navigator.of(context).pop(); + } +} diff --git a/macos/.gitignore b/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..4b81f9b --- /dev/null +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..5caa9d1 --- /dev/null +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..9994324 --- /dev/null +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,12 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + +import connectivity_macos + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) +} diff --git a/macos/Podfile b/macos/Podfile new file mode 100644 index 0000000..dade8df --- /dev/null +++ b/macos/Podfile @@ -0,0 +1,40 @@ +platform :osx, '10.11' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6ade3d5 --- /dev/null +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,572 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 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 = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* queuing_system.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* queuing_system.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..1047bb5 --- /dev/null +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..d53ef64 --- /dev/null +++ b/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..3c4935a Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..ed4cc16 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..483be61 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bcbf36d Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..9c0a652 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..e71a726 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..8a31fe2 Binary files /dev/null and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..537341a --- /dev/null +++ b/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..1daa198 --- /dev/null +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = queuing_system + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.queuingSystem + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..2722837 --- /dev/null +++ b/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController.init() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..750a090 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,285 @@ +# 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" + 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" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.11" + 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" + 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" + 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.3" + 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" + 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" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..11c8771 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,96 @@ +name: queuing_system +description: A new Flutter project. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 4.3.5+1 + +environment: + sdk: ">=2.7.0 <3.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # Base packages + provider: ^6.0.1 + get_it: ^7.1.3 + connectivity: ^3.0.6 + flutter_gifimage: ^1.0.1 + flutter_svg: ^1.0.3 + http: ^0.13.0 + + + + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^1.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..afeb3fe --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:queuing_system/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/windows/.gitignore b/windows/.gitignore new file mode 100644 index 0000000..d492d0d --- /dev/null +++ b/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt new file mode 100644 index 0000000..5c0f53e --- /dev/null +++ b/windows/CMakeLists.txt @@ -0,0 +1,95 @@ +cmake_minimum_required(VERSION 3.14) +project(queuing_system LANGUAGES CXX) + +set(BINARY_NAME "queuing_system") + +cmake_policy(SET CMP0063 NEW) + +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Configure build options. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() + +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") + +# Flutter library and tool build rules. +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build +add_subdirectory("runner") + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000..b2e4bd8 --- /dev/null +++ b/windows/flutter/CMakeLists.txt @@ -0,0 +1,103 @@ +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + windows-x64 $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..8b6d468 --- /dev/null +++ b/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..dc139d8 --- /dev/null +++ b/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000..4d10c25 --- /dev/null +++ b/windows/flutter/generated_plugins.cmake @@ -0,0 +1,15 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt new file mode 100644 index 0000000..de2d891 --- /dev/null +++ b/windows/runner/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) +apply_standard_settings(${BINARY_NAME}) +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc new file mode 100644 index 0000000..3b0bd8c --- /dev/null +++ b/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#ifdef FLUTTER_BUILD_NUMBER +#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER +#else +#define VERSION_AS_NUMBER 1,0,0 +#endif + +#ifdef FLUTTER_BUILD_NAME +#define VERSION_AS_STRING #FLUTTER_BUILD_NAME +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "A new Flutter project." "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "queuing_system" "\0" + VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "queuing_system.exe" "\0" + VALUE "ProductName", "queuing_system" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..b43b909 --- /dev/null +++ b/windows/runner/flutter_window.cpp @@ -0,0 +1,61 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/windows/runner/flutter_window.h b/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp new file mode 100644 index 0000000..ac9e167 --- /dev/null +++ b/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.CreateAndShow(L"queuing_system", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/windows/runner/resource.h b/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000..c04e20c Binary files /dev/null and b/windows/runner/resources/app_icon.ico differ diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..c977c4a --- /dev/null +++ b/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp new file mode 100644 index 0000000..d19bdbb --- /dev/null +++ b/windows/runner/utils.cpp @@ -0,0 +1,64 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr); + if (target_length == 0) { + return std::string(); + } + std::string utf8_string; + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, utf8_string.data(), + target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/windows/runner/utils.h b/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp new file mode 100644 index 0000000..c10f08d --- /dev/null +++ b/windows/runner/win32_window.cpp @@ -0,0 +1,245 @@ +#include "win32_window.h" + +#include + +#include "resource.h" + +namespace { + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + FreeLibrary(user32_module); + } +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::CreateAndShow(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + return OnCreate(); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h new file mode 100644 index 0000000..17ba431 --- /dev/null +++ b/windows/runner/win32_window.h @@ -0,0 +1,98 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates and shows a win32 window with |title| and position and size using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size to will treat the width height passed in to this function + // as logical pixels and scale to appropriate for the default monitor. Returns + // true if the window was created successfully. + bool CreateAndShow(const std::wstring& title, + const Point& origin, + const Size& size); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responsponds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_