diff --git a/help/.gitignore b/help/.gitignore deleted file mode 100644 index 9d532b18..00000000 --- a/help/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# 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 diff --git a/help/.metadata b/help/.metadata deleted file mode 100644 index 107fcb7b..00000000 --- a/help/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# 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: 8874f21e79d7ec66d0457c7ab338348e31b17f1d - channel: stable - -project_type: app diff --git a/help/README.md b/help/README.md deleted file mode 100644 index 4ac021c0..00000000 --- a/help/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# help - -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/help/android/.gitignore b/help/android/.gitignore deleted file mode 100644 index 0a741cb4..00000000 --- a/help/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/help/android/app/build.gradle b/help/android/app/build.gradle deleted file mode 100644 index f44ed6c9..00000000 --- a/help/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -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 29 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.help" - minSdkVersion 16 - targetSdkVersion 29 - 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/help/android/app/src/debug/AndroidManifest.xml b/help/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index fa2c5cd4..00000000 --- a/help/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/help/android/app/src/main/AndroidManifest.xml b/help/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 125d6242..00000000 --- a/help/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/help/android/app/src/main/kotlin/com/example/help/MainActivity.kt b/help/android/app/src/main/kotlin/com/example/help/MainActivity.kt deleted file mode 100644 index 75298a08..00000000 --- a/help/android/app/src/main/kotlin/com/example/help/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.help - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/help/android/app/src/main/res/drawable/launch_background.xml b/help/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/help/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/help/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/help/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/help/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/help/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/help/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/help/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/help/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/help/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/help/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/help/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/help/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/help/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/help/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/help/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/help/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/help/android/app/src/main/res/values/styles.xml b/help/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 1f83a33f..00000000 --- a/help/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/help/android/app/src/profile/AndroidManifest.xml b/help/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index fa2c5cd4..00000000 --- a/help/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/help/android/build.gradle b/help/android/build.gradle deleted file mode 100644 index 3100ad2d..00000000 --- a/help/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/help/android/gradle.properties b/help/android/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/help/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/help/android/gradle/wrapper/gradle-wrapper.properties b/help/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 296b146b..00000000 --- a/help/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#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-5.6.2-all.zip diff --git a/help/android/settings.gradle b/help/android/settings.gradle deleted file mode 100644 index 44e62bcf..00000000 --- a/help/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -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/help/ios/.gitignore b/help/ios/.gitignore deleted file mode 100644 index e96ef602..00000000 --- a/help/ios/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -*.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/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/help/ios/Flutter/AppFrameworkInfo.plist b/help/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index f2872cf4..00000000 --- a/help/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - 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/help/ios/Flutter/Debug.xcconfig b/help/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/help/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/help/ios/Flutter/Release.xcconfig b/help/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/help/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/help/ios/Runner.xcodeproj/project.pbxproj b/help/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 4f158fea..00000000 --- a/help/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,495 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - 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 */; }; - 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 = ""; }; - 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - 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 */, - ); - 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 = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - 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 = 1020; - 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"; - }; - 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"; - }; -/* 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)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.help; - 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_OPTIMIZATION_LEVEL = "-Owholemodule"; - 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)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.help; - 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)"; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.help; - 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/help/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/help/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/help/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/help/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/help/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/help/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/help/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/help/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/help/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/help/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/help/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cf..00000000 --- a/help/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/help/ios/Runner.xcworkspace/contents.xcworkspacedata b/help/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/help/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/help/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/help/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/help/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/help/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/help/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/help/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/help/ios/Runner/AppDelegate.swift b/help/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a..00000000 --- a/help/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -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/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "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/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/help/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "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/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/help/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 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/help/ios/Runner/Base.lproj/LaunchScreen.storyboard b/help/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/help/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/help/ios/Runner/Base.lproj/Main.storyboard b/help/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/help/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/help/ios/Runner/Info.plist b/help/ios/Runner/Info.plist deleted file mode 100644 index 71ce57cb..00000000 --- a/help/ios/Runner/Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - help - 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 - - - < key >NSCameraUsageDescription< /key > - < string >Camera permission is required for barcode scanning.< /string > - - diff --git a/help/ios/Runner/Runner-Bridging-Header.h b/help/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/help/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/help/lib/main.dart b/help/lib/main.dart deleted file mode 100644 index 11655b66..00000000 --- a/help/lib/main.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'package:flutter/material.dart'; - -void main() { - runApp(MyApp()); -} - -class MyApp extends StatelessWidget { - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // Try running your application with "flutter run". You'll see the - // application has a blue toolbar. Then, without quitting the app, try - // changing the primarySwatch below to Colors.green and then invoke - // "hot reload" (press "r" in the console where you ran "flutter run", - // or simply save your changes to "hot reload" in a Flutter IDE). - // Notice that the counter didn't reset back to zero; the application - // is not restarted. - primarySwatch: Colors.blue, - // This makes the visual density adapt to the platform that you run - // the app on. For desktop platforms, the controls will be smaller and - // closer together (more dense) than on mobile platforms. - visualDensity: VisualDensity.adaptivePlatformDensity, - ), - home: MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); - - // 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". - - final String title; - - @override - _MyHomePageState 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) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Invoke "debug painting" (press "p" in the console, choose the - // "Toggle Debug Paint" action from the Flutter Inspector in Android - // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) - // to see the wireframe for each widget. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. - ); - } -} diff --git a/help/pubspec.yaml b/help/pubspec.yaml deleted file mode 100644 index 66af3d9e..00000000 --- a/help/pubspec.yaml +++ /dev/null @@ -1,76 +0,0 @@ -name: help -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `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: 1.0.0+1 - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - -dev_dependencies: - flutter_test: - sdk: flutter - -# 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/help/test/widget_test.dart b/help/test/widget_test.dart deleted file mode 100644 index 9ca1523f..00000000 --- a/help/test/widget_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 '../lib/main.dart'; - - - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(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/lib/config/config.dart b/lib/config/config.dart index e5084398..6ebf9892 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -12,16 +12,16 @@ const PACKAGES_PRODUCTS = '/api/products'; const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; -//const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs -const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // Pharmacy Production URLs -// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; diff --git a/lib/core/model/insurance/insurance_card.dart b/lib/core/model/insurance/insurance_card.dart index ebab8d71..3b91ea9a 100644 --- a/lib/core/model/insurance/insurance_card.dart +++ b/lib/core/model/insurance/insurance_card.dart @@ -1,4 +1,4 @@ -import 'dart:convert'; + class InsuranceCardModel { double versionID; diff --git a/lib/core/model/insurance/insurance_card_update_model.dart b/lib/core/model/insurance/insurance_card_update_model.dart index 6f5331ce..52bd8ad7 100644 --- a/lib/core/model/insurance/insurance_card_update_model.dart +++ b/lib/core/model/insurance/insurance_card_update_model.dart @@ -1,6 +1,4 @@ -import 'dart:convert'; -import 'package:intl/intl.dart'; class InsuranceUpdateModel { int patientID; diff --git a/lib/core/model/packages_offers/responses/order_response_model.dart b/lib/core/model/packages_offers/responses/order_response_model.dart index ed53a765..0a464043 100644 --- a/lib/core/model/packages_offers/responses/order_response_model.dart +++ b/lib/core/model/packages_offers/responses/order_response_model.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; + import 'PackagesCartItemsResponseModel.dart'; class PackagesOrderResponseModel { diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart index 5545b25b..c521bede 100644 --- a/lib/core/model/prescriptions/prescription_report.dart +++ b/lib/core/model/prescriptions/prescription_report.dart @@ -1,4 +1,4 @@ -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + class PrescriptionReport { String address; diff --git a/lib/core/model/prescriptions/prescriptions_order.dart b/lib/core/model/prescriptions/prescriptions_order.dart index d3390d92..646957ac 100644 --- a/lib/core/model/prescriptions/prescriptions_order.dart +++ b/lib/core/model/prescriptions/prescriptions_order.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart index 1bb7c30e..6dde5e2e 100644 --- a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart +++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart @@ -1,9 +1,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:intl/intl.dart'; -import '../../../locator.dart'; import '../base_service.dart'; class CustomerAddressesService extends BaseService { diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index eb27f24e..fdf51326 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -4,12 +4,10 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import '../base_service.dart'; diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart index 27ff2694..4bfbad53 100644 --- a/lib/core/service/ancillary_orders_service.dart +++ b/lib/core/service/ancillary_orders_service.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class AncillaryOrdersService extends BaseService { List _ancillaryLists = List(); diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart index 9fc11c04..0128d0d1 100644 --- a/lib/core/service/blood/blood_donation_service.dart +++ b/lib/core/service/blood/blood_donation_service.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; import '../base_service.dart'; diff --git a/lib/core/service/childvaccines/add_new_child_service.dart b/lib/core/service/childvaccines/add_new_child_service.dart index 5e4a4d86..95757331 100644 --- a/lib/core/service/childvaccines/add_new_child_service.dart +++ b/lib/core/service/childvaccines/add_new_child_service.dart @@ -1,8 +1,9 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + import '../base_service.dart'; class CreteNewBabyService extends BaseService { diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart index 09256f47..03da5ed8 100644 --- a/lib/core/service/childvaccines/child_vaccines_service.dart +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -1,9 +1,9 @@ -import 'dart:convert'; +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + import '../base_service.dart'; class ChildVaccinesService extends BaseService { diff --git a/lib/core/service/childvaccines/delete_baby_service.dart b/lib/core/service/childvaccines/delete_baby_service.dart index 115d13c5..6fb77a1a 100644 --- a/lib/core/service/childvaccines/delete_baby_service.dart +++ b/lib/core/service/childvaccines/delete_baby_service.dart @@ -1,9 +1,10 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + import '../base_service.dart'; diff --git a/lib/core/service/childvaccines/user_information_service.dart b/lib/core/service/childvaccines/user_information_service.dart index 0628920c..125ebf73 100644 --- a/lib/core/service/childvaccines/user_information_service.dart +++ b/lib/core/service/childvaccines/user_information_service.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + import '../base_service.dart'; class UserInformationService extends BaseService { diff --git a/lib/core/service/childvaccines/vaccination_table_service.dart b/lib/core/service/childvaccines/vaccination_table_service.dart index fc2b40e9..22c0d561 100644 --- a/lib/core/service/childvaccines/vaccination_table_service.dart +++ b/lib/core/service/childvaccines/vaccination_table_service.dart @@ -1,9 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + import '../base_service.dart'; class VaccinationTableService extends BaseService { diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index a6a2fb02..381b46e8 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'dart:io' show Platform; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; @@ -19,7 +20,6 @@ import 'package:provider/provider.dart'; import '../../../locator.dart'; import '../../../routes.dart'; import '../AuthenticatedUserObject.dart'; -import 'dart:io' show Platform; AppSharedPreferences sharedPref = new AppSharedPreferences(); diff --git a/lib/core/service/contactus/finadus_service.dart b/lib/core/service/contactus/finadus_service.dart index 4086def9..1aebb7e0 100644 --- a/lib/core/service/contactus/finadus_service.dart +++ b/lib/core/service/contactus/finadus_service.dart @@ -1,6 +1,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; + import '../base_service.dart'; class FindusService extends BaseService { diff --git a/lib/core/service/contactus/livechat_service.dart b/lib/core/service/contactus/livechat_service.dart index 025073ca..ba4cc8b2 100644 --- a/lib/core/service/contactus/livechat_service.dart +++ b/lib/core/service/contactus/livechat_service.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; + import '../base_service.dart'; class LiveChatService extends BaseService { diff --git a/lib/core/service/dashboard_service.dart b/lib/core/service/dashboard_service.dart index a15a4b39..4db1fd6a 100644 --- a/lib/core/service/dashboard_service.dart +++ b/lib/core/service/dashboard_service.dart @@ -1,5 +1,3 @@ -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class DashboardService extends BaseService { diff --git a/lib/core/service/er/er_service.dart b/lib/core/service/er/er_service.dart index 3e899f97..5b7552bb 100644 --- a/lib/core/service/er/er_service.dart +++ b/lib/core/service/er/er_service.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; + import '../base_service.dart'; class ErService extends BaseService { diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index bd5bfa42..b36ebee3 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -1,12 +1,11 @@ import 'dart:io'; + import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; -import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; class FeedbackService extends BaseService { diff --git a/lib/core/service/geofencing/GeofencingServices.dart b/lib/core/service/geofencing/GeofencingServices.dart index 56b4f56e..0ae93dff 100644 --- a/lib/core/service/geofencing/GeofencingServices.dart +++ b/lib/core/service/geofencing/GeofencingServices.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:developer'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; @@ -12,8 +11,6 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; -import '../../../locator.dart'; - class GeofencingServices extends BaseService { List geoZones = List(); bool testZones = true; diff --git a/lib/core/service/hospital_service.dart b/lib/core/service/hospital_service.dart index 6e32d8e6..b9e970e1 100644 --- a/lib/core/service/hospital_service.dart +++ b/lib/core/service/hospital_service.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/request_get_hospitals_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:geolocator/geolocator.dart'; diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index 5c5e2d06..c8f29e44 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -1,11 +1,11 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; +import 'package:flutter/cupertino.dart'; class MedicalService extends BaseService { List appoitmentAllHistoryResultList = List(); diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart index 6fb91a37..fd6b5180 100644 --- a/lib/core/service/medical/my_balance_service.dart +++ b/lib/core/service/medical/my_balance_service.dart @@ -1,4 +1,3 @@ -import 'dart:convert'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index d815ea30..acbe6fe1 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -2,14 +2,12 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; -import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report_enh.dart'; -import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions.dart'; -import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescriptions_orders.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/core/service/packages_offers/PackagesOffersServices.dart b/lib/core/service/packages_offers/PackagesOffersServices.dart index 15811b82..479f59d3 100644 --- a/lib/core/service/packages_offers/PackagesOffersServices.dart +++ b/lib/core/service/packages_offers/PackagesOffersServices.dart @@ -1,9 +1,7 @@ import 'dart:convert'; import 'dart:developer'; -import 'dart:ui'; import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/enum/PaymentOptions.dart'; import 'package:diplomaticquarterapp/core/model/ResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/CreateCustomerRequestModel.dart'; @@ -11,16 +9,13 @@ import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersC import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/order_response_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; -import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:flutter/cupertino.dart'; -import '../../../locator.dart'; - class OffersAndPackagesServices extends BaseService { List categoryList = List(); List productList = List(); diff --git a/lib/core/service/parmacyModule/prescription_service.dart b/lib/core/service/parmacyModule/prescription_service.dart index 9e3b7bbe..37a50c33 100644 --- a/lib/core/service/parmacyModule/prescription_service.dart +++ b/lib/core/service/parmacyModule/prescription_service.dart @@ -1,8 +1,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart'; class PrescriptionService extends BaseService { final AppSharedPreferences sharedPref = AppSharedPreferences(); diff --git a/lib/core/service/pharmacies_service.dart b/lib/core/service/pharmacies_service.dart index dbd4fae1..05f45710 100644 --- a/lib/core/service/pharmacies_service.dart +++ b/lib/core/service/pharmacies_service.dart @@ -1,7 +1,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; -import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:geolocator/geolocator.dart'; class PharmacyService extends BaseService { diff --git a/lib/core/service/pharmacy_categorise_service.dart b/lib/core/service/pharmacy_categorise_service.dart index 58f58ddb..0d2cb7b2 100644 --- a/lib/core/service/pharmacy_categorise_service.dart +++ b/lib/core/service/pharmacy_categorise_service.dart @@ -1,15 +1,10 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/brands_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/final_products_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/parent_products_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/scan_qr_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/sub_categories_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/sub_products_model.dart'; -import 'package:diplomaticquarterapp/core/model/search_products_model.dart'; import 'base_service.dart'; diff --git a/lib/core/service/vaccine_service.dart b/lib/core/service/vaccine_service.dart index 297909a4..29349378 100644 --- a/lib/core/service/vaccine_service.dart +++ b/lib/core/service/vaccine_service.dart @@ -1,8 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart'; import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_item.dart'; import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_on_hand.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; -import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart'; class VaccineService extends BaseService { List _vaccineList = List(); diff --git a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart index 9d163a27..219103da 100644 --- a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart @@ -1,3 +1,6 @@ +import 'dart:math' as math; + +import 'package:charts_flutter/flutter.dart' as charts; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; @@ -6,10 +9,8 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_p import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + import '../../../locator.dart'; -import 'dart:math' as math; class H2OViewModel extends BaseViewModel { H2OService _h2OService = locator(); diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart index 53b39025..ce46a9c6 100644 --- a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart +++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart'; import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_by_time_model.dart'; import 'package:diplomaticquarterapp/core/model/health_calcolator/get_doctor_list_calcolation_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index 4ebdbcc1..4fe046a4 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; @@ -12,7 +11,6 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:intl/intl.dart'; import '../../../locator.dart'; import 'add_new_address_Request_Model.dart'; diff --git a/lib/core/viewModels/ancillary_orders_view_model.dart b/lib/core/viewModels/ancillary_orders_view_model.dart index 4a140004..0d846313 100644 --- a/lib/core/viewModels/ancillary_orders_view_model.dart +++ b/lib/core/viewModels/ancillary_orders_view_model.dart @@ -1,10 +1,10 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; -import 'base_view_model.dart'; import '../../locator.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'base_view_model.dart'; class AnciallryOrdersViewModel extends BaseViewModel { bool hasError = false; diff --git a/lib/core/viewModels/blooddonation/blood_details_view_model.dart b/lib/core/viewModels/blooddonation/blood_details_view_model.dart index a6b341cf..b534a022 100644 --- a/lib/core/viewModels/blooddonation/blood_details_view_model.dart +++ b/lib/core/viewModels/blooddonation/blood_details_view_model.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; + import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart index eebaca02..5af9a75a 100644 --- a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart +++ b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart @@ -1,9 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; -import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart index 7c4af285..a282b774 100644 --- a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart +++ b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart @@ -1,8 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; - -import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; //======== import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; diff --git a/lib/core/viewModels/child_vaccines/user_information_view_model.dart b/lib/core/viewModels/child_vaccines/user_information_view_model.dart index 43269f42..68da113c 100644 --- a/lib/core/viewModels/child_vaccines/user_information_view_model.dart +++ b/lib/core/viewModels/child_vaccines/user_information_view_model.dart @@ -1,8 +1,9 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/user_information_service.dart'; + import '../../../locator.dart'; import '../base_view_model.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; class UserInformationViewModel extends BaseViewModel { UserInformationService _userInformationService = diff --git a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart index d0ccb8a1..e8b4e287 100644 --- a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart +++ b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart @@ -1,8 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; -import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/vaccination_table_service.dart'; import '../../../locator.dart'; diff --git a/lib/core/viewModels/contactus/findus_view_model.dart b/lib/core/viewModels/contactus/findus_view_model.dart index 800c3106..9b2516ba 100644 --- a/lib/core/viewModels/contactus/findus_view_model.dart +++ b/lib/core/viewModels/contactus/findus_view_model.dart @@ -1,8 +1,9 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/service/contactus/finadus_service.dart'; -import '../base_view_model.dart'; + import '../../../locator.dart'; +import '../base_view_model.dart'; class FindusViewModel extends BaseViewModel { FindusService _findusService = locator(); diff --git a/lib/core/viewModels/contactus/livechat_view_model.dart b/lib/core/viewModels/contactus/livechat_view_model.dart index 8df4e801..bd130789 100644 --- a/lib/core/viewModels/contactus/livechat_view_model.dart +++ b/lib/core/viewModels/contactus/livechat_view_model.dart @@ -1,8 +1,9 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; import 'package:diplomaticquarterapp/core/service/contactus/livechat_service.dart'; -import '../base_view_model.dart'; + import '../../../locator.dart'; +import '../base_view_model.dart'; class LiveChatViewModel extends BaseViewModel{ diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index 8eb292fe..ac1b934e 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; -import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; @@ -12,8 +11,9 @@ import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:flutter/cupertino.dart'; -import '../base_view_model.dart'; + import '../../../locator.dart'; +import '../base_view_model.dart'; class AmRequestViewModel extends BaseViewModel { AmService _amService = locator(); diff --git a/lib/core/viewModels/er/near_hospital_view_model.dart b/lib/core/viewModels/er/near_hospital_view_model.dart index f12aa28f..4ff42a42 100644 --- a/lib/core/viewModels/er/near_hospital_view_model.dart +++ b/lib/core/viewModels/er/near_hospital_view_model.dart @@ -1,9 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; - import 'package:diplomaticquarterapp/core/service/er/er_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import '../../../locator.dart'; diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index 1289538d..8e936b52 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -1,10 +1,8 @@ import 'dart:async'; -import 'dart:convert'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; @@ -13,7 +11,6 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'package:flutter/cupertino.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart index 2a9dc90b..6cea3085 100644 --- a/lib/core/viewModels/feedback/feedback_view_model.dart +++ b/lib/core/viewModels/feedback/feedback_view_model.dart @@ -3,9 +3,6 @@ import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; -import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:flutter/cupertino.dart'; import '../../../locator.dart'; diff --git a/lib/core/viewModels/medical/blood_sugar_view_model.dart b/lib/core/viewModels/medical/blood_sugar_view_model.dart index 28292311..29b9cfe2 100644 --- a/lib/core/viewModels/medical/blood_sugar_view_model.dart +++ b/lib/core/viewModels/medical/blood_sugar_view_model.dart @@ -1,10 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; import 'package:diplomaticquarterapp/core/service/medical/BloodSugarService.dart'; import 'package:diplomaticquarterapp/locator.dart'; -import 'package:charts_flutter/flutter.dart' as charts; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import '../../../core/viewModels/base_view_model.dart'; diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index 5099e914..004f368b 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index 2fe174e5..d7c6679a 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -1,10 +1,11 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:flutter/cupertino.dart'; -import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; + import '../../../core/enum/filter_type.dart'; import '../../../core/enum/viewstate.dart'; import '../../../core/model/prescriptions/Prescriptions.dart'; diff --git a/lib/core/viewModels/medical/reports_monthly_view_model.dart b/lib/core/viewModels/medical/reports_monthly_view_model.dart index 15ac9219..a9117172 100644 --- a/lib/core/viewModels/medical/reports_monthly_view_model.dart +++ b/lib/core/viewModels/medical/reports_monthly_view_model.dart @@ -1,9 +1,7 @@ -import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import '../../../core/enum/reportfilter_type.dart'; import '../../../core/enum/viewstate.dart'; -import '../../../core/model/reports/Reports.dart'; import '../../../core/service/medical/reports_service.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/medical/weight_pressure_view_model.dart b/lib/core/viewModels/medical/weight_pressure_view_model.dart index 4a01bd3b..11684472 100644 --- a/lib/core/viewModels/medical/weight_pressure_view_model.dart +++ b/lib/core/viewModels/medical/weight_pressure_view_model.dart @@ -1,14 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; -import 'package:diplomaticquarterapp/core/service/medical/BloodPressureService.dart'; -import 'package:diplomaticquarterapp/core/service/medical/BloodSugarService.dart'; import 'package:diplomaticquarterapp/core/service/medical/WeightPressureService.dart'; import 'package:diplomaticquarterapp/locator.dart'; -import 'package:charts_flutter/flutter.dart' as charts; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import '../../../core/viewModels/base_view_model.dart'; diff --git a/lib/core/viewModels/notifications_view_model.dart b/lib/core/viewModels/notifications_view_model.dart index ac09e3b2..685b4a7f 100644 --- a/lib/core/viewModels/notifications_view_model.dart +++ b/lib/core/viewModels/notifications_view_model.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_ import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart'; import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart'; import 'package:diplomaticquarterapp/core/service/notifications_service.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import '../../locator.dart'; diff --git a/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart b/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart index 1029ed4d..ad950b5d 100644 --- a/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart +++ b/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart @@ -1,12 +1,8 @@ -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; -import 'package:diplomaticquarterapp/core/service/base_service.dart'; -import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:flutter/cupertino.dart'; import 'package:diplomaticquarterapp/locator.dart'; class OfferCategoriesViewModel extends BaseViewModel{ diff --git a/lib/core/viewModels/pharmacies_view_model.dart b/lib/core/viewModels/pharmacies_view_model.dart index b9e162fc..b14da6a4 100644 --- a/lib/core/viewModels/pharmacies_view_model.dart +++ b/lib/core/viewModels/pharmacies_view_model.dart @@ -1,10 +1,11 @@ -import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; -import '../../locator.dart'; -import 'base_view_model.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; import 'package:diplomaticquarterapp/core/service/pharmacies_service.dart'; +import '../../locator.dart'; +import 'base_view_model.dart'; + class PharmacyViewModel extends BaseViewModel { bool isFinished = true; bool hasError = false; diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart index df3ab5ee..479fdd95 100644 --- a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; diff --git a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart index b4d24733..37b33757 100644 --- a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart +++ b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart @@ -3,9 +3,8 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Country.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyAddressesModel.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; + import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/pharmacyModule/brand_view_model.dart b/lib/core/viewModels/pharmacyModule/brand_view_model.dart index c981b2b3..158d9cdb 100644 --- a/lib/core/viewModels/pharmacyModule/brand_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/brand_view_model.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/models/pharmacy/brandModel.dart'; import 'package:diplomaticquarterapp/models/pharmacy/topBrandsModel.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/brands_service.dart'; - import '../../../locator.dart'; class BrandsViewModel extends BaseViewModel{ diff --git a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart index f2ed5913..49e8df6c 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart @@ -1,8 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/lacum-registration-service.dart'; -import 'package:diplomaticquarterapp/core/service/parmacyModule/lacum-transfer-service.dart'; import '../../../locator.dart'; import 'lacum-viewmodel.dart'; diff --git a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart index 1ee1a41c..c03e8e87 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart @@ -1,11 +1,11 @@ +import 'dart:async'; +import 'dart:convert' as convert; import 'dart:typed_data'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/lacum-service.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'dart:async'; -import 'dart:convert' as convert; import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart index 73c41c24..232e10c4 100644 --- a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart @@ -4,14 +4,14 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformati import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/orderDetails_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index dc9f002d..04664003 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -4,15 +4,12 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; -import 'package:diplomaticquarterapp/core/service/medical/prescriptions_service.dart'; //import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; - import '../../../locator.dart'; class PharmacyModuleViewModel extends BaseViewModel { diff --git a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart index c7ac0a04..01695b10 100644 --- a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart @@ -3,9 +3,8 @@ import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; import 'package:diplomaticquarterapp/models/pharmacy/locationModel.dart'; import 'package:diplomaticquarterapp/models/pharmacy/productDetailModel.dart'; -import 'package:diplomaticquarterapp/services/pharmacy_services/product_detail_service.dart'; import 'package:diplomaticquarterapp/models/pharmacy/specification.dart'; - +import 'package:diplomaticquarterapp/services/pharmacy_services/product_detail_service.dart'; import '../../../locator.dart'; diff --git a/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart b/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart index 6a5bd476..a91b2c54 100644 --- a/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart +++ b/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart @@ -1,7 +1,8 @@ +import 'dart:async'; + import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/terms-condition-service.dart'; -import 'dart:async'; import '../../../locator.dart'; import '../base_view_model.dart'; diff --git a/lib/core/viewModels/pharmacy_categorise_view_model.dart b/lib/core/viewModels/pharmacy_categorise_view_model.dart index e48329ba..16a2b88a 100644 --- a/lib/core/viewModels/pharmacy_categorise_view_model.dart +++ b/lib/core/viewModels/pharmacy_categorise_view_model.dart @@ -1,15 +1,8 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/brands_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/final_products_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/parent_products_model.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/scan_qr_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/sub_categories_model.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy/sub_products_model.dart'; -import 'package:diplomaticquarterapp/core/model/search_products_model.dart'; - import 'package:diplomaticquarterapp/core/service/pharmacy_categorise_service.dart'; import 'package:diplomaticquarterapp/locator.dart'; diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index 2e6d1f29..ab2f931b 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -3,9 +3,7 @@ import 'dart:async'; import 'package:connectivity/connectivity.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; -import 'package:diplomaticquarterapp/core/service/privilege_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/core/viewModels/qr_view_model.dart b/lib/core/viewModels/qr_view_model.dart index 9833d6c8..a4a08e3f 100644 --- a/lib/core/viewModels/qr_view_model.dart +++ b/lib/core/viewModels/qr_view_model.dart @@ -1,4 +1,5 @@ import 'dart:convert'; + import 'package:barcode_scan_fix/barcode_scan.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; diff --git a/lib/core/viewModels/vaccine_view_model.dart b/lib/core/viewModels/vaccine_view_model.dart index 37b57da4..895b73a5 100644 --- a/lib/core/viewModels/vaccine_view_model.dart +++ b/lib/core/viewModels/vaccine_view_model.dart @@ -1,11 +1,11 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart'; import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_item.dart'; +import 'package:diplomaticquarterapp/core/service/vaccine_service.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'base_view_model.dart'; import '../../locator.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart'; -import 'package:diplomaticquarterapp/core/service/vaccine_service.dart'; +import 'base_view_model.dart'; class VaccineViewModel extends BaseViewModel { bool hasError = false; diff --git a/lib/core/viewModels/weather/weather_view_model.dart b/lib/core/viewModels/weather/weather_view_model.dart index bb201843..f95bf0fd 100644 --- a/lib/core/viewModels/weather/weather_view_model.dart +++ b/lib/core/viewModels/weather/weather_view_model.dart @@ -1,11 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart'; - -import 'package:diplomaticquarterapp/core/service/er/er_service.dart'; import 'package:diplomaticquarterapp/core/service/weather_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import '../../../locator.dart'; diff --git a/lib/generated/json/base/json_convert_content.dart b/lib/generated/json/base/json_convert_content.dart index ae4eadeb..1c785ef1 100644 --- a/lib/generated/json/base/json_convert_content.dart +++ b/lib/generated/json/base/json_convert_content.dart @@ -2,15 +2,15 @@ // ignore_for_file: camel_case_types // ignore_for_file: prefer_single_quotes +import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart'; // This file is automatically generated. DO NOT EDIT, all your changes would be lost. import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; -import 'package:diplomaticquarterapp/generated/json/OfferCategoriesResponseModel_helper.dart'; -import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart'; -import 'package:diplomaticquarterapp/generated/json/log_geo_zone_response_model_entity_helper.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; -import 'package:diplomaticquarterapp/generated/json/OfferProductsResponseModel_helper.dart'; -import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; import 'package:diplomaticquarterapp/generated/json/GeoZonesResponseModel_helper.dart'; +import 'package:diplomaticquarterapp/generated/json/OfferCategoriesResponseModel_helper.dart'; +import 'package:diplomaticquarterapp/generated/json/OfferProductsResponseModel_helper.dart'; +import 'package:diplomaticquarterapp/generated/json/log_geo_zone_response_model_entity_helper.dart'; class JsonConvert { T fromJson(Map json) { diff --git a/lib/locator.dart b/lib/locator.dart index bc8996b5..ee9ea18d 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -3,21 +3,21 @@ import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart' import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart'; import 'package:diplomaticquarterapp/core/service/qr_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; -import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; // import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; // import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; // import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/review_service.dart'; import 'package:diplomaticquarterapp/services/pharmacy_services/wishList_service.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; -import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_service.dart'; -import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:get_it/get_it.dart'; @@ -46,6 +46,7 @@ import 'core/service/er/er_service.dart'; import 'core/service/feedback/feedback_service.dart'; import 'core/service/geofencing/GeofencingServices.dart'; import 'core/service/hospital_service.dart'; +import 'core/service/insurance_service.dart'; import 'core/service/medical/ActiveMedicationsService.dart'; import 'core/service/medical/AllergiesService.dart'; import 'core/service/medical/BloodPressureService.dart'; @@ -61,25 +62,25 @@ import 'core/service/medical/my_doctor_service.dart'; import 'core/service/medical/prescriptions_service.dart'; import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/reports_monthly_service.dart'; +import 'core/service/medical/reports_service.dart'; import 'core/service/medical/vital_sign_service.dart'; +import 'core/service/notifications_service.dart'; +import 'core/service/offers_service.dart'; import 'core/service/packages_offers/PackagesOffersServices.dart'; import 'core/service/parmacyModule/lacum-registration-service.dart'; import 'core/service/parmacyModule/lacum-service.dart'; import 'core/service/parmacyModule/lacum-transfer-service.dart'; import 'core/service/parmacyModule/order-preview-service.dart'; -import 'core/service/notifications_service.dart'; +import 'core/service/parmacyModule/parmacy_module_service.dart'; import 'core/service/parmacyModule/terms-condition-service.dart'; +import 'core/service/pharmacies_service.dart'; +import 'core/service/pharmacy_categorise_service.dart'; import 'core/service/privilege_service.dart'; import 'core/service/termsConditionsService.dart'; +import 'core/service/vaccine_service.dart'; import 'core/service/weather_service.dart'; import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; -import 'core/service/parmacyModule/parmacy_module_service.dart'; - -import 'core/service/offers_service.dart'; -import 'core/service/pharmacy_categorise_service.dart'; import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; -import 'core/viewModels/er/EdOnlineViewModel.dart'; -import 'core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; import 'core/viewModels/TermsConditionsViewModel.dart'; import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; @@ -90,59 +91,53 @@ import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'core/viewModels/child_vaccines/vaccination_table_view_model.dart'; import 'core/viewModels/contactus/findus_view_model.dart'; import 'core/viewModels/contactus/livechat_view_model.dart'; +import 'core/viewModels/er/EdOnlineViewModel.dart'; import 'core/viewModels/er/am_request_view_model.dart'; import 'core/viewModels/er/near_hospital_view_model.dart'; +import 'core/viewModels/er/rrt-view-model.dart'; import 'core/viewModels/feedback/feedback_view_model.dart'; -import 'core/service/medical/reports_service.dart'; import 'core/viewModels/hospital_view_model.dart'; +import 'core/viewModels/insurance_card_View_model.dart'; import 'core/viewModels/medical/ActiveMedicationsViewModel.dart'; import 'core/viewModels/medical/AllergiesViewModel.dart'; import 'core/viewModels/medical/EyeViewModel.dart'; +import 'core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; import 'core/viewModels/medical/ask_doctor_view_model.dart'; import 'core/viewModels/medical/blood_pressure_view_model.dart'; +import 'core/viewModels/medical/blood_sugar_view_model.dart'; import 'core/viewModels/medical/labs_view_model.dart'; import 'core/viewModels/medical/medical_view_model.dart'; import 'core/viewModels/medical/my_balance_view_model.dart'; import 'core/viewModels/medical/my_doctor_view_model.dart'; -import 'core/viewModels/medical/blood_sugar_view_model.dart'; import 'core/viewModels/medical/patient_sick_leave_view_model.dart'; import 'core/viewModels/medical/prescriptions_view_model.dart'; import 'core/viewModels/medical/radiology_view_model.dart'; import 'core/viewModels/medical/reports_monthly_view_model.dart'; -import 'core/viewModels/medical/vital_sign_view_model.dart'; import 'core/viewModels/medical/reports_view_model.dart'; +import 'core/viewModels/medical/vital_sign_view_model.dart'; import 'core/viewModels/medical/weight_pressure_view_model.dart'; import 'core/viewModels/notifications_view_model.dart'; import 'core/viewModels/offers_Categorise_view_model.dart'; import 'core/viewModels/packages_offers/PackagesOffersViewModel.dart'; import 'core/viewModels/pharmacies_view_model.dart'; -import 'core/service/pharmacies_service.dart'; -import 'core/service/insurance_service.dart'; -import 'core/viewModels/insurance_card_View_model.dart'; -import 'core/viewModels/pharmacyModule/brand_view_model.dart'; -import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; -import 'core/viewModels/pharmacyModule/product_detail_view_model.dart'; -import 'core/viewModels/pharmacyModule/review_view_model.dart'; -import 'core/viewModels/pharmacyModule/wishlist_view_model.dart'; -import 'core/viewModels/qr_view_model.dart'; -import 'core/viewModels/er/rrt-view-model.dart'; -import 'core/viewModels/vaccine_view_model.dart'; -import 'core/service/vaccine_service.dart'; -import 'core/viewModels/weather/weather_view_model.dart'; -import 'services/pharmacy_services/brands_service.dart'; -import 'services/pharmacy_services/product_detail_service.dart'; import 'core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'core/viewModels/pharmacyModule/brand_view_model.dart'; import 'core/viewModels/pharmacyModule/lacum-registration-viewModel.dart'; import 'core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart'; import 'core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'core/viewModels/pharmacyModule/review_view_model.dart'; import 'core/viewModels/pharmacyModule/tems-condition-viewmodel.dart'; +import 'core/viewModels/pharmacyModule/wishlist_view_model.dart'; import 'core/viewModels/pharmacy_categorise_view_model.dart'; import 'core/viewModels/qr_view_model.dart'; import 'core/viewModels/vaccine_view_model.dart'; -import 'core/service/vaccine_service.dart'; +import 'core/viewModels/weather/weather_view_model.dart'; +import 'services/pharmacy_services/brands_service.dart'; import 'services/pharmacy_services/orderDetails_service.dart'; import 'services/pharmacy_services/pharmacyAddress_service.dart'; +import 'services/pharmacy_services/product_detail_service.dart'; GetIt locator = GetIt.instance; diff --git a/lib/main.dart b/lib/main.dart index 548ca38e..49d37919 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,25 +1,24 @@ import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; -import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; +import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:firebase_analytics/firebase_analytics.dart'; -import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:provider/provider.dart'; -import 'config/config.dart'; + import 'config/size_config.dart'; import 'core/viewModels/project_view_model.dart'; import 'locator.dart'; import 'pages/pharmacies/compare-list.dart'; -import 'package:firebase_core/firebase_core.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart index f302f7a2..e2685e29 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart @@ -1,7 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart index f7e2ebef..8b53119b 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart @@ -1,10 +1,8 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:flutter/material.dart'; -import 'package:progress_hud_v2/generated/i18n.dart'; Future showCMCConfirmDialog(BuildContext context, String requestId, {Function onClick}) async { return showDialog( diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart index 6a445663..41fe54b9 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index daee9224..4b6b9b7f 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -5,21 +5,17 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:provider/provider.dart'; import 'new_cmc_step_one_page.dart'; -import 'new_cmc_step_three_page.dart'; -import 'new_cmc_step_tow_page.dart'; class NewCMCPage extends StatefulWidget { NewCMCPage({this.model}); diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index cbbda9b8..d4e2ee02 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index 3b7e5a22..c314812c 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart index 2aabfe77..230266a1 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -8,13 +8,11 @@ import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_v import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index 65b2d878..652f9b48 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_v import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart index b98d97c9..2cbfcd42 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart @@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart index a823c154..46a22980 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; @@ -15,7 +17,6 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import '../dialogs/select_city_dialog.dart'; -import 'dart:io'; class NewEReferralStepThreePage extends StatefulWidget { final CreateEReferralRequestModel createEReferralRequestModel; final Function changePageViewIndex; diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart index 5f85fe12..0228d757 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart @@ -8,13 +8,11 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dial import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import '../dialogs/select_city_dialog.dart'; diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart index 9007229a..713b9180 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart @@ -3,7 +3,6 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index d2255712..5494d0c1 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -3,17 +3,17 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; class NewHomeHealthCareStepOnePage extends StatefulWidget { final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart index 8e94a6b9..e8dc3ce8 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart @@ -4,17 +4,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; class NewHomeHealthCareStepThreePage extends StatefulWidget { final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart index 71936503..523d1296 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -1,15 +1,15 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; +import 'dart:async'; + import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; @@ -17,10 +17,8 @@ import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:provider/provider.dart'; -import 'dart:async'; + import 'location_page.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart'; class NewHomeHealthCareStepTowPage extends StatefulWidget { final Function(PickResult) onPick; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart index 2db006b4..4e50f7eb 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -5,20 +5,17 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import '../StepsWidget.dart'; -import 'package:diplomaticquarterapp/uitl/utils_new.dart'; + import 'new_Home_health_care_step_one_page.dart'; class NewHomeHealthCarePage extends StatefulWidget { diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart index 4ea50670..dc34d312 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart @@ -1,10 +1,7 @@ -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; class StepsWidget extends StatelessWidget { final int index; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart index fa0799f9..89091886 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'home_health_care_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart index ae516429..a5010c70 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -14,7 +15,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'Dialog/confirm_cancel_order_dialog.dart'; -import 'package:diplomaticquarterapp/uitl/utils_new.dart'; class OrdersLogDetailsPage extends StatelessWidget { final HomeHealthCareViewModel model; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index a7681687..b0b14f1d 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -13,7 +13,6 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converte import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; @@ -24,11 +23,9 @@ import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dar import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; - import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; -import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart index 4cb2b658..02ad27ec 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart @@ -1,13 +1,12 @@ import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class AnicllaryOrders extends StatefulWidget { @override diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart index f330717d..24f00ea5 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -1,15 +1,15 @@ +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart'; +import 'package:flutter/material.dart'; class AnicllaryOrdersDetails extends StatefulWidget { final dynamic appoNo; diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart index fee4ff40..03504f57 100644 --- a/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart @@ -1,11 +1,4 @@ -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; class OrdersPayment extends StatefulWidget { @override diff --git a/lib/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart b/lib/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart index 1558b8c7..33e874db 100644 --- a/lib/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart +++ b/lib/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart index c91ac5fd..16f9940a 100644 --- a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart @@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.d import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; - import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; diff --git a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart index 3405a327..3b2e166e 100644 --- a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart +++ b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart @@ -1,14 +1,13 @@ +import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; -import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; -import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; - class H20BottomNavigationBar extends StatelessWidget { H20BottomNavigationBar({Key key}) : super(key: key); diff --git a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart index b692e6ba..59a0a386 100644 --- a/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart +++ b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart @@ -1,12 +1,9 @@ import 'dart:math' as math; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/Dialog/confirm_add_amount_dialog.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart index bc1de1f6..a79c9d9d 100644 --- a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart +++ b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart @@ -5,14 +5,13 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; class HealthWeatherIndicator extends StatefulWidget { @override diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart index c71a0c87..ae7a35a7 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart @@ -1,11 +1,9 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart index ec7074c2..e90acc24 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart @@ -1,13 +1,11 @@ +import 'dart:math'; + import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'dart:math'; import '../health_calc_desc.dart'; import 'result_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart index 9b0ee417..91a430ca 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart @@ -1,10 +1,8 @@ -import 'dart:ffi'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart index 7dc30415..0e22c7ae 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart @@ -1,10 +1,9 @@ -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; + import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; import 'bmr_result_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart index 44a3dc9e..afbc9f1c 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -1,10 +1,10 @@ -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'dart:math'; + import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; import 'body_fat_result_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart index 25293a81..4e24f64a 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart index 474b8613..71055d7b 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart @@ -1,11 +1,10 @@ + import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; - import 'package:flutter/painting.dart'; class CarbsResult extends StatelessWidget { diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart index d9d238e8..84f76153 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart @@ -1,10 +1,9 @@ -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; + import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; import 'ideal_body_result_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart index 24fc768f..311b423a 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart @@ -1,10 +1,10 @@ + import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/doctor_list.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; class IdealBodyResult extends StatelessWidget { final double idealBodyWeight; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart index 99c7505d..86699ed4 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart @@ -1,8 +1,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart index c512f181..bc345711 100644 --- a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart index 1b25f443..faa3af72 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart @@ -1,10 +1,8 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; - +import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; const activeCardColor = Color(0xffD02127); diff --git a/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart b/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart index 35184f7b..b9571d2b 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart @@ -1,12 +1,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; - +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; const activeCardColor = Color(0xff70777A); diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart index 9e8defc1..f6646d36 100644 --- a/lib/pages/AlHabibMedicalService/my_web_view.dart +++ b/lib/pages/AlHabibMedicalService/my_web_view.dart @@ -1,7 +1,7 @@ import 'dart:async'; + import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; - import 'package:webview_flutter/webview_flutter.dart'; class MyWebView extends StatelessWidget { diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index 63567eff..1c861462 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; - //import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; diff --git a/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart b/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart index 5808aed8..bb9afd6c 100644 --- a/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart +++ b/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart @@ -1,5 +1,3 @@ -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; -import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart b/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart index bea4f694..150d408e 100644 --- a/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart +++ b/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart @@ -1,6 +1,4 @@ -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; -import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/Blood/new_text_Field.dart b/lib/pages/Blood/new_text_Field.dart index ad9eb580..8506ac6a 100644 --- a/lib/pages/Blood/new_text_Field.dart +++ b/lib/pages/Blood/new_text_Field.dart @@ -1,4 +1,3 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index afeb1241..43eed6ed 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -22,9 +22,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; -import 'package:rating_bar/rating_bar.dart'; -import 'BookSuccess.dart'; import 'book_reminder_page.dart'; class BookConfirm extends StatefulWidget { diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index f083f3ae..da7ec5c1 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -12,11 +12,11 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/utils_new.dart'; class DentalComplaints extends StatefulWidget { SearchInfo searchInfo; diff --git a/lib/pages/BookAppointment/Search.dart b/lib/pages/BookAppointment/Search.dart index e44cb108..20efe489 100644 --- a/lib/pages/BookAppointment/Search.dart +++ b/lib/pages/BookAppointment/Search.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; -import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart index 97dfc187..2b03f552 100644 --- a/lib/pages/BookAppointment/SearchResults.dart +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; - // import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; diff --git a/lib/pages/BookAppointment/book_reminder_page.dart b/lib/pages/BookAppointment/book_reminder_page.dart index 27f022f9..fcdd8fd4 100644 --- a/lib/pages/BookAppointment/book_reminder_page.dart +++ b/lib/pages/BookAppointment/book_reminder_page.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; -import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -14,7 +13,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -import 'package:jiffy/jiffy.dart'; import 'package:permission_handler/permission_handler.dart'; import 'BookSuccess.dart'; diff --git a/lib/pages/BookAppointment/components/DocInfo.dart b/lib/pages/BookAppointment/components/DocInfo.dart index a4bf12e0..6e10df41 100644 --- a/lib/pages/BookAppointment/components/DocInfo.dart +++ b/lib/pages/BookAppointment/components/DocInfo.dart @@ -1,10 +1,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; -import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; class DoctorInformation extends StatelessWidget { DoctorProfileList docProfileList; diff --git a/lib/pages/BookAppointment/doctor_post_pre_images_page.dart b/lib/pages/BookAppointment/doctor_post_pre_images_page.dart index 85e37308..eddae9d2 100644 --- a/lib/pages/BookAppointment/doctor_post_pre_images_page.dart +++ b/lib/pages/BookAppointment/doctor_post_pre_images_page.dart @@ -1,6 +1,4 @@ import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart index f0ba3091..760f672a 100644 --- a/lib/pages/BookAppointment/widgets/reminder_dialog.dart +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index 3c0d072b..edbd0745 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -4,22 +4,18 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/add_new_child_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; -import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; -import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; enum Gender { Male, Female, NON } enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart index c08749b8..40d8d1fa 100644 --- a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart +++ b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart @@ -1,5 +1,3 @@ -import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/ChildVaccines/dialogs/delete_child.dart b/lib/pages/ChildVaccines/dialogs/delete_child.dart index 250f40d3..9eb49d27 100644 --- a/lib/pages/ChildVaccines/dialogs/delete_child.dart +++ b/lib/pages/ChildVaccines/dialogs/delete_child.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart index 7b8499e0..a7ba1b71 100644 --- a/lib/pages/ChildVaccines/vaccinationtable_page.dart +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; @@ -12,7 +11,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'dialogs/SelectGenderDialog.dart'; diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 01e03e6c..2780d1d2 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -1,17 +1,12 @@ -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - import 'package:url_launcher/url_launcher.dart'; class HospitalsLiveChatPage extends StatefulWidget { diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index 0f1bc517..d2b24e89 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart index 9657e234..f8926eed 100644 --- a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart @@ -1,17 +1,12 @@ -import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - import 'package:url_launcher/url_launcher.dart'; class PharmaciesLiveChatPage extends StatelessWidget { diff --git a/lib/pages/ContactUs/contact_us_page.dart b/lib/pages/ContactUs/contact_us_page.dart index 4ad2f70f..4e2cc334 100644 --- a/lib/pages/ContactUs/contact_us_page.dart +++ b/lib/pages/ContactUs/contact_us_page.dart @@ -1,11 +1,9 @@ import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; - import 'package:flutter/material.dart'; + import '../../uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; class ContactUsPage extends StatefulWidget { @override diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index 8e3f3674..06afe9a4 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -5,8 +5,6 @@ import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; - -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 41dcdf58..52c8044e 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -1,15 +1,10 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; -import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart'; +import 'package:url_launcher/url_launcher.dart'; class HospitalsPage extends StatefulWidget { final List findusHospitalModelList; diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart index 58460e9c..b92dbacd 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -1,11 +1,5 @@ -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; -import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index ba8dd493..f6ed41a3 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; diff --git a/lib/pages/DrawerPages/family/add-family-member.dart b/lib/pages/DrawerPages/family/add-family-member.dart index 35b19ccd..ee9dbd8b 100644 --- a/lib/pages/DrawerPages/family/add-family-member.dart +++ b/lib/pages/DrawerPages/family/add-family-member.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/family-file/add_family_file_request.dart'; import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_request.dart'; @@ -17,7 +18,6 @@ import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_pro import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'add-family_type.dart'; diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart index e4a82cb4..48773820 100644 --- a/lib/pages/DrawerPages/family/add-family_type.dart +++ b/lib/pages/DrawerPages/family/add-family_type.dart @@ -1,13 +1,11 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/routes.dart'; class AddFamilyMemberType extends StatelessWidget { static int loginType = 0; diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 7ba6cc4e..ccfaffa6 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -1,5 +1,6 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; @@ -11,29 +12,22 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as list; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; -import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:provider/provider.dart'; class MyFamily extends StatefulWidget { diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index 1d4e78ee..cf290e5e 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -1,18 +1,13 @@ +import 'dart:ui'; + import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'dart:ui'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart'; import 'OrderLogPage.dart'; diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart index 26c973d7..cb77b22c 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart'; diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart index 43449555..beebc2f8 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; diff --git a/lib/pages/ErService/EdOnline/DdServicesPage.dart b/lib/pages/ErService/EdOnline/DdServicesPage.dart index 47f73c42..edab81c1 100644 --- a/lib/pages/ErService/EdOnline/DdServicesPage.dart +++ b/lib/pages/ErService/EdOnline/DdServicesPage.dart @@ -1,18 +1,17 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'ConfirmExitPageDialog.dart'; import 'EdOnlineAgreementPage.dart'; import 'EdOnlineNotesPage.dart'; import 'EdOnlineQuestionsPage.dart'; import 'EdOnlineSelectedHospitalPage.dart'; import 'EdPaymentInformationPage.dart'; -import 'ConfirmExitPageDialog.dart'; class DdServicesPage extends StatefulWidget { @override diff --git a/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart index 45df4041..fd0c8e9a 100644 --- a/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart +++ b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; diff --git a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart index 34c41040..b8498e7c 100644 --- a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart +++ b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index 8b3e03ed..827fd7bb 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -1,19 +1,16 @@ -import 'dart:convert'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; - import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../../uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; +import '../../uitl/translations_delegate_base.dart'; import 'AmbulanceReq.dart'; import 'EdOnline/DdServicesPage.dart'; -import 'EdOnline/EdOnlineSelectedHospitalPage.dart'; import 'NearestEr.dart'; class ErOptions extends StatefulWidget { diff --git a/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart b/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart index c3048127..4ee9cb65 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/pages/conference/clipped_video.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart index 59f11fb2..773ff6bb 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart @@ -1,9 +1,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart index 20acbbb4..9c4faee6 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart @@ -2,15 +2,12 @@ import 'dart:async'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/RadioStringDialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart index 8287bfad..e9443cbc 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; -import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -10,7 +9,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; diff --git a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart index 4cbfeb4b..c1906c29 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-agreement-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart'; diff --git a/lib/pages/ErService/widgets/card_position.dart b/lib/pages/ErService/widgets/card_position.dart index 29fdd5a4..fc0ca9e4 100644 --- a/lib/pages/ErService/widgets/card_position.dart +++ b/lib/pages/ErService/widgets/card_position.dart @@ -1,14 +1,10 @@ //import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart'; - - -import '../NearestEr.dart'; +import 'package:url_launcher/url_launcher.dart'; class CardPosition extends StatelessWidget { final image; @@ -17,52 +13,43 @@ class CardPosition extends StatelessWidget { final type; final telephone; final networkImage; - final latitude; + final latitude; final longitude; final projectname; final cardSize; final String waitingTime; - const CardPosition( - { - @required this.image, - @required this.text, - @required this.subText, - @required this.type, - @required this.telephone, - @required this.networkImage , - @required this.latitude, - @required this.longitude, - @required this.projectname , - @required this.cardSize, - @required this.waitingTime , - }); + const CardPosition({ + @required this.image, + @required this.text, + @required this.subText, + @required this.type, + @required this.telephone, + @required this.networkImage, + @required this.latitude, + @required this.longitude, + @required this.projectname, + @required this.cardSize, + @required this.waitingTime, + }); @override Widget build(BuildContext context) { return GestureDetector( onTap: () { - navigateToSearch(context, this.type,this.telephone,this.networkImage,this.latitude,this.longitude,this.projectname); - + navigateToSearch(context, this.type, this.telephone, this.networkImage, this.latitude, this.longitude, this.projectname); }, child: Container( // width:MediaQuery.of(context).size.width * 0.47,//165, margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 8.0), - decoration: BoxDecoration(boxShadow: [ - BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0) - ], borderRadius: BorderRadius.circular(10), color: Colors.white), + decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( height: cardSize * 0.2 - 8, margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 0.0), - child: Text(this.text, - overflow: TextOverflow.clip, - style: TextStyle( - color: Colors.black, - letterSpacing: 1.0, - fontSize: 2 * SizeConfig.textMultiplier)), + child: Text(this.text, overflow: TextOverflow.clip, style: TextStyle(color: Colors.black, letterSpacing: 1.0, fontSize: 2 * SizeConfig.textMultiplier)), ), Container( height: cardSize * 0.5 - 8, @@ -73,39 +60,47 @@ class CardPosition extends StatelessWidget { Container( margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), height: cardSize * 0.2 - 8, - child: Text(this.subText, - overflow: TextOverflow.clip, - style: TextStyle( - color: Color(0xFFc5272d), letterSpacing: 1.0, fontSize: 15.0)), + child: Text(this.subText, overflow: TextOverflow.clip, style: TextStyle(color: Color(0xFFc5272d), letterSpacing: 1.0, fontSize: 15.0)), ), - ], ), ), ); } - Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async { + Future navigateToSearch(context, type, telephone, networkImage, latitude, longitude, projectname) async { var localize = TranslationBase.of(context); showDialog( - context: context,builder: (_) => AssetGiffyDialog( - entryAnimation: EntryAnimation.BOTTOM, - image:Image.network(networkImage, fit: BoxFit.cover,), - title: Text(projectname, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ), - description: Text("${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", textAlign: TextAlign.center,), - buttonOkText:Text("LOCATION", style: TextStyle(color: Colors.white),), - buttonOkColor: Colors.grey, - buttonCancelText:Text('CAll', style: TextStyle(color: Colors.white),) , - buttonCancelColor: Colors.grey, - onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);}, - onCancelButtonPressed :() {launch("tel://" +telephone);} - )); - + context: context, + builder: (_) => AssetGiffyDialog( + entryAnimation: EntryAnimation.BOTTOM, + image: Image.network( + networkImage, + fit: BoxFit.cover, + ), + title: Text( + projectname, + style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), + ), + description: Text( + "${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", + textAlign: TextAlign.center, + ), + buttonOkText: Text( + "LOCATION", + style: TextStyle(color: Colors.white), + ), + buttonOkColor: Colors.grey, + buttonCancelText: Text( + 'CAll', + style: TextStyle(color: Colors.white), + ), + buttonCancelColor: Colors.grey, + onOkButtonPressed: () { + MapsLauncher.launchCoordinates(double.parse(latitude), double.parse(longitude), projectname); + }, + onCancelButtonPressed: () { + launch("tel://" + telephone); + })); } - } - - diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart index 7450eae9..26f631c2 100644 --- a/lib/pages/MyAppointments/AppointmentDetails.dart +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; @@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailab import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -21,9 +23,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + import 'widgets/AppointmentActions.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; class AppointmentDetails extends StatefulWidget { AppoitmentAllHistoryResultList appo; diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index dff915cc..a0e68496 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -1,13 +1,11 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; -import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; diff --git a/lib/pages/MyAppointments/SchedulePage.dart b/lib/pages/MyAppointments/SchedulePage.dart index 10b52f10..7f800e03 100644 --- a/lib/pages/MyAppointments/SchedulePage.dart +++ b/lib/pages/MyAppointments/SchedulePage.dart @@ -1,20 +1,16 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; - import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; class SchedulePage extends StatefulWidget { DoctorList doctorList; diff --git a/lib/pages/MyAppointments/widgets/reminder_dialog.dart b/lib/pages/MyAppointments/widgets/reminder_dialog.dart index bc44770e..bc120df8 100644 --- a/lib/pages/MyAppointments/widgets/reminder_dialog.dart +++ b/lib/pages/MyAppointments/widgets/reminder_dialog.dart @@ -1,6 +1,4 @@ -import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/custom_radio.dart'; -import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; diff --git a/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart b/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart index db21d662..ed8c324c 100644 --- a/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart +++ b/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart @@ -1,8 +1,6 @@ -import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/custom_radio.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:manage_calendar_events/manage_calendar_events.dart'; diff --git a/lib/pages/conference/widgets/noise_box.dart b/lib/pages/conference/widgets/noise_box.dart index 5087415f..37d94fb5 100644 --- a/lib/pages/conference/widgets/noise_box.dart +++ b/lib/pages/conference/widgets/noise_box.dart @@ -1,5 +1,6 @@ import 'dart:math' as math; import 'dart:ui'; + import 'package:flutter/material.dart'; enum NoiseBoxDensity { diff --git a/lib/pages/conference/widgets/platform_alert_dialog.dart b/lib/pages/conference/widgets/platform_alert_dialog.dart index 1adaa223..ce5c086c 100644 --- a/lib/pages/conference/widgets/platform_alert_dialog.dart +++ b/lib/pages/conference/widgets/platform_alert_dialog.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import './platform_widget.dart'; diff --git a/lib/pages/conference/widgets/platform_exception_alert_dialog.dart b/lib/pages/conference/widgets/platform_exception_alert_dialog.dart index 931a6e10..12faf640 100644 --- a/lib/pages/conference/widgets/platform_exception_alert_dialog.dart +++ b/lib/pages/conference/widgets/platform_exception_alert_dialog.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; + import './platform_alert_dialog.dart'; class PlatformExceptionAlertDialog extends PlatformAlertDialog { diff --git a/lib/pages/conference/widgets/platform_widget.dart b/lib/pages/conference/widgets/platform_widget.dart index 5773190f..d3366d5e 100644 --- a/lib/pages/conference/widgets/platform_widget.dart +++ b/lib/pages/conference/widgets/platform_widget.dart @@ -1,4 +1,5 @@ import 'dart:io'; + import 'package:flutter/material.dart'; abstract class PlatformWidget extends StatelessWidget { diff --git a/lib/pages/feedback/feedback-detail.dart b/lib/pages/feedback/feedback-detail.dart index 06cf0865..62ab1aa7 100644 --- a/lib/pages/feedback/feedback-detail.dart +++ b/lib/pages/feedback/feedback-detail.dart @@ -1,8 +1,8 @@ import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; class FeedbackDetails extends StatelessWidget { final COCItem items; diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart index 06a7f7cd..72f09bed 100644 --- a/lib/pages/feedback/feedback_home_page.dart +++ b/lib/pages/feedback/feedback_home_page.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index a7bfde60..7ba5e29c 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -1,5 +1,6 @@ +import 'dart:io'; + import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; @@ -11,11 +12,8 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart'; @@ -25,9 +23,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; -import 'dart:convert'; -import 'dart:io'; -import 'appointment_history.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; class SendFeedbackPage extends StatefulWidget { diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index b1eb60ac..18993f1d 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -1,11 +1,8 @@ -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; diff --git a/lib/pages/final_products_page.dart b/lib/pages/final_products_page.dart index 1d5e511b..fc866346 100644 --- a/lib/pages/final_products_page.dart +++ b/lib/pages/final_products_page.dart @@ -1,15 +1,13 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:flutter/src/widgets/image.dart' as flutterImage; + import 'base/base_view.dart'; class FinalProductsPage extends StatefulWidget { diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart index adceb0e8..38fd75d5 100644 --- a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -1,7 +1,7 @@ import 'dart:io'; + import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index e756e59c..b68c9d86 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -1,18 +1,15 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/insurance/insurance_card_update_details.dart b/lib/pages/insurance/insurance_card_update_details.dart index af7dbb44..b6ee6f3b 100644 --- a/lib/pages/insurance/insurance_card_update_details.dart +++ b/lib/pages/insurance/insurance_card_update_details.dart @@ -9,11 +9,11 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; + import 'AttachInsuranceCardImageDialog.dart'; class InsuranceCardUpdateDetails extends StatelessWidget { diff --git a/lib/pages/insurance/insurance_details.dart b/lib/pages/insurance/insurance_details.dart index f2fe64cf..807987c8 100644 --- a/lib/pages/insurance/insurance_details.dart +++ b/lib/pages/insurance/insurance_details.dart @@ -1,12 +1,9 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:flutter_html/flutter_html.dart'; -import 'package:html/dom.dart' as dom; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; class InsuranceCardDetails extends StatelessWidget { final String data; diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index 69115842..e1f347a0 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -4,8 +4,6 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart index dc035859..24b5465f 100644 --- a/lib/pages/insurance/insurance_update_screen.dart +++ b/lib/pages/insurance/insurance_update_screen.dart @@ -1,22 +1,12 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; -import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; -import 'package:diplomaticquarterapp/locator.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart'; +import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import '../base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; -import 'insurance_card_update_details.dart'; +import '../base/base_view.dart'; import 'insurance_page.dart'; class InsuranceUpdate extends StatefulWidget { diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 08509085..f06dd300 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -1,3 +1,5 @@ +import 'dart:math' as math; + import 'package:auto_size_text/auto_size_text.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; @@ -17,12 +19,10 @@ import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; -import 'dart:math' as math; class HomePageFragment2 extends StatefulWidget { DashboardViewModel model; diff --git a/lib/pages/landing/home_page_2.dart b/lib/pages/landing/home_page_2.dart index 1c019682..2245872b 100644 --- a/lib/pages/landing/home_page_2.dart +++ b/lib/pages/landing/home_page_2.dart @@ -2,21 +2,13 @@ import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; - import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; - import 'package:diplomaticquarterapp/pages/base/base_view.dart'; - - import 'package:diplomaticquarterapp/theme/colors.dart'; - import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; - import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import 'fragments/home_page_fragment2.dart'; diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart index 067cb148..a73b4531 100644 --- a/lib/pages/landing/widgets/logged_slider_view.dart +++ b/lib/pages/landing/widgets/logged_slider_view.dart @@ -1,13 +1,12 @@ import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/models/slider_data.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; -import 'package:diplomaticquarterapp/models/slider_data.dart'; import 'package:flutter_svg/flutter_svg.dart'; class LoggedSliderView extends StatelessWidget { diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart index 262ac473..e083448c 100644 --- a/lib/pages/landing/widgets/services_view.dart +++ b/lib/pages/landing/widgets/services_view.dart @@ -6,7 +6,6 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_re import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; -import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; diff --git a/lib/pages/landing/widgets/slider_view.dart b/lib/pages/landing/widgets/slider_view.dart index bb7afae6..09a8f50d 100644 --- a/lib/pages/landing/widgets/slider_view.dart +++ b/lib/pages/landing/widgets/slider_view.dart @@ -1,10 +1,10 @@ +import 'dart:math'; + import 'package:auto_size_text/auto_size_text.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; - import 'package:provider/provider.dart'; class SliderView extends StatelessWidget { diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart index a8eeab12..a45e6f3e 100644 --- a/lib/pages/livecare/livecare_home.dart +++ b/lib/pages/livecare/livecare_home.dart @@ -1,5 +1,5 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart'; @@ -10,7 +10,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; class LiveCareHome extends StatefulWidget { static bool showFooterButton = true; diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 5254e3c1..054d11a6 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/pages/login/forgot-password.dart'; import 'package:diplomaticquarterapp/pages/login/login.dart'; import 'package:diplomaticquarterapp/pages/login/register.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index cf5d2505..88a63ad6 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; @@ -16,24 +15,20 @@ import 'package:diplomaticquarterapp/pages/login/register.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; -import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; -import '../../Constants.dart'; class Login extends StatefulWidget { @override diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index e1152032..4691983c 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -1,10 +1,13 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; -import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation; +import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; @@ -21,9 +24,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hijri/hijri_calendar.dart'; import 'package:intl/intl.dart'; -import 'package:diplomaticquarterapp/locator.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:provider/provider.dart'; class RegisterInfo extends StatefulWidget { diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index 9d9a278d..389c9dc9 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -1,11 +1,8 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/pages/login/register.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart index 10c842ab..0332fd91 100644 --- a/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart +++ b/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart @@ -1,14 +1,8 @@ import 'dart:ui'; -import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index b115dcad..beec5f66 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -16,7 +16,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index a2d6078c..9eacff2d 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -15,7 +15,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart b/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart index 731632c9..01529f52 100644 --- a/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart +++ b/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart b/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart index 4307637e..7605a879 100644 --- a/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart +++ b/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/balance/dialogs/SelectPatientFamilyDialog.dart b/lib/pages/medical/balance/dialogs/SelectPatientFamilyDialog.dart index 445eb3c8..667f156d 100644 --- a/lib/pages/medical/balance/dialogs/SelectPatientFamilyDialog.dart +++ b/lib/pages/medical/balance/dialogs/SelectPatientFamilyDialog.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/balance/dialogs/SelectPatientInfoDialog.dart b/lib/pages/medical/balance/dialogs/SelectPatientInfoDialog.dart index 614ac86a..759a6874 100644 --- a/lib/pages/medical/balance/dialogs/SelectPatientInfoDialog.dart +++ b/lib/pages/medical/balance/dialogs/SelectPatientInfoDialog.dart @@ -1,8 +1,5 @@ -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; -import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 28e1510a..d7336714 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/medical/balance/new_text_Field.dart b/lib/pages/medical/balance/new_text_Field.dart index 2d19a2f8..972d6b92 100644 --- a/lib/pages/medical/balance/new_text_Field.dart +++ b/lib/pages/medical/balance/new_text_Field.dart @@ -1,4 +1,3 @@ -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart index ffa3c820..ac35db45 100644 --- a/lib/pages/medical/doctor/doctor_home_page.dart +++ b/lib/pages/medical/doctor/doctor_home_page.dart @@ -4,18 +4,13 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_mode import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'doctor_profile_page.dart'; - class DoctorHomePage extends StatelessWidget { List imagesInfo = List(); @override diff --git a/lib/pages/medical/doctor/doctor_profile_page.dart b/lib/pages/medical/doctor/doctor_profile_page.dart index 7588205c..18e76002 100644 --- a/lib/pages/medical/doctor/doctor_profile_page.dart +++ b/lib/pages/medical/doctor/doctor_profile_page.dart @@ -1,15 +1,9 @@ import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:rating_bar/rating_bar.dart'; - -import 'doctor_information_page.dart'; class DoctorProfilePage extends StatefulWidget { final PatientDoctorAppointment patientDoctorAppointment; diff --git a/lib/pages/medical/eye/ContactLensPage.dart b/lib/pages/medical/eye/ContactLensPage.dart index feaabc8c..a681b2f0 100644 --- a/lib/pages/medical/eye/ContactLensPage.dart +++ b/lib/pages/medical/eye/ContactLensPage.dart @@ -2,11 +2,8 @@ import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.da import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/medical/eye/EyeHomePage.dart b/lib/pages/medical/eye/EyeHomePage.dart index 00111283..77beae34 100644 --- a/lib/pages/medical/eye/EyeHomePage.dart +++ b/lib/pages/medical/eye/EyeHomePage.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; @@ -13,10 +12,8 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; -import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/eye/EyeMeasurementsPage.dart b/lib/pages/medical/eye/EyeMeasurementsPage.dart index 8c1b656a..60730b30 100644 --- a/lib/pages/medical/eye/EyeMeasurementsPage.dart +++ b/lib/pages/medical/eye/EyeMeasurementsPage.dart @@ -2,15 +2,11 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart index 2cce6dc2..cf0ec4e2 100644 --- a/lib/pages/medical/labs/laboratory_result_page.dart +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dar import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/laboratory_result_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart index 471c2d10..9b14e6f4 100644 --- a/lib/pages/medical/labs/labs_home_page.dart +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; - import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart index ec9f15e6..97e1fe70 100644 --- a/lib/pages/medical/medical_profile_page_new.dart +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -1,54 +1,17 @@ -import 'dart:math'; -import 'package:badges/badges.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart'; -import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; -import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; -import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; -import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_new_widget.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:provider/provider.dart'; -import '../../locator.dart'; -import '../../uitl/gif_loader_dialog_utils.dart'; -import 'active_medications/ActiveMedicationsPage.dart'; -import 'allergies_page.dart'; -import 'ask_doctor/ask_doctor_home_page.dart'; -import 'balance/my_balance_page.dart'; -import 'doctor/doctor_home_page.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; -import 'eye/EyeHomePage.dart'; -import 'eye/EyeMeasurementsPage.dart'; -import 'labs/labs_home_page.dart'; -import 'my_trackers/my_trackers.dart'; class MedicalProfilePageNew extends StatefulWidget { @override diff --git a/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart b/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart index b275b237..cfd6b997 100644 --- a/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart +++ b/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart @@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/RadioStringDialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; @@ -15,7 +15,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; class AddWeightPage extends StatefulWidget { final WeightPressureViewModel model; diff --git a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart index 27ffb386..3661d1fd 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart @@ -10,10 +10,11 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + import 'AddWeightPage.dart'; import 'WeightMonthlyPage.dart'; -import 'WeightYeaPage.dart'; import 'WeightWeeklyPage.dart'; +import 'WeightYeaPage.dart'; class WeightHomePage extends StatefulWidget { @override diff --git a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart index 285dc281..5088d572 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart @@ -1,23 +1,16 @@ -import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:hexcolor/hexcolor.dart'; -import "package:collection/collection.dart"; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; class WeightMonthlyPage extends StatelessWidget { final WeightPressureViewModel model; diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart index 99d025a2..81d8c150 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart @@ -3,16 +3,15 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; + import 'AddWeightPage.dart'; class WeightWeeklyPage extends StatelessWidget { diff --git a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart index c38b0977..9c2414eb 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart @@ -1,23 +1,16 @@ -import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import "package:collection/collection.dart"; -import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; class WeightYearPage extends StatelessWidget { final WeightPressureViewModel model; diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart index 41189415..0ccd8964 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/RadioStringDialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; @@ -15,7 +15,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; class AddBloodPressurePage extends StatefulWidget { final DateTime bloodSugarDate; diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart index 9faf74af..8f79bb34 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart @@ -1,17 +1,16 @@ +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; -import "package:collection/collection.dart"; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; class BloodPressureMonthlyPage extends StatelessWidget { final BloodPressureViewMode model; diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart index aa5fa267..c31b5f5c 100644 --- a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart +++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart @@ -1,16 +1,16 @@ +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; -import "package:collection/collection.dart"; class BloodPressureYearPage extends StatelessWidget { final BloodPressureViewMode model; diff --git a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart index b6c15034..33443e99 100644 --- a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart +++ b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart @@ -7,7 +7,6 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/RadioStringDialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; diff --git a/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart b/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart index c89a4164..5a3710e5 100644 --- a/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart +++ b/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart @@ -1,22 +1,17 @@ +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/YearMonthlyChartDate.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:hexcolor/hexcolor.dart'; -import "package:collection/collection.dart"; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; class BloodMonthlyPage extends StatelessWidget { final List diabtecPatientResult; diff --git a/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart b/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart index e9280fd4..d4e1698e 100644 --- a/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart +++ b/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart @@ -1,20 +1,17 @@ +import "package:collection/collection.dart"; import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; -import "package:collection/collection.dart"; class BloodYearPage extends StatelessWidget { final List diabtecPatientResult; diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart index fd5ebc39..1f32f2b8 100644 --- a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart +++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart @@ -1,4 +1,3 @@ -import 'dart:ui'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; @@ -7,15 +6,12 @@ import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/TabBarWidg import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:charts_flutter/flutter.dart' as charts; -import 'package:hexcolor/hexcolor.dart'; import 'AddBloodSugarPage.dart'; import 'BloodMonthly.dart'; diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart index 76339aa5..9afcd888 100644 --- a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart +++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart @@ -1,20 +1,19 @@ import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; -import 'package:diplomaticquarterapp/core/model/my_trakers/chartData/WeekChartDate.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; import 'package:provider/provider.dart'; + import 'AddBloodSugarPage.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; class BloodSugarWeeklyPage extends StatelessWidget { final List diabtecPatientResult; diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index ac9a4ea8..f9f8f7e2 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -1,9 +1,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; -import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; diff --git a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart index 2f87ffae..d56938ac 100644 --- a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart +++ b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; -import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; diff --git a/lib/pages/medical/prescriptions/prescription_details_inp.dart b/lib/pages/medical/prescriptions/prescription_details_inp.dart index 55476a11..8c181f88 100644 --- a/lib/pages/medical/prescriptions/prescription_details_inp.dart +++ b/lib/pages/medical/prescriptions/prescription_details_inp.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; diff --git a/lib/pages/medical/prescriptions/prescription_details_page.dart b/lib/pages/medical/prescriptions/prescription_details_page.dart index 02be8fdb..6741ae85 100644 --- a/lib/pages/medical/prescriptions/prescription_details_page.dart +++ b/lib/pages/medical/prescriptions/prescription_details_page.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart index 7d65837d..9865da16 100644 --- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart @@ -7,14 +7,11 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import '../../../Constants.dart'; - class HomePrescriptionsPage extends StatefulWidget { @override _HomePrescriptionsPageState createState() => _HomePrescriptionsPageState(); diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart index ae2ded5b..21f88802 100644 --- a/lib/pages/medical/radiology/radiology_home_page.dart +++ b/lib/pages/medical/radiology/radiology_home_page.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_mode import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart index 9e6994da..722cddb6 100644 --- a/lib/pages/medical/reports/report_list_widget.dart +++ b/lib/pages/medical/reports/report_list_widget.dart @@ -9,7 +9,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/smart_watch_health_data/health_data_list.dart b/lib/pages/medical/smart_watch_health_data/health_data_list.dart index ea8746e9..cbfc1c5c 100644 --- a/lib/pages/medical/smart_watch_health_data/health_data_list.dart +++ b/lib/pages/medical/smart_watch_health_data/health_data_list.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/stepsTracker.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; // import 'package:fit_kit/fit_kit.dart'; diff --git a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart index 727e6ce7..b4afebad 100644 --- a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart index e28b52e1..45bdd40e 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class VitalSignBloodPressureWidget extends StatefulWidget { diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart index 9a9dbd10..d11e91f5 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart @@ -6,18 +6,14 @@ import 'package:diplomaticquarterapp/models/vital_sign.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_item.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_item_details_screen.dart'; -import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:flutter_svg/svg.dart'; -import '../../../d_q_icons_icons.dart'; - class VitalSignDetailsScreen extends StatelessWidget { static const String url = "assets/images/"; diff --git a/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart b/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart index 113e29a6..048f30f0 100644 --- a/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart +++ b/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart @@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class VitalSignDetailsWidget extends StatefulWidget { diff --git a/lib/pages/medical/vital_sign/vital_sign_item.dart b/lib/pages/medical/vital_sign/vital_sign_item.dart index 44321942..37cbbf27 100644 --- a/lib/pages/medical/vital_sign/vital_sign_item.dart +++ b/lib/pages/medical/vital_sign/vital_sign_item.dart @@ -1,12 +1,10 @@ import 'package:auto_size_text/auto_size_text.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/models/vital_sign.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hexcolor/hexcolor.dart'; class VitalSignItem extends StatelessWidget { const VitalSignItem({ diff --git a/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart b/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart index 65d838a1..6bec6023 100644 --- a/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart @@ -1,15 +1,11 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_wideget.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:flutter/material.dart'; - -import 'package:charts_flutter/flutter.dart' as charts; import 'package:provider/provider.dart'; import 'LineChartCurved.dart'; diff --git a/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart index 2343f939..1255a43d 100644 --- a/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart @@ -1,19 +1,13 @@ import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart'; -import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_wideget.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:flutter/material.dart'; - -import 'package:charts_flutter/flutter.dart' as charts; import 'package:provider/provider.dart'; -import 'LineChartCurved.dart'; import 'LineChartCurvedBloodPressure.dart'; class VitalSingChartBloodPressure extends StatelessWidget { diff --git a/lib/pages/offers_categorise_page.dart b/lib/pages/offers_categorise_page.dart index f3875d1a..a95cd263 100644 --- a/lib/pages/offers_categorise_page.dart +++ b/lib/pages/offers_categorise_page.dart @@ -1,10 +1,8 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/offers_Categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart b/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart index 76688606..d522d81e 100644 --- a/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart +++ b/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart @@ -1,26 +1,15 @@ import 'package:after_layout/after_layout.dart'; -import 'package:carousel_slider/carousel_slider.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackageDetailPage.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; -import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:flutter/rendering.dart'; -import 'package:flutter_material_pickers/flutter_material_pickers.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'CreateCustomerDailogPage.dart'; diff --git a/lib/pages/packages_offers/CreateCustomerDailogPage.dart b/lib/pages/packages_offers/CreateCustomerDailogPage.dart index 73e95d09..d7a98a64 100644 --- a/lib/pages/packages_offers/CreateCustomerDailogPage.dart +++ b/lib/pages/packages_offers/CreateCustomerDailogPage.dart @@ -1,35 +1,16 @@ import 'package:after_layout/after_layout.dart'; -import 'package:carousel_slider/carousel_slider.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/CreateCustomerRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/ClinicOfferAndPackagesPage.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackageDetailPage.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesCartPage.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/AnimatedTextFields.dart'; -import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/LoadingButton.dart'; -import 'package:diplomaticquarterapp/widgets/carousel_indicator/carousel_indicator.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; -import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:flutter/rendering.dart'; -import 'package:flutter_material_pickers/flutter_material_pickers.dart'; dynamic languageID; var emailRegex = RegExp(r'^[^\s@]+@[^\s@]+\.[^\s@]+$'); diff --git a/lib/pages/packages_offers/OfferAndPackageDetailPage.dart b/lib/pages/packages_offers/OfferAndPackageDetailPage.dart index d0e69d14..8aeb4edf 100644 --- a/lib/pages/packages_offers/OfferAndPackageDetailPage.dart +++ b/lib/pages/packages_offers/OfferAndPackageDetailPage.dart @@ -1,7 +1,4 @@ -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/ProductCheckTypeWidget.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -11,9 +8,6 @@ import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; - -import 'ClinicOfferAndPackagesPage.dart'; class OfferAndPackagesDetail extends StatefulWidget{ final dynamic model; diff --git a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart index 77d168ac..8e8085d7 100644 --- a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart +++ b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart @@ -1,37 +1,22 @@ import 'package:after_layout/after_layout.dart'; -import 'package:carousel_slider/carousel_slider.dart'; -import 'package:diplomaticquarterapp/core/enum/PaymentOptions.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/ResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/ClinicOfferAndPackagesPage.dart'; -import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackageDetailPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/PackageOrderCompletedPage.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; -import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; -import 'package:diplomaticquarterapp/widgets/carousel_indicator/carousel_indicator.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; -import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesCartItemCard.dart'; -import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:flutter/rendering.dart'; -import 'package:flutter_material_pickers/flutter_material_pickers.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; dynamic languageID; const _columnCount = 1; diff --git a/lib/pages/packages_offers/OfferAndPackagesPage.dart b/lib/pages/packages_offers/OfferAndPackagesPage.dart index c09e10ea..b3b0605d 100644 --- a/lib/pages/packages_offers/OfferAndPackagesPage.dart +++ b/lib/pages/packages_offers/OfferAndPackagesPage.dart @@ -1,31 +1,25 @@ import 'package:after_layout/after_layout.dart'; import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/CreateCustomerRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; -import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/ClinicOfferAndPackagesPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/CreateCustomerDailogPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackageDetailPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesCartPage.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; -import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/carousel_indicator/carousel_indicator.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_material_pickers/flutter_material_pickers.dart'; diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart index a7e43241..a6b2b306 100644 --- a/lib/pages/parent_categorise_page.dart +++ b/lib/pages/parent_categorise_page.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; diff --git a/lib/pages/pharmacies/compare-list.dart b/lib/pages/pharmacies/compare-list.dart index 37e2fc8c..c4da5ba2 100644 --- a/lib/pages/pharmacies/compare-list.dart +++ b/lib/pages/pharmacies/compare-list.dart @@ -1,6 +1,6 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; class CompareList with ChangeNotifier { List _product = []; diff --git a/lib/pages/pharmacies/compare.dart b/lib/pages/pharmacies/compare.dart index 505533cb..415b096f 100644 --- a/lib/pages/pharmacies/compare.dart +++ b/lib/pages/pharmacies/compare.dart @@ -1,9 +1,9 @@ -import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:carousel_slider/carousel_slider.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; int counter = 0; diff --git a/lib/pages/pharmacies/medicine_search_screen.dart b/lib/pages/pharmacies/medicine_search_screen.dart index 5c31f2de..f945c545 100644 --- a/lib/pages/pharmacies/medicine_search_screen.dart +++ b/lib/pages/pharmacies/medicine_search_screen.dart @@ -1,20 +1,19 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart'; -import '../base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/pharmacy/drug_item.dart'; -import 'package:diplomaticquarterapp/core/service/pharmacies_service.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../base/base_view.dart'; class MedicineSearch extends StatelessWidget { final textController = TextEditingController(); diff --git a/lib/pages/pharmacies/my_reviews.dart b/lib/pages/pharmacies/my_reviews.dart index 7b17a359..6d02513b 100644 --- a/lib/pages/pharmacies/my_reviews.dart +++ b/lib/pages/pharmacies/my_reviews.dart @@ -1,9 +1,9 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/review_view_model.dart'; -import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; class MyReviewsPage extends StatefulWidget { @override diff --git a/lib/pages/pharmacies/product-brands.dart b/lib/pages/pharmacies/product-brands.dart index e2fefab0..d6915e1e 100644 --- a/lib/pages/pharmacies/product-brands.dart +++ b/lib/pages/pharmacies/product-brands.dart @@ -1,9 +1,7 @@ -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/pages/final_products_page.dart'; -import 'package:diplomaticquarterapp/pages/login/register-info.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/brand_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/final_products_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/search_brands_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/pages/pharmacies/product_detail.dart b/lib/pages/pharmacies/product_detail.dart index b1ec665a..c56e161d 100644 --- a/lib/pages/pharmacies/product_detail.dart +++ b/lib/pages/pharmacies/product_detail.dart @@ -15,7 +15,7 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; + import 'screens/cart-order-page.dart'; int price = 0; diff --git a/lib/pages/pharmacies/screens/address-select-page.dart b/lib/pages/pharmacies/screens/address-select-page.dart index 6c39ba3f..3b78e3c1 100644 --- a/lib/pages/pharmacies/screens/address-select-page.dart +++ b/lib/pages/pharmacies/screens/address-select-page.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index fdf3cc78..23adf2f6 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; diff --git a/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart b/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart index 87c1b97c..6c58970c 100644 --- a/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart +++ b/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/tems-conditi import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; diff --git a/lib/pages/pharmacies/screens/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart index ad49366d..93549184 100644 --- a/lib/pages/pharmacies/screens/pharmacy_module_page.dart +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; @@ -8,10 +7,8 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/recommended-product-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/BannerPager.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/manufacturerItem.dart'; @@ -23,9 +20,9 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:rating_bar/rating_bar.dart'; + import '../../final_products_page.dart'; import 'lacum-activitaion-vida-page.dart'; diff --git a/lib/pages/pharmacies/screens/recommended-product-page.dart b/lib/pages/pharmacies/screens/recommended-product-page.dart index f1c0fb2e..4ea089fa 100644 --- a/lib/pages/pharmacies/screens/recommended-product-page.dart +++ b/lib/pages/pharmacies/screens/recommended-product-page.dart @@ -1,14 +1,8 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; dynamic languageID; bool isInWishlist = false; diff --git a/lib/pages/pharmacies/search_brands_page.dart b/lib/pages/pharmacies/search_brands_page.dart index 8f771490..d993ecdf 100644 --- a/lib/pages/pharmacies/search_brands_page.dart +++ b/lib/pages/pharmacies/search_brands_page.dart @@ -1,15 +1,10 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/brand_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; -import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:flutter/material.dart'; class SearchBrandsPage extends StatefulWidget { diff --git a/lib/pages/pharmacies/widgets/BannerPager.dart b/lib/pages/pharmacies/widgets/BannerPager.dart index b088eefb..756d0758 100644 --- a/lib/pages/pharmacies/widgets/BannerPager.dart +++ b/lib/pages/pharmacies/widgets/BannerPager.dart @@ -1,9 +1,9 @@ import 'package:carousel_slider/carousel_slider.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; class BannerPager extends StatefulWidget { final PharmacyModuleViewModel _model; diff --git a/lib/pages/pharmacies/widgets/ProductTileItem.dart b/lib/pages/pharmacies/widgets/ProductTileItem.dart index 20d6b730..3762b584 100644 --- a/lib/pages/pharmacies/widgets/ProductTileItem.dart +++ b/lib/pages/pharmacies/widgets/ProductTileItem.dart @@ -2,7 +2,6 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/phramacy-product-detail-page.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; diff --git a/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart b/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart index 6e4e2309..ad53efd0 100644 --- a/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart +++ b/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart @@ -1,7 +1,5 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/points-expandable-notifier.dart'; -import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; class LakumPointTableRowWidget extends StatefulWidget { diff --git a/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart b/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart index bddd2e3b..b2baa788 100644 --- a/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart +++ b/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart @@ -1,7 +1,5 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/points-expandable-notifier.dart'; -import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; class LakumPointTableRowWidget extends StatefulWidget { diff --git a/lib/pages/pharmacies/wishlist.dart b/lib/pages/pharmacies/wishlist.dart index 000e8404..e4eb859e 100644 --- a/lib/pages/pharmacies/wishlist.dart +++ b/lib/pages/pharmacies/wishlist.dart @@ -1,8 +1,8 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/wishlist_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/ProductCheckTypeWidget.dart'; -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; class WishlistPage extends StatefulWidget { bool showBar; diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart index 2f113e50..999356e9 100644 --- a/lib/pages/pharmacy/order/OrderDetails.dart +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -6,9 +6,9 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets//pharmacy/product_tile.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; diff --git a/lib/pages/pharmacy/order/ProductReview.dart b/lib/pages/pharmacy/order/ProductReview.dart index 7f58fa21..12ab939a 100644 --- a/lib/pages/pharmacy/order/ProductReview.dart +++ b/lib/pages/pharmacy/order/ProductReview.dart @@ -6,11 +6,9 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; +import 'package:flutter/src/widgets/image.dart' as flutterImage; import 'package:flutter_svg/svg.dart'; -import 'package:intl/intl.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:flutter/src/widgets/image.dart' as flutterImage; class ProductReviewPage extends StatefulWidget { final PharmacyProduct product; diff --git a/lib/pages/pharmacy/order/TrackDriver.dart b/lib/pages/pharmacy/order/TrackDriver.dart index 587ba9a6..40114c03 100644 --- a/lib/pages/pharmacy/order/TrackDriver.dart +++ b/lib/pages/pharmacy/order/TrackDriver.dart @@ -5,7 +5,6 @@ import 'dart:ui' as ui; import 'package:async/async.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -17,10 +16,8 @@ import 'package:flutter_animarker/lat_lng_interpolation.dart'; import 'package:flutter_animarker/models/lat_lng_delta.dart'; import 'package:flutter_animarker/models/lat_lng_info.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart'; -import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:location/location.dart'; -import 'package:flutter_animarker/streams/lat_lng_stream.dart'; class TrackDriver extends StatefulWidget { final OrderDetailModel order; diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart index 7569ed43..31dea8ef 100644 --- a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart +++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart @@ -1,11 +1,10 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; diff --git a/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart b/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart index 51256e11..56170644 100644 --- a/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart +++ b/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart @@ -1,7 +1,9 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; @@ -9,8 +11,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart'; class PharmacyAddressesPage extends StatefulWidget { @override diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 71aacae2..7197b070 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; diff --git a/lib/pages/search_products_page.dart b/lib/pages/search_products_page.dart index 73b17558..1fa279ae 100644 --- a/lib/pages/search_products_page.dart +++ b/lib/pages/search_products_page.dart @@ -1,10 +1,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/product-brands.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; diff --git a/lib/pages/settings/InfoPage.dart b/lib/pages/settings/InfoPage.dart index c835b10e..04cc670e 100644 --- a/lib/pages/settings/InfoPage.dart +++ b/lib/pages/settings/InfoPage.dart @@ -1,6 +1,6 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; class AboutApp extends StatelessWidget { @override diff --git a/lib/pages/settings/general_setting.dart b/lib/pages/settings/general_setting.dart index bd07bfa0..049b9821 100644 --- a/lib/pages/settings/general_setting.dart +++ b/lib/pages/settings/general_setting.dart @@ -1,11 +1,9 @@ -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart index d877514c..838af5f9 100644 --- a/lib/pages/settings/profile_setting.dart +++ b/lib/pages/settings/profile_setting.dart @@ -1,16 +1,14 @@ -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:provider/provider.dart'; class ProfileSettings extends StatefulWidget { diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index abfd022e..1282a636 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -1,6 +1,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/pages/settings/profile_setting.dart'; import 'package:diplomaticquarterapp/pages/settings/general_setting.dart'; +import 'package:diplomaticquarterapp/pages/settings/profile_setting.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart'; import 'package:flutter/material.dart'; diff --git a/lib/pages/symptom-checker/info.dart b/lib/pages/symptom-checker/info.dart index 7906ba1a..d066bc8f 100644 --- a/lib/pages/symptom-checker/info.dart +++ b/lib/pages/symptom-checker/info.dart @@ -1,12 +1,10 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/routes.dart'; class SymptomInfo extends StatefulWidget { @override diff --git a/lib/pages/symptom-checker/select-gender.dart b/lib/pages/symptom-checker/select-gender.dart index 0b8be29d..aae64bb6 100644 --- a/lib/pages/symptom-checker/select-gender.dart +++ b/lib/pages/symptom-checker/select-gender.dart @@ -1,12 +1,10 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:flutter_xlider/flutter_xlider.dart'; class SelectGender extends StatefulWidget { diff --git a/lib/pages/vaccine/my_vaccines_item_screen.dart b/lib/pages/vaccine/my_vaccines_item_screen.dart index 33ef5975..38911c90 100644 --- a/lib/pages/vaccine/my_vaccines_item_screen.dart +++ b/lib/pages/vaccine/my_vaccines_item_screen.dart @@ -1,19 +1,15 @@ -import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; + import '../base/base_view.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart'; -import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; -import 'package:popup_box/popup_box.dart'; class MyVaccinesItemPage extends StatefulWidget { @override diff --git a/lib/routes.dart b/lib/routes.dart index 4f1f2364..5d4ebea4 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -8,11 +8,11 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/forgot-password.dart'; -import 'package:diplomaticquarterapp/pages/login/register-info.dart'; -import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/pages/login/login.dart'; +import 'package:diplomaticquarterapp/pages/login/register-info.dart'; import 'package:diplomaticquarterapp/pages/login/register.dart'; +import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesCartPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart'; import 'package:diplomaticquarterapp/pages/packages_offers/PackageOrderCompletedPage.dart'; diff --git a/lib/services/pharmacy_services/cancelOrder_service.dart b/lib/services/pharmacy_services/cancelOrder_service.dart index 3804b19b..c19186d0 100644 --- a/lib/services/pharmacy_services/cancelOrder_service.dart +++ b/lib/services/pharmacy_services/cancelOrder_service.dart @@ -1,13 +1,10 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:flutter/material.dart'; class CancelOrderService extends BaseService{ diff --git a/lib/services/pharmacy_services/orderDetails_service.dart b/lib/services/pharmacy_services/orderDetails_service.dart index 4178c50a..a897955a 100644 --- a/lib/services/pharmacy_services/orderDetails_service.dart +++ b/lib/services/pharmacy_services/orderDetails_service.dart @@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; diff --git a/lib/services/pharmacy_services/order_service.dart b/lib/services/pharmacy_services/order_service.dart index 3f1ece78..b5632076 100644 --- a/lib/services/pharmacy_services/order_service.dart +++ b/lib/services/pharmacy_services/order_service.dart @@ -1,11 +1,9 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; class OrderService extends BaseService{ diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart index e219adaa..181a4101 100644 --- a/lib/services/pharmacy_services/product_detail_service.dart +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -1,12 +1,11 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; -import 'package:diplomaticquarterapp/models/pharmacy/addToCartModel.dart'; import 'package:diplomaticquarterapp/models/pharmacy/locationModel.dart'; import 'package:diplomaticquarterapp/models/pharmacy/productDetailModel.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/models/pharmacy/specification.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; class ProductDetailService extends BaseService { bool isLogin = false; diff --git a/lib/services/pharmacy_services/recommendedProduct_service.dart b/lib/services/pharmacy_services/recommendedProduct_service.dart index 3b432c02..9527b21f 100644 --- a/lib/services/pharmacy_services/recommendedProduct_service.dart +++ b/lib/services/pharmacy_services/recommendedProduct_service.dart @@ -1,7 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; diff --git a/lib/services/pharmacy_services/review_service.dart b/lib/services/pharmacy_services/review_service.dart index 44839955..b60ad412 100644 --- a/lib/services/pharmacy_services/review_service.dart +++ b/lib/services/pharmacy_services/review_service.dart @@ -1,10 +1,10 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/pharmacy/reviewModel.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; class ReviewService extends BaseService { diff --git a/lib/services/pharmacy_services/wishList_service.dart b/lib/services/pharmacy_services/wishList_service.dart index 5404a2bd..78f17401 100644 --- a/lib/services/pharmacy_services/wishList_service.dart +++ b/lib/services/pharmacy_services/wishList_service.dart @@ -1,12 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; -import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; -import 'package:diplomaticquarterapp/models/pharmacy/products.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:flutter/material.dart'; class WishListService extends BaseService { diff --git a/lib/services/pharmacy_services/writeReview_service.dart b/lib/services/pharmacy_services/writeReview_service.dart index 573095eb..52d31c9b 100644 --- a/lib/services/pharmacy_services/writeReview_service.dart +++ b/lib/services/pharmacy_services/writeReview_service.dart @@ -1,12 +1,10 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:flutter/material.dart'; class writeReviewService extends BaseService{ diff --git a/lib/theme/theme_notifier.dart b/lib/theme/theme_notifier.dart index e61c73a6..9ad15f33 100644 --- a/lib/theme/theme_notifier.dart +++ b/lib/theme/theme_notifier.dart @@ -1,8 +1,4 @@ -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; class ThemeNotifier with ChangeNotifier { ThemeData _themeData; diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart index 142b26a7..6d8c7f5d 100644 --- a/lib/theme/theme_value.dart +++ b/lib/theme/theme_value.dart @@ -1,9 +1,8 @@ import 'dart:ui'; + import 'package:diplomaticquarterapp/Constants.dart'; -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; /// ---- Default Theme ---- /// diff --git a/lib/uitl/PlatformBridge.dart b/lib/uitl/PlatformBridge.dart index 618468e1..56020781 100644 --- a/lib/uitl/PlatformBridge.dart +++ b/lib/uitl/PlatformBridge.dart @@ -1,10 +1,8 @@ -import 'dart:developer'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/localized_values.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; diff --git a/lib/uitl/app_toast.dart b/lib/uitl/app_toast.dart index f997b6b8..16aaba3b 100644 --- a/lib/uitl/app_toast.dart +++ b/lib/uitl/app_toast.dart @@ -1,7 +1,7 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; class AppToast { /// show long toast message diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart index ae5a6dab..2daa392f 100644 --- a/lib/uitl/location_util.dart +++ b/lib/uitl/location_util.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:connectivity/connectivity.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -9,14 +8,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:geolocator/geolocator.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:huawei_location/permission/permission_handler.dart'; import 'package:huawei_location/location/fused_location_provider_client.dart'; +import 'package:huawei_location/location/location.dart'; +import 'package:huawei_location/location/location_callback.dart'; import 'package:huawei_location/location/location_request.dart'; import 'package:huawei_location/location/location_settings_request.dart'; -import 'package:huawei_location/location/location_callback.dart'; -import 'package:huawei_location/location/location.dart'; -import 'package:huawei_location/location/location_settings_states.dart'; -import 'package:huawei_location/location/location_availability.dart'; +import 'package:huawei_location/permission/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart'; class LocationUtils { @@ -37,6 +34,8 @@ class LocationUtils { if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) { Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) { setLocation(value); + print(value.latitude); + print(value.longitude); if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); }); } diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart index 06ef517a..0040a1f2 100644 --- a/lib/uitl/utils_new.dart +++ b/lib/uitl/utils_new.dart @@ -1,5 +1,3 @@ -import 'dart:io'; -import 'dart:math'; import 'dart:ui'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/LoadingButton.dart b/lib/widgets/LoadingButton.dart index 6924bd44..c0004112 100644 --- a/lib/widgets/LoadingButton.dart +++ b/lib/widgets/LoadingButton.dart @@ -1,9 +1,8 @@ +import 'dart:math'; + import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'dart:math'; - -import 'data_display/text.dart'; class AnimatedButton extends StatefulWidget { AnimatedButton({ diff --git a/lib/widgets/TextFieldInertiaDirection.java b/lib/widgets/TextFieldInertiaDirection.java index 627bf406..daaa0229 100644 --- a/lib/widgets/TextFieldInertiaDirection.java +++ b/lib/widgets/TextFieldInertiaDirection.java @@ -1,8 +1,6 @@ -import 'dart:math'; - -import 'package:flutter/gestures.dart'; -import 'package:flutter/material.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +'dart:math'; + 'package:flutter/gestures.dart'; + 'package:flutter/material.dart'; 'package:font_awesome_flutter/font_awesome_flutter.dart'; enum TextFieldInertiaDirection { left, diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index d2ff467e..e19f376d 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -1,16 +1,13 @@ -import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:provider/provider.dart'; import '../../d_q_icons_icons.dart'; diff --git a/lib/widgets/buttons/button.dart b/lib/widgets/buttons/button.dart index 331ce4b6..99abad84 100644 --- a/lib/widgets/buttons/button.dart +++ b/lib/widgets/buttons/button.dart @@ -1,8 +1,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; /// Button widget diff --git a/lib/widgets/buttons/floatingActionButton.dart b/lib/widgets/buttons/floatingActionButton.dart index 85efdb9c..e4a4465b 100644 --- a/lib/widgets/buttons/floatingActionButton.dart +++ b/lib/widgets/buttons/floatingActionButton.dart @@ -1,8 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/lib/widgets/buttons/mini_button.dart b/lib/widgets/buttons/mini_button.dart index a391a49b..153c74b1 100644 --- a/lib/widgets/buttons/mini_button.dart +++ b/lib/widgets/buttons/mini_button.dart @@ -1,7 +1,6 @@ import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; enum MINI_BUTTON { Secondary, Primary } diff --git a/lib/widgets/buttons/secondary_button.dart b/lib/widgets/buttons/secondary_button.dart index 06b71a61..3f6b849b 100644 --- a/lib/widgets/buttons/secondary_button.dart +++ b/lib/widgets/buttons/secondary_button.dart @@ -1,8 +1,6 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; /// SecondaryButton widget diff --git a/lib/widgets/charts/app_bar_chart.dart b/lib/widgets/charts/app_bar_chart.dart index 818de33f..19362f32 100644 --- a/lib/widgets/charts/app_bar_chart.dart +++ b/lib/widgets/charts/app_bar_chart.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; +import 'package:flutter/material.dart'; class AppBarChart extends StatelessWidget { const AppBarChart({ diff --git a/lib/widgets/charts/app_line_chart.dart b/lib/widgets/charts/app_line_chart.dart index 553afec8..1a29b1e6 100644 --- a/lib/widgets/charts/app_line_chart.dart +++ b/lib/widgets/charts/app_line_chart.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:charts_flutter/flutter.dart' as charts; +import 'package:flutter/material.dart'; /// chart line /// [seriesList] charts series diff --git a/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart b/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart index 6d4e84ee..1a29856f 100644 --- a/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart +++ b/lib/widgets/data_display/medical/LabResult/FlowChartPage.dart @@ -1,9 +1,7 @@ import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; -import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart b/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart index f9eb0427..a67d991d 100644 --- a/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart +++ b/lib/widgets/data_display/medical/LabResult/LabResultWidget.dart @@ -6,15 +6,14 @@ import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dar import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/uitl/utils.dart'; -import '../../text.dart'; import 'FlowChartPage.dart'; class LabResultWidget extends StatelessWidget { diff --git a/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart b/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart index 71ebd36d..7b8a0c47 100644 --- a/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart +++ b/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart @@ -1,13 +1,10 @@ import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart'; -import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class LabResultDetailsWidget extends StatefulWidget { diff --git a/lib/widgets/data_display/medical/LabResult/lab_result_chart_and_detials.dart b/lib/widgets/data_display/medical/LabResult/lab_result_chart_and_detials.dart index 309abb0e..9c9db151 100644 --- a/lib/widgets/data_display/medical/LabResult/lab_result_chart_and_detials.dart +++ b/lib/widgets/data_display/medical/LabResult/lab_result_chart_and_detials.dart @@ -1,14 +1,7 @@ import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart'; -import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:flutter/material.dart'; -import 'package:charts_flutter/flutter.dart' as charts; - -import 'LineChartCurved.dart'; import 'Lab_Result_details_wideget.dart'; class LabResultChartAndDetails extends StatelessWidget { diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index c646c1f5..82d53327 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -1,27 +1,16 @@ -import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; -import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; -import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:provider/provider.dart'; -import 'package:rating_bar/rating_bar.dart'; -import '../../text.dart'; -import 'FlowChartPage.dart'; import 'LabResultWidget.dart'; class LaboratoryResultWidget extends StatefulWidget { diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index 86fe85d4..c4c2dc03 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -1,15 +1,8 @@ -import 'package:auto_size_text/auto_size_text.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:provider/provider.dart'; - -import '../../../Constants.dart'; -import '../text.dart'; class MedicalProfileItem extends StatelessWidget { final String imagePath; diff --git a/lib/widgets/data_display/medical/time_line_new_widget.dart b/lib/widgets/data_display/medical/time_line_new_widget.dart index aa43f537..ba089c69 100644 --- a/lib/widgets/data_display/medical/time_line_new_widget.dart +++ b/lib/widgets/data_display/medical/time_line_new_widget.dart @@ -7,13 +7,13 @@ import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_re import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as auth; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as auth; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/data_display/services)contaniner.dart b/lib/widgets/data_display/services)contaniner.dart index e435539f..cab74172 100644 --- a/lib/widgets/data_display/services)contaniner.dart +++ b/lib/widgets/data_display/services)contaniner.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; class ServicesContainer extends StatelessWidget { final String title; diff --git a/lib/widgets/dialogs/ConfirmWithMessageDialog.dart b/lib/widgets/dialogs/ConfirmWithMessageDialog.dart index ba1975ea..22bb8ecb 100644 --- a/lib/widgets/dialogs/ConfirmWithMessageDialog.dart +++ b/lib/widgets/dialogs/ConfirmWithMessageDialog.dart @@ -1,15 +1,8 @@ -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; -import 'package:diplomaticquarterapp/pages/settings/settings.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../../routes.dart'; - class ConfirmWithMessageDialog extends StatelessWidget { final String message; final String okTitle; diff --git a/lib/widgets/dialogs/RadioStringDialog.dart b/lib/widgets/dialogs/RadioStringDialog.dart index af8eae5f..49a16142 100644 --- a/lib/widgets/dialogs/RadioStringDialog.dart +++ b/lib/widgets/dialogs/RadioStringDialog.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/widgets/dialogs/confirm_send_email_dialog.dart b/lib/widgets/dialogs/confirm_send_email_dialog.dart index 540824ee..ea6df71c 100644 --- a/lib/widgets/dialogs/confirm_send_email_dialog.dart +++ b/lib/widgets/dialogs/confirm_send_email_dialog.dart @@ -1,6 +1,3 @@ -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; -import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/pages/settings/settings.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -8,8 +5,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../../routes.dart'; - class ConfirmSendEmailDialog extends StatefulWidget { final String email; final GestureTapCallback onTapSendEmail; diff --git a/lib/widgets/dialogs/select_location_dialog.dart b/lib/widgets/dialogs/select_location_dialog.dart index 4291c67e..cdf53454 100644 --- a/lib/widgets/dialogs/select_location_dialog.dart +++ b/lib/widgets/dialogs/select_location_dialog.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/drawer/drawer_item_widget.dart b/lib/widgets/drawer/drawer_item_widget.dart index ea75455c..df8e6062 100644 --- a/lib/widgets/drawer/drawer_item_widget.dart +++ b/lib/widgets/drawer/drawer_item_widget.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/loadings/ShimmerLoading.dart b/lib/widgets/loadings/ShimmerLoading.dart index 806409d8..64a31843 100644 --- a/lib/widgets/loadings/ShimmerLoading.dart +++ b/lib/widgets/loadings/ShimmerLoading.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/widgets/new_design/doctor_header.dart b/lib/widgets/new_design/doctor_header.dart index 85509abe..d5d5a9f2 100644 --- a/lib/widgets/new_design/doctor_header.dart +++ b/lib/widgets/new_design/doctor_header.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; @@ -7,7 +6,6 @@ import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; import 'package:rating_bar/rating_bar.dart'; diff --git a/lib/widgets/new_design/my_tab_view.dart b/lib/widgets/new_design/my_tab_view.dart index 11adfd57..74723a88 100644 --- a/lib/widgets/new_design/my_tab_view.dart +++ b/lib/widgets/new_design/my_tab_view.dart @@ -1,5 +1,5 @@ -import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:flutter/material.dart'; class MyTabView extends StatelessWidget { final String title; diff --git a/lib/widgets/offers_packages/PackagesCartItemCard.dart b/lib/widgets/offers_packages/PackagesCartItemCard.dart index 12a49d2e..3ae405c6 100644 --- a/lib/widgets/offers_packages/PackagesCartItemCard.dart +++ b/lib/widgets/offers_packages/PackagesCartItemCard.dart @@ -1,11 +1,9 @@ -import 'package:cached_network_image/cached_network_image.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/CounterView.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/offers_packages/PackagesOfferCard.dart b/lib/widgets/offers_packages/PackagesOfferCard.dart index 9738400e..2242f01d 100644 --- a/lib/widgets/offers_packages/PackagesOfferCard.dart +++ b/lib/widgets/offers_packages/PackagesOfferCard.dart @@ -1,4 +1,3 @@ -import 'package:cached_network_image/cached_network_image.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/widgets/offers_packages/offers_packages.dart b/lib/widgets/offers_packages/offers_packages.dart index a9fcf99d..2b255ccb 100644 --- a/lib/widgets/offers_packages/offers_packages.dart +++ b/lib/widgets/offers_packages/offers_packages.dart @@ -1,4 +1,3 @@ -import 'dart:developer'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; @@ -7,7 +6,6 @@ import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffers import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/loadings/ShimmerLoading.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index 042cad0c..67a4c08c 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -1,10 +1,8 @@ -import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; - /// App Expandable Notifier with animation /// [headerWidget] widget want to show in the header /// [bodyWidget] widget want to show in the body diff --git a/lib/widgets/others/app_scaffold_pharmacy_widget.dart b/lib/widgets/others/app_scaffold_pharmacy_widget.dart index 001bc955..7f49f441 100644 --- a/lib/widgets/others/app_scaffold_pharmacy_widget.dart +++ b/lib/widgets/others/app_scaffold_pharmacy_widget.dart @@ -1,21 +1,11 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; - import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:provider/provider.dart'; import '../../locator.dart'; -import 'floating_button_search.dart'; import '../progress_indicator/app_loader_widget.dart'; import 'arrow_back.dart'; import 'network_base_view.dart'; diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 64980aad..3fef65fb 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -1,39 +1,26 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:badges/badges.dart'; import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:diplomaticquarterapp/widgets/typewriter/typewiter.dart'; -import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import '../../locator.dart'; -import 'floating_button_search.dart'; import '../progress_indicator/app_loader_widget.dart'; import 'arrow_back.dart'; +import 'floating_button_search.dart'; import 'network_base_view.dart'; import 'not_auh_page.dart'; -import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; VoidCallback _onCartClick; diff --git a/lib/widgets/others/app_scafold_detail_page.dart b/lib/widgets/others/app_scafold_detail_page.dart index 9960b1d1..ba729965 100644 --- a/lib/widgets/others/app_scafold_detail_page.dart +++ b/lib/widgets/others/app_scafold_detail_page.dart @@ -1,30 +1,23 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; -import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import '../../locator.dart'; -import 'floating_button_search.dart'; import '../progress_indicator/app_loader_widget.dart'; -import 'arrow_back.dart'; import 'network_base_view.dart'; import 'not_auh_page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; class DetailPageScafold extends StatefulWidget { final String appBarTitle; diff --git a/lib/widgets/others/arrow_back.dart b/lib/widgets/others/arrow_back.dart index 6e7cb65c..e384bb7c 100644 --- a/lib/widgets/others/arrow_back.dart +++ b/lib/widgets/others/arrow_back.dart @@ -1,5 +1,4 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; diff --git a/lib/widgets/others/card_with_bg_widget.dart b/lib/widgets/others/card_with_bg_widget.dart index f343d8aa..f21063b9 100644 --- a/lib/widgets/others/card_with_bg_widget.dart +++ b/lib/widgets/others/card_with_bg_widget.dart @@ -1,6 +1,5 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; /* diff --git a/lib/widgets/others/entity_checkbox_list.dart b/lib/widgets/others/entity_checkbox_list.dart index da09a0ac..c03fe029 100644 --- a/lib/widgets/others/entity_checkbox_list.dart +++ b/lib/widgets/others/entity_checkbox_list.dart @@ -1,11 +1,8 @@ import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/widgets/others/floating_button_search.dart b/lib/widgets/others/floating_button_search.dart index fd6c674c..7cdeb4a4 100644 --- a/lib/widgets/others/floating_button_search.dart +++ b/lib/widgets/others/floating_button_search.dart @@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; @@ -30,14 +31,12 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; - import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; @@ -45,6 +44,7 @@ import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; @@ -63,12 +63,7 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; -import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart'; -import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; class FloatingSearchButton extends StatefulWidget { @override diff --git a/lib/widgets/others/network_base_view.dart b/lib/widgets/others/network_base_view.dart index bca942f4..13c4ff16 100644 --- a/lib/widgets/others/network_base_view.dart +++ b/lib/widgets/others/network_base_view.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_gifimage/flutter_gifimage.dart'; class NetworkBaseView extends StatefulWidget { final BaseViewModel baseViewModel; diff --git a/lib/widgets/others/not_auh_page.dart b/lib/widgets/others/not_auh_page.dart index 3bd9ae64..b774b7c6 100644 --- a/lib/widgets/others/not_auh_page.dart +++ b/lib/widgets/others/not_auh_page.dart @@ -4,7 +4,6 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; -import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as auth; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; @@ -12,7 +11,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index 54231248..be545407 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -3,13 +3,9 @@ import 'dart:async'; import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'dart:math'; - import 'package:provider/provider.dart'; - import 'package:sms_otp_auto_verify/sms_otp_auto_verify.dart'; import '../otp_widget.dart'; diff --git a/lib/widgets/pharmacy/bottom_nav_pharmacy_home_item.dart b/lib/widgets/pharmacy/bottom_nav_pharmacy_home_item.dart index 2920b2c8..77ce71be 100644 --- a/lib/widgets/pharmacy/bottom_nav_pharmacy_home_item.dart +++ b/lib/widgets/pharmacy/bottom_nav_pharmacy_home_item.dart @@ -1,8 +1,8 @@ +import 'package:diplomaticquarterapp/Constants.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/Constants.dart'; class BottomNavHomeItem extends StatelessWidget { final IconData icon; diff --git a/lib/widgets/pharmacy/drug_item.dart b/lib/widgets/pharmacy/drug_item.dart index b50f825a..d9ffcd1c 100644 --- a/lib/widgets/pharmacy/drug_item.dart +++ b/lib/widgets/pharmacy/drug_item.dart @@ -1,10 +1,9 @@ import 'dart:convert'; import 'dart:typed_data'; -import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; - +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:flutter/material.dart'; class MedicineItemWidget extends StatefulWidget { diff --git a/lib/widgets/pharmacy/product_tile.dart b/lib/widgets/pharmacy/product_tile.dart index 76e46949..8203155a 100644 --- a/lib/widgets/pharmacy/product_tile.dart +++ b/lib/widgets/pharmacy/product_tile.dart @@ -2,12 +2,12 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart' import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/ProductReview.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; class productTile extends StatelessWidget { final String productName; diff --git a/lib/widgets/pickupLocation/PickupLocationFromMap.dart b/lib/widgets/pickupLocation/PickupLocationFromMap.dart index 563de5d7..d1efeef6 100644 --- a/lib/widgets/pickupLocation/PickupLocationFromMap.dart +++ b/lib/widgets/pickupLocation/PickupLocationFromMap.dart @@ -2,12 +2,11 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/others/close_back.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:provider/provider.dart'; class PickupLocationFromMap extends StatelessWidget { diff --git a/lib/widgets/typewriter/typewiter.dart b/lib/widgets/typewriter/typewiter.dart index 5354df38..e8ca178a 100644 --- a/lib/widgets/typewriter/typewiter.dart +++ b/lib/widgets/typewriter/typewiter.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/material.dart'; diff --git a/speech_to_text_/.github/workflows/master.yml b/speech_to_text_/.github/workflows/master.yml deleted file mode 100644 index 4d4cff1c..00000000 --- a/speech_to_text_/.github/workflows/master.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: build - -on: - push: - branches: - - master - -jobs: - test: - name: Test on Ubuntu - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: subosito/flutter-action@v1.3.2 - with: - flutter-version: '1.17.1' - channel: 'stable' - - run: flutter pub get - - run: flutter test diff --git a/speech_to_text_/.gitignore b/speech_to_text_/.gitignore deleted file mode 100644 index 8969cbcd..00000000 --- a/speech_to_text_/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ -coverage/ -example/.flutter-plugins-dependencies -**/ios/Flutter/flutter_export_environment.sh -android/.idea/ diff --git a/speech_to_text_/.metadata b/speech_to_text_/.metadata deleted file mode 100644 index 1940d996..00000000 --- a/speech_to_text_/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# 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: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f - channel: stable - -project_type: plugin diff --git a/speech_to_text_/CHANGELOG.md b/speech_to_text_/CHANGELOG.md deleted file mode 100644 index 477e110c..00000000 --- a/speech_to_text_/CHANGELOG.md +++ /dev/null @@ -1,166 +0,0 @@ -# Changelog - -## 2.3.0 - -### New - * new parameter `onDevice` on the `listen` method enforces on device recognition for sensitive content - * onSoundLevelChange now supported on iOS - * added compile troubleshooting help to README.md - * `SpeechToTextProvider` is an alternate and simpler way to interact with the `SpeechToText` plugin. - * new `provider_example.dart` example for usage of `SpeechToTextProvider`. -### Fix - * on iOS handles some conflicts with other applications better to keep speech working after calls for example - - -## 2.2.0 - -### New - * improved error handling and logging in the iOS implementation - * added general guides for iOS to the README - * moved stress testing out of the main example - * iOS now defaults to using the speaker rather than the receiver for start /stop sounds when no headphones -### Fix - * iOS now properly deactivates the audio session when no longer listening - * start and stop sounds on iOS should be more reliable when available - -## 2.1.0 -### Breaking - * `listenFor` now calls `stop` rather than `cancel` as this seems like more useful behaviour - -### Fix - * Android no longer stops or cancels the speech recognizer if it has already been shutdown by a - timeout or other platform behaviour. - * Android no longer tries to restart the listener when it is already active - * Now properly notifies errors that happen after listening stops due to platform callback rather than - client request. See https://github.com/csdcorp/speech_to_text/issues/51 - -## 2.0.1 -### Fix - * Resolves an issue with the Android implementation not handling permission requests properly on apps - that didn't use the 1.12.x plugin APIs for registration. The permission dialog would not appear and - permission was denied. - - -## 2.0.0 - -### Breaking - - * Upgraded to New Swift 1.12 plugin structure, may work with older Flutter version but not guaranteed - -### New - - * the plugin now requests both speech and microphone permission on initialize on iOS - * added `debugLogging` parameter to the `initialize` method to control native logging - -### Fix - - * The Android implementation now blocks duplicate results notifications. It appears that at least on some - Android versions the final results notification onResults is notified twice when Android automatically - terminates the session due to a pause time. The de-duplication looks for successive notifications - with < 100 ms between them and blocks the second. If you miss any onResult notifications please post - an issue. - -## 1.1.0 - -### New - - * error_timeout has been separated into error_network_timeout and error_speech_timeout - -## 1.0.0 - -### New - * hasPermission to check for the current permission without bringing up the system dialog - * `listen` has a new optional `cancelOnError` parameter to support automatically canceling - a listening session on a permanent error. - * `listen` has a new optional `partialResults` parameter that controls whether the callback - receives partial or only final results. - -## 0.8.0 - -### New - - * speech recognizer now exposes multiple possible transcriptions for each recognized speech - * alternates list on SpeechRecognitionResult exposes alternate transcriptions of voice - * confidence on SpeechRecognitionResult gives an estimate of confidence in the transcription - * isConfident on SpeechRecognitionResult supports testing confidence - * hasConfidenceRating on SpeechRecognitionResult indicates if confidence was provided from the device - * new SpeechRecognitionWords class gives details on per transcription words and confidence - -### Fix - - * speechRecognizer availabilityDidChange was crashing if invoked due to an invalid parameter type - * Added iOS platform 10 to example Podfile to resolve compilation warnings - -## 0.7.2 - -### Breaking - - * Upgrade Swift to version 5 to match Flutter. Projects using this plugin must now switch to 5. - -## 0.7.1 - -### Fix - - * Upgrade Kotlin to 1.3.5 to match the Flutter 1.12 version - * Upgrade Gradle build to 3.5.0 to match the Flutter 1.12 version - * Android version of the plugin was repeating the system default locale in the `locales` list - -## 0.7.0 - -### New - - * locales method returns the list of available languages for speech - * new optional localeId parameter on listen method supports choosing the comprehension language separately from the current system locale. - -### Breaking - - * `cancel` and `stop` are now async - -## 0.6.3 - -### Fix - - * request permission fix on Android to ensure it doesn't conflict with other requests - -## 0.6.2 - -### Fix - - * channel invoke wasn't being done on the main thread in iOS - -## 0.6.1 - -### Fix - - * listening sound was failing due to timing, now uses play and record mode on iOS. - - ## 0.6.0 -### Breaking - - * The filenames for the optional sounds for iOS have changed. - -### New - - * Added an optional listenFor parameter to set a max duration to listen for speech and then automatically cancel. - -### Fix - - * Was failing to play sounds because of record mode. Now plays sounds before going into record mode and after coming out. - * Status listener was being ignored, now properly notifies on status changes. - -## 0.5.1 - * Fixes a problem where the recognizer left the AVAudioSession in record mode which meant that subsequent sounds couldn't be played. - -## 0.5.0 -Initial draft with limited functionality, supports: - * initializing speech recognition - * asking the user for permission if required - * listening for recognized speech - * canceling the current recognition session - * stopping the current recognition session -* Android and iOS 10+ support - -Missing: - * some error handling - * testing across multiple OS versions - * and more, to be discovered... diff --git a/speech_to_text_/LICENSE b/speech_to_text_/LICENSE deleted file mode 100644 index 7c3991c8..00000000 --- a/speech_to_text_/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2019, Corner Software Development Corp. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/speech_to_text_/README.md b/speech_to_text_/README.md deleted file mode 100644 index af726f0e..00000000 --- a/speech_to_text_/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# speech_to_text - -[![pub package](https://img.shields.io/badge/pub-v2.3.0-blue)](https://pub.dartlang.org/packages/speech_to_text) [![build status](https://github.com/csdcorp/speech_to_text/workflows/build/badge.svg)](https://github.com/csdcorp/speech_to_text/actions?query=workflow%3Abuild) - -A library that exposes device specific speech recognition capability. - -This plugin contains a set of classes that make it easy to use the speech recognition -capabilities of the mobile device in Flutter. It supports both Android and iOS. The -target use cases for this library are commands and short phrases, not continuous spoken -conversion or always on listening. - -## Recent Updates - -The 2.3.0 version adds `SpeechToTextProvider` as a simpler way to interact with the plugin. Checkout -the new `provider_example.dart` for intended usage. - -The 2.2.0 version improves audio session handling and start / stop sound playback on iOS. - -*Note*: Feedback from any test devices is welcome. - -## Using - -To recognize text from the microphone import the package and call the plugin, like so: - -```dart -import 'package:speech_to_text/speech_to_text.dart' as stt; - - stt.SpeechToText speech = stt.SpeechToText(); - bool available = await speech.initialize( onStatus: statusListener, onError: errorListener ); - if ( available ) { - speech.listen( onResult: resultListener ); - } - else { - print("The user has denied the use of speech recognition."); - } - // some time later... - speech.stop() -``` - -### Initialize once -The `initialize` method only needs to be called once per application session. After that `listen`, -`start`, `stop`, and `cancel` can be used to interact with the plugin. Subsequent calls to `initialize` -are ignored which is safe but does mean that the `onStatus` and `onError` callbacks cannot be reset after -the first call to `initialize`. For that reason there should be only one instance of the plugin per -application. The `SpeechToTextProvider` is one way to create a single instance and easily reuse it in -multiple widgets. - -## Permissions - -Applications using this plugin require user permissions. -### iOS - -Add the following keys to your _Info.plist_ file, located in `/ios/Runner/Info.plist`: - -* `NSSpeechRecognitionUsageDescription` - describe why your app uses speech recognition. This is called _Privacy - Speech Recognition Usage Description_ in the visual editor. -* `NSMicrophoneUsageDescription` - describe why your app needs access to the microphone. This is called _Privacy - Microphone Usage Description_ in the visual editor. - -### Android - -Add the record audio permission to your _AndroidManifest.xml_ file, located in `/android/app/src/main/AndroidManifest.xml`. - -* `android.permission.RECORD_AUDIO` - this permission is required for microphone access. -* `android.permission.INTERNET` - this permission is required because speech recognition may use remote services. - -## Adding Sounds for iOS (optional) - -Android automatically plays system sounds when speech listening starts or stops but iOS does not. This plugin supports playing sounds to indicate listening status on iOS if sound files are available as assets in the application. To enable sounds in an application using this plugin add the sound files to the project and reference them in the assets section of the application `pubspec.yaml`. The location and filenames of the sound files must exactly match what -is shown below or they will not be found. The example application for the plugin shows the usage. *Note* These files should be very short as they delay -the start / end of the speech recognizer until the sound playback is complete. -```yaml - assets: - - assets/sounds/speech_to_text_listening.m4r - - assets/sounds/speech_to_text_cancel.m4r - - assets/sounds/speech_to_text_stop.m4r -``` -* `speech_to_text_listening.m4r` - played when the listen method is called. -* `speech_to_text_cancel.m4r` - played when the cancel method is called. -* `speech_to_text_stop.m4r` - played when the stop method is called. - -## Troubleshooting - -### SDK version error trying to compile for Android -``` -Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:speech_to_text] -``` -The speech_to_text plugin requires at least Android SDK 21 because some of the speech functions in Android -were only introduced in that version. To fix this error you need to change the `build.gradle` entry to reflect -this version. Here's what the relevant part of that file looked like as of this writing: -``` - defaultConfig { - applicationId "com.example.app" - minSdkVersion 21 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } -``` - -### Incorrect Swift version trying to compile for iOS -``` -/Users/markvandergon/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-1.1.0/ios/Classes/SwiftSpeechToTextPlugin.swift:224:44: error: value of type 'SwiftSpeechToTextPlugin' has no member 'AVAudioSession' - rememberedAudioCategory = self.AVAudioSession.Category - ~~~~ ^~~~~~~~~~~~~~ - /Users/markvandergon/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-1.1.0/ios/Classes/SwiftSpeechToTextPlugin.swift:227:63: error: type 'Int' has no member 'notifyOthersOnDeactivation' - try self.audioSession.setActive(true, withFlags: .notifyOthersOnDeactivation) -``` -This happens when the Swift language version is not set correctly. See this thread for help https://github.com/csdcorp/speech_to_text/issues/45. - -### Swift not supported trying to compile for iOS -``` -`speech_to_text` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. -``` -This usually happens for older projects that only support Objective-C. See this thread for help https://github.com/csdcorp/speech_to_text/issues/88. - -### Not working on a particular Android device -The symptom for this issue is that the `initialize` method will always fail. If you turn on debug logging -using the `debugLogging: true` flag on the `initialize` method you'll see `'Speech recognition unavailable'` -in the Android log. There's a lengthy issue discussion here https://github.com/csdcorp/speech_to_text/issues/36 -about this. The issue seems to be that the recognizer is not always automatically enabled on the device. Two -key things helped resolve the issue in this case at least. - -#### First -1. Go to Google Play -2. Search for 'Google' -3. You should find this app: https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox -If 'Disabled' enable it - -This is the SO post that helped: https://stackoverflow.com/questions/28769320/how-to-check-wether-speech-recognition-is-available-or-not - -#### Second -Ensure the app has the required permissions. The symptom for this that you get a permanent error notification - 'error_audio_error` when starting a listen session. Here's a Stack Overflow post that addresses that - https://stackoverflow.com/questions/46376193/android-speechrecognizer-audio-recording-error - Here's the important excerpt: - >You should go to system setting, Apps, Google app, then enable its permission of microphone. - -### iOS recognition guidelines -Apple has quite a good guide on the user experience for using speech, the original is here -https://developer.apple.com/documentation/speech/sfspeechrecognizer This is the section that I think is particularly relevant: - ->#### Create a Great User Experience for Speech Recognition ->Here are some tips to consider when adding speech recognition support to your app. - ->**Be prepared to handle failures caused by speech recognition limits.** Because speech recognition is a network-based service, limits are enforced so that the service can remain freely available to all apps. Individual devices may be limited in the number of recognitions that can be performed per day, and each app may be throttled globally based on the number of requests it makes per day. If a recognition request fails quickly (within a second or two of starting), check to see if the recognition service became unavailable. If it is, you may want to ask users to try again later. - ->**Plan for a one-minute limit on audio duration.** Speech recognition places a relatively high burden on battery life and network usage. To minimize this burden, the framework stops speech recognition tasks that last longer than one minute. This limit is similar to the one for keyboard-related dictation. -Remind the user when your app is recording. For example, display a visual indicator and play sounds at the beginning and end of speech recognition to help users understand that they're being actively recorded. You can also display speech as it is being recognized so that users understand what your app is doing and see any mistakes made during the recognition process. - ->**Do not perform speech recognition on private or sensitive information.** Some speech is not appropriate for recognition. Don't send passwords, health or financial data, and other sensitive speech for recognition. diff --git a/speech_to_text_/android/.classpath b/speech_to_text_/android/.classpath deleted file mode 100644 index eb19361b..00000000 --- a/speech_to_text_/android/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/speech_to_text_/android/.gitignore b/speech_to_text_/android/.gitignore deleted file mode 100644 index c6cbe562..00000000 --- a/speech_to_text_/android/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures diff --git a/speech_to_text_/android/.project b/speech_to_text_/android/.project deleted file mode 100644 index 3050653c..00000000 --- a/speech_to_text_/android/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - speech_to_text - Project android_____ created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/speech_to_text_/android/.settings/org.eclipse.buildship.core.prefs b/speech_to_text_/android/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 7a23d112..00000000 --- a/speech_to_text_/android/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,13 +0,0 @@ -arguments= -auto.sync=false -build.scans.enabled=false -connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(5.6.1)) -connection.project.dir= -eclipse.preferences.version=1 -gradle.user.home= -java.home= -jvm.arguments= -offline.mode=false -override.workspace.settings=true -show.console.view=true -show.executions.view=true diff --git a/speech_to_text_/android/build.gradle b/speech_to_text_/android/build.gradle deleted file mode 100644 index 6b23b300..00000000 --- a/speech_to_text_/android/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -group 'com.csdcorp.speech_to_text' -version '1.0-SNAPSHOT' - -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -rootProject.allprojects { - repositories { - google() - jcenter() - } -} - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - defaultConfig { - minSdkVersion 21 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - lintOptions { - disable 'InvalidPackage' - } -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/speech_to_text_/android/gradle/gradle.properties b/speech_to_text_/android/gradle/gradle.properties deleted file mode 100644 index 94adc3a3..00000000 --- a/speech_to_text_/android/gradle/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/speech_to_text_/android/gradle/local.properties b/speech_to_text_/android/gradle/local.properties deleted file mode 100644 index 71a0a2e4..00000000 --- a/speech_to_text_/android/gradle/local.properties +++ /dev/null @@ -1,3 +0,0 @@ -sdk.dir=/Users/stephen.owens/Library/Android/sdk -flutter.sdk=/Users/stephen.owens/Documents/dev/flutter/sdk/flutter -org.gradle.jvmargs=-Xmx1536m -Duser.country=US -Duser.language=en \ No newline at end of file diff --git a/speech_to_text_/android/gradle/settings.gradle b/speech_to_text_/android/gradle/settings.gradle deleted file mode 100644 index cdfc1c4b..00000000 --- a/speech_to_text_/android/gradle/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'speech_to_text' diff --git a/speech_to_text_/android/gradle/wrapper/gradle-wrapper.properties b/speech_to_text_/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 674bdda0..00000000 --- a/speech_to_text_/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/speech_to_text_/android/src/main/AndroidManifest.xml b/speech_to_text_/android/src/main/AndroidManifest.xml deleted file mode 100644 index 61a73f32..00000000 --- a/speech_to_text_/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/speech_to_text_/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt b/speech_to_text_/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt deleted file mode 100644 index 7954add3..00000000 --- a/speech_to_text_/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt +++ /dev/null @@ -1,595 +0,0 @@ -package com.csdcorp.speech_to_text - -import androidx.annotation.NonNull; -import io.flutter.embedding.engine.plugins.FlutterPlugin -import android.Manifest -import android.annotation.TargetApi -import android.app.Activity -import android.content.Intent -import android.content.pm.PackageManager -import android.os.Build -import android.os.Bundle -import android.speech.RecognitionListener -import android.speech.SpeechRecognizer.createSpeechRecognizer -import android.speech.RecognizerIntent -import android.speech.SpeechRecognizer -import androidx.core.app.ActivityCompat -import androidx.core.content.ContextCompat -import io.flutter.plugin.common.MethodCall -import io.flutter.plugin.common.MethodChannel -import io.flutter.plugin.common.MethodChannel.MethodCallHandler -import io.flutter.plugin.common.MethodChannel.Result -import io.flutter.plugin.common.PluginRegistry -import io.flutter.plugin.common.PluginRegistry.Registrar -import org.json.JSONObject -import android.content.Context -import android.content.BroadcastReceiver -import android.os.Handler -import android.os.Looper -import android.util.Log -import io.flutter.embedding.engine.plugins.activity.ActivityAware -import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding -import io.flutter.plugin.common.BinaryMessenger -import org.json.JSONArray -import java.util.* - - -enum class SpeechToTextErrors { - multipleRequests, - unimplemented, - noLanguageIntent, - recognizerNotAvailable, - missingOrInvalidArg, - unknown -} - -enum class SpeechToTextCallbackMethods { - textRecognition, - notifyStatus, - notifyError, - soundLevelChange, -} - -enum class SpeechToTextStatus { - listening, - notListening, - unavailable, - available, -} - -enum class ListenMode { - deviceDefault, - dictation, - search, - confirmation, -} - -const val pluginChannelName = "plugin.csdcorp.com/speech_to_text" - -@TargetApi(8) -/** SpeechToTextPlugin */ -public class SpeechToTextPlugin : - MethodCallHandler, RecognitionListener, - PluginRegistry.RequestPermissionsResultListener, FlutterPlugin, - ActivityAware { - private var pluginContext: Context? = null - private var channel: MethodChannel? = null - private val minSdkForSpeechSupport = 21 - private val speechToTextPermissionCode = 28521 - private val missingConfidence: Double = -1.0 - private val logTag = "SpeechToTextPlugin" - private var currentActivity: Activity? = null - private var activeResult: Result? = null - private var initializedSuccessfully: Boolean = false - private var permissionToRecordAudio: Boolean = false - private var listening = false - private var debugLogging: Boolean = false - private var speechRecognizer: SpeechRecognizer? = null - private var recognizerIntent: Intent? = null - private var previousRecognizerLang: String? = null - private var previousPartialResults: Boolean = true - private var previousListenMode: ListenMode = ListenMode.deviceDefault - private var lastFinalTime: Long = 0 - private val handler: Handler = Handler(Looper.getMainLooper()) - private val defaultLanguageTag: String = Locale.getDefault().toLanguageTag() - - override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { - - onAttachedToEngine(flutterPluginBinding.getApplicationContext(), flutterPluginBinding.getBinaryMessenger()); - } - - // This static function is optional and equivalent to onAttachedToEngine. It supports the old - // pre-Flutter-1.12 Android projects. You are encouraged to continue supporting - // plugin registration via this function while apps migrate to use the new Android APIs - // post-flutter-1.12 via https://flutter.dev/go/android-project-migration. - // - // It is encouraged to share logic between onAttachedToEngine and registerWith to keep - // them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called - // depending on the user's project. onAttachedToEngine or registerWith must both be defined - // in the same class. - companion object { - @JvmStatic - fun registerWith(registrar: Registrar) { - val speechPlugin = SpeechToTextPlugin() - speechPlugin.currentActivity = registrar.activity() - registrar.addRequestPermissionsResultListener(speechPlugin) - speechPlugin.onAttachedToEngine(registrar.context(), registrar.messenger()) - } - } - - private fun onAttachedToEngine(applicationContext: Context, messenger: BinaryMessenger) { - this.pluginContext = applicationContext; - channel = MethodChannel(messenger, pluginChannelName) - channel?.setMethodCallHandler(this) - } - - override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { - this.pluginContext = null; - channel?.setMethodCallHandler(null) - channel = null - } - - override fun onDetachedFromActivity() { - currentActivity = null - } - - override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) { - currentActivity = binding.activity - binding.addRequestPermissionsResultListener(this) - } - - override fun onAttachedToActivity(binding: ActivityPluginBinding) { - currentActivity = binding.activity - binding.addRequestPermissionsResultListener(this) - } - - override fun onDetachedFromActivityForConfigChanges() { - currentActivity = null - } - - override fun onMethodCall(@NonNull call: MethodCall, @NonNull rawrResult: Result) { - val result = ChannelResultWrapper(rawrResult) - try { - when (call.method) { - "has_permission" -> hasPermission(result) - "initialize" -> { - var dlog = call.argument("debugLogging") - if (null != dlog) { - debugLogging = dlog - } - initialize(result) - } - "listen" -> { - var localeId = call.argument("localeId") - if (null == localeId) { - localeId = defaultLanguageTag - } - var partialResults = call.argument("partialResults") - if (null == partialResults) { - partialResults = true - } - val listenModeIndex = call.argument("listenMode") - if ( null == listenModeIndex ) { - result.error(SpeechToTextErrors.missingOrInvalidArg.name, - "listenMode is required", null) - return - } - startListening(result, localeId, partialResults, listenModeIndex ) - } - "stop" -> stopListening(result) - "cancel" -> cancelListening(result) - "locales" -> locales(result) - else -> result.notImplemented() - } - } catch (exc: Exception) { - Log.e(logTag, "Unexpected exception", exc) - result.error(SpeechToTextErrors.unknown.name, - "Unexpected exception", exc.localizedMessage) - } - } - - private fun hasPermission(result: Result) { - if (sdkVersionTooLow(result)) { - return - } - debugLog("Start has_permission") - val localContext = pluginContext - if (localContext != null) { - val hasPerm = ContextCompat.checkSelfPermission(localContext, - Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED - result.success(hasPerm) - } - } - - private fun initialize(result: Result) { - if (sdkVersionTooLow(result)) { - return - } - debugLog("Start initialize") - if (null != activeResult) { - result.error(SpeechToTextErrors.multipleRequests.name, - "Only one initialize at a time", null) - return - } - activeResult = result - val localContext = pluginContext - initializeIfPermitted(pluginContext) - } - - private fun sdkVersionTooLow(result: Result): Boolean { - if (Build.VERSION.SDK_INT < minSdkForSpeechSupport) { - result.success(false) - return true; - } - return false; - } - - private fun isNotInitialized(result: Result): Boolean { - if (!initializedSuccessfully || null == pluginContext) { - result.success(false) - } - return !initializedSuccessfully - } - - private fun isListening(): Boolean { - return listening - } - - private fun isNotListening(): Boolean { - return !listening - } - - private fun startListening(result: Result, languageTag: String, partialResults: Boolean, - listenModeIndex: Int) { - if (sdkVersionTooLow(result) || isNotInitialized(result) || isListening()) { - return - } - debugLog("Start listening") - var listenMode = ListenMode.deviceDefault - if ( listenModeIndex == ListenMode.dictation.ordinal) { - listenMode = ListenMode.dictation - } - setupRecognizerIntent(languageTag, partialResults, listenMode) - handler.post { - run { - speechRecognizer?.startListening(recognizerIntent) - } - } - notifyListening(isRecording = true) - result.success(true) - debugLog("Start listening done") - } - - private fun stopListening(result: Result) { - if (sdkVersionTooLow(result) || isNotInitialized(result) || isNotListening()) { - return - } - debugLog("Stop listening") - handler.post { - run { - speechRecognizer?.stopListening() - } - } - notifyListening(isRecording = false) - result.success(true) - debugLog("Stop listening done") - } - - private fun cancelListening(result: Result) { - if (sdkVersionTooLow(result) || isNotInitialized(result) || isNotListening()) { - return - } - debugLog("Cancel listening") - handler.post { - run { - speechRecognizer?.cancel() - } - } - notifyListening(isRecording = false) - result.success(true) - debugLog("Cancel listening done") - } - - private fun locales(result: Result) { - if (sdkVersionTooLow(result) || isNotInitialized(result)) { - return - } - var detailsIntent = RecognizerIntent.getVoiceDetailsIntent(pluginContext) - if (null == detailsIntent) { - detailsIntent = Intent(RecognizerIntent.ACTION_GET_LANGUAGE_DETAILS) - } - if (null == detailsIntent) { - result.error(SpeechToTextErrors.noLanguageIntent.name, - "Could not get voice details", null) - return - } - pluginContext?.sendOrderedBroadcast( - detailsIntent, null, LanguageDetailsChecker(result), - null, Activity.RESULT_OK, null, null) - } - - private fun notifyListening(isRecording: Boolean) { - debugLog("Notify listening") - listening = isRecording - val status = when (isRecording) { - true -> SpeechToTextStatus.listening.name - false -> SpeechToTextStatus.notListening.name - } - channel?.invokeMethod(SpeechToTextCallbackMethods.notifyStatus.name, status) - debugLog("Notify listening done") - } - - private fun updateResults(speechBundle: Bundle?, isFinal: Boolean) { - if (isDuplicateFinal( isFinal )) { - debugLog("Discarding duplicate final") - return - } - val userSaid = speechBundle?.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION) - if (null != userSaid && userSaid.isNotEmpty()) { - val speechResult = JSONObject() - speechResult.put("finalResult", isFinal) - val confidence = speechBundle?.getFloatArray(SpeechRecognizer.CONFIDENCE_SCORES) - val alternates = JSONArray() - for (resultIndex in 0..userSaid.size - 1) { - val speechWords = JSONObject() - speechWords.put("recognizedWords", userSaid[resultIndex]) - if (null != confidence && confidence.size >= userSaid.size) { - speechWords.put("confidence", confidence[resultIndex]) - } else { - speechWords.put("confidence", missingConfidence) - } - alternates.put(speechWords) - } - speechResult.put("alternates", alternates) - val jsonResult = speechResult.toString() - debugLog("Calling results callback") - channel?.invokeMethod(SpeechToTextCallbackMethods.textRecognition.name, - jsonResult) - } - } - - private fun isDuplicateFinal( isFinal: Boolean ) : Boolean { - if ( !isFinal ) { - return false - } - val delta = System.currentTimeMillis() - lastFinalTime - lastFinalTime = System.currentTimeMillis() - return delta >= 0 && delta < 100 - } - - private fun initializeIfPermitted(context: Context?) { - val localContext = context - if (null == localContext) { - completeInitialize() - return - } - permissionToRecordAudio = ContextCompat.checkSelfPermission(localContext, - Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED - debugLog("Checked permission") - if (!permissionToRecordAudio) { - val localActivity = currentActivity - if (null != localActivity) { - debugLog("Requesting permission") - ActivityCompat.requestPermissions(localActivity, - arrayOf(Manifest.permission.RECORD_AUDIO), speechToTextPermissionCode) - } else { - debugLog("no permission, no activity, completing") - completeInitialize() - } - } else { - debugLog("has permission, completing") - completeInitialize() - } - debugLog("leaving initializeIfPermitted") - } - - private fun completeInitialize() { - - debugLog("completeInitialize") - if (permissionToRecordAudio) { - debugLog("Testing recognition availability") - if (!SpeechRecognizer.isRecognitionAvailable(pluginContext)) { - Log.e(logTag, "Speech recognition not available on this device") - activeResult?.error(SpeechToTextErrors.recognizerNotAvailable.name, - "Speech recognition not available on this device", "") - activeResult = null - return - } - - debugLog("Creating recognizer") - speechRecognizer = createSpeechRecognizer(pluginContext).apply { - debugLog("Setting listener") - setRecognitionListener(this@SpeechToTextPlugin) - } - if (null == speechRecognizer) { - Log.e(logTag, "Speech recognizer null") - activeResult?.error( - SpeechToTextErrors.recognizerNotAvailable.name, - "Speech recognizer null", "") - activeResult = null - } - - debugLog("before setup intent") - setupRecognizerIntent(defaultLanguageTag, true, ListenMode.deviceDefault) - debugLog("after setup intent") - } - - initializedSuccessfully = permissionToRecordAudio - debugLog("sending result") - activeResult?.success(permissionToRecordAudio) - debugLog("leaving complete") - activeResult = null - } - - private fun setupRecognizerIntent(languageTag: String, partialResults: Boolean, listenMode: ListenMode) { - debugLog("setupRecognizerIntent") - if (previousRecognizerLang == null || - previousRecognizerLang != languageTag || - partialResults != previousPartialResults || previousListenMode != listenMode ) { - previousRecognizerLang = languageTag; - previousPartialResults = partialResults - previousListenMode = listenMode - handler.post { - run { - recognizerIntent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply { - debugLog("In RecognizerIntent apply") - putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) - debugLog("put model") - val localContext = pluginContext - if (null != localContext) { - putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, - localContext.applicationInfo.packageName) - } - debugLog("put package") - putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, partialResults) - debugLog("put partial") - if (languageTag != Locale.getDefault().toLanguageTag()) { - putExtra(RecognizerIntent.EXTRA_LANGUAGE, languageTag); - debugLog("put languageTag") - } - } - } - } - } - } - - override fun onRequestPermissionsResult(requestCode: Int, permissions: Array?, - grantResults: IntArray?): Boolean { - when (requestCode) { - speechToTextPermissionCode -> { - if (null != grantResults) { - permissionToRecordAudio = grantResults.isNotEmpty() && - grantResults.get(0) == PackageManager.PERMISSION_GRANTED - } - completeInitialize() - return true - } - } - return false - } - - - override fun onPartialResults(results: Bundle?) = updateResults(results, false) - override fun onResults(results: Bundle?) = updateResults(results, true) - override fun onEndOfSpeech() = notifyListening(isRecording = false) - - override fun onError(errorCode: Int) { - val errorMsg = when (errorCode) { - SpeechRecognizer.ERROR_AUDIO -> "error_audio_error" - SpeechRecognizer.ERROR_CLIENT -> "error_client" - SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS -> "error_permission" - SpeechRecognizer.ERROR_NETWORK -> "error_network" - SpeechRecognizer.ERROR_NETWORK_TIMEOUT -> "error_network_timeout" - SpeechRecognizer.ERROR_NO_MATCH -> "error_no_match" - SpeechRecognizer.ERROR_RECOGNIZER_BUSY -> "error_busy" - SpeechRecognizer.ERROR_SERVER -> "error_server" - SpeechRecognizer.ERROR_SPEECH_TIMEOUT -> "error_speech_timeout" - else -> "error_unknown" - } - sendError(errorMsg) - } - - private fun debugLog( msg: String ) { - if ( debugLogging ) { - Log.d( logTag, msg ) - } - } - - private fun sendError(errorMsg: String) { - val speechError = JSONObject() - speechError.put("errorMsg", errorMsg) - speechError.put("permanent", true) - handler.post { - run { - channel?.invokeMethod(SpeechToTextCallbackMethods.notifyError.name, speechError.toString()) - } - } - } - - override fun onRmsChanged(rmsdB: Float) { - handler.post { - run { - channel?.invokeMethod(SpeechToTextCallbackMethods.soundLevelChange.name, rmsdB) - } - } - } - - override fun onReadyForSpeech(p0: Bundle?) {} - override fun onBufferReceived(p0: ByteArray?) {} - override fun onEvent(p0: Int, p1: Bundle?) {} - override fun onBeginningOfSpeech() {} -} - -// See https://stackoverflow.com/questions/10538791/how-to-set-the-language-in-speech-recognition-on-android/10548680#10548680 -class LanguageDetailsChecker(flutterResult: Result) : BroadcastReceiver() { - private val result: Result = flutterResult - private var supportedLanguages: List? = null - - private var languagePreference: String? = null - - override fun onReceive(context: Context, intent: Intent) { - val results = getResultExtras(true) - if (results.containsKey(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE)) { - languagePreference = results.getString(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE) - } - if (results.containsKey(RecognizerIntent.EXTRA_SUPPORTED_LANGUAGES)) { - supportedLanguages = results.getStringArrayList( - RecognizerIntent.EXTRA_SUPPORTED_LANGUAGES) - createResponse(supportedLanguages) - } - } - - private fun createResponse(supportedLanguages: List?) { - val currentLocale = Locale.getDefault() - val localeNames = ArrayList() - localeNames.add(buildIdNameForLocale(currentLocale)) - if (null != supportedLanguages) { - for (lang in supportedLanguages) { - if (currentLocale.toLanguageTag() == lang) { - continue - } - val locale = Locale.forLanguageTag(lang) - localeNames.add(buildIdNameForLocale(locale)) - } - } - result.success(localeNames) - - } - - private fun buildIdNameForLocale(locale: Locale): String { - val name = locale.displayName.replace(':', ' ') - return "${locale.language}_${locale.country}:$name" - } -} - -private class ChannelResultWrapper(result: Result) : Result { - // Caller handler - val handler: Handler = Handler(Looper.getMainLooper()) - val result: Result = result - - // make sure to respond in the caller thread - override fun success(results: Any?) { - - handler.post { - run { - result.success(results); - } - } - } - - override fun error(errorCode: String?, errorMessage: String?, data: Any?) { - handler.post { - run { - result.error(errorCode, errorMessage, data); - } - } - } - - override fun notImplemented() { - handler.post { - run { - result.notImplemented(); - } - } - } -} diff --git a/speech_to_text_/example/.gitignore b/speech_to_text_/example/.gitignore deleted file mode 100644 index 2ddde2a5..00000000 --- a/speech_to_text_/example/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# 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/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -/build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/speech_to_text_/example/.metadata b/speech_to_text_/example/.metadata deleted file mode 100644 index aeb01ee2..00000000 --- a/speech_to_text_/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# 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: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f - channel: stable - -project_type: app diff --git a/speech_to_text_/example/README.md b/speech_to_text_/example/README.md deleted file mode 100644 index 92252821..00000000 --- a/speech_to_text_/example/README.md +++ /dev/null @@ -1,155 +0,0 @@ -# speech_to_text_example - -Demonstrates how to use the speech_to_text plugin. This example requires -that the plugin has been installed. It initializes speech recognition, -listens for words and prints them. - - -## Source - -```dart -import 'package:flutter/material.dart'; -import 'dart:async'; - -import 'package:speech_to_text/speech_to_text.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - bool _hasSpeech = false; - String lastWords = ""; - String lastError = ""; - String lastStatus = ""; - final SpeechToText speech = SpeechToText(); - - @override - void initState() { - super.initState(); - initSpeechState(); - } - - Future initSpeechState() async { - bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener ); - - if (!mounted) return; - setState(() { - _hasSpeech = hasSpeech; - }); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('Speech to Text Example'), - ), - body: _hasSpeech - ? Column(children: [ - Expanded( - child: Center( - child: Text('Speech recognition available'), - ), - ), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - FlatButton( - child: Text('Start'), - onPressed: startListening, - ), - FlatButton( - child: Text('Stop'), - onPressed: stopListening, - ), - FlatButton( - child: Text('Cancel'), - onPressed:cancelListening, - ), - ], - ), - ), - Expanded( - child: Column( - children: [ - Center( - child: Text('Recognized Words'), - ), - Center( - child: Text(lastWords), - ), - ], - ), - ), - Expanded( - child: Column( - children: [ - Center( - child: Text('Error'), - ), - Center( - child: Text(lastError), - ), - ], - ), - ), - Expanded( - child: Center( - child: speech.isListening ? Text("I'm listening...") : Text( 'Not listening' ), - ), - ), - ]) - : Center( child: Text('Speech recognition unavailable', style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold))), - ), - ); - } - - void startListening() { - lastWords = ""; - lastError = ""; - speech.listen(onResult: resultListener ); - setState(() { - - }); - } - - void stopListening() { - speech.stop( ); - setState(() { - - }); - } - - void cancelListening() { - speech.cancel( ); - setState(() { - - }); - } - - void resultListener(SpeechRecognitionResult result) { - setState(() { - lastWords = "${result.recognizedWords} - ${result.finalResult}"; - }); - } - - void errorListener(SpeechRecognitionError error ) { - setState(() { - lastError = "${error.errorMsg} - ${error.permanent}"; - }); - } - void statusListener(String status ) { - setState(() { - lastStatus = "$status"; - }); - } -} -``` \ No newline at end of file diff --git a/speech_to_text_/example/android/.project b/speech_to_text_/example/android/.project deleted file mode 100644 index d7d48141..00000000 --- a/speech_to_text_/example/android/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - android___ - Project android___ created by Buildship. - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/speech_to_text_/example/android/.settings/org.eclipse.buildship.core.prefs b/speech_to_text_/example/android/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index e8895216..00000000 --- a/speech_to_text_/example/android/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir= -eclipse.preferences.version=1 diff --git a/speech_to_text_/example/android/app/build.gradle b/speech_to_text_/example/android/app/build.gradle deleted file mode 100644 index 8b616f29..00000000 --- a/speech_to_text_/example/android/app/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -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 28 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.csdcorp.speech_to_text_example" - minSdkVersion 21 - targetSdkVersion 28 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - 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" - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' -} diff --git a/speech_to_text_/example/android/app/src/debug/AndroidManifest.xml b/speech_to_text_/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 36edf838..00000000 --- a/speech_to_text_/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/speech_to_text_/example/android/app/src/main/AndroidManifest.xml b/speech_to_text_/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index b0912061..00000000 --- a/speech_to_text_/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/speech_to_text_/example/android/app/src/main/kotlin/com/csdcorp/speech_to_text_example/MainActivity.kt b/speech_to_text_/example/android/app/src/main/kotlin/com/csdcorp/speech_to_text_example/MainActivity.kt deleted file mode 100644 index f44e470e..00000000 --- a/speech_to_text_/example/android/app/src/main/kotlin/com/csdcorp/speech_to_text_example/MainActivity.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.csdcorp.speech_to_text_example - -import androidx.annotation.NonNull; -import io.flutter.embedding.android.FlutterActivity -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugins.GeneratedPluginRegistrant - -class MainActivity: FlutterActivity() { - override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { - GeneratedPluginRegistrant.registerWith(flutterEngine); - } -} diff --git a/speech_to_text_/example/android/app/src/main/res/drawable/launch_background.xml b/speech_to_text_/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/speech_to_text_/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/speech_to_text_/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/speech_to_text_/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/speech_to_text_/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/speech_to_text_/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/speech_to_text_/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/speech_to_text_/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/speech_to_text_/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/speech_to_text_/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/speech_to_text_/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/speech_to_text_/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/speech_to_text_/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/speech_to_text_/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/speech_to_text_/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/speech_to_text_/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/speech_to_text_/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/speech_to_text_/example/android/app/src/main/res/values/styles.xml b/speech_to_text_/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa4417..00000000 --- a/speech_to_text_/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/speech_to_text_/example/android/app/src/profile/AndroidManifest.xml b/speech_to_text_/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 36edf838..00000000 --- a/speech_to_text_/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/speech_to_text_/example/android/build.gradle b/speech_to_text_/example/android/build.gradle deleted file mode 100644 index 13546311..00000000 --- a/speech_to_text_/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.6.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/speech_to_text_/example/android/gradle.properties b/speech_to_text_/example/android/gradle.properties deleted file mode 100644 index a6738207..00000000 --- a/speech_to_text_/example/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true -android.enableR8=true diff --git a/speech_to_text_/example/android/gradle/wrapper/gradle-wrapper.properties b/speech_to_text_/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 052e7951..00000000 --- a/speech_to_text_/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Mon Mar 16 08:57:32 EDT 2020 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/speech_to_text_/example/android/settings.gradle b/speech_to_text_/example/android/settings.gradle deleted file mode 100644 index 5a2f14fb..00000000 --- a/speech_to_text_/example/android/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':app' - -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() - -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} - -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} diff --git a/speech_to_text_/example/assets/sounds/speech_to_text_cancel.m4r b/speech_to_text_/example/assets/sounds/speech_to_text_cancel.m4r deleted file mode 100644 index ccb3afe3..00000000 Binary files a/speech_to_text_/example/assets/sounds/speech_to_text_cancel.m4r and /dev/null differ diff --git a/speech_to_text_/example/assets/sounds/speech_to_text_listening.m4r b/speech_to_text_/example/assets/sounds/speech_to_text_listening.m4r deleted file mode 100644 index 3131d60f..00000000 Binary files a/speech_to_text_/example/assets/sounds/speech_to_text_listening.m4r and /dev/null differ diff --git a/speech_to_text_/example/assets/sounds/speech_to_text_stop.m4r b/speech_to_text_/example/assets/sounds/speech_to_text_stop.m4r deleted file mode 100644 index 8817f01b..00000000 Binary files a/speech_to_text_/example/assets/sounds/speech_to_text_stop.m4r and /dev/null differ diff --git a/speech_to_text_/example/ios/Flutter/AppFrameworkInfo.plist b/speech_to_text_/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 6b4c0f78..00000000 --- a/speech_to_text_/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 8.0 - - diff --git a/speech_to_text_/example/ios/Flutter/Debug.xcconfig b/speech_to_text_/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba11..00000000 --- a/speech_to_text_/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/speech_to_text_/example/ios/Flutter/Flutter.podspec b/speech_to_text_/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 5ca30416..00000000 --- a/speech_to_text_/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.description = <<-DESC -Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. - DESC - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.vendored_frameworks = 'Flutter.framework' -end diff --git a/speech_to_text_/example/ios/Flutter/Release.xcconfig b/speech_to_text_/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340..00000000 --- a/speech_to_text_/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/speech_to_text_/example/ios/Podfile b/speech_to_text_/example/ios/Podfile deleted file mode 100644 index ab7d5b46..00000000 --- a/speech_to_text_/example/ios/Podfile +++ /dev/null @@ -1,90 +0,0 @@ -# Uncomment this line to define a global platform for your project -platform :ios, '10.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 parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; - end - generated_key_values = {} - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) do |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - generated_key_values[podname] = podpath - else - puts "Invalid plugin specification: #{line}" - end - end - generated_key_values -end - -target 'Runner' do - use_frameworks! - use_modular_headers! - - # Flutter Pod - - copied_flutter_dir = File.join(__dir__, 'Flutter') - copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework') - copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec') - unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path) - # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet. - # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration. - # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist. - - generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig') - unless File.exist?(generated_xcode_build_settings_path) - raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path) - cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR']; - - unless File.exist?(copied_framework_path) - FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir) - end - unless File.exist?(copied_podspec_path) - FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir) - end - end - - # Keep pod path relative so it can be checked into Podfile.lock. - pod 'Flutter', :path => 'Flutter' - - # Plugin Pods - - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.each do |name, path| - symlink = File.join('.symlinks', 'plugins', name) - File.symlink(path, symlink) - pod name, :path => File.join(symlink, 'ios') - end -end - -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. -install! 'cocoapods', :disable_input_output_paths => true - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end - end -end diff --git a/speech_to_text_/example/ios/Podfile.lock b/speech_to_text_/example/ios/Podfile.lock deleted file mode 100644 index 60c8b57d..00000000 --- a/speech_to_text_/example/ios/Podfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -PODS: - - Flutter (1.0.0) - - speech_to_text (0.0.1): - - Flutter - - Try - - Try (2.1.1) - -DEPENDENCIES: - - Flutter (from `Flutter`) - - speech_to_text (from `.symlinks/plugins/speech_to_text/ios`) - -SPEC REPOS: - trunk: - - Try - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - speech_to_text: - :path: ".symlinks/plugins/speech_to_text/ios" - -SPEC CHECKSUMS: - Flutter: 0e3d915762c693b495b44d77113d4970485de6ec - speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe - Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96 - -PODFILE CHECKSUM: 0ba44ad07df4ab62269dc769727cf0f12b1e453d - -COCOAPODS: 1.9.3 diff --git a/speech_to_text_/example/ios/Runner.xcodeproj/project.pbxproj b/speech_to_text_/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index c40af650..00000000 --- a/speech_to_text_/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,578 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - 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 */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 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 */; }; - C446300A034BF27D9F1ACEF9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E76E9615C6B4FABD88067D55 /* Pods_Runner.framework */; }; -/* 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 = ""; }; - 59AFE6BB0B596A0E0811BDFF /* 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 = ""; }; - 6280E2A777726D2043BF80B7 /* 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 = ""; }; - 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 = ""; }; - C3909A4B7EC98A20255210E3 /* 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 = ""; }; - E76E9615C6B4FABD88067D55 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C446300A034BF27D9F1ACEF9 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 7937AF765430D66F28F7FEEF /* Frameworks */ = { - isa = PBXGroup; - children = ( - E76E9615C6B4FABD88067D55 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 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 */, - A68CCF1640763A551D35BD31 /* Pods */, - 7937AF765430D66F28F7FEEF /* 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 */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A68CCF1640763A551D35BD31 /* Pods */ = { - isa = PBXGroup; - children = ( - 59AFE6BB0B596A0E0811BDFF /* Pods-Runner.debug.xcconfig */, - 6280E2A777726D2043BF80B7 /* Pods-Runner.release.xcconfig */, - C3909A4B7EC98A20255210E3 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 949FCB95217187F2C022D6A9 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 8B0988F04B6AE44AA0304FEF /* [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 = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 3X949YE9K2; - LastSwiftMigration = 0910; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - 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 */, - 9740EEB41CF90195004384FC /* Debug.xcconfig 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"; - }; - 8B0988F04B6AE44AA0304FEF /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 949FCB95217187F2C022D6A9 /* [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"; - }; -/* 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; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - 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 = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = 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 = 3X949YE9K2; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.csdcorp.speechToTextExample; - 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; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - 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 = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - 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 = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - 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 = 3X949YE9K2; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.csdcorp.speechToTextExample; - 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 = 3X949YE9K2; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.csdcorp.speechToTextExample; - 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/speech_to_text_/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/speech_to_text_/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a16..00000000 --- a/speech_to_text_/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/speech_to_text_/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/speech_to_text_/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index a28140cf..00000000 --- a/speech_to_text_/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/speech_to_text_/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/speech_to_text_/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/speech_to_text_/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/speech_to_text_/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/speech_to_text_/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/speech_to_text_/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/speech_to_text_/example/ios/Runner/AppDelegate.swift b/speech_to_text_/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4a..00000000 --- a/speech_to_text_/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -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/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "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/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "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/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/speech_to_text_/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 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/speech_to_text_/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/speech_to_text_/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/speech_to_text_/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/speech_to_text_/example/ios/Runner/Base.lproj/Main.storyboard b/speech_to_text_/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/speech_to_text_/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/speech_to_text_/example/ios/Runner/Info.plist b/speech_to_text_/example/ios/Runner/Info.plist deleted file mode 100644 index a69c0fce..00000000 --- a/speech_to_text_/example/ios/Runner/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - NSMicrophoneUsageDescription - This example listens for speech on the device microphone on your request. - NSSpeechRecognitionUsageDescription - This example recognizes words as you speak them and displays them. - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - speech_to_text_example - 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/speech_to_text_/example/ios/Runner/Runner-Bridging-Header.h b/speech_to_text_/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 7335fdf9..00000000 --- a/speech_to_text_/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/speech_to_text_/example/lib/main.dart b/speech_to_text_/example/lib/main.dart deleted file mode 100644 index 0115b828..00000000 --- a/speech_to_text_/example/lib/main.dart +++ /dev/null @@ -1,275 +0,0 @@ -import 'dart:async'; -import 'dart:math'; - -import 'package:flutter/material.dart'; -import 'package:permission_handler/permission_handler.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; -import 'package:speech_to_text/speech_to_text.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - bool _hasSpeech = false; - double level = 0.0; - double minSoundLevel = 50000; - double maxSoundLevel = -50000; - String lastWords = ""; - String lastError = ""; - String lastStatus = ""; - String _currentLocaleId = ""; - List _localeNames = []; - final SpeechToText speech = SpeechToText(); - - @override - void initState() { - requestPermissions(); - super.initState(); - } - - Future initSpeechState() async { - bool hasSpeech = await speech.initialize( - onError: errorListener, onStatus: statusListener); - if (hasSpeech) { - _localeNames = await speech.locales(); - - var systemLocale = await speech.systemLocale(); - _currentLocaleId = systemLocale.localeId; - } - - if (!mounted) return; - - setState(() { - _hasSpeech = hasSpeech; - }); - } - - void requestPermissions() async{ - Map statuses = await [ - Permission.microphone, - ].request(); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('Speech to Text CloudSolution'), - ), - body: Column(children: [ - Center( - child: Text( - 'Speech recognition available', - style: TextStyle(fontSize: 22.0), - ), - ), - Container( - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - FlatButton( - child: Text('Initialize'), - onPressed: _hasSpeech ? null : initSpeechState, - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - FlatButton( - child: Text('Start'), - onPressed: !_hasSpeech || speech.isListening - ? null - : startListening, - ), - FlatButton( - child: Text('Stop'), - onPressed: speech.isListening ? stopListening : null, - ), - FlatButton( - child: Text('Cancel'), - onPressed: speech.isListening ? cancelListening : null, - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - DropdownButton( - onChanged: (selectedVal) => _switchLang(selectedVal), - value: _currentLocaleId, - items: _localeNames - .map( - (localeName) => DropdownMenuItem( - value: localeName.localeId, - child: Text(localeName.name), - ), - ) - .toList(), - ), - ], - ) - ], - ), - ), - Expanded( - flex: 4, - child: Column( - children: [ - Center( - child: Text( - 'Recognized Words', - style: TextStyle(fontSize: 22.0), - ), - ), - Expanded( - child: Stack( - children: [ - Container( - color: Theme.of(context).selectedRowColor, - child: Center( - child: Text( - lastWords, - textAlign: TextAlign.center, - ), - ), - ), - Positioned.fill( - bottom: 10, - child: Align( - alignment: Alignment.bottomCenter, - child: Container( - width: 40, - height: 40, - alignment: Alignment.center, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - blurRadius: .26, - spreadRadius: level * 1.5, - color: Colors.black.withOpacity(.05)) - ], - color: Colors.white, - borderRadius: - BorderRadius.all(Radius.circular(50)), - ), - child: IconButton(icon: Icon(Icons.mic)), - ), - ), - ), - ], - ), - ), - ], - ), - ), - Expanded( - flex: 1, - child: Column( - children: [ - Center( - child: Text( - 'Error Status', - style: TextStyle(fontSize: 22.0), - ), - ), - Center( - child: Text(lastError), - ), - ], - ), - ), - Container( - padding: EdgeInsets.symmetric(vertical: 20), - color: Theme.of(context).backgroundColor, - child: Center( - child: speech.isListening - ? Text( - "I'm listening...", - style: TextStyle(fontWeight: FontWeight.bold), - ) - : Text( - 'Not listening', - style: TextStyle(fontWeight: FontWeight.bold), - ), - ), - ), - ]), - ), - ); - } - - void startListening() { - lastWords = ""; - lastError = ""; - speech.listen( - onResult: resultListener, - listenFor: Duration(seconds: 10), - localeId: _currentLocaleId, - onSoundLevelChange: soundLevelListener, - cancelOnError: true, - partialResults: true, - onDevice: true, - listenMode: ListenMode.confirmation); - setState(() {}); - } - - void stopListening() { - speech.stop(); - setState(() { - level = 0.0; - }); - } - - void cancelListening() { - speech.cancel(); - setState(() { - level = 0.0; - }); - } - - void resultListener(SpeechRecognitionResult result) { - setState(() { - lastWords = "${result.recognizedWords} - ${result.finalResult}"; - }); - } - - void soundLevelListener(double level) { - minSoundLevel = min(minSoundLevel, level); - maxSoundLevel = max(maxSoundLevel, level); - // print("sound level $level: $minSoundLevel - $maxSoundLevel "); - setState(() { - this.level = level; - }); - } - - void errorListener(SpeechRecognitionError error) { - // print("Received error status: $error, listening: ${speech.isListening}"); - setState(() { - lastError = "${error.errorMsg} - ${error.permanent}"; - }); - } - - void statusListener(String status) { - // print( - // "Received listener status: $status, listening: ${speech.isListening}"); - setState(() { - lastStatus = "$status"; - }); - } - - _switchLang(selectedVal) { - setState(() { - _currentLocaleId = selectedVal; - }); - print(selectedVal); - } -} diff --git a/speech_to_text_/example/pubspec.yaml b/speech_to_text_/example/pubspec.yaml deleted file mode 100644 index d2bfcff7..00000000 --- a/speech_to_text_/example/pubspec.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: speech_to_text_example -description: Demonstrates how to use the speech_to_text plugin. -version: 1.1.0 -publish_to: 'none' - -environment: - sdk: ">=2.1.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - cupertino_icons: ^0.1.2 - permission_handler: ^5.0.1+1 - - provider: - -dev_dependencies: - flutter_test: - sdk: flutter - - speech_to_text: - path: ../ - -# The following section is specific to Flutter. -flutter: - - uses-material-design: true - - assets: - - assets/sounds/speech_to_text_listening.m4r - - assets/sounds/speech_to_text_cancel.m4r - - assets/sounds/speech_to_text_stop.m4r diff --git a/speech_to_text_/example/test/widget_test.dart b/speech_to_text_/example/test/widget_test.dart deleted file mode 100644 index 639a52fb..00000000 --- a/speech_to_text_/example/test/widget_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 '../lib/main.dart'; - -void main() { - testWidgets('Verify Platform version', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that platform version is retrieved. - expect( - find.byWidgetPredicate( - (Widget widget) => - widget is Text && widget.data.startsWith('Running on:'), - ), - findsOneWidget, - ); - }); -} diff --git a/speech_to_text_/ios/.gitignore b/speech_to_text_/ios/.gitignore deleted file mode 100644 index aa479fd3..00000000 --- a/speech_to_text_/ios/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/Generated.xcconfig -/Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/speech_to_text_/ios/Assets/.gitkeep b/speech_to_text_/ios/Assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/speech_to_text_/ios/Classes/SpeechToTextPlugin.h b/speech_to_text_/ios/Classes/SpeechToTextPlugin.h deleted file mode 100644 index 1785eb8f..00000000 --- a/speech_to_text_/ios/Classes/SpeechToTextPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface SpeechToTextPlugin : NSObject -@end diff --git a/speech_to_text_/ios/Classes/SpeechToTextPlugin.m b/speech_to_text_/ios/Classes/SpeechToTextPlugin.m deleted file mode 100644 index 20d0327d..00000000 --- a/speech_to_text_/ios/Classes/SpeechToTextPlugin.m +++ /dev/null @@ -1,8 +0,0 @@ -#import "SpeechToTextPlugin.h" -#import - -@implementation SpeechToTextPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftSpeechToTextPlugin registerWithRegistrar:registrar]; -} -@end diff --git a/speech_to_text_/ios/Classes/SwiftSpeechToTextPlugin.swift b/speech_to_text_/ios/Classes/SwiftSpeechToTextPlugin.swift deleted file mode 100644 index 68687967..00000000 --- a/speech_to_text_/ios/Classes/SwiftSpeechToTextPlugin.swift +++ /dev/null @@ -1,580 +0,0 @@ -import Flutter -import UIKit -import Speech -import os.log -import Try - -public enum SwiftSpeechToTextMethods: String { - case has_permission - case initialize - case listen - case stop - case cancel - case locales - case unknown // just for testing -} - -public enum SwiftSpeechToTextCallbackMethods: String { - case textRecognition - case notifyStatus - case notifyError - case soundLevelChange -} - -public enum SpeechToTextStatus: String { - case listening - case notListening - case unavailable - case available -} - -public enum SpeechToTextErrors: String { - case onDeviceError - case noRecognizerError - case listenFailedError - case missingOrInvalidArg -} - -public enum ListenMode: Int { - case deviceDefault = 0 - case dictation = 1 - case search = 2 - case confirmation = 3 -} - -struct SpeechRecognitionWords : Codable { - let recognizedWords: String - let confidence: Decimal -} - -struct SpeechRecognitionResult : Codable { - let alternates: [SpeechRecognitionWords] - let finalResult: Bool -} - -struct SpeechRecognitionError : Codable { - let errorMsg: String - let permanent: Bool -} - -enum SpeechToTextError: Error { - case runtimeError(String) -} - - -@available(iOS 10.0, *) -public class SwiftSpeechToTextPlugin: NSObject, FlutterPlugin { - private var channel: FlutterMethodChannel - private var registrar: FlutterPluginRegistrar - private var recognizer: SFSpeechRecognizer? - private var currentRequest: SFSpeechAudioBufferRecognitionRequest? - private var currentTask: SFSpeechRecognitionTask? - private var listeningSound: AVAudioPlayer? - private var successSound: AVAudioPlayer? - private var cancelSound: AVAudioPlayer? - private var rememberedAudioCategory: AVAudioSession.Category? - private var previousLocale: Locale? - private var onPlayEnd: (() -> Void)? - private var returnPartialResults: Bool = true - private var failedListen: Bool = false - private var listening = false - private let audioSession = AVAudioSession.sharedInstance() - private let audioEngine = AVAudioEngine() - private let jsonEncoder = JSONEncoder() - private let busForNodeTap = 0 - private let speechBufferSize: AVAudioFrameCount = 1024 - private static var subsystem = Bundle.main.bundleIdentifier! - private let pluginLog = OSLog(subsystem: "com.csdcorp.speechToText", category: "plugin") - - public static func register(with registrar: FlutterPluginRegistrar) { - let channel = FlutterMethodChannel(name: "plugin.csdcorp.com/speech_to_text", binaryMessenger: registrar.messenger()) - let instance = SwiftSpeechToTextPlugin( channel, registrar: registrar ) - registrar.addMethodCallDelegate(instance, channel: channel ) - } - - init( _ channel: FlutterMethodChannel, registrar: FlutterPluginRegistrar ) { - self.channel = channel - self.registrar = registrar - } - - public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { - switch call.method { - case SwiftSpeechToTextMethods.has_permission.rawValue: - hasPermission( result ) - case SwiftSpeechToTextMethods.initialize.rawValue: - initialize( result ) - case SwiftSpeechToTextMethods.listen.rawValue: - guard let argsArr = call.arguments as? Dictionary, - let partialResults = argsArr["partialResults"] as? Bool, let onDevice = argsArr["onDevice"] as? Bool, let listenModeIndex = argsArr["listenMode"] as? Int - else { - DispatchQueue.main.async { - result(FlutterError( code: SpeechToTextErrors.missingOrInvalidArg.rawValue, - message:"Missing arg partialResults, onDevice, and listenMode are required", - details: nil )) - } - return - } - var localeStr: String? = nil - if let localeParam = argsArr["localeId"] as? String { - localeStr = localeParam - } - guard let listenMode = ListenMode(rawValue: listenModeIndex) else { - DispatchQueue.main.async { - result(FlutterError( code: SpeechToTextErrors.missingOrInvalidArg.rawValue, - message:"invalid value for listenMode, must be 0-2, was \(listenModeIndex)", - details: nil )) - } - return - } - - listenForSpeech( result, localeStr: localeStr, partialResults: partialResults, onDevice: onDevice, listenMode: listenMode ) - case SwiftSpeechToTextMethods.stop.rawValue: - stopSpeech( result ) - case SwiftSpeechToTextMethods.cancel.rawValue: - cancelSpeech( result ) - case SwiftSpeechToTextMethods.locales.rawValue: - locales( result ) - default: - os_log("Unrecognized method: %{PUBLIC}@", log: pluginLog, type: .error, call.method) - DispatchQueue.main.async { - result( FlutterMethodNotImplemented) - } - } - } - - private func hasPermission( _ result: @escaping FlutterResult) { - let has = SFSpeechRecognizer.authorizationStatus() == SFSpeechRecognizerAuthorizationStatus.authorized && - AVAudioSession.sharedInstance().recordPermission == AVAudioSession.RecordPermission.granted - DispatchQueue.main.async { - result( has ) - } - } - - private func initialize( _ result: @escaping FlutterResult) { - var success = false - let status = SFSpeechRecognizer.authorizationStatus() - switch status { - case SFSpeechRecognizerAuthorizationStatus.notDetermined: - SFSpeechRecognizer.requestAuthorization({(status)->Void in - success = status == SFSpeechRecognizerAuthorizationStatus.authorized - if ( success ) { - AVAudioSession.sharedInstance().requestRecordPermission({(granted: Bool)-> Void in - if granted { - self.setupSpeechRecognition(result) - } else{ - self.sendBoolResult( false, result ); - os_log("User denied permission", log: self.pluginLog, type: .info) - } - }) - } - else { - self.sendBoolResult( false, result ); - } - }); - case SFSpeechRecognizerAuthorizationStatus.denied: - os_log("Permission permanently denied", log: self.pluginLog, type: .info) - sendBoolResult( false, result ); - case SFSpeechRecognizerAuthorizationStatus.restricted: - os_log("Device restriction prevented initialize", log: self.pluginLog, type: .info) - sendBoolResult( false, result ); - default: - os_log("Has permissions continuing with setup", log: self.pluginLog, type: .debug) - setupSpeechRecognition(result) - } - } - - fileprivate func sendBoolResult( _ value: Bool, _ result: @escaping FlutterResult) { - DispatchQueue.main.async { - result( value ) - } - } - - fileprivate func setupListeningSound() { - listeningSound = loadSound("assets/sounds/speech_to_text_listening.m4r") - successSound = loadSound("assets/sounds/speech_to_text_stop.m4r") - cancelSound = loadSound("assets/sounds/speech_to_text_cancel.m4r") - } - - fileprivate func loadSound( _ assetPath: String ) -> AVAudioPlayer? { - var player: AVAudioPlayer? = nil - let soundKey = registrar.lookupKey(forAsset: assetPath ) - guard !soundKey.isEmpty else { - return player - } - if let soundPath = Bundle.main.path(forResource: soundKey, ofType:nil) { - let soundUrl = URL(fileURLWithPath: soundPath ) - do { - player = try AVAudioPlayer(contentsOf: soundUrl ) - player?.delegate = self - } catch { - // no audio - } - } - return player - } - - private func setupSpeechRecognition( _ result: @escaping FlutterResult) { - setupRecognizerForLocale( locale: Locale.current ) - guard recognizer != nil else { - sendBoolResult( false, result ); - return - } - recognizer?.delegate = self - setupListeningSound() - - sendBoolResult( true, result ); - } - - private func setupRecognizerForLocale( locale: Locale ) { - if ( previousLocale == locale ) { - return - } - previousLocale = locale - recognizer = SFSpeechRecognizer( locale: locale ) - } - - private func getLocale( _ localeStr: String? ) -> Locale { - guard let aLocaleStr = localeStr else { - return Locale.current - } - let locale = Locale(identifier: aLocaleStr) - return locale - } - - private func stopSpeech( _ result: @escaping FlutterResult) { - if ( !listening ) { - sendBoolResult( false, result ); - return - } - stopAllPlayers() - if let sound = successSound { - onPlayEnd = {() -> Void in - self.currentTask?.finish() - self.stopCurrentListen( ) - self.sendBoolResult( true, result ) - return - } - sound.play() - } - else { - stopCurrentListen( ) - sendBoolResult( true, result ); - } - } - - private func cancelSpeech( _ result: @escaping FlutterResult) { - if ( !listening ) { - sendBoolResult( false, result ); - return - } - stopAllPlayers() - if let sound = cancelSound { - onPlayEnd = {() -> Void in - self.currentTask?.cancel() - self.stopCurrentListen( ) - self.sendBoolResult( true, result ) - return - } - sound.play() - } - else { - self.currentTask?.cancel() - stopCurrentListen( ) - sendBoolResult( true, result ); - } - } - - private func stopAllPlayers() { - cancelSound?.stop() - successSound?.stop() - listeningSound?.stop() - } - - private func stopCurrentListen( ) { - stopAllPlayers() - currentRequest?.endAudio() - - do { - try trap { - self.audioEngine.stop() - } - } - catch { - os_log("Error stopping engine: %{PUBLIC}@", log: pluginLog, type: .error, error.localizedDescription) - } - do { - try trap { - let inputNode = self.audioEngine.inputNode - inputNode.removeTap(onBus: self.busForNodeTap); - } - } - catch { - os_log("Error removing trap: %{PUBLIC}@", log: pluginLog, type: .error, error.localizedDescription) - } - do { - if let rememberedAudioCategory = rememberedAudioCategory { - try self.audioSession.setCategory(rememberedAudioCategory) - } - } - catch { - os_log("Error stopping listen: %{PUBLIC}@", log: pluginLog, type: .error, error.localizedDescription) - } - do { - try self.audioSession.setActive(false, options: .notifyOthersOnDeactivation) - } - catch { - os_log("Error deactivation: %{PUBLIC}@", log: pluginLog, type: .info, error.localizedDescription) - } - currentRequest = nil - currentTask = nil - onPlayEnd = nil - listening = false - } - - private func listenForSpeech( _ result: @escaping FlutterResult, localeStr: String?, partialResults: Bool, onDevice: Bool, listenMode: ListenMode ) { - if ( nil != currentTask || listening ) { - sendBoolResult( false, result ); - return - } - do { - // let inErrorTest = true - failedListen = false - returnPartialResults = partialResults - setupRecognizerForLocale(locale: getLocale(localeStr)) - guard let localRecognizer = recognizer else { - result(FlutterError( code: SpeechToTextErrors.noRecognizerError.rawValue, - message:"Failed to create speech recognizer", - details: nil )) - return - } - if ( onDevice ) { - if #available(iOS 13.0, *), !localRecognizer.supportsOnDeviceRecognition { - result(FlutterError( code: SpeechToTextErrors.onDeviceError.rawValue, - message:"on device recognition is not supported on this device", - details: nil )) - } - } - rememberedAudioCategory = self.audioSession.category - try self.audioSession.setCategory(AVAudioSession.Category.playAndRecord, options: .defaultToSpeaker) - // try self.audioSession.setMode(AVAudioSession.Mode.measurement) - try self.audioSession.setMode(AVAudioSession.Mode.default) - try self.audioSession.setActive(true, options: .notifyOthersOnDeactivation) - if let sound = listeningSound { - self.onPlayEnd = {()->Void in - if ( !self.failedListen ) { - self.listening = true - self.invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyStatus, arguments: SpeechToTextStatus.listening.rawValue ) - - } - } - sound.play() - } - self.audioEngine.reset(); - let inputNode = self.audioEngine.inputNode - if(inputNode.inputFormat(forBus: 0).channelCount == 0){ - throw SpeechToTextError.runtimeError("Not enough available inputs.") - } - self.currentRequest = SFSpeechAudioBufferRecognitionRequest() - guard let currentRequest = self.currentRequest else { - sendBoolResult( false, result ); - return - } - currentRequest.shouldReportPartialResults = true - if #available(iOS 13.0, *), onDevice { - currentRequest.requiresOnDeviceRecognition = true - } - switch listenMode { - case ListenMode.dictation: - currentRequest.taskHint = SFSpeechRecognitionTaskHint.dictation - break - case ListenMode.search: - currentRequest.taskHint = SFSpeechRecognitionTaskHint.search - break - case ListenMode.confirmation: - currentRequest.taskHint = SFSpeechRecognitionTaskHint.confirmation - break - default: - break - } - self.currentTask = self.recognizer?.recognitionTask(with: currentRequest, delegate: self ) - let recordingFormat = inputNode.outputFormat(forBus: self.busForNodeTap) - try trap { - inputNode.installTap(onBus: self.busForNodeTap, bufferSize: self.speechBufferSize, format: recordingFormat) { (buffer: AVAudioPCMBuffer, when: AVAudioTime) in - currentRequest.append(buffer) - self.updateSoundLevel( buffer: buffer ) - } - } - // if ( inErrorTest ){ - // throw SpeechToTextError.runtimeError("for testing only") - // } - self.audioEngine.prepare() - try self.audioEngine.start() - if nil == listeningSound { - listening = true - self.invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyStatus, arguments: SpeechToTextStatus.listening.rawValue ) - } - sendBoolResult( true, result ); - } - catch { - failedListen = true - os_log("Error starting listen: %{PUBLIC}@", log: pluginLog, type: .error, error.localizedDescription) - stopCurrentListen() - sendBoolResult( false, result ); - invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyStatus, arguments: SpeechToTextStatus.notListening.rawValue ) - let speechError = SpeechRecognitionError(errorMsg: "error_listen_failed", permanent: true ) - do { - let errorResult = try jsonEncoder.encode(speechError) - invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyError, arguments: String( data:errorResult, encoding: .utf8) ) - } catch { - os_log("Could not encode JSON", log: pluginLog, type: .error) - } - } - } - - private func updateSoundLevel( buffer: AVAudioPCMBuffer) { - guard - let channelData = buffer.floatChannelData - else { - return - } - - let channelDataValue = channelData.pointee - let channelDataValueArray = stride(from: 0, - to: Int(buffer.frameLength), - by: buffer.stride).map{ channelDataValue[$0] } - let frameLength = Float(buffer.frameLength) - let rms = sqrt(channelDataValueArray.map{ $0 * $0 }.reduce(0, +) / frameLength ) - let avgPower = 20 * log10(rms) - self.invokeFlutter( SwiftSpeechToTextCallbackMethods.soundLevelChange, arguments: avgPower ) - } - - /// Build a list of localId:name with the current locale first - private func locales( _ result: @escaping FlutterResult ) { - var localeNames = [String](); - let locales = SFSpeechRecognizer.supportedLocales(); - let currentLocale = Locale.current - if let idName = buildIdNameForLocale(forIdentifier: currentLocale.identifier ) { - localeNames.append(idName) - } - for locale in locales { - if ( locale.identifier == currentLocale.identifier) { - continue - } - if let idName = buildIdNameForLocale(forIdentifier: locale.identifier ) { - localeNames.append(idName) - } - } - DispatchQueue.main.async { - result(localeNames) - } - } - - private func buildIdNameForLocale( forIdentifier: String ) -> String? { - var idName: String? - if let name = Locale.current.localizedString(forIdentifier: forIdentifier ) { - let sanitizedName = name.replacingOccurrences(of: ":", with: " ") - idName = "\(forIdentifier):\(sanitizedName)" - } - return idName - } - - private func handleResult( _ transcriptions: [SFTranscription], isFinal: Bool ) { - if ( !isFinal && !returnPartialResults ) { - return - } - var speechWords: [SpeechRecognitionWords] = [] - for transcription in transcriptions { - let words: SpeechRecognitionWords = SpeechRecognitionWords(recognizedWords: transcription.formattedString, confidence: confidenceIn( transcription)) - speechWords.append( words ) - } - let speechInfo = SpeechRecognitionResult(alternates: speechWords, finalResult: isFinal ) - do { - let speechMsg = try jsonEncoder.encode(speechInfo) - if let speechStr = String( data:speechMsg, encoding: .utf8) { - os_log("Encoded JSON result: %{PUBLIC}@", log: pluginLog, type: .debug, speechStr ) - invokeFlutter( SwiftSpeechToTextCallbackMethods.textRecognition, arguments: speechStr ) - } - } catch { - os_log("Could not encode JSON", log: pluginLog, type: .error) - } - } - - private func confidenceIn( _ transcription: SFTranscription ) -> Decimal { - guard ( transcription.segments.count > 0 ) else { - return 0; - } - var totalConfidence: Float = 0.0; - for segment in transcription.segments { - totalConfidence += segment.confidence - } - let avgConfidence: Float = totalConfidence / Float(transcription.segments.count ) - let confidence: Float = (avgConfidence * 1000).rounded() / 1000 - return Decimal( string: String( describing: confidence ) )! - } - - private func invokeFlutter( _ method: SwiftSpeechToTextCallbackMethods, arguments: Any? ) { - DispatchQueue.main.async { - self.channel.invokeMethod( method.rawValue, arguments: arguments ) - } - } - -} - -@available(iOS 10.0, *) -extension SwiftSpeechToTextPlugin : SFSpeechRecognizerDelegate { - public func speechRecognizer(_ speechRecognizer: SFSpeechRecognizer, availabilityDidChange available: Bool) { - let availability = available ? SpeechToTextStatus.available.rawValue : SpeechToTextStatus.unavailable.rawValue - os_log("Availability changed: %{PUBLIC}@", log: pluginLog, type: .debug, availability) - invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyStatus, arguments: availability ) - } -} - -@available(iOS 10.0, *) -extension SwiftSpeechToTextPlugin : SFSpeechRecognitionTaskDelegate { - public func speechRecognitionDidDetectSpeech(_ task: SFSpeechRecognitionTask) { - // Do nothing for now - } - - public func speechRecognitionTaskFinishedReadingAudio(_ task: SFSpeechRecognitionTask) { - reportError(source: "FinishedReadingAudio", error: task.error) - invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyStatus, arguments: SpeechToTextStatus.notListening.rawValue ) - } - - public func speechRecognitionTaskWasCancelled(_ task: SFSpeechRecognitionTask) { - reportError(source: "TaskWasCancelled", error: task.error) - invokeFlutter( SwiftSpeechToTextCallbackMethods.notifyStatus, arguments: SpeechToTextStatus.notListening.rawValue ) - } - - public func speechRecognitionTask(_ task: SFSpeechRecognitionTask, didFinishSuccessfully successfully: Bool) { - reportError(source: "FinishSuccessfully", error: task.error) - stopCurrentListen( ) - } - - public func speechRecognitionTask(_ task: SFSpeechRecognitionTask, didHypothesizeTranscription transcription: SFTranscription) { - reportError(source: "HypothesizeTranscription", error: task.error) - handleResult( [transcription], isFinal: false ) - } - - public func speechRecognitionTask(_ task: SFSpeechRecognitionTask, didFinishRecognition recognitionResult: SFSpeechRecognitionResult) { - reportError(source: "FinishRecognition", error: task.error) - let isFinal = recognitionResult.isFinal - handleResult( recognitionResult.transcriptions, isFinal: isFinal ) - } - - private func reportError( source: String, error: Error?) { - if ( nil != error) { - os_log("%{PUBLIC}@ with error: %{PUBLIC}@", log: pluginLog, type: .debug, source, error.debugDescription) - } - } -} - -@available(iOS 10.0, *) -extension SwiftSpeechToTextPlugin : AVAudioPlayerDelegate { - - public func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer, - successfully flag: Bool) { - if let playEnd = self.onPlayEnd { - playEnd() - } - } -} diff --git a/speech_to_text_/ios/speech_to_text.podspec b/speech_to_text_/ios/speech_to_text.podspec deleted file mode 100644 index 1db79aa0..00000000 --- a/speech_to_text_/ios/speech_to_text.podspec +++ /dev/null @@ -1,22 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# -Pod::Spec.new do |s| - s.name = 'speech_to_text' - s.version = '0.0.1' - s.summary = 'A new flutter plugin project.' - s.description = <<-DESC -A new flutter plugin project. - DESC - s.homepage = 'http://example.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Your Company' => 'email@example.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' - s.dependency 'Flutter' - s.dependency 'Try' - - s.ios.deployment_target = '8.0' -end - diff --git a/speech_to_text_/lib/speech_recognition_error.dart b/speech_to_text_/lib/speech_recognition_error.dart deleted file mode 100644 index 2ab6cd4d..00000000 --- a/speech_to_text_/lib/speech_recognition_error.dart +++ /dev/null @@ -1,44 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'speech_recognition_error.g.dart'; - -/// A single error returned from the underlying speech services. -/// -/// Errors are either transient or permanent. Permanent errors -/// block speech recognition from continuing and must be -/// addressed before recogntion will work. Transient errors -/// cause individual recognition sessions to fail but subsequent -/// attempts may well succeed. -@JsonSerializable() -class SpeechRecognitionError { - /// Use this to differentiate the various error conditions. - /// - /// Not meant for display to the user. - final String errorMsg; - - /// True means that recognition cannot continue until - /// the error is resolved. - final bool permanent; - - SpeechRecognitionError(this.errorMsg, this.permanent); - - factory SpeechRecognitionError.fromJson(Map json) => - _$SpeechRecognitionErrorFromJson(json); - Map toJson() => _$SpeechRecognitionErrorToJson(this); - - @override - String toString() { - return "SpeechRecognitionError msg: $errorMsg, permanent: $permanent"; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - other is SpeechRecognitionError && - errorMsg == other.errorMsg && - permanent == other.permanent; - } - - @override - int get hashCode => errorMsg.hashCode; -} diff --git a/speech_to_text_/lib/speech_recognition_error.g.dart b/speech_to_text_/lib/speech_recognition_error.g.dart deleted file mode 100644 index 65299f6d..00000000 --- a/speech_to_text_/lib/speech_recognition_error.g.dart +++ /dev/null @@ -1,22 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'speech_recognition_error.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -SpeechRecognitionError _$SpeechRecognitionErrorFromJson( - Map json) { - return SpeechRecognitionError( - json['errorMsg'] as String, - json['permanent'] as bool, - ); -} - -Map _$SpeechRecognitionErrorToJson( - SpeechRecognitionError instance) => - { - 'errorMsg': instance.errorMsg, - 'permanent': instance.permanent, - }; diff --git a/speech_to_text_/lib/speech_recognition_event.dart b/speech_to_text_/lib/speech_recognition_event.dart deleted file mode 100644 index 71729365..00000000 --- a/speech_to_text_/lib/speech_recognition_event.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; - -enum SpeechRecognitionEventType { - finalRecognitionEvent, - partialRecognitionEvent, - errorEvent, - statusChangeEvent, - soundLevelChangeEvent, -} - -/// A single event in a stream of speech recognition events. -/// -/// Use [eventType] to determine what type of event it is and depending on that -/// use the other properties to get information about it. -class SpeechRecognitionEvent { - final SpeechRecognitionEventType eventType; - final SpeechRecognitionError _error; - final SpeechRecognitionResult _result; - final bool _listening; - final double _level; - - SpeechRecognitionEvent( - this.eventType, this._result, this._error, this._listening, this._level); - - bool get isListening => _listening; - double get level => _level; - SpeechRecognitionResult get recognitionResult => _result; - SpeechRecognitionError get error => _error; -} diff --git a/speech_to_text_/lib/speech_recognition_result.dart b/speech_to_text_/lib/speech_recognition_result.dart deleted file mode 100644 index 38509f65..00000000 --- a/speech_to_text_/lib/speech_recognition_result.dart +++ /dev/null @@ -1,140 +0,0 @@ -import 'dart:collection'; - -import 'package:json_annotation/json_annotation.dart'; - -part 'speech_recognition_result.g.dart'; - -/// A sequence of recognized words from the speech recognition -/// service. -/// -/// Depending on the platform behaviour the words may come in all -/// at once at the end or as partial results as each word is -/// recognized. Use the [finalResult] flag to determine if the -/// result is considered final by the platform. -@JsonSerializable(explicitToJson: true) -class SpeechRecognitionResult { - List _alternates; - - /// Returns a list of possible transcriptions of the speech. - /// - /// The first value is always the same as the [recognizedWords] - /// value. Use the confidence for each alternate transcription - /// to determine how likely it is. Note that not all platforms - /// do a good job with confidence, there are convenience methods - /// on [SpeechRecogntionWords] to work with possibly missing - /// confidence values. - List get alternates => - UnmodifiableListView(_alternates); - - /// The sequence of words that is the best transcription of - /// what was said. - /// - /// This is the same as the first value of [alternates]. - String get recognizedWords => - _alternates.isNotEmpty ? _alternates.first.recognizedWords : ""; - - /// False means the words are an interim result, true means - /// they are the final recognition. - final bool finalResult; - - /// The confidence that the [recognizedWords] are correct. - /// - /// Confidence is expressed as a value between 0 and 1. -1 - /// means that the confidence value was not available. - double get confidence => - _alternates.isNotEmpty ? _alternates.first.confidence : 0; - - /// true if there is confidence in this recognition, false otherwise. - /// - /// There are two separate ways for there to be confidence, the first - /// is if the confidence is missing, which is indicated by a value of - /// -1. The second is if the confidence is greater than or equal - /// [threshold]. If [threshold] is not provided it defaults to 0.8. - bool isConfident( - {double threshold = SpeechRecognitionWords.confidenceThreshold}) => - _alternates.isNotEmpty - ? _alternates.first.isConfident(threshold: threshold) - : false; - - /// true if [confidence] is not the [missingConfidence] value, false - /// otherwise. - bool get hasConfidenceRating => - _alternates.isNotEmpty ? _alternates.first.hasConfidenceRating : false; - - SpeechRecognitionResult(this._alternates, this.finalResult); - - @override - String toString() { - return "SpeechRecognitionResult words: $_alternates, final: $finalResult"; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - other is SpeechRecognitionResult && - recognizedWords == other.recognizedWords && - finalResult == other.finalResult; - } - - @override - int get hashCode => recognizedWords.hashCode; - - factory SpeechRecognitionResult.fromJson(Map json) => - _$SpeechRecognitionResultFromJson(json); - Map toJson() => _$SpeechRecognitionResultToJson(this); -} - -/// A set of words recognized in a [SpeechRecognitionResult]. -/// -/// Each result will have one or more [SpeechRecognitionWords] -/// with a varying degree of confidence about each set of words. -@JsonSerializable() -class SpeechRecognitionWords { - /// The sequence of words recognized - final String recognizedWords; - - /// The confidence that the [recognizedWords] are correct. - /// - /// Confidence is expressed as a value between 0 and 1. 0 - /// means that the confidence value was not available. Use - /// [isConfident] which will ignore 0 values automatically. - final double confidence; - - static const double confidenceThreshold = 0.8; - static const double missingConfidence = -1; - - const SpeechRecognitionWords(this.recognizedWords, this.confidence); - - /// true if there is confidence in this recognition, false otherwise. - /// - /// There are two separate ways for there to be confidence, the first - /// is if the confidence is missing, which is indicated by a value of - /// -1. The second is if the confidence is greater than or equal - /// [threshold]. If [threshold] is not provided it defaults to 0.8. - bool isConfident({double threshold = confidenceThreshold}) => - confidence == missingConfidence || confidence >= threshold; - - /// true if [confidence] is not the [missingConfidence] value, false - /// otherwise. - bool get hasConfidenceRating => confidence != missingConfidence; - - @override - String toString() { - return "SpeechRecognitionWords words: $recognizedWords, confidence: $confidence"; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - other is SpeechRecognitionWords && - recognizedWords == other.recognizedWords && - confidence == other.confidence; - } - - @override - int get hashCode => recognizedWords.hashCode; - - factory SpeechRecognitionWords.fromJson(Map json) => - _$SpeechRecognitionWordsFromJson(json); - Map toJson() => _$SpeechRecognitionWordsToJson(this); -} diff --git a/speech_to_text_/lib/speech_recognition_result.g.dart b/speech_to_text_/lib/speech_recognition_result.g.dart deleted file mode 100644 index 023e5485..00000000 --- a/speech_to_text_/lib/speech_recognition_result.g.dart +++ /dev/null @@ -1,41 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'speech_recognition_result.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -SpeechRecognitionResult _$SpeechRecognitionResultFromJson( - Map json) { - return SpeechRecognitionResult( - (json['alternates'] as List) - ?.map((e) => e == null - ? null - : SpeechRecognitionWords.fromJson(e as Map)) - ?.toList(), - json['finalResult'] as bool, - ); -} - -Map _$SpeechRecognitionResultToJson( - SpeechRecognitionResult instance) => - { - 'alternates': instance.alternates?.map((e) => e?.toJson())?.toList(), - 'finalResult': instance.finalResult, - }; - -SpeechRecognitionWords _$SpeechRecognitionWordsFromJson( - Map json) { - return SpeechRecognitionWords( - json['recognizedWords'] as String, - (json['confidence'] as num)?.toDouble(), - ); -} - -Map _$SpeechRecognitionWordsToJson( - SpeechRecognitionWords instance) => - { - 'recognizedWords': instance.recognizedWords, - 'confidence': instance.confidence, - }; diff --git a/speech_to_text_/lib/speech_to_text.dart b/speech_to_text_/lib/speech_to_text.dart deleted file mode 100644 index 343706e6..00000000 --- a/speech_to_text_/lib/speech_to_text.dart +++ /dev/null @@ -1,511 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:math'; - -import 'package:clock/clock.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; - -enum ListenMode { - deviceDefault, - dictation, - search, - confirmation, -} - -/// Notified as words are recognized with the current set of recognized words. -/// -/// See the [onResult] argument on the [listen] method for use. -typedef SpeechResultListener = void Function(SpeechRecognitionResult result); - -/// Notified if errors occur during recognition or intialization. -/// -/// Possible errors per the Android docs are described here: -/// https://developer.android.com/reference/android/speech/SpeechRecognizer -/// "error_audio_error" -/// "error_client" -/// "error_permission" -/// "error_network" -/// "error_network_timeout" -/// "error_no_match" -/// "error_busy" -/// "error_server" -/// "error_speech_timeout" -/// See the [onError] argument on the [initialize] method for use. -typedef SpeechErrorListener = void Function( - SpeechRecognitionError errorNotification); - -/// Notified when recognition status changes. -/// -/// See the [onStatus] argument on the [initialize] method for use. -typedef SpeechStatusListener = void Function(String status); - -/// Notified when the sound level changes during a listen method. -/// -/// [level] is a measure of the decibels of the current sound on -/// the recognition input. See the [onSoundLevelChange] argument on -/// the [listen] method for use. -typedef SpeechSoundLevelChange = Function(double level); - -/// An interface to device specific speech recognition services. -/// -/// The general flow of a speech recognition session is as follows: -/// ```Dart -/// SpeechToText speech = SpeechToText(); -/// bool isReady = await speech.initialize(); -/// if ( isReady ) { -/// await speech.listen( resultListener: resultListener ); -/// } -/// ... -/// // At some point later -/// speech.stop(); -/// ``` -class SpeechToText { - static const String listenMethod = 'listen'; - static const String textRecognitionMethod = 'textRecognition'; - static const String notifyErrorMethod = 'notifyError'; - static const String notifyStatusMethod = 'notifyStatus'; - static const String soundLevelChangeMethod = "soundLevelChange"; - static const String notListeningStatus = "notListening"; - static const String listeningStatus = "listening"; - - static const MethodChannel speechChannel = - const MethodChannel('plugin.csdcorp.com/speech_to_text'); - static final SpeechToText _instance = - SpeechToText.withMethodChannel(speechChannel); - bool _initWorked = false; - bool _recognized = false; - bool _listening = false; - bool _cancelOnError = false; - bool _partialResults = false; - int _listenStartedAt = 0; - int _lastSpeechEventAt = 0; - Duration _pauseFor; - Duration _listenFor; - - /// True if not listening or the user called cancel / stop, false - /// if cancel/stop were invoked by timeout or error condition. - bool _userEnded = false; - String _lastRecognized = ""; - String _lastStatus = ""; - double _lastSoundLevel = 0; - Timer _listenTimer; - LocaleName _systemLocale; - SpeechRecognitionError _lastError; - SpeechResultListener _resultListener; - SpeechErrorListener errorListener; - SpeechStatusListener statusListener; - SpeechSoundLevelChange _soundLevelChange; - - final MethodChannel channel; - factory SpeechToText() => _instance; - - @visibleForTesting - SpeechToText.withMethodChannel(this.channel); - - /// True if words have been recognized during the current [listen] call. - /// - /// Goes false as soon as [cancel] is called. - bool get hasRecognized => _recognized; - - /// The last set of recognized words received. - /// - /// This is maintained across [cancel] calls but cleared on the next - /// [listen]. - String get lastRecognizedWords => _lastRecognized; - - /// The last status update received, see [initialize] to register - /// an optional listener to be notified when this changes. - String get lastStatus => _lastStatus; - - /// The last sound level received during a listen event. - /// - /// The sound level is a measure of how loud the current - /// input is during listening. Use the [onSoundLevelChange] - /// argument in the [listen] method to get notified of - /// changes. - double get lastSoundLevel => _lastSoundLevel; - - /// True if [initialize] succeeded - bool get isAvailable => _initWorked; - - /// True if [listen] succeeded and [stop] or [cancel] has not been called. - /// - /// Also goes false when listening times out if listenFor was set. - bool get isListening => _listening; - bool get isNotListening => !isListening; - - /// The last error received or null if none, see [initialize] to - /// register an optional listener to be notified of errors. - SpeechRecognitionError get lastError => _lastError; - - /// True if an error has been received, see [lastError] for details - bool get hasError => null != lastError; - - /// Returns true if the user has already granted permission to access the - /// microphone, does not prompt the user. - /// - /// This method can be called before [initialize] to check if permission - /// has already been granted. If this returns false then the [initialize] - /// call will prompt the user for permission if it is allowed to do so. - /// Note that applications cannot ask for permission again if the user has - /// denied them permission in the past. - Future get hasPermission async { - bool hasPermission = await channel.invokeMethod('has_permission'); - return hasPermission; - } - - /// Initialize speech recognition services, returns true if - /// successful, false if failed. - /// - /// This method must be called before any other speech functions. - /// If this method returns false no further [SpeechToText] methods - /// should be used. Should only be called once if successful but does protect - /// itself if called repeatedly. False usually means that the user has denied - /// permission to use speech. The usual option in that case is to give them - /// instructions on how to open system settings and grant permission. - /// - /// [onError] is an optional listener for errors like - /// timeout, or failure of the device speech recognition. - /// [onStatus] is an optional listener for status changes from - /// listening to not listening. - /// [debugLogging] controls whether there is detailed logging from the underlying - /// plugins. It is off by default, usually only useful for troubleshooting issues - /// with a paritcular OS version or device, fairly verbose - Future initialize( - {SpeechErrorListener onError, - SpeechStatusListener onStatus, - debugLogging = false}) async { - if (_initWorked) { - return Future.value(_initWorked); - } - errorListener = onError; - statusListener = onStatus; - channel.setMethodCallHandler(_handleCallbacks); - _initWorked = await channel - .invokeMethod('initialize', {"debugLogging": debugLogging}); - return _initWorked; - } - - /// Stops the current listen for speech if active, does nothing if not. - /// - /// Stopping a listen session will cause a final result to be sent. Each - /// listen session should be ended with either [stop] or [cancel], for - /// example in the dispose method of a Widget. [cancel] is automatically - /// invoked by a permanent error if [cancelOnError] is set to true in the - /// [listen] call. - /// - /// *Note:* Cannot be used until a successful [initialize] call. Should - /// only be used after a successful [listen] call. - Future stop() async { - _userEnded = true; - return _stop(); - } - - Future _stop() async { - if (!_initWorked) { - return; - } - _shutdownListener(); - await channel.invokeMethod('stop'); - } - - /// Cancels the current listen for speech if active, does nothing if not. - /// - /// Canceling means that there will be no final result returned from the - /// recognizer. Each listen session should be ended with either [stop] or - /// [cancel], for example in the dispose method of a Widget. [cancel] is - /// automatically invoked by a permanent error if [cancelOnError] is set - /// to true in the [listen] call. - /// - /// *Note* Cannot be used until a successful [initialize] call. Should only - /// be used after a successful [listen] call. - Future cancel() async { - _userEnded = true; - return _cancel(); - } - - Future _cancel() async { - if (!_initWorked) { - return; - } - _shutdownListener(); - await channel.invokeMethod('cancel'); - } - - /// Starts a listening session for speech and converts it to text, - /// invoking the provided [onResult] method as words are recognized. - /// - /// Cannot be used until a successful [initialize] call. There is a - /// time limit on listening imposed by both Android and iOS. The time - /// depends on the device, network, etc. Android is usually quite short, - /// especially if there is no active speech event detected, on the order - /// of ten seconds or so. - /// - /// When listening is done always invoke either [cancel] or [stop] to - /// end the session, even if it times out. [cancelOnError] provides an - /// automatic way to ensure this happens. - /// - /// [onResult] is an optional listener that is notified when words - /// are recognized. - /// - /// [listenFor] sets the maximum duration that it will listen for, after - /// that it automatically stops the listen for you. - /// - /// [pauseFor] sets the maximum duration of a pause in speech with no words - /// detected, after that it automatically stops the listen for you. - /// - /// [localeId] is an optional locale that can be used to listen in a language - /// other than the current system default. See [locales] to find the list of - /// supported languages for listening. - /// - /// [onSoundLevelChange] is an optional listener that is notified when the - /// sound level of the input changes. Use this to update the UI in response to - /// more or less input. The values currently differ between Ancroid and iOS, - /// haven't yet been able to determine from the Android documentation what the - /// value means. On iOS the value returned is in decibels. - /// - /// [cancelOnError] if true then listening is automatically canceled on a - /// permanent error. This defaults to false. When false cancel should be - /// called from the error handler. - /// - /// [partialResults] if true the listen reports results as they are recognized, - /// when false only final results are reported. Defaults to true. - /// - /// [onDevice] if true the listen attempts to recognize locally with speech never - /// leaving the device. If it cannot do this the listen attempt will fail. This is - /// usually only needed for sensitive content where privacy or security is a concern. - Future listen( - {SpeechResultListener onResult, - Duration listenFor, - Duration pauseFor, - String localeId, - SpeechSoundLevelChange onSoundLevelChange, - cancelOnError = false, - partialResults = true, - onDevice = false, - ListenMode listenMode = ListenMode.confirmation}) async { - if (!_initWorked) { - throw SpeechToTextNotInitializedException(); - } - _userEnded = false; - _cancelOnError = cancelOnError; - _recognized = false; - _resultListener = onResult; - _soundLevelChange = onSoundLevelChange; - _partialResults = partialResults; - Map listenParams = { - "partialResults": partialResults || null != pauseFor, - "onDevice": onDevice, - "listenMode": listenMode.index, - }; - if (null != localeId) { - listenParams["localeId"] = localeId; - } - try { - bool started = await channel.invokeMethod(listenMethod, listenParams); - if (started) { - _listenStartedAt = clock.now().millisecondsSinceEpoch; - _setupListenAndPause(pauseFor, listenFor); - } - } on PlatformException catch (e) { - throw ListenFailedException(e.details); - } - } - - void _setupListenAndPause(Duration pauseFor, Duration listenFor) { - _pauseFor = null; - _listenFor = null; - if (null == pauseFor && null == listenFor) { - return; - } - var minDuration; - if (null == pauseFor) { - _listenFor = Duration(milliseconds: listenFor.inMilliseconds); - minDuration = listenFor; - } else if (null == listenFor) { - _pauseFor = Duration(milliseconds: pauseFor.inMilliseconds); - minDuration = pauseFor; - } else { - _listenFor = Duration(milliseconds: listenFor.inMilliseconds); - _pauseFor = Duration(milliseconds: pauseFor.inMilliseconds); - var minMillis = min(listenFor.inMilliseconds - _elapsedListenMillis, - pauseFor.inMilliseconds); - minDuration = Duration(milliseconds: minMillis); - } - _listenTimer = Timer(minDuration, _stopOnPauseOrListen); - } - - int get _elapsedListenMillis => - clock.now().millisecondsSinceEpoch - _listenStartedAt; - int get _elapsedSinceSpeechEvent => - clock.now().millisecondsSinceEpoch - _lastSpeechEventAt; - - void _stopOnPauseOrListen() { - if (null != _listenFor && - _elapsedListenMillis >= _listenFor.inMilliseconds) { - _stop(); - } else if (null != _pauseFor && - _elapsedSinceSpeechEvent >= _pauseFor.inMilliseconds) { - _stop(); - } else { - _setupListenAndPause(_pauseFor, _listenFor); - } - } - - /// returns the list of speech locales available on the device. - /// - /// This method is useful to find the identifier to use - /// for the [listen] method, it is the [localeId] member of the - /// [LocaleName]. - /// - /// Each [LocaleName] in the returned list has the - /// identifier for the locale as well as a name for - /// display. The name is localized for the system locale on - /// the device. - Future> locales() async { - if (!_initWorked) { - throw SpeechToTextNotInitializedException(); - } - final List locales = await channel.invokeMethod('locales'); - List filteredLocales = locales - .map((locale) { - var components = locale.split(":"); - if (components.length != 2) { - return null; - } - return LocaleName(components[0], components[1]); - }) - .where((item) => item != null) - .toList(); - if (filteredLocales.isNotEmpty) { - _systemLocale = filteredLocales.first; - } else { - _systemLocale = null; - } - filteredLocales.sort((ln1, ln2) => ln1.name.compareTo(ln2.name)); - return filteredLocales; - } - - /// returns the locale that will be used if no localeId is passed - /// to the [listen] method. - Future systemLocale() async { - if (null == _systemLocale) { - await locales(); - } - return Future.value(_systemLocale); - } - - Future _handleCallbacks(MethodCall call) async { - // print("SpeechToText call: ${call.method} ${call.arguments}"); - switch (call.method) { - case textRecognitionMethod: - if (call.arguments is String) { - _onTextRecognition(call.arguments); - } - break; - case notifyErrorMethod: - if (call.arguments is String) { - await _onNotifyError(call.arguments); - } - break; - case notifyStatusMethod: - if (call.arguments is String) { - _onNotifyStatus(call.arguments); - } - break; - case soundLevelChangeMethod: - if (call.arguments is double) { - _onSoundLevelChange(call.arguments); - } - break; - default: - } - } - - void _onTextRecognition(String resultJson) { - _lastSpeechEventAt = clock.now().millisecondsSinceEpoch; - Map resultMap = jsonDecode(resultJson); - SpeechRecognitionResult speechResult = - SpeechRecognitionResult.fromJson(resultMap); - if (!_partialResults && !speechResult.finalResult) { - return; - } - _recognized = true; - // print("Recognized text $resultJson"); - - _lastRecognized = speechResult.recognizedWords; - if (null != _resultListener) { - _resultListener(speechResult); - } - } - - Future _onNotifyError(String errorJson) async { - if (isNotListening && _userEnded) { - return; - } - Map errorMap = jsonDecode(errorJson); - SpeechRecognitionError speechError = - SpeechRecognitionError.fromJson(errorMap); - _lastError = speechError; - if (null != errorListener) { - errorListener(speechError); - } - if (_cancelOnError && speechError.permanent) { - await _cancel(); - } - } - - void _onNotifyStatus(String status) { - _lastStatus = status; - _listening = status == listeningStatus; - // print(status); - if (null != statusListener) { - statusListener(status); - } - } - - void _onSoundLevelChange(double level) { - if (isNotListening) { - return; - } - _lastSoundLevel = level; - if (null != _soundLevelChange) { - _soundLevelChange(level); - } - } - - _shutdownListener() { - _listening = false; - _recognized = false; - _listenTimer?.cancel(); - _listenTimer = null; - } - - @visibleForTesting - Future processMethodCall(MethodCall call) async { - return await _handleCallbacks(call); - } -} - -/// A single locale with a [name], localized to the current system locale, -/// and a [localeId] which can be used in the [listen] method to choose a -/// locale for speech recognition. -class LocaleName { - final String localeId; - final String name; - LocaleName(this.localeId, this.name); -} - -/// Thrown when a method is called that requires successful -/// initialization first. -class SpeechToTextNotInitializedException implements Exception {} - -/// Thrown when listen fails to properly start a speech listening session -/// on the device -class ListenFailedException implements Exception { - final String details; - ListenFailedException(this.details); -} diff --git a/speech_to_text_/lib/speech_to_text_provider.dart b/speech_to_text_/lib/speech_to_text_provider.dart deleted file mode 100644 index 91adf3b4..00000000 --- a/speech_to_text_/lib/speech_to_text_provider.dart +++ /dev/null @@ -1,201 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_event.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; -import 'package:speech_to_text/speech_to_text.dart'; - -/// Simplifies interaction with [SpeechToText] by handling all the callbacks and notifying -/// listeners as events happen. -/// -/// Here's an example of using the [SpeechToTextProvider] -/// ``` -/// var speechProvider = SpeechToTextProvider( SpeechToText()); -/// var available = await speechProvider.initialize(); -/// StreamSubscription _subscription; -/// _subscription = speechProvider.recognitionController.stream.listen((recognitionEvent) { -/// if (recognitionEvent.eventType == SpeechRecognitionEventType.finalRecognitionEvent ) { -/// print("I heard: ${recognitionEvent.recognitionResult.recognizedWords}"); -/// } -/// }); -/// speechProvider.addListener(() { -/// var words = speechProvider.lastWords; -/// }); -class SpeechToTextProvider extends ChangeNotifier { - final StreamController _recognitionController = - StreamController.broadcast(); - final SpeechToText _speechToText; - SpeechRecognitionResult _lastResult; - double _lastLevel = 0; - List _locales = []; - LocaleName _systemLocale; - - /// Only construct one instance in an application. - /// - /// Do not call `initialize` on the [SpeechToText] that is passed as a parameter, instead - /// call the [initialize] method on this class. - SpeechToTextProvider(this._speechToText); - - Stream get stream => _recognitionController.stream; - - /// Returns the last result received, may be null. - SpeechRecognitionResult get lastResult => _lastResult; - - /// Returns the last error received, may be null. - SpeechRecognitionError get lastError => _speechToText.lastError; - - /// Returns the last sound level received. - /// - /// Note this is only available when the `soundLevel` is set to true on - /// a call to [listen], will be 0 at all other times. - double get lastLevel => _lastLevel; - - /// Initializes the provider and the contained [SpeechToText] instance. - /// - /// Returns true if [SpeechToText] was initialized successful and can now - /// be used, false otherwse. - Future initialize() async { - if (isAvailable) { - return isAvailable; - } - bool availableBefore = _speechToText.isAvailable; - bool available = - await _speechToText.initialize(onStatus: _onStatus, onError: _onError); - if (available) { - _locales = []; - _locales.addAll(await _speechToText.locales()); - _systemLocale = await _speechToText.systemLocale(); - } - if (availableBefore != available) { - notifyListeners(); - } - return available; - } - - /// Returns true if the provider has been initialized and can be used to recognize speech. - bool get isAvailable => _speechToText.isAvailable; - - /// Returns true if the provider cannot be used to recognize speech, either because it has not - /// yet been initialized or because initialization failed. - bool get isNotAvailable => !_speechToText.isAvailable; - - /// Returns true if [SpeechToText] is listening for new speech. - bool get isListening => _speechToText.isListening; - - /// Returns true if [SpeechToText] is not listening for new speech. - bool get isNotListening => _speechToText.isNotListening; - - /// Returns true if [SpeechToText] has a previous error. - bool get hasError => _speechToText.hasError; - - /// Returns true if [lastResult] has a last result. - bool get hasResults => null != _lastResult; - - /// Returns the list of locales that are available on the device for speech recognition. - List get locales => _locales; - - /// Returns the locale that is currently set as active on the device. - LocaleName get systemLocale => _systemLocale; - - /// Start listening for new events, set [partialResults] to true to receive interim - /// recognition results. - /// - /// [soundLevel] set to true to be notified on changes to the input sound level - /// on the microphone. - /// - /// [listenFor] sets the maximum duration that it will listen for, after - /// that it automatically stops the listen for you. - /// - /// [pauseFor] sets the maximum duration of a pause in speech with no words - /// detected, after that it automatically stops the listen for you. - /// - /// Call this only after a successful [initialize] call - void listen( - {bool partialResults = false, - bool soundLevel = false, - Duration listenFor, - Duration pauseFor}) { - _lastLevel = 0; - _lastResult = null; - if (soundLevel) { - _speechToText.listen( - partialResults: partialResults, - listenFor: listenFor, - pauseFor: pauseFor, - cancelOnError: true, - onResult: _onListenResult, - // onSoundLevelChange: _onSoundLevelChange); - ); - } else { - _speechToText.listen( - partialResults: partialResults, - listenFor: listenFor, - pauseFor: pauseFor, - cancelOnError: true, - onResult: _onListenResult); - } - } - - /// Stops a current active listening session. - /// - /// Call this after calling [listen] to stop the recognizer from listening further - /// and return the current result as final. - void stop() { - _speechToText.stop(); - notifyListeners(); - } - - /// Cancel a current active listening session. - /// - /// Call this after calling [listen] to stop the recognizer from listening further - /// and ignore any results recognized so far. - void cancel() { - _speechToText.cancel(); - notifyListeners(); - } - - void _onError(SpeechRecognitionError errorNotification) { - _recognitionController.add(SpeechRecognitionEvent( - SpeechRecognitionEventType.errorEvent, - null, - errorNotification, - isListening, - null)); - notifyListeners(); - } - - void _onStatus(String status) { - _recognitionController.add(SpeechRecognitionEvent( - SpeechRecognitionEventType.statusChangeEvent, - null, - null, - isListening, - null)); - notifyListeners(); - } - - void _onListenResult(SpeechRecognitionResult result) { - _lastResult = result; - _recognitionController.add(SpeechRecognitionEvent( - result.finalResult - ? SpeechRecognitionEventType.finalRecognitionEvent - : SpeechRecognitionEventType.partialRecognitionEvent, - result, - null, - isListening, - null)); - notifyListeners(); - } - - // void _onSoundLevelChange(double level) { - // _lastLevel = level; - // _recognitionController.add(SpeechRecognitionEvent( - // SpeechRecognitionEventType.soundLevelChangeEvent, - // null, - // null, - // null, - // level)); - // notifyListeners(); - // } -} diff --git a/speech_to_text_/pubspec.yaml b/speech_to_text_/pubspec.yaml deleted file mode 100644 index 34b3da29..00000000 --- a/speech_to_text_/pubspec.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: speech_to_text -description: A Flutter plugin that exposes device specific speech to text recognition capability. - - - -environment: - sdk: ">=2.1.0 <3.0.0" - flutter: ">=1.10.0" - -dependencies: - flutter: - sdk: flutter - json_annotation: ^3.0.0 - clock: ^1.0.1 - -dev_dependencies: - flutter_test: - sdk: flutter - build_runner: ^1.0.0 - json_serializable: ^3.0.0 - fake_async: ^1.0.1 - -flutter: - plugin: - platforms: - android: - package: com.csdcorp.speech_to_text - pluginClass: SpeechToTextPlugin - ios: - pluginClass: SpeechToTextPlugin - diff --git a/speech_to_text_/test/speech_recognition_error_test.dart b/speech_to_text_/test/speech_recognition_error_test.dart deleted file mode 100644 index 202ae4cd..00000000 --- a/speech_to_text_/test/speech_recognition_error_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; - -void main() { - const String msg1 = "msg1"; - - setUp(() {}); - - group('properties', () { - test('equals true for same object', () { - SpeechRecognitionError error = SpeechRecognitionError(msg1, false); - expect(error, error); - }); - test('equals true for different object same values', () { - SpeechRecognitionError error1 = SpeechRecognitionError(msg1, false); - SpeechRecognitionError error2 = SpeechRecognitionError(msg1, false); - expect(error1, error2); - }); - test('equals false for different object', () { - SpeechRecognitionError error1 = SpeechRecognitionError(msg1, false); - SpeechRecognitionError error2 = SpeechRecognitionError("msg2", false); - expect(error1, isNot(error2)); - }); - test('hash same for same object', () { - SpeechRecognitionError error = SpeechRecognitionError(msg1, false); - expect(error.hashCode, error.hashCode); - }); - test('hash same for different object same values', () { - SpeechRecognitionError error1 = SpeechRecognitionError(msg1, false); - SpeechRecognitionError error2 = SpeechRecognitionError(msg1, false); - expect(error1.hashCode, error2.hashCode); - }); - test('hash different for different object', () { - SpeechRecognitionError error1 = SpeechRecognitionError(msg1, false); - SpeechRecognitionError error2 = SpeechRecognitionError("msg2", false); - expect(error1.hashCode, isNot(error2.hashCode)); - }); - test('toString as expected', () { - SpeechRecognitionError error1 = SpeechRecognitionError(msg1, false); - expect(error1.toString(), - "SpeechRecognitionError msg: $msg1, permanent: false"); - }); - }); - group('json', () { - test('loads properly', () { - var json = jsonDecode('{"errorMsg":"$msg1","permanent":true}'); - SpeechRecognitionError error = SpeechRecognitionError.fromJson(json); - expect(error.errorMsg, msg1); - expect(error.permanent, isTrue); - json = jsonDecode('{"errorMsg":"$msg1","permanent":false}'); - error = SpeechRecognitionError.fromJson(json); - expect(error.permanent, isFalse); - }); - test('roundtrips properly', () { - var json = jsonDecode('{"errorMsg":"$msg1","permanent":true}'); - SpeechRecognitionError error = SpeechRecognitionError.fromJson(json); - var roundtripJson = error.toJson(); - SpeechRecognitionError roundtripError = - SpeechRecognitionError.fromJson(roundtripJson); - expect(error, roundtripError); - }); - }); -} diff --git a/speech_to_text_/test/speech_recognition_event_test.dart b/speech_to_text_/test/speech_recognition_event_test.dart deleted file mode 100644 index ceaaab8a..00000000 --- a/speech_to_text_/test/speech_recognition_event_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:speech_to_text/speech_recognition_event.dart'; - -import 'test_speech_channel_handler.dart'; - -void main() { - group('properties', () { - test('status listening matches', () { - var event = SpeechRecognitionEvent( - SpeechRecognitionEventType.statusChangeEvent, null, null, true, null); - expect(event.eventType, SpeechRecognitionEventType.statusChangeEvent); - expect(event.isListening, isTrue); - }); - test('result matches', () { - var event = SpeechRecognitionEvent( - SpeechRecognitionEventType.finalRecognitionEvent, - TestSpeechChannelHandler.firstRecognizedResult, - null, - null, - null); - expect(event.eventType, SpeechRecognitionEventType.finalRecognitionEvent); - expect(event.recognitionResult, - TestSpeechChannelHandler.firstRecognizedResult); - }); - test('error matches', () { - var event = SpeechRecognitionEvent(SpeechRecognitionEventType.errorEvent, - null, TestSpeechChannelHandler.firstError, null, null); - expect(event.eventType, SpeechRecognitionEventType.errorEvent); - expect(event.error, TestSpeechChannelHandler.firstError); - }); - test('sound level matches', () { - var event = SpeechRecognitionEvent( - SpeechRecognitionEventType.soundLevelChangeEvent, - null, - null, - null, - TestSpeechChannelHandler.level1); - expect(event.eventType, SpeechRecognitionEventType.soundLevelChangeEvent); - expect(event.level, TestSpeechChannelHandler.level1); - }); - }); -} diff --git a/speech_to_text_/test/speech_recognition_result_test.dart b/speech_to_text_/test/speech_recognition_result_test.dart deleted file mode 100644 index 1516779a..00000000 --- a/speech_to_text_/test/speech_recognition_result_test.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; - -void main() { - final String firstRecognizedWords = 'hello'; - final String secondRecognizedWords = 'hello there'; - final double firstConfidence = 0.85; - final double secondConfidence = 0.62; - final String firstRecognizedJson = - '{"alternates":[{"recognizedWords":"$firstRecognizedWords","confidence":$firstConfidence}],"finalResult":false}'; - final String secondRecognizedJson = - '{"alternates":[{"recognizedWords":"$secondRecognizedWords","confidence":$secondConfidence}],"finalResult":false}'; - final SpeechRecognitionWords firstWords = - SpeechRecognitionWords(firstRecognizedWords, firstConfidence); - final SpeechRecognitionWords secondWords = - SpeechRecognitionWords(secondRecognizedWords, secondConfidence); - - setUp(() {}); - - group('recognizedWords', () { - test('empty if no alternates', () { - SpeechRecognitionResult result = SpeechRecognitionResult([], true); - expect(result.recognizedWords, isEmpty); - }); - test('matches first alternate', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords, secondWords], true); - expect(result.recognizedWords, firstRecognizedWords); - }); - }); - group('alternates', () { - test('empty if no alternates', () { - SpeechRecognitionResult result = SpeechRecognitionResult([], true); - expect(result.alternates, isEmpty); - }); - test('expected contents', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords, secondWords], true); - expect(result.alternates, contains(firstWords)); - expect(result.alternates, contains(secondWords)); - }); - test('in order', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords, secondWords], true); - expect(result.alternates.first, firstWords); - }); - }); - group('confidence', () { - test('0 if no alternates', () { - SpeechRecognitionResult result = SpeechRecognitionResult([], true); - expect(result.confidence, 0); - }); - test('isConfident false if no alternates', () { - SpeechRecognitionResult result = SpeechRecognitionResult([], true); - expect(result.isConfident(), isFalse); - }); - test('isConfident matches first alternate', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords, secondWords], true); - expect(result.isConfident(), firstWords.isConfident()); - }); - test('hasConfidenceRating false if no alternates', () { - SpeechRecognitionResult result = SpeechRecognitionResult([], true); - expect(result.hasConfidenceRating, isFalse); - }); - test('hasConfidenceRating matches first alternate', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords, secondWords], true); - expect(result.hasConfidenceRating, firstWords.hasConfidenceRating); - }); - }); - group('json', () { - test('loads correctly', () { - var json = jsonDecode(firstRecognizedJson); - SpeechRecognitionResult result = SpeechRecognitionResult.fromJson(json); - expect(result.recognizedWords, firstRecognizedWords); - expect(result.confidence, firstConfidence); - }); - test('roundtrips correctly', () { - var json = jsonDecode(firstRecognizedJson); - SpeechRecognitionResult result = SpeechRecognitionResult.fromJson(json); - var roundTripJson = result.toJson(); - SpeechRecognitionResult roundtripResult = - SpeechRecognitionResult.fromJson(roundTripJson); - expect(result, roundtripResult); - }); - }); - group('overrides', () { - test('toString works with no alternates', () { - SpeechRecognitionResult result = SpeechRecognitionResult([], true); - expect( - result.toString(), "SpeechRecognitionResult words: [], final: true"); - }); - test('toString works with alternates', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords], true); - expect(result.toString(), - "SpeechRecognitionResult words: [SpeechRecognitionWords words: hello, confidence: 0.85], final: true"); - }); - test('hash same for same object', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords], true); - expect(result.hashCode, result.hashCode); - }); - test('hash differs for different objects', () { - SpeechRecognitionResult result1 = - SpeechRecognitionResult([firstWords], true); - SpeechRecognitionResult result2 = - SpeechRecognitionResult([secondWords], true); - expect(result1.hashCode, isNot(result2.hashCode)); - }); - test('equals same for same object', () { - SpeechRecognitionResult result = - SpeechRecognitionResult([firstWords], true); - expect(result, result); - }); - test('equals same for different object same values', () { - SpeechRecognitionResult result1 = - SpeechRecognitionResult([firstWords], true); - SpeechRecognitionResult result1a = - SpeechRecognitionResult([firstWords], true); - expect(result1, result1a); - }); - test('equals differs for different objects', () { - SpeechRecognitionResult result1 = - SpeechRecognitionResult([firstWords], true); - SpeechRecognitionResult result2 = - SpeechRecognitionResult([secondWords], true); - expect(result1, isNot(result2)); - }); - }); -} diff --git a/speech_to_text_/test/speech_recognitions_words_test.dart b/speech_to_text_/test/speech_recognitions_words_test.dart deleted file mode 100644 index 36a9ef0e..00000000 --- a/speech_to_text_/test/speech_recognitions_words_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter_test/flutter_test.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; - -void main() { - final String firstRecognizedWords = 'hello'; - final String secondRecognizedWords = 'hello there'; - final double firstConfidence = 0.85; - final double secondConfidence = 0.62; - final String firstRecognizedJson = - '{"recognizedWords":"$firstRecognizedWords","confidence":$firstConfidence}'; - final SpeechRecognitionWords firstWords = - SpeechRecognitionWords(firstRecognizedWords, firstConfidence); - final SpeechRecognitionWords secondWords = - SpeechRecognitionWords(secondRecognizedWords, secondConfidence); - - setUp(() {}); - - group('properties', () { - test('words', () { - expect(firstWords.recognizedWords, firstRecognizedWords); - expect(secondWords.recognizedWords, secondRecognizedWords); - }); - test('confidence', () { - expect(firstWords.confidence, firstConfidence); - expect(secondWords.confidence, secondConfidence); - expect(firstWords.hasConfidenceRating, isTrue); - }); - test('equals true for same object', () { - expect(firstWords, firstWords); - }); - test('equals true for different object with same values', () { - SpeechRecognitionWords firstWordsA = - SpeechRecognitionWords(firstRecognizedWords, firstConfidence); - expect(firstWords, firstWordsA); - }); - test('equals false for different results', () { - expect(firstWords, isNot(secondWords)); - }); - test('hash same for same object', () { - expect(firstWords.hashCode, firstWords.hashCode); - }); - test('hash same for different object with same values', () { - SpeechRecognitionWords firstWordsA = - SpeechRecognitionWords(firstRecognizedWords, firstConfidence); - expect(firstWords.hashCode, firstWordsA.hashCode); - }); - test('hash different for different results', () { - expect(firstWords.hashCode, isNot(secondWords.hashCode)); - }); - }); - group('isConfident', () { - test('true when >= 0.8', () { - expect(firstWords.isConfident(), isTrue); - }); - test('false when < 0.8', () { - expect(secondWords.isConfident(), isFalse); - }); - test('respects threshold', () { - expect(secondWords.isConfident(threshold: 0.5), isTrue); - }); - test('true when missing', () { - SpeechRecognitionWords words = SpeechRecognitionWords( - firstRecognizedWords, SpeechRecognitionWords.missingConfidence); - expect(words.isConfident(), isTrue); - expect(words.hasConfidenceRating, isFalse); - }); - }); - group('json', () { - test('loads correctly', () { - var json = jsonDecode(firstRecognizedJson); - SpeechRecognitionWords words = SpeechRecognitionWords.fromJson(json); - expect(words.recognizedWords, firstRecognizedWords); - expect(words.confidence, firstConfidence); - }); - test('roundtrips correctly', () { - var json = jsonDecode(firstRecognizedJson); - SpeechRecognitionWords words = SpeechRecognitionWords.fromJson(json); - var roundTripJson = words.toJson(); - SpeechRecognitionWords roundtripWords = - SpeechRecognitionWords.fromJson(roundTripJson); - expect(words, roundtripWords); - }); - }); -} diff --git a/speech_to_text_/test/speech_to_text_provider_test.dart b/speech_to_text_/test/speech_to_text_provider_test.dart deleted file mode 100644 index 25366b6f..00000000 --- a/speech_to_text_/test/speech_to_text_provider_test.dart +++ /dev/null @@ -1,196 +0,0 @@ -import 'package:fake_async/fake_async.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:speech_to_text/speech_to_text.dart'; -import 'package:speech_to_text/speech_to_text_provider.dart'; - -import 'test_speech_channel_handler.dart'; -import 'test_speech_listener.dart'; - -void main() { - SpeechToTextProvider provider; - SpeechToText speechToText; - TestSpeechChannelHandler speechHandler; - TestSpeechListener speechListener; - - TestWidgetsFlutterBinding.ensureInitialized(); - - setUp(() { - speechToText = SpeechToText.withMethodChannel(SpeechToText.speechChannel); - speechHandler = TestSpeechChannelHandler(speechToText); - speechToText.channel - .setMockMethodCallHandler(speechHandler.methodCallHandler); - provider = SpeechToTextProvider(speechToText); - speechListener = TestSpeechListener(provider); - provider.addListener(speechListener.onNotify); - }); - - tearDown(() { - speechToText.channel.setMockMethodCallHandler(null); - }); - - group('delegates', () { - test('isListening matches delegate defaults', () { - expect(provider.isListening, speechToText.isListening); - expect(provider.isNotListening, speechToText.isNotListening); - }); - test('isAvailable matches delegate defaults', () { - expect(provider.isAvailable, speechToText.isAvailable); - expect(provider.isNotAvailable, !speechToText.isAvailable); - }); - test('isAvailable matches delegate after init', () async { - expect(await provider.initialize(), isTrue); - expect(provider.isAvailable, speechToText.isAvailable); - expect(provider.isNotAvailable, !speechToText.isAvailable); - }); - test('hasError matches delegate after error', () async { - expect(await provider.initialize(), isTrue); - expect(provider.hasError, speechToText.hasError); - }); - }); - group('listening', () { - test('notifies on initialize', () async { - fakeAsync((fa) { - provider.initialize(); - fa.flushMicrotasks(); - expect(speechListener.notified, isTrue); - expect(speechListener.isAvailable, isTrue); - }); - }); - test('notifies on listening', () async { - fakeAsync((fa) { - setupForListen(provider, fa, speechListener); - expect(speechListener.notified, isTrue); - expect(speechListener.isListening, isTrue); - expect(provider.hasResults, isFalse); - }); - }); - test('notifies on final words', () async { - fakeAsync((fa) { - setupForListen(provider, fa, speechListener); - speechListener.reset(); - speechHandler.notifyFinalWords(); - fa.flushMicrotasks(); - expect(speechListener.notified, isTrue); - expect(provider.hasResults, isTrue); - var result = speechListener.recognitionResult; - expect(result.recognizedWords, - TestSpeechChannelHandler.secondRecognizedWords); - expect(result.finalResult, isTrue); - }); - }); - test('hasResult false after listening before new results', () async { - fakeAsync((fa) { - setupForListen(provider, fa, speechListener); - speechHandler.notifyFinalWords(); - provider.stop(); - setupForListen(provider, fa, speechListener); - fa.flushMicrotasks(); - expect(provider.hasResults, isFalse); - }); - }); - test('notifies on partial words', () async { - fakeAsync((fa) { - setupForListen(provider, fa, speechListener, partialResults: true); - speechListener.reset(); - speechHandler.notifyPartialWords(); - fa.flushMicrotasks(); - expect(speechListener.notified, isTrue); - expect(provider.hasResults, isTrue); - var result = speechListener.recognitionResult; - expect(result.recognizedWords, - TestSpeechChannelHandler.firstRecognizedWords); - expect(result.finalResult, isFalse); - }); - }); - }); - group('soundLevel', () { - test('notifies when requested', () async { - fakeAsync((fa) { - setupForListen(provider, fa, speechListener, - partialResults: true, soundLevel: true); - speechListener.reset(); - speechHandler.notifySoundLevel(); - fa.flushMicrotasks(); - expect(speechListener.notified, isTrue); - expect(speechListener.soundLevel, TestSpeechChannelHandler.level2); - }); - }); - test('no notification by default', () async { - fakeAsync((fa) { - setupForListen(provider, fa, speechListener, - partialResults: true, soundLevel: false); - speechListener.reset(); - speechHandler.notifySoundLevel(); - fa.flushMicrotasks(); - expect(speechListener.notified, isFalse); - expect(speechListener.soundLevel, 0); - }); - }); - }); - group('stop/cancel', () { - test('notifies on stop', () async { - fakeAsync((fa) { - provider.initialize(); - setupForListen(provider, fa, speechListener); - speechListener.reset(); - provider.stop(); - fa.flushMicrotasks(); - expect(speechListener.notified, isTrue); - expect(speechListener.isListening, isFalse); - }); - }); - test('notifies on cancel', () async { - fakeAsync((fa) { - provider.initialize(); - setupForListen(provider, fa, speechListener); - speechListener.reset(); - provider.cancel(); - fa.flushMicrotasks(); - expect(speechListener.notified, isTrue); - expect(speechListener.isListening, isFalse); - }); - }); - }); - group('error handling', () { - test('hasError matches delegate default', () async { - expect(await provider.initialize(), isTrue); - expect(provider.hasError, speechToText.hasError); - }); - test('notifies on error', () async { - fakeAsync((fa) { - provider.initialize(); - setupForListen(provider, fa, speechListener); - speechListener.reset(); - speechHandler.notifyPermanentError(); - expect(speechListener.notified, isTrue); - expect(speechListener.hasError, isTrue); - }); - }); - }); - group('locale', () { - test('locales empty before init', () async { - expect(provider.systemLocale, isNull); - expect(provider.locales, isEmpty); - }); - test('set from SpeechToText after init', () async { - fakeAsync((fa) { - speechHandler.setupLocales(); - provider.initialize(); - fa.flushMicrotasks(); - expect( - provider.systemLocale.localeId, TestSpeechChannelHandler.localeId1); - expect(provider.locales, hasLength(speechHandler.locales.length)); - }); - }); - }); -} - -void setupForListen(SpeechToTextProvider provider, FakeAsync fa, - TestSpeechListener speechListener, - {bool partialResults = false, bool soundLevel = false}) { - provider.initialize(); - fa.flushMicrotasks(); - speechListener.reset(); - provider.listen(partialResults: partialResults, soundLevel: soundLevel); - fa.flushMicrotasks(); -} diff --git a/speech_to_text_/test/speech_to_text_test.dart b/speech_to_text_/test/speech_to_text_test.dart deleted file mode 100644 index 7b4701ff..00000000 --- a/speech_to_text_/test/speech_to_text_test.dart +++ /dev/null @@ -1,425 +0,0 @@ -import 'package:fake_async/fake_async.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; -import 'package:speech_to_text/speech_to_text.dart'; - -import 'test_speech_channel_handler.dart'; - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - TestSpeechListener listener; - TestSpeechChannelHandler speechHandler; - SpeechToText speech; - - setUp(() { - listener = TestSpeechListener(); - speech = SpeechToText.withMethodChannel(SpeechToText.speechChannel); - speechHandler = TestSpeechChannelHandler(speech); - speech.channel.setMockMethodCallHandler(speechHandler.methodCallHandler); - }); - - tearDown(() { - speech.channel.setMockMethodCallHandler(null); - }); - - group('hasPermission', () { - test('true if platform reports true', () async { - expect(await speech.hasPermission, true); - }); - test('false if platform reports false', () async { - speechHandler.hasPermissionResult = false; - expect(await speech.hasPermission, false); - }); - }); - group('init', () { - test('succeeds on platform success', () async { - expect(await speech.initialize(), true); - expect(speechHandler.initInvoked, true); - expect(speech.isAvailable, true); - }); - test('only invokes once', () async { - expect(await speech.initialize(), true); - speechHandler.initInvoked = false; - expect(await speech.initialize(), true); - expect(speechHandler.initInvoked, false); - }); - test('fails on platform failure', () async { - speechHandler.initResult = false; - expect(await speech.initialize(), false); - expect(speech.isAvailable, false); - }); - }); - - group('listen', () { - test('fails with exception if not initialized', () async { - try { - await speech.listen(); - fail("Expected an exception."); - } on SpeechToTextNotInitializedException { - // This is a good result - } - }); - test('fails with exception if init fails', () async { - try { - speechHandler.initResult = false; - await speech.initialize(); - await speech.listen(); - fail("Expected an exception."); - } on SpeechToTextNotInitializedException { - // This is a good result - } - }); - test('invokes listen after successful init', () async { - await speech.initialize(); - await speech.listen(); - expect(speechHandler.listenLocale, isNull); - expect(speechHandler.listenInvoked, true); - }); - test('converts platformException to listenFailed', () async { - await speech.initialize(); - speechHandler.listenException = true; - try { - await speech.listen(); - fail("Should have thrown"); - } on ListenFailedException catch (e) { - expect(e.details, TestSpeechChannelHandler.listenExceptionDetails); - } catch (wrongE) { - fail("Should have been ListenFailedException"); - } - }); - test('stops listen after listenFor duration', () async { - fakeAsync((fa) { - speech.initialize(); - fa.flushMicrotasks(); - speech.listen(listenFor: Duration(seconds: 2)); - fa.flushMicrotasks(); - expect(speech.isListening, isTrue); - fa.elapse(Duration(seconds: 2)); - expect(speech.isListening, isFalse); - }); - }); - test('stops listen after listenFor duration even with speech event', - () async { - fakeAsync((fa) { - speech.initialize(); - fa.flushMicrotasks(); - speech.listen(listenFor: Duration(seconds: 1)); - speech.processMethodCall(MethodCall(SpeechToText.textRecognitionMethod, - TestSpeechChannelHandler.firstRecognizedJson)); - fa.flushMicrotasks(); - expect(speech.isListening, isTrue); - fa.elapse(Duration(seconds: 1)); - expect(speech.isListening, isFalse); - }); - }); - test('stops listen after pauseFor duration with no speech', () async { - fakeAsync((fa) { - speech.initialize(); - fa.flushMicrotasks(); - speech.listen(pauseFor: Duration(seconds: 2)); - fa.flushMicrotasks(); - expect(speech.isListening, isTrue); - fa.elapse(Duration(seconds: 2)); - expect(speech.isListening, isFalse); - }); - }); - test('stops listen after pauseFor with longer listenFor duration', - () async { - fakeAsync((fa) { - speech.initialize(); - fa.flushMicrotasks(); - speech.listen( - pauseFor: Duration(seconds: 1), listenFor: Duration(seconds: 5)); - fa.flushMicrotasks(); - expect(speech.isListening, isTrue); - fa.elapse(Duration(seconds: 1)); - expect(speech.isListening, isFalse); - }); - }); - test('stops listen after listenFor with longer pauseFor duration', - () async { - fakeAsync((fa) { - speech.initialize(); - fa.flushMicrotasks(); - speech.listen( - listenFor: Duration(seconds: 1), pauseFor: Duration(seconds: 5)); - fa.flushMicrotasks(); - expect(speech.isListening, isTrue); - fa.elapse(Duration(seconds: 1)); - expect(speech.isListening, isFalse); - }); - }); - test('keeps listening after pauseFor with speech event', () async { - fakeAsync((fa) { - speech.initialize(); - fa.flushMicrotasks(); - speech.listen(pauseFor: Duration(seconds: 2)); - fa.flushMicrotasks(); - fa.elapse(Duration(seconds: 1)); - speech.processMethodCall(MethodCall(SpeechToText.textRecognitionMethod, - TestSpeechChannelHandler.firstRecognizedJson)); - fa.flushMicrotasks(); - fa.elapse(Duration(seconds: 1)); - expect(speech.isListening, isTrue); - }); - }); - test('uses localeId if provided', () async { - await speech.initialize(); - await speech.listen(localeId: TestSpeechChannelHandler.localeId1); - expect(speechHandler.listenInvoked, true); - expect(speechHandler.listenLocale, TestSpeechChannelHandler.localeId1); - }); - test('calls speech listener', () async { - await speech.initialize(); - await speech.listen(onResult: listener.onSpeechResult); - await speech.processMethodCall(MethodCall( - SpeechToText.textRecognitionMethod, - TestSpeechChannelHandler.firstRecognizedJson)); - expect(listener.speechResults, 1); - expect( - listener.results, [TestSpeechChannelHandler.firstRecognizedResult]); - expect(speech.lastRecognizedWords, - TestSpeechChannelHandler.firstRecognizedWords); - }); - test('calls speech listener with multiple', () async { - await speech.initialize(); - await speech.listen(onResult: listener.onSpeechResult); - await speech.processMethodCall(MethodCall( - SpeechToText.textRecognitionMethod, - TestSpeechChannelHandler.firstRecognizedJson)); - await speech.processMethodCall(MethodCall( - SpeechToText.textRecognitionMethod, - TestSpeechChannelHandler.secondRecognizedJson)); - expect(listener.speechResults, 2); - expect(listener.results, [ - TestSpeechChannelHandler.firstRecognizedResult, - TestSpeechChannelHandler.secondRecognizedResult - ]); - expect(speech.lastRecognizedWords, - TestSpeechChannelHandler.secondRecognizedWords); - }); - }); - - group('status callback', () { - test('invoked on listen', () async { - await speech.initialize( - onError: listener.onSpeechError, onStatus: listener.onSpeechStatus); - await speech.processMethodCall(MethodCall( - SpeechToText.notifyStatusMethod, SpeechToText.listeningStatus)); - expect(listener.speechStatus, 1); - expect(listener.statuses.contains(SpeechToText.listeningStatus), true); - }); - }); - - group('soundLevel callback', () { - test('invoked on listen', () async { - await speech.initialize(); - await speech.listen(onSoundLevelChange: listener.onSoundLevel); - await speech.processMethodCall(MethodCall( - SpeechToText.soundLevelChangeMethod, - TestSpeechChannelHandler.level1)); - expect(listener.soundLevel, 1); - expect(listener.soundLevels, contains(TestSpeechChannelHandler.level1)); - }); - test('sets lastLevel', () async { - await speech.initialize(); - await speech.listen(onSoundLevelChange: listener.onSoundLevel); - await speech.processMethodCall(MethodCall( - SpeechToText.soundLevelChangeMethod, - TestSpeechChannelHandler.level1)); - expect(speech.lastSoundLevel, TestSpeechChannelHandler.level1); - }); - }); - - group('cancel', () { - test('does nothing if not initialized', () async { - speech.cancel(); - expect(speechHandler.cancelInvoked, false); - }); - test('cancels an active listen', () async { - await speech.initialize(); - await speech.listen(); - await speech.cancel(); - expect(speechHandler.cancelInvoked, true); - expect(speech.isListening, isFalse); - }); - }); - group('stop', () { - test('does nothing if not initialized', () async { - speech.stop(); - expect(speechHandler.cancelInvoked, false); - }); - test('stops an active listen', () async { - await speech.initialize(); - speech.listen(); - speech.stop(); - expect(speechHandler.stopInvoked, true); - }); - }); - group('error', () { - test('notifies handler with transient', () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.transientErrorJson)); - expect(listener.speechErrors, 1); - expect(listener.errors.first.permanent, isFalse); - }); - test('notifies handler with permanent', () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.permanentErrorJson)); - expect(listener.speechErrors, 1); - expect(listener.errors.first.permanent, isTrue); - }); - test('continues listening on transient', () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.transientErrorJson)); - expect(speech.isListening, isTrue); - }); - test('continues listening on permanent if cancel not explicitly requested', - () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.permanentErrorJson)); - expect(speech.isListening, isTrue); - }); - test('stops listening on permanent if cancel explicitly requested', - () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(cancelOnError: true); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.permanentErrorJson)); - expect(speech.isListening, isFalse); - }); - test('Error not sent after cancel', () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(); - await speech.cancel(); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.permanentErrorJson)); - expect(speech.isListening, isFalse); - expect(listener.speechErrors, 0); - }); - test('Error still sent after implicit cancel', () async { - await speech.initialize(onError: listener.onSpeechError); - await speech.listen(cancelOnError: true); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.permanentErrorJson)); - await speech.processMethodCall(MethodCall(SpeechToText.notifyErrorMethod, - TestSpeechChannelHandler.permanentErrorJson)); - expect(speech.isListening, isFalse); - expect(listener.speechErrors, 2); - }); - }); - group('locales', () { - test('fails with exception if not initialized', () async { - try { - await speech.locales(); - fail("Expected an exception."); - } on SpeechToTextNotInitializedException { - // This is a good result - } - }); - test('system locale null if not initialized', () async { - LocaleName current; - try { - current = await speech.systemLocale(); - fail("Expected an exception."); - } on SpeechToTextNotInitializedException { - expect(current, isNull); - } - }); - test('handles an empty list', () async { - await speech.initialize(onError: listener.onSpeechError); - List localeNames = await speech.locales(); - expect(speechHandler.localesInvoked, isTrue); - expect(localeNames, isEmpty); - }); - test('returns expected locales', () async { - await speech.initialize(onError: listener.onSpeechError); - speechHandler.locales.add(TestSpeechChannelHandler.locale1); - speechHandler.locales.add(TestSpeechChannelHandler.locale2); - List localeNames = await speech.locales(); - expect(localeNames, hasLength(speechHandler.locales.length)); - expect(localeNames[0].localeId, TestSpeechChannelHandler.localeId1); - expect(localeNames[0].name, TestSpeechChannelHandler.name1); - expect(localeNames[1].localeId, TestSpeechChannelHandler.localeId2); - expect(localeNames[1].name, TestSpeechChannelHandler.name2); - }); - test('skips incorrect locales', () async { - await speech.initialize(onError: listener.onSpeechError); - speechHandler.locales.add("InvalidJunk"); - speechHandler.locales.add(TestSpeechChannelHandler.locale1); - List localeNames = await speech.locales(); - expect(localeNames, hasLength(1)); - expect(localeNames[0].localeId, TestSpeechChannelHandler.localeId1); - expect(localeNames[0].name, TestSpeechChannelHandler.name1); - }); - test('system locale matches first returned locale', () async { - await speech.initialize(onError: listener.onSpeechError); - speechHandler.locales.add(TestSpeechChannelHandler.locale1); - speechHandler.locales.add(TestSpeechChannelHandler.locale2); - LocaleName current = await speech.systemLocale(); - expect(current.localeId, TestSpeechChannelHandler.localeId1); - }); - }); - group('status', () { - test('recognized false at start', () async { - expect(speech.hasRecognized, isFalse); - }); - test('listening false at start', () async { - expect(speech.isListening, isFalse); - }); - }); - test('available false at start', () async { - expect(speech.isAvailable, isFalse); - }); - test('hasError false at start', () async { - expect(speech.hasError, isFalse); - }); - test('lastError null at start', () async { - expect(speech.lastError, isNull); - }); - test('status empty at start', () async { - expect(speech.lastStatus, isEmpty); - }); -} - -class TestSpeechListener { - int speechResults = 0; - List results = []; - int speechErrors = 0; - List errors = []; - int speechStatus = 0; - List statuses = []; - int soundLevel = 0; - List soundLevels = []; - - void onSpeechResult(SpeechRecognitionResult result) { - ++speechResults; - results.add(result); - } - - void onSpeechError(SpeechRecognitionError errorResult) { - ++speechErrors; - errors.add(errorResult); - } - - void onSpeechStatus(String status) { - ++speechStatus; - statuses.add(status); - } - - void onSoundLevel(double level) { - ++soundLevel; - soundLevels.add(level); - } -} diff --git a/speech_to_text_/test/test_speech_channel_handler.dart b/speech_to_text_/test/test_speech_channel_handler.dart deleted file mode 100644 index a55f0670..00000000 --- a/speech_to_text_/test/test_speech_channel_handler.dart +++ /dev/null @@ -1,134 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; -import 'package:speech_to_text/speech_to_text.dart'; - -/// Holds a set of responses and acts as a mock for the platform specific -/// implementations allowing test cases to determine what the result of -/// a call should be. -class TestSpeechChannelHandler { - final SpeechToText _speech; - - bool listenException = false; - - static const String listenExceptionCode = "listenFailedError"; - static const String listenExceptionMessage = "Failed"; - static const String listenExceptionDetails = "Device Listen Failure"; - - TestSpeechChannelHandler(this._speech); - - bool initResult = true; - bool initInvoked = false; - bool listenInvoked = false; - bool cancelInvoked = false; - bool stopInvoked = false; - bool localesInvoked = false; - bool hasPermissionResult = true; - String listeningStatusResponse = SpeechToText.listeningStatus; - String listenLocale; - List locales = []; - static const String localeId1 = "en_US"; - static const String localeId2 = "fr_CA"; - static const String name1 = "English US"; - static const String name2 = "French Canada"; - static const String locale1 = "$localeId1:$name1"; - static const String locale2 = "$localeId2:$name2"; - static const String firstRecognizedWords = 'hello'; - static const String secondRecognizedWords = 'hello there'; - static const double firstConfidence = 0.85; - static const double secondConfidence = 0.62; - static const String firstRecognizedJson = - '{"alternates":[{"recognizedWords":"$firstRecognizedWords","confidence":$firstConfidence}],"finalResult":false}'; - static const String secondRecognizedJson = - '{"alternates":[{"recognizedWords":"$secondRecognizedWords","confidence":$secondConfidence}],"finalResult":false}'; - static const String finalRecognizedJson = - '{"alternates":[{"recognizedWords":"$secondRecognizedWords","confidence":$secondConfidence}],"finalResult":true}'; - static const SpeechRecognitionWords firstWords = - SpeechRecognitionWords(firstRecognizedWords, firstConfidence); - static const SpeechRecognitionWords secondWords = - SpeechRecognitionWords(secondRecognizedWords, secondConfidence); - static final SpeechRecognitionResult firstRecognizedResult = - SpeechRecognitionResult([firstWords], false); - static final SpeechRecognitionResult secondRecognizedResult = - SpeechRecognitionResult([secondWords], false); - static final SpeechRecognitionResult finalRecognizedResult = - SpeechRecognitionResult([secondWords], true); - static const String transientErrorJson = - '{"errorMsg":"network","permanent":false}'; - static const String permanentErrorJson = - '{"errorMsg":"network","permanent":true}'; - static final SpeechRecognitionError firstError = - SpeechRecognitionError("network", true); - static const double level1 = 0.5; - static const double level2 = 10; - - Future methodCallHandler(MethodCall methodCall) async { - switch (methodCall.method) { - case "has_permission": - return hasPermissionResult; - break; - case "initialize": - initInvoked = true; - return initResult; - break; - case "cancel": - cancelInvoked = true; - return true; - break; - case "stop": - stopInvoked = true; - return true; - break; - case SpeechToText.listenMethod: - listenInvoked = true; - if (listenException) { - throw PlatformException( - code: listenExceptionCode, - message: listenExceptionMessage, - details: listenExceptionDetails); - } - listenLocale = methodCall.arguments["localeId"]; - await _speech.processMethodCall(MethodCall( - SpeechToText.notifyStatusMethod, listeningStatusResponse)); - return initResult; - break; - case "locales": - localesInvoked = true; - return locales; - break; - default: - } - return initResult; - } - - void notifyFinalWords() { - _speech.processMethodCall( - MethodCall(SpeechToText.textRecognitionMethod, finalRecognizedJson)); - } - - void notifyPartialWords() { - _speech.processMethodCall( - MethodCall(SpeechToText.textRecognitionMethod, firstRecognizedJson)); - } - - void notifyPermanentError() { - _speech.processMethodCall( - MethodCall(SpeechToText.notifyErrorMethod, permanentErrorJson)); - } - - void notifyTransientError() { - _speech.processMethodCall( - MethodCall(SpeechToText.notifyErrorMethod, transientErrorJson)); - } - - void notifySoundLevel() { - _speech.processMethodCall( - MethodCall(SpeechToText.soundLevelChangeMethod, level2)); - } - - void setupLocales() { - locales.clear(); - locales.add(locale1); - locales.add(locale2); - } -} diff --git a/speech_to_text_/test/test_speech_listener.dart b/speech_to_text_/test/test_speech_listener.dart deleted file mode 100644 index 1efcd81c..00000000 --- a/speech_to_text_/test/test_speech_listener.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:speech_to_text/speech_recognition_error.dart'; -import 'package:speech_to_text/speech_recognition_result.dart'; -import 'package:speech_to_text/speech_to_text_provider.dart'; - -/// Holds the results of notification by the [SpeechToTextProvider] -class TestSpeechListener { - final SpeechToTextProvider _speechProvider; - - bool isListening = false; - bool isFinal = false; - bool isAvailable = false; - bool notified = false; - bool hasError = false; - SpeechRecognitionResult recognitionResult; - SpeechRecognitionError lastError; - double soundLevel; - - TestSpeechListener(this._speechProvider); - - void reset() { - isListening = false; - isFinal = false; - isAvailable = false; - notified = false; - } - - void onNotify() { - notified = true; - isAvailable = _speechProvider.isAvailable; - isListening = _speechProvider.isListening; - recognitionResult = _speechProvider.lastResult; - hasError = _speechProvider.hasError; - lastError = _speechProvider.lastError; - soundLevel = _speechProvider.lastLevel; - } -} diff --git a/test/widget_test.dart b/test/widget_test.dart index 01e68534..68118458 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -5,11 +5,10 @@ // 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:diplomaticquarterapp/main.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:diplomaticquarterapp/main.dart'; - void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame.