diff --git a/android/.gradle/8.12/checksums/checksums.lock b/android/.gradle/8.12/checksums/checksums.lock index a816601..6f80b2c 100644 Binary files a/android/.gradle/8.12/checksums/checksums.lock and b/android/.gradle/8.12/checksums/checksums.lock differ diff --git a/android/.gradle/8.12/checksums/sha1-checksums.bin b/android/.gradle/8.12/checksums/sha1-checksums.bin index 856c6ce..fe0cae0 100644 Binary files a/android/.gradle/8.12/checksums/sha1-checksums.bin and b/android/.gradle/8.12/checksums/sha1-checksums.bin differ diff --git a/android/.gradle/8.12/executionHistory/executionHistory.bin b/android/.gradle/8.12/executionHistory/executionHistory.bin index f03f466..5181326 100644 Binary files a/android/.gradle/8.12/executionHistory/executionHistory.bin and b/android/.gradle/8.12/executionHistory/executionHistory.bin differ diff --git a/android/.gradle/8.12/executionHistory/executionHistory.lock b/android/.gradle/8.12/executionHistory/executionHistory.lock index 3c1edb5..d7c6480 100644 Binary files a/android/.gradle/8.12/executionHistory/executionHistory.lock and b/android/.gradle/8.12/executionHistory/executionHistory.lock differ diff --git a/android/.gradle/8.12/fileHashes/fileHashes.bin b/android/.gradle/8.12/fileHashes/fileHashes.bin index 1c892bd..9321039 100644 Binary files a/android/.gradle/8.12/fileHashes/fileHashes.bin and b/android/.gradle/8.12/fileHashes/fileHashes.bin differ diff --git a/android/.gradle/8.12/fileHashes/fileHashes.lock b/android/.gradle/8.12/fileHashes/fileHashes.lock index 6830155..3a5900c 100644 Binary files a/android/.gradle/8.12/fileHashes/fileHashes.lock and b/android/.gradle/8.12/fileHashes/fileHashes.lock differ diff --git a/android/.gradle/8.12/fileHashes/resourceHashesCache.bin b/android/.gradle/8.12/fileHashes/resourceHashesCache.bin index ec60522..5f190fd 100644 Binary files a/android/.gradle/8.12/fileHashes/resourceHashesCache.bin and b/android/.gradle/8.12/fileHashes/resourceHashesCache.bin differ diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock index bfdaa1e..54eeae6 100644 Binary files a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/android/.gradle/buildOutputCleanup/outputFiles.bin b/android/.gradle/buildOutputCleanup/outputFiles.bin index ef1353b..9bdddf6 100644 Binary files a/android/.gradle/buildOutputCleanup/outputFiles.bin and b/android/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/android/.gradle/file-system.probe b/android/.gradle/file-system.probe index 5cc6938..038f9ec 100644 Binary files a/android/.gradle/file-system.probe and b/android/.gradle/file-system.probe differ diff --git a/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java index 45c2c53..a4c7742 100644 --- a/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ b/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -25,11 +25,6 @@ public final class GeneratedPluginRegistrant { } catch (Exception e) { Log.e(TAG, "Error registering plugin audio_session, com.ryanheise.audio_session.AudioSessionPlugin", e); } - try { - flutterEngine.getPlugins().add(new de.mintware.barcode_scan.BarcodeScanPlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin barcode_scan2, de.mintware.barcode_scan.BarcodeScanPlugin", e); - } try { flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin()); } catch (Exception e) { @@ -125,6 +120,11 @@ public final class GeneratedPluginRegistrant { } catch (Exception e) { Log.e(TAG, "Error registering plugin health, cachet.plugins.health.HealthPlugin", e); } + try { + flutterEngine.getPlugins().add(new com.huawei.hms.flutter.health.HuaweiHealthPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin huawei_health, com.huawei.hms.flutter.health.HuaweiHealthPlugin", e); + } try { flutterEngine.getPlugins().add(new com.huawei.hms.flutter.location.LocationPlugin()); } catch (Exception e) { diff --git a/android/app/src/main/kotlin/com/ejada/hmg/Application.kt b/android/app/src/main/kotlin/com/ejada/hmg/Application.kt index 32eb97c..2e88c46 100644 --- a/android/app/src/main/kotlin/com/ejada/hmg/Application.kt +++ b/android/app/src/main/kotlin/com/ejada/hmg/Application.kt @@ -2,11 +2,19 @@ package com.ejada.hmg +import android.util.Log +import com.example.live_activities.LiveActivityManagerHolder +import com.example.live_activities.LiveActivitiesPlugin +import com.ejada.hmg.live_activity.CustomLiveActivityManager import io.flutter.app.FlutterApplication class Application : FlutterApplication() { override fun onCreate() { super.onCreate() + Log.d("MyApplication", "Application onCreate: called") + // Initialize your singleton here instead of in MainActivity + LiveActivityManagerHolder.instance = CustomLiveActivityManager(this) + Log.d("MyApplication", "LiveActivityManagerHolder initialized: ${LiveActivityManagerHolder.instance}") } } diff --git a/android/app/src/main/kotlin/com/ejada/hmg/MainActivity.kt b/android/app/src/main/kotlin/com/ejada/hmg/MainActivity.kt index 2dc962f..676c39f 100644 --- a/android/app/src/main/kotlin/com/ejada/hmg/MainActivity.kt +++ b/android/app/src/main/kotlin/com/ejada/hmg/MainActivity.kt @@ -9,11 +9,11 @@ import android.view.WindowManager import androidx.annotation.NonNull; import androidx.annotation.RequiresApi import com.ejada.hmg.penguin.PenguinInPlatformBridge -import io.flutter.embedding.engine.FlutterEngine import io.flutter.plugins.GeneratedPluginRegistrant import io.flutter.embedding.android.FlutterFragmentActivity import com.example.live_activities.LiveActivityManagerHolder +import com.example.live_activities.LiveActivitiesPlugin import com.ejada.hmg.live_activity.CustomLiveActivityManager import io.flutter.embedding.engine.FlutterEngine @@ -24,7 +24,11 @@ class MainActivity: FlutterFragmentActivity() { GeneratedPluginRegistrant.registerWith(flutterEngine); // Create Flutter Platform Bridge this.window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON or WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) - LiveActivityManagerHolder.instance = CustomLiveActivityManager(this) +// Log.d("MainActivity", "configureFlutterEngine: called") +// LiveActivityManagerHolder.instance = CustomLiveActivityManager(this) +// Log.d("MainActivity", "configureFlutterEngine: LiveActivityManagerHolder is ${LiveActivityManagerHolder.instance}") + + LiveActivitiesPlugin().setupChannel(flutterEngine.dartExecutor.binaryMessenger) PenguinInPlatformBridge(flutterEngine, this).create() } diff --git a/android/app/src/main/kotlin/com/ejada/hmg/live_activity/CustomActiviy.kt b/android/app/src/main/kotlin/com/ejada/hmg/live_activity/CustomActiviy.kt index 9db6175..ed61a50 100644 --- a/android/app/src/main/kotlin/com/ejada/hmg/live_activity/CustomActiviy.kt +++ b/android/app/src/main/kotlin/com/ejada/hmg/live_activity/CustomActiviy.kt @@ -49,15 +49,16 @@ class CustomLiveActivityManager(context: Context) : else -> Triple(R. drawable.grey_rounded_corner_widget, R.color.text_color, R.drawable.whitebg_yellow_border_rounded_corner_widget) } - var currentServingBackground = when (data["currentlyServingCallType"] as? Int) { - 1->R.drawable.red_rounded_corner_widget - else ->R.drawable.green_rounded_corner_widget + var (currentServingBackground, currentServingFontColor) = when (data["currentlyServingCallType"] as? Int) { + 1->Pair(R.drawable.red_rounded_corner_widget, R.color.colorWhite) + else ->Pair(R.drawable.green_rounded_corner_widget, R.color.colorWhite) } remoteViews.setInt(R.id.nextStep, "setBackgroundResource", nextStepButtonBackground) remoteViews.setInt(R.id.status, "setBackgroundResource", currentServingBackground) remoteViews.setInt(R.id.container, "setBackgroundResource", containerBackground) remoteViews.setTextColor(R.id.nextStep, ContextCompat.getColor(context, textColor)) + remoteViews.setTextColor(R.id.status, ContextCompat.getColor(context, currentServingFontColor)) remoteViews.setTextViewText(R.id.countvalue, data["queueNo"] as? String ?: "") remoteViews.setTextViewText(R.id.status, data["currentlyServingStatus"] as? String ?: "") remoteViews.setTextViewText(R. id.currentlyserving, data["currentlyServingTitle"] as? String ?: "") @@ -95,6 +96,8 @@ class CustomLiveActivityManager(context: Context) : remoteViews.apply { updateRemoteViews(data) } + Log.d("buildNotification", "Building notification for event: $event with data: $data") + Log.d("buildNotification", "Building notification for collapesView: $collapesView with remoteViews: $remoteViews") return notification .setSmallIcon(R.drawable.hmg) @@ -108,6 +111,7 @@ class CustomLiveActivityManager(context: Context) : .setCategory(Notification.CATEGORY_EVENT) .setVisibility(Notification.VISIBILITY_PUBLIC) .setOngoing(true) + .build() } } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3128b1d..4749467 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -4,10 +4,6 @@ PODS: - PayFortSDK - audio_session (0.0.1): - Flutter - - barcode_scan2 (0.0.1): - - Flutter - - MTBBarcodeScanner - - SwiftProtobuf - connectivity_plus (0.0.1): - Flutter - CryptoSwift (1.8.4) @@ -140,7 +136,7 @@ PODS: - google_maps_flutter_ios (0.0.1): - Flutter - Google-Maps-iOS-Utils (< 7.0, >= 5.0) - - GoogleMaps (< 10.0, >= 8.4) + - GoogleMaps (< 11.0, >= 8.4) - GoogleAdsOnDeviceConversion (2.1.0): - GoogleUtilities/Logger (~> 8.1) - GoogleUtilities/Network (~> 8.1) @@ -243,7 +239,6 @@ PODS: - MapboxSpeech (2.1.1) - maps_launcher (0.0.1): - Flutter - - MTBBarcodeScanner (5.0.11) - nanopb (3.30910.0): - nanopb/decode (= 3.30910.0) - nanopb/encode (= 3.30910.0) @@ -276,7 +271,6 @@ PODS: - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS - - SwiftProtobuf (1.31.0) - SwiftyGif (5.4.5) - Turf (2.8.0) - url_launcher_ios (0.0.1): @@ -293,7 +287,6 @@ PODS: DEPENDENCIES: - amazon_payfort (from `.symlinks/plugins/amazon_payfort/ios`) - audio_session (from `.symlinks/plugins/audio_session/ios`) - - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - device_calendar (from `.symlinks/plugins/device_calendar/ios`) - device_calendar_plus_ios (from `.symlinks/plugins/device_calendar_plus_ios/ios`) @@ -363,7 +356,6 @@ SPEC REPOS: - MapboxNavigation - MapboxNavigationNative - MapboxSpeech - - MTBBarcodeScanner - nanopb - OrderedSet - PayFortSDK @@ -371,7 +363,6 @@ SPEC REPOS: - PromisesObjC - SDWebImage - Solar-dev - - SwiftProtobuf - SwiftyGif - Turf @@ -380,8 +371,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/amazon_payfort/ios" audio_session: :path: ".symlinks/plugins/audio_session/ios" - barcode_scan2: - :path: ".symlinks/plugins/barcode_scan2/ios" connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" device_calendar: @@ -462,7 +451,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: amazon_payfort: 4ad7a3413acc1c4c4022117a80d18fee23c572d3 audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0 - barcode_scan2: f80517f040989095c9b5067be77649bf6114442c connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90 device_calendar: b55b2c5406cfba45c95a59f9059156daee1f74ed @@ -491,7 +479,7 @@ SPEC CHECKSUMS: fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1 geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e Google-Maps-iOS-Utils: 66d6de12be1ce6d3742a54661e7a79cb317a9321 - google_maps_flutter_ios: 0291eb2aa252298a769b04d075e4a9d747ff7264 + google_maps_flutter_ios: 3213e1e5f5588b6134935cb8fc59acb4e6d88377 GoogleAdsOnDeviceConversion: 2be6297a4f048459e0ae17fad9bfd2844e10cf64 GoogleAppMeasurement: 700dce7541804bec33db590a5c496b663fbe2539 GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 @@ -514,7 +502,6 @@ SPEC CHECKSUMS: MapboxNavigationNative: 629e359f3d2590acd1ebbacaaf99e1a80ee57e42 MapboxSpeech: cd25ef99c3a3d2e0da72620ff558276ea5991a77 maps_launcher: edf829809ba9e894d70e569bab11c16352dedb45 - MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 network_info_plus: cf61925ab5205dce05a4f0895989afdb6aade5fc open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1 @@ -530,7 +517,6 @@ SPEC CHECKSUMS: shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb Solar-dev: 4612dc9878b9fed2667d23b327f1d4e54e16e8d0 sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0 - SwiftProtobuf: caa61117d9a5eeb60a52375f6685991a1fd4bd7b SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 Turf: aa2ede4298009639d10db36aba1a7ebaad072a5e url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index b114153..1299de1 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -11,23 +11,17 @@ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */; }; - 61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */; }; - 61243B4C2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */; }; - 61243B502EC5FA3700D46FA0 /* PenguinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B452EC5FA3700D46FA0 /* PenguinView.swift */; }; - 61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */; }; - 61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */; }; - 61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */; }; + 61243B492EC5FA3700D46FA0 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; + 61243B4C2EC5FA3700D46FA0 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; + 61243B502EC5FA3700D46FA0 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; + 61243B542EC5FA3700D46FA0 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; + 61243B562EC5FA3700D46FA0 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; + 61243B572EC5FA3700D46FA0 /* BuildFile in Sources */ = {isa = PBXBuildFile; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 766D8CB62EC60BE600D05E07 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB32EC60BE600D05E07 /* Penguin.xcframework */; }; - 766D8CB72EC60BE600D05E07 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB32EC60BE600D05E07 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 766D8CB82EC60BE600D05E07 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */; }; - 766D8CB92EC60BE600D05E07 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 766D8CBA2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */; }; - 766D8CBB2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 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 */; }; - DE1EF78253E64BE86845D2CC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D562310E31D1DDEFA02A6C12 /* Pods_Runner.framework */; }; + C5586BA7BD57391D3F91EF2B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8076571670911AB920E1FF99 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -47,9 +41,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 766D8CB72EC60BE600D05E07 /* Penguin.xcframework in Embed Frameworks */, - 766D8CBB2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Embed Frameworks */, - 766D8CB92EC60BE600D05E07 /* PenNavUI.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -67,11 +58,9 @@ 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 = ""; }; 7595037DD52211B91157B0F3 /* 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 = ""; }; - 766D8CB32EC60BE600D05E07 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = ""; }; - 766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = ""; }; - 766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = ""; }; 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 8076571670911AB920E1FF99 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8E12CEEB8E334EE22D5259D7 /* 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 = ""; }; 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 = ""; }; @@ -80,12 +69,11 @@ 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 = ""; }; - D562310E31D1DDEFA02A6C12 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D6BB17A036DF7FCE75271203 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ - 6147DFA32EF2D46300A0F0AA /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { + 6147DFA32EF2D46300A0F0AA /* Exceptions for "AppWidget" folder in "Runner" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( "Poppins-Medium.ttf", @@ -95,27 +83,26 @@ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ - 61769DEA2EEFDD0F000EC14A /* AppWidget */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (6147DFA32EF2D46300A0F0AA /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = AppWidget; sourceTree = ""; }; + 61769DEA2EEFDD0F000EC14A /* AppWidget */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 6147DFA32EF2D46300A0F0AA /* Exceptions for "AppWidget" folder in "Runner" target */, + ); + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = AppWidget; + sourceTree = ""; + }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ - 61769DE22EEFDD0F000EC14A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 61769DE92EEFDD0F000EC14A /* SwiftUI.framework in Frameworks */, - 61769DE72EEFDD0F000EC14A /* WidgetKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 766D8CB62EC60BE600D05E07 /* Penguin.xcframework in Frameworks */, - 766D8CBA2EC60BE600D05E07 /* PenguinINRenderer.xcframework in Frameworks */, - 766D8CB82EC60BE600D05E07 /* PenNavUI.xcframework in Frameworks */, - DE1EF78253E64BE86845D2CC /* Pods_Runner.framework in Frameworks */, + C5586BA7BD57391D3F91EF2B /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -133,7 +120,6 @@ 61243B412EC5FA3700D46FA0 /* Helper */ = { isa = PBXGroup; children = ( - 61243B3D2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift */, ); path = Helper; sourceTree = ""; @@ -141,26 +127,10 @@ 61243B472EC5FA3700D46FA0 /* Penguin */ = { isa = PBXGroup; children = ( - 61243B422EC5FA3700D46FA0 /* PenguinModel.swift */, - 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */, - 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */, - 61243B452EC5FA3700D46FA0 /* PenguinView.swift */, - 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */, ); path = Penguin; sourceTree = ""; }; - 766D8CB22EC60BE600D05E07 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 766D8CB32EC60BE600D05E07 /* Penguin.xcframework */, - 766D8CB52EC60BE600D05E07 /* PenguinINRenderer.xcframework */, - 766D8CB42EC60BE600D05E07 /* PenNavUI.xcframework */, - D562310E31D1DDEFA02A6C12 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 79DD2093A1D9674C94359FC8 /* Pods */ = { isa = PBXGroup; children = ( @@ -185,14 +155,13 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( - 61769E012EEFDD98000EC14A /* AppWidgetExtension.entitlements */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 61769DEA2EEFDD0F000EC14A /* AppWidget */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, 79DD2093A1D9674C94359FC8 /* Pods */, - 766D8CB22EC60BE600D05E07 /* Frameworks */, + DBBFD4F9B92DEEED70E55CB8 /* Frameworks */, ); sourceTree = ""; }; @@ -201,7 +170,6 @@ children = ( 97C146EE1CF9000F007C117D /* Runner.app */, 331C8081294A63A400263BE5 /* RunnerTests.xctest */, - 61769DE52EEFDD0F000EC14A /* AppWidgetExtension.appex */, ); name = Products; sourceTree = ""; @@ -226,6 +194,14 @@ path = Runner; sourceTree = ""; }; + DBBFD4F9B92DEEED70E55CB8 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8076571670911AB920E1FF99 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -434,12 +410,12 @@ buildActionMask = 2147483647; files = ( 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 61243B492EC5FA3700D46FA0 /* PenguinModel.swift in Sources */, - 61243B4C2EC5FA3700D46FA0 /* HMGPenguinInPlatformBridge.swift in Sources */, - 61243B502EC5FA3700D46FA0 /* PenguinView.swift in Sources */, - 61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */, - 61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */, - 61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */, + 61243B492EC5FA3700D46FA0 /* BuildFile in Sources */, + 61243B4C2EC5FA3700D46FA0 /* BuildFile in Sources */, + 61243B502EC5FA3700D46FA0 /* BuildFile in Sources */, + 61243B542EC5FA3700D46FA0 /* BuildFile in Sources */, + 61243B562EC5FA3700D46FA0 /* BuildFile in Sources */, + 61243B572EC5FA3700D46FA0 /* BuildFile in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 64d7428..4172e0e 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -18,7 +18,7 @@ import GoogleMaps func initializePlatformChannels(){ if let mainViewController = window?.rootViewController as? FlutterViewController{ // platform initialization suppose to be in foreground - HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController) +// HMGPenguinInPlatformBridge.initialize(flutterViewController: mainViewController) } } diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 1846d1e..0febdbe 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -675,7 +675,7 @@ var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatb class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart index ebf0a84..d14d78d 100644 --- a/lib/core/dependencies.dart +++ b/lib/core/dependencies.dart @@ -111,10 +111,10 @@ class AppDependencies { getIt.registerLazySingleton(() => CacheServiceImp(sharedPreferences: sharedPreferences, loggerService: getIt())); final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); - getIt.registerLazySingleton(() => NotificationServiceImp( - flutterLocalNotificationsPlugin: flutterLocalNotificationsPlugin, - loggerService: getIt(), - )); + // getIt.registerLazySingleton(() => NotificationServiceImp( + // flutterLocalNotificationsPlugin: flutterLocalNotificationsPlugin, + // loggerService: getIt(), + // )); getIt.registerLazySingleton(() => ApiClientImp(appState: getIt())); getIt.registerLazySingleton( diff --git a/lib/core/utils/calender_utils_new.dart b/lib/core/utils/calender_utils_new.dart index 2edfcdc..c411fe6 100644 --- a/lib/core/utils/calender_utils_new.dart +++ b/lib/core/utils/calender_utils_new.dart @@ -50,7 +50,7 @@ class CalenderUtilsNew { startDate: scheduleDateTime!, endDate: scheduleDateTime!.add(Duration(minutes: 30)), // reminderMinutes: reminderMinutes - , // TODO : NEED TO CONFIRM THIS FROM TAHA + // TODO : NEED TO CONFIRM THIS FROM TAHA ); return eventResult.isNotEmpty; // } diff --git a/lib/core/utils/push_notification_handler.dart b/lib/core/utils/push_notification_handler.dart index 6bd7329..6bf7ed3 100644 --- a/lib/core/utils/push_notification_handler.dart +++ b/lib/core/utils/push_notification_handler.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io'; +import 'dart:ui'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:firebase_core/firebase_core.dart'; @@ -8,6 +9,7 @@ import 'package:firebase_messaging/firebase_messaging.dart' as fir; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_callkit_incoming/entities/android_params.dart'; import 'package:flutter_callkit_incoming/entities/call_kit_params.dart'; import 'package:flutter_callkit_incoming/entities/ios_params.dart'; @@ -41,27 +43,69 @@ Future backgroundMessageHandler(dynamic message) async { return; } if (message.data['isLiveActivity'] == true || message.data['isLiveActivity'] == "true") { - print("live activity called"); - LiveActivities().init(appGroupId: "group.alhabib.patientApp"); - await LiveActivities().endAllActivities(); - // await Permission.notification.request(); - var buttonText = Utils.getCardButtonText(int.parse(message.data['callType']??"1"), message.data['roomNo']); - PatientQueue _patientQueue = PatientQueue( - queueNo: message.data['queueNo'] ?? "IME-1", - currentlyServingStatus: (message.data['servingCallType'] ?? 0) == "1" ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation, - currentlyServingTitle: message.data['servingQueueNo'] ?? "IME-3", - nextTicketStatus: buttonText, - callType: int.parse(message.data['callType']??"1"), + try { + print('Before WidgetsFlutterBinding'); + // Initialize Firebase + await Firebase.initializeApp(); + WidgetsFlutterBinding.ensureInitialized(); + DartPluginRegistrant.ensureInitialized(); + await Future.delayed(Duration(seconds: 2)); + print('Before addLiveNotification'); + addLiveNotification(message, isBackgroundMessage: true); + print('After addLiveNotification'); + } catch (e, stackTrace) { + print('Error: $e'); + print('Stack trace: $stackTrace'); + } + } +} + +addLiveNotification(dynamic message, {bool isBackgroundMessage = false}) async{ + print("live activity called"); + // final methodChannel = const MethodChannel('live_activities'); + // methodChannel.invokeMethod('init', { + // 'appGroupId': "", + // 'urlScheme': "", + // }); + // print("After addLiveNotification local init run"); + var liveActivity = LiveActivities(); + + + var activityId = await Utils.getStringFromPrefs( message.data['queueNo'] ??""); + + var buttonText = Utils.getCardButtonText(int.parse(message.data['callType']??"1"), message.data['roomNo']); + PatientQueue _patientQueue = PatientQueue( + queueNo: message.data['queueNo'] ?? "IME-1", + currentlyServingStatus: (message.data['servingCallType'] ?? 0) == "1" ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation, + currentlyServingTitle: message.data['servingQueueNo'] ?? "IME-3", + nextTicketStatus: buttonText, + callType: int.parse(message.data['callType']??"1"), currentlyServingCallType: int.parse(message.data['servingCallType']??"1")); + if((activityId??"") != (message.data['queueNo']??"")){ + liveActivity.endActivity(activityId); + activityId = ""; + } + print("the activity id is $activityId"); - var activity= await LiveActivities().createActivity( + if( activityId == ""){ + String? id = await liveActivity.createActivity( DateTime.now().millisecondsSinceEpoch.toString(), _patientQueue.toMap(), ); - print("the activity is $activity"); - + print("the activity id created is $id"); + await Utils.saveStringFromPrefs(message.data['queueNo'] ??"", message.data['queueNo']??""); + print("the activity id saved is ${await Utils.getStringFromPrefs(message.data['queueNo'] ??"")}"); + print("the activity is created"); + return; } + await liveActivity.updateActivity( + activityId, + _patientQueue.toMap(), + ); + + print("the activity is is created or updated"); + } callPage(String sessionID, String token) async {} @@ -448,34 +492,37 @@ class PushNotificationHandler { } newMessage(RemoteMessage remoteMessage) async { - print("Remote Message: ${remoteMessage.data}"); + print("Remote Message 1: ${remoteMessage.data}"); if (remoteMessage.data.isEmpty) { return; } - debugPrint('the value of the remote message is ${remoteMessage.data}'); + debugPrint('the value of the remote message is 1 ${remoteMessage.data}'); if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) { _incomingCall(remoteMessage.data); // showCallkitIncoming(); } else { if(remoteMessage.data['isLiveActivity'] == true || remoteMessage.data['isLiveActivity'] == 'true'){ - print("live activity called"); - LiveActivities().init(appGroupId: "group.alhabib.patientApp"); - await LiveActivities().endAllActivities(); - // await Permission.notification.request(); - var buttonText = Utils.getCardButtonText(int.parse(remoteMessage.data['callType']??"1"), remoteMessage.data['roomNo']); - PatientQueue _patientQueue = - PatientQueue( - queueNo: remoteMessage.data['queueNo'] ?? "IME-1", - currentlyServingStatus: (remoteMessage.data['servingCallType'] ?? 0) == 1 ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation, - currentlyServingTitle: remoteMessage.data['servingQueueNo'] ?? "IME-3", - nextTicketStatus: buttonText, - callType: int.parse(remoteMessage.data['callType']??"1"),currentlyServingCallType: int.parse(remoteMessage.data['servingCallType']??"1")); - var activity = await LiveActivities().createActivity( - DateTime.now().millisecondsSinceEpoch.toString(), - _patientQueue.toMap(), - ); - print("the activity is $activity"); + // print("live activity called"); + // LiveActivities().init(appGroupId: "group.alhabib.patientApp"); + // await LiveActivities().endAllActivities(); + // // await Permission.notification.request(); + // var buttonText = Utils.getCardButtonText(int.parse(remoteMessage.data['callType']??"1"), remoteMessage.data['roomNo']); + // PatientQueue _patientQueue = + // PatientQueue( + // queueNo: remoteMessage.data['queueNo'] ?? "IME-1", + // currentlyServingStatus: (remoteMessage.data['servingCallType'] ?? 0) == 1 ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation, + // currentlyServingTitle: remoteMessage.data['servingQueueNo'] ?? "IME-3", + // nextTicketStatus: buttonText, + // callType: int.parse(remoteMessage.data['callType']??"1"),currentlyServingCallType: int.parse(remoteMessage.data['servingCallType']??"1")); + // var activity = await LiveActivities().createActivity( + // DateTime.now().millisecondsSinceEpoch.toString(), + // _patientQueue.toMap(), + // ); + // print("the activity is $activity"); + + addLiveNotification(remoteMessage, isBackgroundMessage: false); + } // GetNotificationsResponseModel notification = new GetNotificationsResponseModel(); // diff --git a/lib/main.dart b/lib/main.dart index eb57c37..c141951 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -41,6 +41,7 @@ import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/theme/app_theme.dart'; import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart' show DateRangeSelectorRangeViewModel; +import 'package:live_activities/live_activities.dart'; import 'package:provider/provider.dart'; import 'package:provider/single_child_widget.dart'; @@ -75,6 +76,7 @@ Future callInitializations() async { await EasyLocalization.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); await AppDependencies.addDependencies(); + LiveActivities().init(appGroupId: "group.alhabib.patientApp"); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); HttpOverrides.global = MyHttpOverrides(); await callAppStateInitializations(); diff --git a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart index d118a5e..2b1712b 100644 --- a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart +++ b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart @@ -16,7 +16,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/appointments/appointment_queue_page.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; -import 'package:barcode_scan2/barcode_scan2.dart'; +// import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:hmg_patient_app_new/widgets/nfc/nfc_reader_sheet.dart'; @@ -88,10 +88,10 @@ class AppointmentCheckinBottomSheet extends StatelessWidget { "QR Code".needTranslation, "Scan QR code with your camera to check in".needTranslation, ).onPress(() async { - String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); - if (onlineCheckInQRCode != "") { - sendCheckInRequest(onlineCheckInQRCode, 2, context); - } else {} + // String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + // if (onlineCheckInQRCode != "") { + // sendCheckInRequest(onlineCheckInQRCode, 2, context); + // } else {} }), ], ); diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart index 4a2a304..5451df9 100644 --- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart +++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart @@ -12,7 +12,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/review_appointment_page.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; -import 'package:barcode_scan2/barcode_scan2.dart'; +// import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:hmg_patient_app_new/widgets/nfc/nfc_reader_sheet.dart'; @@ -85,10 +85,10 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget { "QR Code".needTranslation, "Scan QR code with your camera to check in".needTranslation, ).onPress(() async { - String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); - if (onlineCheckInQRCode != "") { - checkScannedNFCAndQRCode(onlineCheckInQRCode, context); - } else {} + // String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + // if (onlineCheckInQRCode != "") { + // checkScannedNFCAndQRCode(onlineCheckInQRCode, context); + // } else {} }), ], ); diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart index d44686c..e717d0f 100644 --- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart +++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart @@ -10,7 +10,7 @@ import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; -import 'package:barcode_scan2/barcode_scan2.dart'; +// import 'package:barcode_scan2/barcode_scan2.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/nfc/nfc_reader_sheet.dart'; @@ -78,10 +78,10 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget { "QR Code".needTranslation, "Scan QR code with your camera to check in".needTranslation, ).onPress(() async { - String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); - if (onlineCheckInQRCode != "") { - sendCheckInRequest(onlineCheckInQRCode, context); - } else {} + // String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + // if (onlineCheckInQRCode != "") { + // sendCheckInRequest(onlineCheckInQRCode, context); + // } else {} }), ], ); diff --git a/lib/presentation/home/widgets/small_service_card.dart b/lib/presentation/home/widgets/small_service_card.dart index 9599d00..ffc5ed1 100644 --- a/lib/presentation/home/widgets/small_service_card.dart +++ b/lib/presentation/home/widgets/small_service_card.dart @@ -1,3 +1,4 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; @@ -14,8 +15,11 @@ import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_lis import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart'; +import 'package:live_activities/live_activities.dart' show LiveActivities; import 'package:provider/provider.dart'; +import '../../../core/common_models/patient_queue.dart' show PatientQueue; +import '../../../core/dependencies.dart'; import '../../../core/utils/utils.dart'; import '../../../theme/colors.dart'; import '../../emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart'; @@ -65,14 +69,29 @@ class SmallServiceCard extends StatelessWidget { ), ), ), - ).onPress(() { + ).onPress(() async { switch (serviceName) { case "lab_results": - Navigator.of(context).push( - CustomPageRoute( - page: LabOrdersPage(), - ), - ); + { + LiveActivities().init(appGroupId: "group.alhabib.patientApp"); + PatientQueue _patientQueue = PatientQueue( + queueNo: "IME-1", + currentlyServingStatus: "Call for vital signs".needTranslation , + currentlyServingTitle:"IME-3", + nextTicketStatus: "dsds", + callType: 1, + currentlyServingCallType: 1); + + var activity = await LiveActivities().createActivity( + DateTime.now().millisecondsSinceEpoch.toString(), + _patientQueue.toMap(), + ); + } + // Navigator.of(context).push( + // CustomPageRoute( + // page: LabOrdersPage(), + // ), + // ); break; case "radiology_results": Navigator.of(context).push( @@ -112,15 +131,30 @@ class SmallServiceCard extends StatelessWidget { ); break; case "emergency": - context.read().flushData(); - context.read().getTransportationOrders(showLoader: false,); - context.read().getRRTOrders(showLoader: false,); - Navigator.of(context).push( - CustomPageRoute( - page: EmergencyServicesPage(), - settings: const RouteSettings(name: '/EmergencyServicesPage'), - ), + // context.read().flushData(); + // context.read().getTransportationOrders(showLoader: false,); + // context.read().getRRTOrders(showLoader: false,); + // Navigator.of(context).push( + // CustomPageRoute( + // page: EmergencyServicesPage(), + // settings: const RouteSettings(name: '/EmergencyServicesPage'), + // ), + // ); + { + LiveActivities().init(appGroupId: "group.alhabib.patientApp"); + PatientQueue _patientQueue = PatientQueue( + queueNo: "IME-1", + currentlyServingStatus: "Call for vital signs".needTranslation , + currentlyServingTitle:"IME-3", + nextTicketStatus: "dsds", + callType: 1, + currentlyServingCallType: 1); + + var activity = await LiveActivities().createActivity( + DateTime.now().millisecondsSinceEpoch.toString(), + _patientQueue.toMap(), ); + } break; default: // Handle unknown service diff --git a/lib/presentation/tele_consultation/zoom/call_screen.dart b/lib/presentation/tele_consultation/zoom/call_screen.dart index 59b5ce4..51edf9e 100644 --- a/lib/presentation/tele_consultation/zoom/call_screen.dart +++ b/lib/presentation/tele_consultation/zoom/call_screen.dart @@ -1,1838 +1,1838 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:flutter_ios_voip_kit_karmm/flutter_ios_voip_kit.dart'; -import 'package:flutter_zoom_videosdk/flutter_zoom_view.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk_camera_device.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk_cmd_channel.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk_event_listener.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk_live_transcription_message_info.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk_share_action.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk_user.dart'; -import 'package:hmg_patient_app_new/core/app_export.dart'; -import 'package:hmg_patient_app_new/core/cache_consts.dart'; -import 'package:hmg_patient_app_new/core/utils/jwt.dart'; -import 'package:hmg_patient_app_new/core/utils/utils.dart'; -import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; -import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; -import 'package:hmg_patient_app_new/presentation/tele_consultation/zoom/video_view.dart'; -import 'package:hmg_patient_app_new/theme/colors.dart'; -import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; -import 'package:image_picker/image_picker.dart'; - -class CallScreen extends StatefulHookWidget { - const CallScreen({Key? key}) : super(key: key); - - @override - State createState() => _CallScreenState(); -} - -class _CallScreenState extends State { - static TextEditingController changeNameController = TextEditingController(); - double opacityLevel = 1.0; - - final voIPKit = FlutterIOSVoIPKit.instance; - - bool isScreenBeingShared = false; - - void _changeOpacity() { - setState(() => opacityLevel = opacityLevel == 0 ? 1.0 : 0.0); - } - - @override - Widget build(BuildContext context) { - var zoom = ZoomVideoSdk(); - var eventListener = ZoomVideoSdkEventListener(); - var isInSession = useState(false); - var sessionName = useState(''); - var sessionPassword = useState(''); - var users = useState([]); - var fullScreenUser = useState(null); - var sharingUser = useState(null); - var videoInfo = useState(''); - var isSharing = useState(false); - var isMuted = useState(true); - var isVideoOn = useState(false); - var isSpeakerOn = useState(false); - var isRenameModalVisible = useState(false); - var isRecordingStarted = useState(false); - var isMicOriginalOn = useState(false); - var isMounted = useIsMounted(); - var audioStatusFlag = useState(false); - var videoStatusFlag = useState(false); - var userNameFlag = useState(false); - var userShareStatusFlag = useState(false); - var isReceiveSpokenLanguageContentEnabled = useState(false); - var isVideoMirrored = useState(false); - var isOriginalAspectRatio = useState(false); - var isPiPView = useState(false); - var isSharedCamera = useState(false); - CameraShareView cameraShareView = const CameraShareView(creationParams: {}); - - //hide status bar - SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack); - var circleButtonSize = 65.0; - Color backgroundColor = const Color(0xFF232323); - Color buttonBackgroundColor = const Color.fromRGBO(0, 0, 0, 0.6); - Color chatTextColor = const Color(0xFFAAAAAA); - Widget changeNamePopup; - final args = ModalRoute.of(context)!.settings.arguments as CallArguments; - - useEffect(() { - Future.microtask(() async { - var token = generateJwt(args.sessionName, args.role); - - Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall); - - try { - Map SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false}; - Map SDKvideoOptions = { - "localVideoOn": true, - }; - JoinSessionConfig joinSession = JoinSessionConfig( - sessionName: args.sessionName, - sessionPassword: args.sessionPwd, - token: token, - userName: args.displayName, - audioOptions: SDKaudioOptions, - videoOptions: SDKvideoOptions, - sessionIdleTimeoutMins: int.parse(args.sessionIdleTimeoutMins), - ); - await zoom.joinSession(joinSession); - } catch (e) { - const AlertDialog( - title: Text("Error"), - content: Text("Failed to join the session"), - ); - Future.delayed(const Duration(milliseconds: 1000)).asStream().listen((event) { - Navigator.pushAndRemoveUntil( - context, - CustomPageRoute( - page: LandingNavigation(), - ), - (r) => false); - }); - } - }); - return null; - }, []); - - useEffect(() { - final sessionJoinListener = eventListener.addListener(EventType.onSessionJoin, (data) async { - data = data as Map; - isInSession.value = true; - zoom.session.getSessionName().then((value) => sessionName.value = value!); - sessionPassword.value = await zoom.session.getSessionPassword(); - debugPrint("sessionPhonePasscode: ${await zoom.session.getSessionPhonePasscode()}"); - ZoomVideoSdkUser mySelf = ZoomVideoSdkUser.fromJson(jsonDecode(data['sessionUser'])); - List? remoteUsers = await zoom.session.getRemoteUsers(); - var muted = await mySelf.audioStatus?.isMuted(); - var videoOn = await mySelf.videoStatus?.isOn(); - var speakerOn = await zoom.audioHelper.getSpeakerStatus(); - fullScreenUser.value = mySelf; - remoteUsers?.insert(0, mySelf); - isMuted.value = muted!; - isSpeakerOn.value = speakerOn; - isVideoOn.value = videoOn!; - users.value = remoteUsers!; - isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(); - }); - - final sessionLeaveListener = eventListener.addListener(EventType.onSessionLeave, (data) async { - data = data as Map; - debugPrint("onSessionLeave: ${data['reason']}"); - isInSession.value = false; - users.value = []; - fullScreenUser.value = null; - // Navigator.popAndPushNamed( - // context, - // "Join", - // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), - // ); - Navigator.pushAndRemoveUntil( - context, - CustomPageRoute( - page: LandingNavigation(), - ), - (r) => false); - }); - - final sessionNeedPasswordListener = eventListener.addListener(EventType.onSessionNeedPassword, (data) async { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text('Session Need Password'), - content: const Text('Password is required'), - actions: [ - TextButton( - onPressed: () async => { - Navigator.pushAndRemoveUntil( - context, - CustomPageRoute( - page: LandingNavigation(), - ), - (r) => false), - await zoom.leaveSession(false), - }, - child: const Text('OK'), - ), - ], - ), - ); - }); - - final sessionPasswordWrongListener = eventListener.addListener(EventType.onSessionPasswordWrong, (data) async { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text('Session Password Incorrect'), - content: const Text('Password is wrong'), - actions: [ - TextButton( - onPressed: () async => { - Navigator.popAndPushNamed(context, 'Join', arguments: JoinArguments(args.isJoin, args.sessionName, "", args.displayName, args.sessionIdleTimeoutMins, args.role)), - await zoom.leaveSession(false), - }, - child: const Text('OK'), - ), - ], - ), - ); - }); - - final userVideoStatusChangedListener = eventListener.addListener(EventType.onUserVideoStatusChanged, (data) async { - data = data as Map; - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - var userListJson = jsonDecode(data['changedUsers']) as List; - List userList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); - for (var user in userList) { - { - if (user.userId == mySelf?.userId) { - mySelf?.videoStatus?.isOn().then((on) => isVideoOn.value = on); - } - } - } - videoStatusFlag.value = !videoStatusFlag.value; - }); - - final userAudioStatusChangedListener = eventListener.addListener(EventType.onUserAudioStatusChanged, (data) async { - data = data as Map; - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - var userListJson = jsonDecode(data['changedUsers']) as List; - List userList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); - for (var user in userList) { - { - if (user.userId == mySelf?.userId) { - mySelf?.audioStatus?.isMuted().then((muted) => isMuted.value = muted); - } - } - } - audioStatusFlag.value = !audioStatusFlag.value; - }); - - final userShareStatusChangeListener = eventListener.addListener(EventType.onUserShareStatusChanged, (data) async { - data = data as Map; - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - ZoomVideoSdkUser shareUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'].toString())); - ZoomVideoSdkShareAction? shareAction = ZoomVideoSdkShareAction.fromJson(jsonDecode(data['shareAction'])); - - if (shareAction.shareStatus == ShareStatus.Start || shareAction.shareStatus == ShareStatus.Resume) { - sharingUser.value = shareUser; - fullScreenUser.value = shareUser; - isSharing.value = (shareUser.userId == mySelf?.userId); - - setState(() { - isScreenBeingShared = true; - }); - Future.delayed(const Duration(seconds: 2), () { - setState(() { - isScreenBeingShared = false; - }); - }); - } else { - sharingUser.value = null; - isSharing.value = false; - isSharedCamera.value = false; - fullScreenUser.value = mySelf; - isScreenBeingShared = false; - setState(() { - isScreenBeingShared = true; - }); - Future.delayed(const Duration(seconds: 2), () { - setState(() { - isScreenBeingShared = false; - }); - }); - } - userShareStatusFlag.value = !userShareStatusFlag.value; - }); - - final shareContentChangedListener = eventListener.addListener(EventType.onShareContentChanged, (data) async { - data = data as Map; - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - ZoomVideoSdkUser shareUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'].toString())); - ZoomVideoSdkShareAction? shareAction = ZoomVideoSdkShareAction.fromJson(jsonDecode(data['shareAction'])); - if (shareAction.shareType == ShareType.Camera) { - debugPrint("Camera share started"); - isSharedCamera.value = (shareUser.userId == mySelf?.userId); - } - }); - - final userJoinListener = eventListener.addListener(EventType.onUserJoin, (data) async { - if (!isMounted()) return; - data = data as Map; - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - var userListJson = jsonDecode(data['remoteUsers']) as List; - List remoteUserList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); - remoteUserList.insert(0, mySelf!); - users.value = remoteUserList; - }); - - final userLeaveListener = eventListener.addListener(EventType.onUserLeave, (data) async { - if (!isMounted()) return; - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - data = data as Map; - List? remoteUserList = await zoom.session.getRemoteUsers(); - var leftUserListJson = jsonDecode(data['leftUsers']) as List; - List leftUserLis = leftUserListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); - if (fullScreenUser.value != null) { - for (var user in leftUserLis) { - { - if (fullScreenUser.value?.userId == user.userId) { - fullScreenUser.value = mySelf; - } - } - } - } else { - fullScreenUser.value = mySelf; - } - remoteUserList?.add(mySelf!); - users.value = remoteUserList!; - }); - - final userNameChangedListener = eventListener.addListener(EventType.onUserNameChanged, (data) async { - if (!isMounted()) return; - data = data as Map; - ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); - int index; - for (var user in users.value) { - if (user.userId == changedUser.userId) { - index = users.value.indexOf(user); - users.value[index] = changedUser; - } - } - userNameFlag.value = !userNameFlag.value; - }); - - final commandReceived = eventListener.addListener(EventType.onCommandReceived, (data) async { - data = data as Map; - debugPrint("sender: ${ZoomVideoSdkUser.fromJson(jsonDecode(data['sender']))}, command: ${data['command']}"); - }); - - final liveStreamStatusChangeListener = eventListener.addListener(EventType.onLiveStreamStatusChanged, (data) async { - data = data as Map; - debugPrint("onLiveStreamStatusChanged: status: ${data['status']}"); - }); - - final liveTranscriptionStatusChangeListener = eventListener.addListener(EventType.onLiveTranscriptionStatus, (data) async { - data = data as Map; - debugPrint("onLiveTranscriptionStatus: status: ${data['status']}"); - }); - - final cloudRecordingStatusListener = eventListener.addListener(EventType.onCloudRecordingStatus, (data) async { - data = data as Map; - debugPrint("onCloudRecordingStatus: status: ${data['status']}"); - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - if (data['status'] == RecordingStatus.Start) { - if (mySelf != null && !mySelf.isHost!) { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - content: const Text('The session is being recorded.'), - actions: [ - TextButton( - onPressed: () async { - await zoom.acceptRecordingConsent(); - if (context.mounted) { - Navigator.pop(context); - } - ; - }, - child: const Text('accept'), - ), - TextButton( - onPressed: () async { - String currentConsentType = await zoom.getRecordingConsentType(); - if (currentConsentType == ConsentType.ConsentType_Individual) { - await zoom.declineRecordingConsent(); - Navigator.pop(context); - } else { - await zoom.declineRecordingConsent(); - zoom.leaveSession(false); - if (!context.mounted) return; - Navigator.popAndPushNamed( - context, - "Join", - arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), - ); - } - }, - child: const Text('decline'), - ), - ], - ), - ); - } - isRecordingStarted.value = true; - } else { - isRecordingStarted.value = false; - } - }); - - final liveTranscriptionMsgInfoReceivedListener = eventListener.addListener(EventType.onLiveTranscriptionMsgInfoReceived, (data) async { - data = data as Map; - ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); - debugPrint("onLiveTranscriptionMsgInfoReceived: content: ${messageInfo.messageContent}"); - }); - - final inviteByPhoneStatusListener = eventListener.addListener(EventType.onInviteByPhoneStatus, (data) async { - data = data as Map; - debugPrint("onInviteByPhoneStatus: status: ${data['status']}, reason: ${data['reason']}"); - }); - - final multiCameraStreamStatusChangedListener = eventListener.addListener(EventType.onMultiCameraStreamStatusChanged, (data) async { - data = data as Map; - ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); - var status = data['status']; - for (var user in users.value) { - { - if (changedUser.userId == user.userId) { - if (status == MultiCameraStreamStatus.Joined) { - user.hasMultiCamera = true; - } else if (status == MultiCameraStreamStatus.Left) { - user.hasMultiCamera = false; - } - } - } - } - }); - - final requireSystemPermission = eventListener.addListener(EventType.onRequireSystemPermission, (data) async { - data = data as Map; - ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); - var permissionType = data['permissionType']; - switch (permissionType) { - case SystemPermissionType.Camera: - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text("Can't Access Camera"), - content: const Text("please turn on the toggle in system settings to grant permission"), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context, 'OK'), - child: const Text('OK'), - ), - ], - ), - ); - break; - case SystemPermissionType.Microphone: - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text("Can't Access Microphone"), - content: const Text("please turn on the toggle in system settings to grant permission"), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context, 'OK'), - child: const Text('OK'), - ), - ], - ), - ); - break; - } - }); - - final networkStatusChangeListener = eventListener.addListener(EventType.onUserVideoNetworkStatusChanged, (data) async { - data = data as Map; - ZoomVideoSdkUser? networkUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); - - if (data['status'] == NetworkStatus.Bad) { - debugPrint("onUserVideoNetworkStatusChanged: status: ${data['status']}, user: ${networkUser.userName}"); - } - }); - - final eventErrorListener = eventListener.addListener(EventType.onError, (data) async { - data = data as Map; - String errorType = data['errorType']; - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text("Error"), - content: Text(errorType), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context, 'OK'), - child: const Text('OK'), - ), - ], - ), - ); - if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconnecting) { - Timer( - const Duration(milliseconds: 1000), - () => { - Navigator.popAndPushNamed( - context, - "Join", - arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), - ), - }); - } - }); - - final userRecordingConsentListener = eventListener.addListener(EventType.onUserRecordingConsent, (data) async { - data = data as Map; - ZoomVideoSdkUser? user = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); - debugPrint('userRecordingConsentListener: user= ${user.userName}'); - }); - - final callCRCDeviceStatusListener = eventListener.addListener(EventType.onCallCRCDeviceStatusChanged, (data) async { - data = data as Map; - debugPrint('onCallCRCDeviceStatusChanged: status = ${data['status']}'); - }); - - final originalLanguageMsgReceivedListener = eventListener.addListener(EventType.onOriginalLanguageMsgReceived, (data) async { - data = data as Map; - ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); - debugPrint("onOriginalLanguageMsgReceived: content: ${messageInfo.messageContent}"); - }); - - final chatPrivilegeChangedListener = eventListener.addListener(EventType.onChatPrivilegeChanged, (data) async { - data = data as Map; - String type = data['privilege']; - debugPrint('chatPrivilegeChangedListener: type= $type'); - }); - - final testMicStatusListener = eventListener.addListener(EventType.onTestMicStatusChanged, (data) async { - data = data as Map; - String status = data['status']; - debugPrint('testMicStatusListener: status= $status'); - }); - - final micSpeakerVolumeChangedListener = eventListener.addListener(EventType.onMicSpeakerVolumeChanged, (data) async { - data = data as Map; - int type = data['micVolume']; - debugPrint('onMicSpeakerVolumeChanged: micVolume= $type, speakerVolume'); - }); - - final cameraControlRequestResultListener = eventListener.addListener(EventType.onCameraControlRequestResult, (data) async { - data = data as Map; - bool approved = data['approved']; - debugPrint('onCameraControlRequestResult: approved= $approved'); - }); - - final callOutUserJoinListener = eventListener.addListener(EventType.onCalloutJoinSuccess, (data) async { - data = data as Map; - String phoneNumber = data['phoneNumber']; - ZoomVideoSdkUser? user = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); - debugPrint('onCalloutJoinSuccess: phoneNumber= $phoneNumber, user= ${user.userName}'); - }); - - return () => { - sessionJoinListener.cancel(), - sessionLeaveListener.cancel(), - sessionPasswordWrongListener.cancel(), - sessionNeedPasswordListener.cancel(), - userVideoStatusChangedListener.cancel(), - userAudioStatusChangedListener.cancel(), - userJoinListener.cancel(), - userLeaveListener.cancel(), - userNameChangedListener.cancel(), - userShareStatusChangeListener.cancel(), - liveStreamStatusChangeListener.cancel(), - cloudRecordingStatusListener.cancel(), - inviteByPhoneStatusListener.cancel(), - eventErrorListener.cancel(), - commandReceived.cancel(), - liveTranscriptionStatusChangeListener.cancel(), - liveTranscriptionMsgInfoReceivedListener.cancel(), - multiCameraStreamStatusChangedListener.cancel(), - requireSystemPermission.cancel(), - userRecordingConsentListener.cancel(), - networkStatusChangeListener.cancel(), - callCRCDeviceStatusListener.cancel(), - originalLanguageMsgReceivedListener.cancel(), - chatPrivilegeChangedListener.cancel(), - testMicStatusListener.cancel(), - micSpeakerVolumeChangedListener.cancel(), - cameraControlRequestResultListener.cancel(), - callOutUserJoinListener.cancel(), - shareContentChangedListener.cancel(), - }; - }, [zoom, users.value, isMounted]); - - void selectVirtualBackgroundItem() async { - final ImagePicker picker = ImagePicker(); - // Pick an image. - final XFile? image = await picker.pickImage(source: ImageSource.gallery); - await zoom.virtualBackgroundHelper.addVirtualBackgroundItem(image!.path); - } - - void onPressAudio() async { - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - if (mySelf != null) { - final audioStatus = mySelf.audioStatus; - if (audioStatus != null) { - var muted = await audioStatus.isMuted(); - if (muted) { - await zoom.audioHelper.unMuteAudio(mySelf.userId); - } else { - await zoom.audioHelper.muteAudio(mySelf.userId); - } - } - } - } - - void onPressVideo() async { - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - if (mySelf != null) { - final videoStatus = mySelf.videoStatus; - if (videoStatus != null) { - var videoOn = await videoStatus.isOn(); - if (videoOn) { - await zoom.videoHelper.stopVideo(); - } else { - await zoom.videoHelper.startVideo(); - } - } - } - } - - void onPressShare() async { - var isOtherSharing = await zoom.shareHelper.isOtherSharing(); - var isShareLocked = await zoom.shareHelper.isShareLocked(); - String? shareCameraViewResult = Errors.InternalError; - - if (isOtherSharing) { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text("Error"), - content: const Text('Other is sharing'), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context, 'OK'), - child: const Text('OK'), - ), - ], - ), - ); - } else if (isShareLocked) { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - title: const Text("Error"), - content: const Text('Share is locked by host'), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context, 'OK'), - child: const Text('OK'), - ), - ], - ), - ); - } else if (isSharing.value) { - zoom.shareHelper.stopShare(); - } else { - List options = [ - ListTile( - title: Text( - 'Share Device Screen', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - zoom.shareHelper.shareScreen(), - Navigator.of(context).pop(), - }, - ), - ListTile( - title: Text( - 'Share Camera', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - shareCameraViewResult = await zoom.shareHelper.startShareCamera(cameraShareView), - debugPrint('start camera: $shareCameraViewResult'), - Navigator.of(context).pop(), - }, - ), - ]; - showDialog( - context: context, - builder: (context) { - return Dialog( - elevation: 0.0, - insetPadding: const EdgeInsets.symmetric(horizontal: 40), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - child: SizedBox( - height: options.length * 60, - child: Scrollbar( - child: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: ListTile.divideTiles( - context: context, - tiles: options, - ).toList(), - ), - ), - ), - ); - }); - } - } - - void onSelectedUserVolume(ZoomVideoSdkUser user) async { - var isShareAudio = user.isSharing; - bool canSetVolume = await user.canSetUserVolume(user.userId, isShareAudio); - num userVolume; - - List options = [ - ListTile( - title: Text( - 'Adjust Volume', - style: const TextStyle( - fontSize: 18, - fontWeight: FontWeight.w600, - color: Colors.black, - ), - ), - ), - ListTile( - title: Text( - 'Current volume', - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - debugPrint('user volume'), - userVolume = await user.getUserVolume(user.userId, isShareAudio), - debugPrint('user ${user.userName}\'s volume is ${userVolume!}'), - }, - ), - ]; - if (canSetVolume) { - options.add( - ListTile( - title: Text( - 'Volume up', - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - userVolume = await user.getUserVolume(user.userId, isShareAudio), - if (userVolume < 10) - { - await user.setUserVolume(user.userId, userVolume + 1, isShareAudio), - } - else - { - debugPrint("Cannot volume up."), - } - }, - ), - ); - options.add( - ListTile( - title: Text( - 'Volume down', - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - userVolume = await user.getUserVolume(user.userId, isShareAudio), - if (userVolume > 0) - { - await user.setUserVolume(user.userId, userVolume - 1, isShareAudio), - } - else - { - debugPrint("Cannot volume down."), - } - }, - ), - ); - } - showDialog( - context: context, - builder: (context) { - return Dialog( - elevation: 0.0, - insetPadding: const EdgeInsets.symmetric(horizontal: 40), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - child: SizedBox( - height: options.length * 58, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - ListView( - shrinkWrap: true, - children: ListTile.divideTiles( - context: context, - tiles: options, - ).toList(), - ), - ], - ), - )); - }); - } - - void onPressCameraList() async { - List options = []; - List cameraList = await zoom.videoHelper.getCameraList(); - for (var camera in cameraList) { - options.add( - ListTile( - title: Text( - camera.deviceName, - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - await zoom.videoHelper.switchCamera(camera.deviceId), - Navigator.of(context).pop(), - }, - ), - ); - } - options.add( - ListTile( - title: Text( - "Cancel", - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - Navigator.of(context).pop(), - }, - ), - ); - showDialog( - context: context, - builder: (context) { - return Dialog( - elevation: 0.0, - insetPadding: const EdgeInsets.symmetric(horizontal: 40), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - child: SizedBox( - height: options.length * 60, - child: Scrollbar( - child: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: ListTile.divideTiles( - context: context, - tiles: options, - ).toList(), - ), - ), - ), - ); - }); - } - - // Future onPressMore() async { - // ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - // bool isShareLocked = await zoom.shareHelper.isShareLocked(); - // bool canSwitchSpeaker = await zoom.audioHelper.canSwitchSpeaker(); - // bool canStartRecording = (await zoom.recordingHelper.canStartRecording()) == Errors.Success; - // debugPrint("canStartRecording ${await zoom.recordingHelper.canStartRecording()}"); - // var startLiveTranscription = (await zoom.liveTranscriptionHelper.getLiveTranscriptionStatus()) == LiveTranscriptionStatus.Start; - // bool canStartLiveTranscription = await zoom.liveTranscriptionHelper.canStartLiveTranscription(); - // bool isHost = (mySelf != null) ? (await mySelf.getIsHost()) : false; - // isOriginalAspectRatio.value = await zoom.videoHelper.isOriginalAspectRatioEnabled(); - // bool canCallOutToCRC = await zoom.CRCHelper.isCRCEnabled(); - // bool supportVB = await zoom.virtualBackgroundHelper.isSupportVirtualBackground(); - // List? shareActionList = await mySelf?.getShareActionList(); - // - // List options = [ - // ListTile( - // title: Text( - // 'More', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 18, - // fontWeight: FontWeight.w600, - // color: Colors.black, - // ), - // ), - // ), - // ), - // ListTile( - // title: Text( - // 'Get Chat Privilege', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint("Chat Privilege = ${await zoom.chatHelper.getChatPrivilege()}"), - // Navigator.of(context).pop(), - // }, - // ), - // ListTile( - // title: Text( - // 'Get Session Dial-in Number infos', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint("session number = ${await zoom.session.getSessionNumber()}"), - // Navigator.of(context).pop(), - // }, - // ), - // ListTile( - // title: Text( - // 'Get Camera List', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint("camera list= ${await zoom.videoHelper.getCameraList()}"), - // onPressCameraList(), - // Navigator.of(context).pop(), - // }, - // ), - // ListTile( - // title: Text( - // '${isMicOriginalOn.value ? 'Disable' : 'Enable'} Original Sound', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint("${isMicOriginalOn.value}"), - // await zoom.audioSettingHelper.enableMicOriginalInput(!isMicOriginalOn.value), - // isMicOriginalOn.value = await zoom.audioSettingHelper.isMicOriginalInputEnable(), - // debugPrint("Original sound ${isMicOriginalOn.value ? 'Enabled' : 'Disabled'}"), - // Navigator.of(context).pop(), - // }, - // ) - // ]; - // - // if (supportVB) { - // options.add( - // ListTile( - // title: Text( - // 'Add Virtual Background', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // selectVirtualBackgroundItem(), - // Navigator.of(context).pop(), - // }, - // ), - // ); - // } - // - // if (canCallOutToCRC) { - // options.add(ListTile( - // title: Text( - // 'Call-out to CRC devices', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint('CRC result = ${await zoom.CRCHelper.callCRCDevice("bjn.vc", ZoomVideoSdkCRCProtocolType.SIP)}'), - // Navigator.of(context).pop(), - // }, - // )); - // options.add(ListTile( - // title: Text( - // 'Cancel call-out to CRC devices', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint('cancel result= ${await zoom.CRCHelper.cancelCallCRCDevice()}'), - // Navigator.of(context).pop(), - // }, - // )); - // } - // - // if (canSwitchSpeaker) { - // options.add(ListTile( - // title: Text( - // 'Turn ${isSpeakerOn.value ? 'off' : 'on'} Speaker', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // await zoom.audioHelper.setSpeaker(!isSpeakerOn.value), - // isSpeakerOn.value = await zoom.audioHelper.getSpeakerStatus(), - // debugPrint('Turned ${isSpeakerOn.value ? 'on' : 'off'} Speaker'), - // Navigator.of(context).pop(), - // }, - // )); - // } - // - // if (isHost) { - // options.add(ListTile( - // title: Text( - // '${isShareLocked ? 'Unlock' : 'Lock'} Share', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // debugPrint("isShareLocked = ${await zoom.shareHelper.lockShare(!isShareLocked)}"), - // Navigator.of(context).pop(), - // })); - // options.add(ListTile( - // title: Text( - // 'Change Name', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () => { - // isRenameModalVisible.value = true, - // Navigator.of(context).pop(), - // }, - // )); - // } - // - // if (canStartLiveTranscription) { - // options.add(ListTile( - // title: Text( - // "${startLiveTranscription ? 'Stop' : 'Start'} Live Transcription", - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // if (startLiveTranscription) - // { - // debugPrint('stopLiveTranscription= ${await zoom.liveTranscriptionHelper.stopLiveTranscription()}'), - // } - // else - // { - // debugPrint('startLiveTranscription= ${await zoom.liveTranscriptionHelper.startLiveTranscription()}'), - // }, - // Navigator.of(context).pop(), - // }, - // )); - // options.add(ListTile( - // title: Text( - // '${isReceiveSpokenLanguageContentEnabled.value ? 'Disable' : 'Enable'} receiving original caption', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // await zoom.liveTranscriptionHelper.enableReceiveSpokenLanguageContent(!isReceiveSpokenLanguageContentEnabled.value), - // isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(), - // debugPrint("isReceiveSpokenLanguageContentEnabled = ${isReceiveSpokenLanguageContentEnabled.value}"), - // Navigator.of(context).pop(), - // })); - // } - // - // if (canStartRecording) { - // options.add(ListTile( - // title: Text( - // '${isRecordingStarted.value ? 'Stop' : 'Start'} Recording', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // if (!isRecordingStarted.value) - // { - // debugPrint('isRecordingStarted = ${await zoom.recordingHelper.startCloudRecording()}'), - // } - // else - // { - // debugPrint('isRecordingStarted = ${await zoom.recordingHelper.stopCloudRecording()}'), - // }, - // Navigator.of(context).pop(), - // })); - // } - // - // if (Platform.isAndroid) { - // bool isFlashlightSupported = await zoom.videoHelper.isSupportFlashlight(); - // bool isFlashlightOn = await zoom.videoHelper.isFlashlightOn(); - // if (isFlashlightSupported) { - // options.add(ListTile( - // title: Text( - // '${isFlashlightOn ? 'Turn Off' : 'Turn On'} Flashlight', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // if (!isFlashlightOn) - // { - // await zoom.videoHelper.turnOnOrOffFlashlight(true), - // } - // else - // { - // await zoom.videoHelper.turnOnOrOffFlashlight(false), - // }, - // Navigator.of(context).pop(), - // })); - // } - // } - // - // if (Platform.isIOS) { - // options.add(ListTile( - // title: Text( - // '${isPiPView.value ? 'Disable' : 'Enable'} picture in picture view', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // isPiPView.value = !isPiPView.value, - // Navigator.of(context).pop(), - // })); - // } - // - // if (isVideoOn.value) { - // options.add(ListTile( - // title: Text( - // 'Mirror the video', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // await zoom.videoHelper.mirrorMyVideo(!isVideoMirrored.value), - // isVideoMirrored.value = await zoom.videoHelper.isMyVideoMirrored(), - // Navigator.of(context).pop(), - // })); - // options.add(ListTile( - // title: Text( - // '${isOriginalAspectRatio.value ? 'Enable' : 'Disable'} original aspect ratio', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.normal, - // color: Colors.black, - // ), - // ), - // ), - // onTap: () async => { - // await zoom.videoHelper.enableOriginalAspectRatio(!isOriginalAspectRatio.value), - // isOriginalAspectRatio.value = await zoom.videoHelper.isOriginalAspectRatioEnabled(), - // debugPrint("isOriginalAspectRatio= ${isOriginalAspectRatio.value}"), - // Navigator.of(context).pop(), - // })); - // } - // - // showDialog( - // context: context, - // builder: (context) { - // return Dialog( - // elevation: 0.0, - // insetPadding: const EdgeInsets.symmetric(horizontal: 40), - // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - // child: SizedBox( - // height: 500, - // child: Scrollbar( - // child: ListView( - // shrinkWrap: true, - // scrollDirection: Axis.vertical, - // children: ListTile.divideTiles( - // context: context, - // tiles: options, - // ).toList(), - // ), - // ), - // ), - // ); - // }); - // } - - void onLeaveSession(bool isEndSession) async { - await zoom.leaveSession(isEndSession); - Navigator.pushAndRemoveUntil( - context, - CustomPageRoute( - page: LandingNavigation(), - ), - (r) => false); - } - - void showLeaveOptions() async { - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - bool isHost = await mySelf!.getIsHost(); - - Widget endSession; - Widget leaveSession; - Widget cancel = TextButton( - child: const Text('Cancel'), - onPressed: () { - Navigator.pop(context); //close Dialog - }, - ); - - switch (defaultTargetPlatform) { - case TargetPlatform.android: - endSession = TextButton( - child: const Text('End Session'), - onPressed: () => onLeaveSession(true), - ); - leaveSession = TextButton( - child: const Text('Leave Session'), - onPressed: () => onLeaveSession(false), - ); - break; - default: - endSession = CupertinoActionSheetAction( - isDestructiveAction: true, - child: const Text('End Session'), - onPressed: () => onLeaveSession(true), - ); - leaveSession = CupertinoActionSheetAction( - child: const Text('Leave Session'), - onPressed: () => onLeaveSession(false), - ); - break; - } - - List options = [ - leaveSession, - cancel, - ]; - - if (Platform.isAndroid) { - if (isHost) { - options.removeAt(1); - options.insert(0, endSession); - } - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: const Text("Do you want to leave this session?"), - shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), - actions: options, - ); - }); - } else { - options.removeAt(1); - if (isHost) { - options.insert(1, endSession); - } - showCupertinoModalPopup( - context: context, - builder: (context) => CupertinoActionSheet( - message: const Text('Are you sure that you want to leave the session?'), - actions: options, - cancelButton: cancel, - ), - ); - } - } - - final chatMessageController = TextEditingController(); - - void sendChatMessage(String message) async { - await zoom.chatHelper.sendChatToAll(message); - ZoomVideoSdkUser? self = await zoom.session.getMySelf(); - ZoomVideoSdkCmdChannel cmdChannel = zoom.cmdChannel; - for (var user in users.value) { - if (user.userId != self?.userId) { - await zoom.cmdChannel.sendCommand(user.userId, message); - } - } - chatMessageController.clear(); - // send the chat as a command - } - - void onSelectedUser(ZoomVideoSdkUser user) async { - setState(() { - fullScreenUser.value = user; - }); - } - - changeNamePopup = Center( - child: Stack( - children: [ - Visibility( - visible: isRenameModalVisible.value, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - alignment: Alignment.bottomLeft, - decoration: const BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10)), - color: Colors.white, - ), - width: MediaQuery.of(context).size.width - 130, - height: MediaQuery.of(context).size.height * 0.2, - child: Center( - child: (Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(top: 20, left: 20), - child: Text( - 'Change Name', - style: const TextStyle( - fontSize: 18, - fontWeight: FontWeight.w500, - ), - ), - ), - Padding( - padding: const EdgeInsets.only(top: 10, left: 20), - child: SizedBox( - width: MediaQuery.of(context).size.width - 230, - child: TextField( - onEditingComplete: () {}, - autofocus: true, - cursorColor: Colors.black, - controller: changeNameController, - decoration: InputDecoration( - isDense: true, - hintText: 'New name', - hintStyle: TextStyle( - fontSize: 14.0, - color: chatTextColor, - ), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(top: 15), - child: Row( - children: [ - Padding( - padding: const EdgeInsets.only(left: 40), - child: InkWell( - child: Text( - 'Apply', - style: const TextStyle( - fontSize: 16, - ), - ), - onTap: () async { - if (fullScreenUser.value != null) { - ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); - await zoom.userHelper.changeName((mySelf?.userId)!, changeNameController.text); - changeNameController.clear(); - } - isRenameModalVisible.value = false; - }, - ), - ), - Padding( - padding: const EdgeInsets.only(left: 40), - child: InkWell( - child: Text( - 'Cancel', - style: const TextStyle( - fontSize: 16, - ), - ), - onTap: () async { - isRenameModalVisible.value = false; - }, - ), - ) - ], - ), - ) - ], - )), - ), - ), - ], - )), - ], - ), - ); - - Widget fullScreenView; - Widget smallView; - Widget cameraView; - - if (isInSession.value && fullScreenUser.value != null && users.value.isNotEmpty) { - fullScreenView = AnimatedOpacity( - opacity: opacityLevel, - duration: const Duration(seconds: 3), - child: VideoView( - user: users.value.length > 1 ? users.value[1] : users.value[0], - hasMultiCamera: false, - isPiPView: isPiPView.value, - sharing: sharingUser.value == null ? false : (sharingUser.value?.userId == fullScreenUser.value?.userId), - preview: false, - focused: false, - multiCameraIndex: "0", - videoAspect: VideoAspect.Original, - fullScreen: true, - resolution: VideoResolution.Resolution360, - ), - ); - - smallView = Container( - height: 110, - margin: const EdgeInsets.only(left: 20, right: 20), - alignment: Alignment.center, - child: ListView.separated( - scrollDirection: Axis.horizontal, - itemCount: users.value.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () async { - onSelectedUser(users.value[index]); - }, - onDoubleTap: () async { - onSelectedUserVolume(users.value[index]); - }, - child: Center( - child: VideoView( - user: users.value[index], - hasMultiCamera: false, - isPiPView: false, - sharing: false, - preview: false, - focused: false, - multiCameraIndex: "0", - videoAspect: VideoAspect.Original, - fullScreen: false, - resolution: VideoResolution.Resolution180, - ), - ), - ); - }, - separatorBuilder: (BuildContext context, int index) => const Divider(), - ), - ); - } else { - fullScreenView = Container( - color: Colors.black, - child: const Center( - child: Text( - "Connecting...", - style: TextStyle( - fontSize: 20, - color: Colors.white, - ), - ), - )); - smallView = Container( - height: 110, - color: Colors.transparent, - ); - } - - cameraView = Offstage( - offstage: !isSharedCamera.value, - child: AnimatedOpacity( - opacity: isSharedCamera.value ? 1.0 : 0.0, - duration: const Duration(milliseconds: 300), - child: cameraShareView, - ), - ); - - _changeOpacity; - return Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: backgroundColor, - body: Stack( - children: [ - // isScreenBeingShared ? fullScreenView : SizedBox.shrink(), - isScreenBeingShared ? SizedBox.shrink() : fullScreenView, - cameraView, - Container( - padding: const EdgeInsets.only(top: 35), - child: Stack( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - height: 80, - width: 180, - margin: const EdgeInsets.only(top: 16, left: 8), - padding: const EdgeInsets.all(8), - alignment: Alignment.topLeft, - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(8.0)), - // color: buttonBackgroundColor, - ), - // child: InkWell( - // onTap: () async { - // showDialog( - // context: context, - // builder: (context) { - // return Dialog( - // elevation: 0.0, - // insetPadding: const EdgeInsets.symmetric(horizontal: 40), - // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - // child: FractionallySizedBox( - // heightFactor: 0.2, - // widthFactor: 0.3, - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.stretch, - // children: [ - // ListView( - // shrinkWrap: true, - // children: ListTile.divideTiles( - // context: context, - // tiles: [ - // ListTile( - // title: Text( - // 'Session Information', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 18, - // fontWeight: FontWeight.w600, - // ), - // ), - // ), - // ), - // ListTile( - // title: Text( - // 'Session Name', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // ), - // ), - // ), - // subtitle: Text( - // sessionName.value, - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 12, - // ), - // ), - // ), - // ), - // ListTile( - // title: Text( - // 'Session Password', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // ), - // ), - // ), - // subtitle: Text( - // sessionPassword.value, - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 12, - // ), - // ), - // ), - // ), - // ListTile( - // title: Text( - // 'Participants', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // ), - // ), - // ), - // subtitle: Text( - // '${users.value.length}', - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 12, - // ), - // ), - // ), - // ), - // ], - // ).toList(), - // ), - // ], - // ), - // )); - // }); - // }, - // child: Stack( - // children: [ - // Column( - // children: [ - // const Padding(padding: EdgeInsets.symmetric(vertical: 4)), - // Align( - // alignment: Alignment.centerLeft, - // child: Text( - // sessionName.value, - // overflow: TextOverflow.ellipsis, - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.w600, - // color: Colors.white, - // ), - // ), - // ), - // ), - // const Padding(padding: EdgeInsets.symmetric(vertical: 5)), - // Align( - // alignment: Alignment.centerLeft, - // child: Text( - // "Participants: ${users.value.length}", - // style: GoogleFonts.lato( - // textStyle: const TextStyle( - // fontSize: 14, - // fontWeight: FontWeight.w600, - // color: Colors.white, - // ), - // ), - // ), - // ) - // ], - // ), - // Container( - // alignment: Alignment.centerRight, - // child: Image.asset( - // "assets/icons/unlocked@2x.png", - // height: 22, - // )), - // ], - // ), - // ), - ), - TextButton( - onPressed: (showLeaveOptions), - child: Container( - alignment: Alignment.topRight, - margin: const EdgeInsets.only(top: 16, right: 8), - padding: const EdgeInsets.only(top: 5, bottom: 5, left: 16, right: 16), - height: 28, - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(20.0)), - color: buttonBackgroundColor, - ), - child: const Text( - "LEAVE", - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.bold, - color: Color(0xFFE02828), - ), - ), - )), - ], - ), - Align( - alignment: Alignment.centerRight, - child: FractionallySizedBox( - widthFactor: 0.2, - heightFactor: 0.6, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - IconButton( - onPressed: onPressAudio, - icon: isMuted.value ? Image.asset("assets/images/png/zoom/unmute@2x.png") : Image.asset("assets/images/png/zoom/mute@2x.png"), - iconSize: circleButtonSize, - tooltip: isMuted.value == true ? "Unmute" : "Mute", - ), - IconButton( - onPressed: onPressShare, - icon: isSharing.value ? Image.asset("assets/images/png/zoom/share-off@2x.png") : Image.asset("assets/images/png/zoom/share-on@2x.png"), - iconSize: circleButtonSize, - ), - IconButton( - onPressed: onPressVideo, - iconSize: circleButtonSize, - icon: isVideoOn.value ? Image.asset("assets/images/png/zoom/video-off@2x.png") : Image.asset("assets/images/png/zoom/video-on@2x.png"), - ), - Column( - children: [ - IconButton( - onPressed: () async { - onPressCameraList(); - }, - icon: Icon(Icons.cameraswitch, color: Colors.white), - color: Colors.white, - iconSize: 40.h, - ), - "Switch Camera".toText12(color: AppColors.whiteColor, isCenter: true, isBold: true) - ], - ), - ], - ), - )), - Container( - margin: const EdgeInsets.only(left: 16, right: 16, bottom: 40, top: 10), - alignment: Alignment.bottomCenter, - child: SizedBox( - height: MediaQuery.of(context).viewInsets.bottom == 0 ? 65 : MediaQuery.of(context).viewInsets.bottom + 18, - child: TextField( - maxLines: 1, - textAlign: TextAlign.left, - style: TextStyle(color: chatTextColor), - cursorColor: chatTextColor, - textAlignVertical: TextAlignVertical.center, - controller: chatMessageController, - decoration: InputDecoration( - contentPadding: const EdgeInsets.only(left: 16, top: 10, bottom: 10, right: 16), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(width: 1, color: chatTextColor), //<-- SEE HERE - ), - hintText: 'Type your message here...', - hintStyle: TextStyle( - fontSize: 14.0, - color: chatTextColor, - ), - ), - onSubmitted: (String str) { - sendChatMessage(str); - }, - ), - ), - ), - Container( - alignment: Alignment.bottomLeft, - margin: const EdgeInsets.only(bottom: 120), - child: smallView, - ), - // CommentList(zoom: zoom, eventListener: eventListener), - changeNamePopup, - ], - )), - ], - )); - } -} - -class CallArguments { - final bool isJoin; - final String sessionName; - final String sessionPwd; - final String displayName; - final String sessionIdleTimeoutMins; - final String role; - final int callType; - - CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin, this.callType); -} - -class JoinArguments { - final bool isJoin; - final String sessionName; - final String sessionPwd; - final String displayName; - final String sessionTimeout; - final String roleType; - - JoinArguments(this.isJoin, this.sessionName, this.sessionPwd, this.displayName, this.sessionTimeout, this.roleType); -} +// import 'dart:async'; +// import 'dart:convert'; +// import 'dart:io'; +// +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter/foundation.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'package:flutter_hooks/flutter_hooks.dart'; +// import 'package:flutter_ios_voip_kit_karmm/flutter_ios_voip_kit.dart'; +// import 'package:flutter_zoom_videosdk/flutter_zoom_view.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk_camera_device.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk_cmd_channel.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk_event_listener.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk_live_transcription_message_info.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk_share_action.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk_user.dart'; +// import 'package:hmg_patient_app_new/core/app_export.dart'; +// import 'package:hmg_patient_app_new/core/cache_consts.dart'; +// import 'package:hmg_patient_app_new/core/utils/jwt.dart'; +// import 'package:hmg_patient_app_new/core/utils/utils.dart'; +// import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; +// import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; +// import 'package:hmg_patient_app_new/presentation/tele_consultation/zoom/video_view.dart'; +// import 'package:hmg_patient_app_new/theme/colors.dart'; +// import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; +// import 'package:image_picker/image_picker.dart'; +// +// class CallScreen extends StatefulHookWidget { +// const CallScreen({Key? key}) : super(key: key); +// +// @override +// State createState() => _CallScreenState(); +// } +// +// class _CallScreenState extends State { +// static TextEditingController changeNameController = TextEditingController(); +// double opacityLevel = 1.0; +// +// final voIPKit = FlutterIOSVoIPKit.instance; +// +// bool isScreenBeingShared = false; +// +// void _changeOpacity() { +// setState(() => opacityLevel = opacityLevel == 0 ? 1.0 : 0.0); +// } +// +// @override +// Widget build(BuildContext context) { +// var zoom = ZoomVideoSdk(); +// var eventListener = ZoomVideoSdkEventListener(); +// var isInSession = useState(false); +// var sessionName = useState(''); +// var sessionPassword = useState(''); +// var users = useState([]); +// var fullScreenUser = useState(null); +// var sharingUser = useState(null); +// var videoInfo = useState(''); +// var isSharing = useState(false); +// var isMuted = useState(true); +// var isVideoOn = useState(false); +// var isSpeakerOn = useState(false); +// var isRenameModalVisible = useState(false); +// var isRecordingStarted = useState(false); +// var isMicOriginalOn = useState(false); +// var isMounted = useIsMounted(); +// var audioStatusFlag = useState(false); +// var videoStatusFlag = useState(false); +// var userNameFlag = useState(false); +// var userShareStatusFlag = useState(false); +// var isReceiveSpokenLanguageContentEnabled = useState(false); +// var isVideoMirrored = useState(false); +// var isOriginalAspectRatio = useState(false); +// var isPiPView = useState(false); +// var isSharedCamera = useState(false); +// CameraShareView cameraShareView = const CameraShareView(creationParams: {}); +// +// //hide status bar +// SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack); +// var circleButtonSize = 65.0; +// Color backgroundColor = const Color(0xFF232323); +// Color buttonBackgroundColor = const Color.fromRGBO(0, 0, 0, 0.6); +// Color chatTextColor = const Color(0xFFAAAAAA); +// Widget changeNamePopup; +// final args = ModalRoute.of(context)!.settings.arguments as CallArguments; +// +// useEffect(() { +// Future.microtask(() async { +// var token = generateJwt(args.sessionName, args.role); +// +// Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall); +// +// try { +// Map SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false}; +// Map SDKvideoOptions = { +// "localVideoOn": true, +// }; +// JoinSessionConfig joinSession = JoinSessionConfig( +// sessionName: args.sessionName, +// sessionPassword: args.sessionPwd, +// token: token, +// userName: args.displayName, +// audioOptions: SDKaudioOptions, +// videoOptions: SDKvideoOptions, +// sessionIdleTimeoutMins: int.parse(args.sessionIdleTimeoutMins), +// ); +// await zoom.joinSession(joinSession); +// } catch (e) { +// const AlertDialog( +// title: Text("Error"), +// content: Text("Failed to join the session"), +// ); +// Future.delayed(const Duration(milliseconds: 1000)).asStream().listen((event) { +// Navigator.pushAndRemoveUntil( +// context, +// CustomPageRoute( +// page: LandingNavigation(), +// ), +// (r) => false); +// }); +// } +// }); +// return null; +// }, []); +// +// useEffect(() { +// final sessionJoinListener = eventListener.addListener(EventType.onSessionJoin, (data) async { +// data = data as Map; +// isInSession.value = true; +// zoom.session.getSessionName().then((value) => sessionName.value = value!); +// sessionPassword.value = await zoom.session.getSessionPassword(); +// debugPrint("sessionPhonePasscode: ${await zoom.session.getSessionPhonePasscode()}"); +// ZoomVideoSdkUser mySelf = ZoomVideoSdkUser.fromJson(jsonDecode(data['sessionUser'])); +// List? remoteUsers = await zoom.session.getRemoteUsers(); +// var muted = await mySelf.audioStatus?.isMuted(); +// var videoOn = await mySelf.videoStatus?.isOn(); +// var speakerOn = await zoom.audioHelper.getSpeakerStatus(); +// fullScreenUser.value = mySelf; +// remoteUsers?.insert(0, mySelf); +// isMuted.value = muted!; +// isSpeakerOn.value = speakerOn; +// isVideoOn.value = videoOn!; +// users.value = remoteUsers!; +// isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(); +// }); +// +// final sessionLeaveListener = eventListener.addListener(EventType.onSessionLeave, (data) async { +// data = data as Map; +// debugPrint("onSessionLeave: ${data['reason']}"); +// isInSession.value = false; +// users.value = []; +// fullScreenUser.value = null; +// // Navigator.popAndPushNamed( +// // context, +// // "Join", +// // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), +// // ); +// Navigator.pushAndRemoveUntil( +// context, +// CustomPageRoute( +// page: LandingNavigation(), +// ), +// (r) => false); +// }); +// +// final sessionNeedPasswordListener = eventListener.addListener(EventType.onSessionNeedPassword, (data) async { +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text('Session Need Password'), +// content: const Text('Password is required'), +// actions: [ +// TextButton( +// onPressed: () async => { +// Navigator.pushAndRemoveUntil( +// context, +// CustomPageRoute( +// page: LandingNavigation(), +// ), +// (r) => false), +// await zoom.leaveSession(false), +// }, +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// }); +// +// final sessionPasswordWrongListener = eventListener.addListener(EventType.onSessionPasswordWrong, (data) async { +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text('Session Password Incorrect'), +// content: const Text('Password is wrong'), +// actions: [ +// TextButton( +// onPressed: () async => { +// Navigator.popAndPushNamed(context, 'Join', arguments: JoinArguments(args.isJoin, args.sessionName, "", args.displayName, args.sessionIdleTimeoutMins, args.role)), +// await zoom.leaveSession(false), +// }, +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// }); +// +// final userVideoStatusChangedListener = eventListener.addListener(EventType.onUserVideoStatusChanged, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// var userListJson = jsonDecode(data['changedUsers']) as List; +// List userList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); +// for (var user in userList) { +// { +// if (user.userId == mySelf?.userId) { +// mySelf?.videoStatus?.isOn().then((on) => isVideoOn.value = on); +// } +// } +// } +// videoStatusFlag.value = !videoStatusFlag.value; +// }); +// +// final userAudioStatusChangedListener = eventListener.addListener(EventType.onUserAudioStatusChanged, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// var userListJson = jsonDecode(data['changedUsers']) as List; +// List userList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); +// for (var user in userList) { +// { +// if (user.userId == mySelf?.userId) { +// mySelf?.audioStatus?.isMuted().then((muted) => isMuted.value = muted); +// } +// } +// } +// audioStatusFlag.value = !audioStatusFlag.value; +// }); +// +// final userShareStatusChangeListener = eventListener.addListener(EventType.onUserShareStatusChanged, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// ZoomVideoSdkUser shareUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'].toString())); +// ZoomVideoSdkShareAction? shareAction = ZoomVideoSdkShareAction.fromJson(jsonDecode(data['shareAction'])); +// +// if (shareAction.shareStatus == ShareStatus.Start || shareAction.shareStatus == ShareStatus.Resume) { +// sharingUser.value = shareUser; +// fullScreenUser.value = shareUser; +// isSharing.value = (shareUser.userId == mySelf?.userId); +// +// setState(() { +// isScreenBeingShared = true; +// }); +// Future.delayed(const Duration(seconds: 2), () { +// setState(() { +// isScreenBeingShared = false; +// }); +// }); +// } else { +// sharingUser.value = null; +// isSharing.value = false; +// isSharedCamera.value = false; +// fullScreenUser.value = mySelf; +// isScreenBeingShared = false; +// setState(() { +// isScreenBeingShared = true; +// }); +// Future.delayed(const Duration(seconds: 2), () { +// setState(() { +// isScreenBeingShared = false; +// }); +// }); +// } +// userShareStatusFlag.value = !userShareStatusFlag.value; +// }); +// +// final shareContentChangedListener = eventListener.addListener(EventType.onShareContentChanged, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// ZoomVideoSdkUser shareUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'].toString())); +// ZoomVideoSdkShareAction? shareAction = ZoomVideoSdkShareAction.fromJson(jsonDecode(data['shareAction'])); +// if (shareAction.shareType == ShareType.Camera) { +// debugPrint("Camera share started"); +// isSharedCamera.value = (shareUser.userId == mySelf?.userId); +// } +// }); +// +// final userJoinListener = eventListener.addListener(EventType.onUserJoin, (data) async { +// if (!isMounted()) return; +// data = data as Map; +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// var userListJson = jsonDecode(data['remoteUsers']) as List; +// List remoteUserList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); +// remoteUserList.insert(0, mySelf!); +// users.value = remoteUserList; +// }); +// +// final userLeaveListener = eventListener.addListener(EventType.onUserLeave, (data) async { +// if (!isMounted()) return; +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// data = data as Map; +// List? remoteUserList = await zoom.session.getRemoteUsers(); +// var leftUserListJson = jsonDecode(data['leftUsers']) as List; +// List leftUserLis = leftUserListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); +// if (fullScreenUser.value != null) { +// for (var user in leftUserLis) { +// { +// if (fullScreenUser.value?.userId == user.userId) { +// fullScreenUser.value = mySelf; +// } +// } +// } +// } else { +// fullScreenUser.value = mySelf; +// } +// remoteUserList?.add(mySelf!); +// users.value = remoteUserList!; +// }); +// +// final userNameChangedListener = eventListener.addListener(EventType.onUserNameChanged, (data) async { +// if (!isMounted()) return; +// data = data as Map; +// ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); +// int index; +// for (var user in users.value) { +// if (user.userId == changedUser.userId) { +// index = users.value.indexOf(user); +// users.value[index] = changedUser; +// } +// } +// userNameFlag.value = !userNameFlag.value; +// }); +// +// final commandReceived = eventListener.addListener(EventType.onCommandReceived, (data) async { +// data = data as Map; +// debugPrint("sender: ${ZoomVideoSdkUser.fromJson(jsonDecode(data['sender']))}, command: ${data['command']}"); +// }); +// +// final liveStreamStatusChangeListener = eventListener.addListener(EventType.onLiveStreamStatusChanged, (data) async { +// data = data as Map; +// debugPrint("onLiveStreamStatusChanged: status: ${data['status']}"); +// }); +// +// final liveTranscriptionStatusChangeListener = eventListener.addListener(EventType.onLiveTranscriptionStatus, (data) async { +// data = data as Map; +// debugPrint("onLiveTranscriptionStatus: status: ${data['status']}"); +// }); +// +// final cloudRecordingStatusListener = eventListener.addListener(EventType.onCloudRecordingStatus, (data) async { +// data = data as Map; +// debugPrint("onCloudRecordingStatus: status: ${data['status']}"); +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// if (data['status'] == RecordingStatus.Start) { +// if (mySelf != null && !mySelf.isHost!) { +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// content: const Text('The session is being recorded.'), +// actions: [ +// TextButton( +// onPressed: () async { +// await zoom.acceptRecordingConsent(); +// if (context.mounted) { +// Navigator.pop(context); +// } +// ; +// }, +// child: const Text('accept'), +// ), +// TextButton( +// onPressed: () async { +// String currentConsentType = await zoom.getRecordingConsentType(); +// if (currentConsentType == ConsentType.ConsentType_Individual) { +// await zoom.declineRecordingConsent(); +// Navigator.pop(context); +// } else { +// await zoom.declineRecordingConsent(); +// zoom.leaveSession(false); +// if (!context.mounted) return; +// Navigator.popAndPushNamed( +// context, +// "Join", +// arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), +// ); +// } +// }, +// child: const Text('decline'), +// ), +// ], +// ), +// ); +// } +// isRecordingStarted.value = true; +// } else { +// isRecordingStarted.value = false; +// } +// }); +// +// final liveTranscriptionMsgInfoReceivedListener = eventListener.addListener(EventType.onLiveTranscriptionMsgInfoReceived, (data) async { +// data = data as Map; +// ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); +// debugPrint("onLiveTranscriptionMsgInfoReceived: content: ${messageInfo.messageContent}"); +// }); +// +// final inviteByPhoneStatusListener = eventListener.addListener(EventType.onInviteByPhoneStatus, (data) async { +// data = data as Map; +// debugPrint("onInviteByPhoneStatus: status: ${data['status']}, reason: ${data['reason']}"); +// }); +// +// final multiCameraStreamStatusChangedListener = eventListener.addListener(EventType.onMultiCameraStreamStatusChanged, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); +// var status = data['status']; +// for (var user in users.value) { +// { +// if (changedUser.userId == user.userId) { +// if (status == MultiCameraStreamStatus.Joined) { +// user.hasMultiCamera = true; +// } else if (status == MultiCameraStreamStatus.Left) { +// user.hasMultiCamera = false; +// } +// } +// } +// } +// }); +// +// final requireSystemPermission = eventListener.addListener(EventType.onRequireSystemPermission, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); +// var permissionType = data['permissionType']; +// switch (permissionType) { +// case SystemPermissionType.Camera: +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text("Can't Access Camera"), +// content: const Text("please turn on the toggle in system settings to grant permission"), +// actions: [ +// TextButton( +// onPressed: () => Navigator.pop(context, 'OK'), +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// break; +// case SystemPermissionType.Microphone: +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text("Can't Access Microphone"), +// content: const Text("please turn on the toggle in system settings to grant permission"), +// actions: [ +// TextButton( +// onPressed: () => Navigator.pop(context, 'OK'), +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// break; +// } +// }); +// +// final networkStatusChangeListener = eventListener.addListener(EventType.onUserVideoNetworkStatusChanged, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? networkUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); +// +// if (data['status'] == NetworkStatus.Bad) { +// debugPrint("onUserVideoNetworkStatusChanged: status: ${data['status']}, user: ${networkUser.userName}"); +// } +// }); +// +// final eventErrorListener = eventListener.addListener(EventType.onError, (data) async { +// data = data as Map; +// String errorType = data['errorType']; +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text("Error"), +// content: Text(errorType), +// actions: [ +// TextButton( +// onPressed: () => Navigator.pop(context, 'OK'), +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconnecting) { +// Timer( +// const Duration(milliseconds: 1000), +// () => { +// Navigator.popAndPushNamed( +// context, +// "Join", +// arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), +// ), +// }); +// } +// }); +// +// final userRecordingConsentListener = eventListener.addListener(EventType.onUserRecordingConsent, (data) async { +// data = data as Map; +// ZoomVideoSdkUser? user = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); +// debugPrint('userRecordingConsentListener: user= ${user.userName}'); +// }); +// +// final callCRCDeviceStatusListener = eventListener.addListener(EventType.onCallCRCDeviceStatusChanged, (data) async { +// data = data as Map; +// debugPrint('onCallCRCDeviceStatusChanged: status = ${data['status']}'); +// }); +// +// final originalLanguageMsgReceivedListener = eventListener.addListener(EventType.onOriginalLanguageMsgReceived, (data) async { +// data = data as Map; +// ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); +// debugPrint("onOriginalLanguageMsgReceived: content: ${messageInfo.messageContent}"); +// }); +// +// final chatPrivilegeChangedListener = eventListener.addListener(EventType.onChatPrivilegeChanged, (data) async { +// data = data as Map; +// String type = data['privilege']; +// debugPrint('chatPrivilegeChangedListener: type= $type'); +// }); +// +// final testMicStatusListener = eventListener.addListener(EventType.onTestMicStatusChanged, (data) async { +// data = data as Map; +// String status = data['status']; +// debugPrint('testMicStatusListener: status= $status'); +// }); +// +// final micSpeakerVolumeChangedListener = eventListener.addListener(EventType.onMicSpeakerVolumeChanged, (data) async { +// data = data as Map; +// int type = data['micVolume']; +// debugPrint('onMicSpeakerVolumeChanged: micVolume= $type, speakerVolume'); +// }); +// +// final cameraControlRequestResultListener = eventListener.addListener(EventType.onCameraControlRequestResult, (data) async { +// data = data as Map; +// bool approved = data['approved']; +// debugPrint('onCameraControlRequestResult: approved= $approved'); +// }); +// +// final callOutUserJoinListener = eventListener.addListener(EventType.onCalloutJoinSuccess, (data) async { +// data = data as Map; +// String phoneNumber = data['phoneNumber']; +// ZoomVideoSdkUser? user = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); +// debugPrint('onCalloutJoinSuccess: phoneNumber= $phoneNumber, user= ${user.userName}'); +// }); +// +// return () => { +// sessionJoinListener.cancel(), +// sessionLeaveListener.cancel(), +// sessionPasswordWrongListener.cancel(), +// sessionNeedPasswordListener.cancel(), +// userVideoStatusChangedListener.cancel(), +// userAudioStatusChangedListener.cancel(), +// userJoinListener.cancel(), +// userLeaveListener.cancel(), +// userNameChangedListener.cancel(), +// userShareStatusChangeListener.cancel(), +// liveStreamStatusChangeListener.cancel(), +// cloudRecordingStatusListener.cancel(), +// inviteByPhoneStatusListener.cancel(), +// eventErrorListener.cancel(), +// commandReceived.cancel(), +// liveTranscriptionStatusChangeListener.cancel(), +// liveTranscriptionMsgInfoReceivedListener.cancel(), +// multiCameraStreamStatusChangedListener.cancel(), +// requireSystemPermission.cancel(), +// userRecordingConsentListener.cancel(), +// networkStatusChangeListener.cancel(), +// callCRCDeviceStatusListener.cancel(), +// originalLanguageMsgReceivedListener.cancel(), +// chatPrivilegeChangedListener.cancel(), +// testMicStatusListener.cancel(), +// micSpeakerVolumeChangedListener.cancel(), +// cameraControlRequestResultListener.cancel(), +// callOutUserJoinListener.cancel(), +// shareContentChangedListener.cancel(), +// }; +// }, [zoom, users.value, isMounted]); +// +// void selectVirtualBackgroundItem() async { +// final ImagePicker picker = ImagePicker(); +// // Pick an image. +// final XFile? image = await picker.pickImage(source: ImageSource.gallery); +// await zoom.virtualBackgroundHelper.addVirtualBackgroundItem(image!.path); +// } +// +// void onPressAudio() async { +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// if (mySelf != null) { +// final audioStatus = mySelf.audioStatus; +// if (audioStatus != null) { +// var muted = await audioStatus.isMuted(); +// if (muted) { +// await zoom.audioHelper.unMuteAudio(mySelf.userId); +// } else { +// await zoom.audioHelper.muteAudio(mySelf.userId); +// } +// } +// } +// } +// +// void onPressVideo() async { +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// if (mySelf != null) { +// final videoStatus = mySelf.videoStatus; +// if (videoStatus != null) { +// var videoOn = await videoStatus.isOn(); +// if (videoOn) { +// await zoom.videoHelper.stopVideo(); +// } else { +// await zoom.videoHelper.startVideo(); +// } +// } +// } +// } +// +// void onPressShare() async { +// var isOtherSharing = await zoom.shareHelper.isOtherSharing(); +// var isShareLocked = await zoom.shareHelper.isShareLocked(); +// String? shareCameraViewResult = Errors.InternalError; +// +// if (isOtherSharing) { +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text("Error"), +// content: const Text('Other is sharing'), +// actions: [ +// TextButton( +// onPressed: () => Navigator.pop(context, 'OK'), +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// } else if (isShareLocked) { +// showDialog( +// context: context, +// builder: (BuildContext context) => AlertDialog( +// title: const Text("Error"), +// content: const Text('Share is locked by host'), +// actions: [ +// TextButton( +// onPressed: () => Navigator.pop(context, 'OK'), +// child: const Text('OK'), +// ), +// ], +// ), +// ); +// } else if (isSharing.value) { +// zoom.shareHelper.stopShare(); +// } else { +// List options = [ +// ListTile( +// title: Text( +// 'Share Device Screen', +// style: TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// zoom.shareHelper.shareScreen(), +// Navigator.of(context).pop(), +// }, +// ), +// ListTile( +// title: Text( +// 'Share Camera', +// style: TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// shareCameraViewResult = await zoom.shareHelper.startShareCamera(cameraShareView), +// debugPrint('start camera: $shareCameraViewResult'), +// Navigator.of(context).pop(), +// }, +// ), +// ]; +// showDialog( +// context: context, +// builder: (context) { +// return Dialog( +// elevation: 0.0, +// insetPadding: const EdgeInsets.symmetric(horizontal: 40), +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), +// child: SizedBox( +// height: options.length * 60, +// child: Scrollbar( +// child: ListView( +// shrinkWrap: true, +// scrollDirection: Axis.vertical, +// children: ListTile.divideTiles( +// context: context, +// tiles: options, +// ).toList(), +// ), +// ), +// ), +// ); +// }); +// } +// } +// +// void onSelectedUserVolume(ZoomVideoSdkUser user) async { +// var isShareAudio = user.isSharing; +// bool canSetVolume = await user.canSetUserVolume(user.userId, isShareAudio); +// num userVolume; +// +// List options = [ +// ListTile( +// title: Text( +// 'Adjust Volume', +// style: const TextStyle( +// fontSize: 18, +// fontWeight: FontWeight.w600, +// color: Colors.black, +// ), +// ), +// ), +// ListTile( +// title: Text( +// 'Current volume', +// style: const TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// debugPrint('user volume'), +// userVolume = await user.getUserVolume(user.userId, isShareAudio), +// debugPrint('user ${user.userName}\'s volume is ${userVolume!}'), +// }, +// ), +// ]; +// if (canSetVolume) { +// options.add( +// ListTile( +// title: Text( +// 'Volume up', +// style: const TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// userVolume = await user.getUserVolume(user.userId, isShareAudio), +// if (userVolume < 10) +// { +// await user.setUserVolume(user.userId, userVolume + 1, isShareAudio), +// } +// else +// { +// debugPrint("Cannot volume up."), +// } +// }, +// ), +// ); +// options.add( +// ListTile( +// title: Text( +// 'Volume down', +// style: const TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// userVolume = await user.getUserVolume(user.userId, isShareAudio), +// if (userVolume > 0) +// { +// await user.setUserVolume(user.userId, userVolume - 1, isShareAudio), +// } +// else +// { +// debugPrint("Cannot volume down."), +// } +// }, +// ), +// ); +// } +// showDialog( +// context: context, +// builder: (context) { +// return Dialog( +// elevation: 0.0, +// insetPadding: const EdgeInsets.symmetric(horizontal: 40), +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), +// child: SizedBox( +// height: options.length * 58, +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.stretch, +// children: [ +// ListView( +// shrinkWrap: true, +// children: ListTile.divideTiles( +// context: context, +// tiles: options, +// ).toList(), +// ), +// ], +// ), +// )); +// }); +// } +// +// void onPressCameraList() async { +// List options = []; +// List cameraList = await zoom.videoHelper.getCameraList(); +// for (var camera in cameraList) { +// options.add( +// ListTile( +// title: Text( +// camera.deviceName, +// style: const TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// await zoom.videoHelper.switchCamera(camera.deviceId), +// Navigator.of(context).pop(), +// }, +// ), +// ); +// } +// options.add( +// ListTile( +// title: Text( +// "Cancel", +// style: const TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ), +// onTap: () async => { +// Navigator.of(context).pop(), +// }, +// ), +// ); +// showDialog( +// context: context, +// builder: (context) { +// return Dialog( +// elevation: 0.0, +// insetPadding: const EdgeInsets.symmetric(horizontal: 40), +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), +// child: SizedBox( +// height: options.length * 60, +// child: Scrollbar( +// child: ListView( +// shrinkWrap: true, +// scrollDirection: Axis.vertical, +// children: ListTile.divideTiles( +// context: context, +// tiles: options, +// ).toList(), +// ), +// ), +// ), +// ); +// }); +// } +// +// // Future onPressMore() async { +// // ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// // bool isShareLocked = await zoom.shareHelper.isShareLocked(); +// // bool canSwitchSpeaker = await zoom.audioHelper.canSwitchSpeaker(); +// // bool canStartRecording = (await zoom.recordingHelper.canStartRecording()) == Errors.Success; +// // debugPrint("canStartRecording ${await zoom.recordingHelper.canStartRecording()}"); +// // var startLiveTranscription = (await zoom.liveTranscriptionHelper.getLiveTranscriptionStatus()) == LiveTranscriptionStatus.Start; +// // bool canStartLiveTranscription = await zoom.liveTranscriptionHelper.canStartLiveTranscription(); +// // bool isHost = (mySelf != null) ? (await mySelf.getIsHost()) : false; +// // isOriginalAspectRatio.value = await zoom.videoHelper.isOriginalAspectRatioEnabled(); +// // bool canCallOutToCRC = await zoom.CRCHelper.isCRCEnabled(); +// // bool supportVB = await zoom.virtualBackgroundHelper.isSupportVirtualBackground(); +// // List? shareActionList = await mySelf?.getShareActionList(); +// // +// // List options = [ +// // ListTile( +// // title: Text( +// // 'More', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 18, +// // fontWeight: FontWeight.w600, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // ), +// // ListTile( +// // title: Text( +// // 'Get Chat Privilege', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint("Chat Privilege = ${await zoom.chatHelper.getChatPrivilege()}"), +// // Navigator.of(context).pop(), +// // }, +// // ), +// // ListTile( +// // title: Text( +// // 'Get Session Dial-in Number infos', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint("session number = ${await zoom.session.getSessionNumber()}"), +// // Navigator.of(context).pop(), +// // }, +// // ), +// // ListTile( +// // title: Text( +// // 'Get Camera List', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint("camera list= ${await zoom.videoHelper.getCameraList()}"), +// // onPressCameraList(), +// // Navigator.of(context).pop(), +// // }, +// // ), +// // ListTile( +// // title: Text( +// // '${isMicOriginalOn.value ? 'Disable' : 'Enable'} Original Sound', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint("${isMicOriginalOn.value}"), +// // await zoom.audioSettingHelper.enableMicOriginalInput(!isMicOriginalOn.value), +// // isMicOriginalOn.value = await zoom.audioSettingHelper.isMicOriginalInputEnable(), +// // debugPrint("Original sound ${isMicOriginalOn.value ? 'Enabled' : 'Disabled'}"), +// // Navigator.of(context).pop(), +// // }, +// // ) +// // ]; +// // +// // if (supportVB) { +// // options.add( +// // ListTile( +// // title: Text( +// // 'Add Virtual Background', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // selectVirtualBackgroundItem(), +// // Navigator.of(context).pop(), +// // }, +// // ), +// // ); +// // } +// // +// // if (canCallOutToCRC) { +// // options.add(ListTile( +// // title: Text( +// // 'Call-out to CRC devices', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint('CRC result = ${await zoom.CRCHelper.callCRCDevice("bjn.vc", ZoomVideoSdkCRCProtocolType.SIP)}'), +// // Navigator.of(context).pop(), +// // }, +// // )); +// // options.add(ListTile( +// // title: Text( +// // 'Cancel call-out to CRC devices', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint('cancel result= ${await zoom.CRCHelper.cancelCallCRCDevice()}'), +// // Navigator.of(context).pop(), +// // }, +// // )); +// // } +// // +// // if (canSwitchSpeaker) { +// // options.add(ListTile( +// // title: Text( +// // 'Turn ${isSpeakerOn.value ? 'off' : 'on'} Speaker', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // await zoom.audioHelper.setSpeaker(!isSpeakerOn.value), +// // isSpeakerOn.value = await zoom.audioHelper.getSpeakerStatus(), +// // debugPrint('Turned ${isSpeakerOn.value ? 'on' : 'off'} Speaker'), +// // Navigator.of(context).pop(), +// // }, +// // )); +// // } +// // +// // if (isHost) { +// // options.add(ListTile( +// // title: Text( +// // '${isShareLocked ? 'Unlock' : 'Lock'} Share', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // debugPrint("isShareLocked = ${await zoom.shareHelper.lockShare(!isShareLocked)}"), +// // Navigator.of(context).pop(), +// // })); +// // options.add(ListTile( +// // title: Text( +// // 'Change Name', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () => { +// // isRenameModalVisible.value = true, +// // Navigator.of(context).pop(), +// // }, +// // )); +// // } +// // +// // if (canStartLiveTranscription) { +// // options.add(ListTile( +// // title: Text( +// // "${startLiveTranscription ? 'Stop' : 'Start'} Live Transcription", +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // if (startLiveTranscription) +// // { +// // debugPrint('stopLiveTranscription= ${await zoom.liveTranscriptionHelper.stopLiveTranscription()}'), +// // } +// // else +// // { +// // debugPrint('startLiveTranscription= ${await zoom.liveTranscriptionHelper.startLiveTranscription()}'), +// // }, +// // Navigator.of(context).pop(), +// // }, +// // )); +// // options.add(ListTile( +// // title: Text( +// // '${isReceiveSpokenLanguageContentEnabled.value ? 'Disable' : 'Enable'} receiving original caption', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // await zoom.liveTranscriptionHelper.enableReceiveSpokenLanguageContent(!isReceiveSpokenLanguageContentEnabled.value), +// // isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(), +// // debugPrint("isReceiveSpokenLanguageContentEnabled = ${isReceiveSpokenLanguageContentEnabled.value}"), +// // Navigator.of(context).pop(), +// // })); +// // } +// // +// // if (canStartRecording) { +// // options.add(ListTile( +// // title: Text( +// // '${isRecordingStarted.value ? 'Stop' : 'Start'} Recording', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // if (!isRecordingStarted.value) +// // { +// // debugPrint('isRecordingStarted = ${await zoom.recordingHelper.startCloudRecording()}'), +// // } +// // else +// // { +// // debugPrint('isRecordingStarted = ${await zoom.recordingHelper.stopCloudRecording()}'), +// // }, +// // Navigator.of(context).pop(), +// // })); +// // } +// // +// // if (Platform.isAndroid) { +// // bool isFlashlightSupported = await zoom.videoHelper.isSupportFlashlight(); +// // bool isFlashlightOn = await zoom.videoHelper.isFlashlightOn(); +// // if (isFlashlightSupported) { +// // options.add(ListTile( +// // title: Text( +// // '${isFlashlightOn ? 'Turn Off' : 'Turn On'} Flashlight', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // if (!isFlashlightOn) +// // { +// // await zoom.videoHelper.turnOnOrOffFlashlight(true), +// // } +// // else +// // { +// // await zoom.videoHelper.turnOnOrOffFlashlight(false), +// // }, +// // Navigator.of(context).pop(), +// // })); +// // } +// // } +// // +// // if (Platform.isIOS) { +// // options.add(ListTile( +// // title: Text( +// // '${isPiPView.value ? 'Disable' : 'Enable'} picture in picture view', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // isPiPView.value = !isPiPView.value, +// // Navigator.of(context).pop(), +// // })); +// // } +// // +// // if (isVideoOn.value) { +// // options.add(ListTile( +// // title: Text( +// // 'Mirror the video', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // await zoom.videoHelper.mirrorMyVideo(!isVideoMirrored.value), +// // isVideoMirrored.value = await zoom.videoHelper.isMyVideoMirrored(), +// // Navigator.of(context).pop(), +// // })); +// // options.add(ListTile( +// // title: Text( +// // '${isOriginalAspectRatio.value ? 'Enable' : 'Disable'} original aspect ratio', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.normal, +// // color: Colors.black, +// // ), +// // ), +// // ), +// // onTap: () async => { +// // await zoom.videoHelper.enableOriginalAspectRatio(!isOriginalAspectRatio.value), +// // isOriginalAspectRatio.value = await zoom.videoHelper.isOriginalAspectRatioEnabled(), +// // debugPrint("isOriginalAspectRatio= ${isOriginalAspectRatio.value}"), +// // Navigator.of(context).pop(), +// // })); +// // } +// // +// // showDialog( +// // context: context, +// // builder: (context) { +// // return Dialog( +// // elevation: 0.0, +// // insetPadding: const EdgeInsets.symmetric(horizontal: 40), +// // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), +// // child: SizedBox( +// // height: 500, +// // child: Scrollbar( +// // child: ListView( +// // shrinkWrap: true, +// // scrollDirection: Axis.vertical, +// // children: ListTile.divideTiles( +// // context: context, +// // tiles: options, +// // ).toList(), +// // ), +// // ), +// // ), +// // ); +// // }); +// // } +// +// void onLeaveSession(bool isEndSession) async { +// await zoom.leaveSession(isEndSession); +// Navigator.pushAndRemoveUntil( +// context, +// CustomPageRoute( +// page: LandingNavigation(), +// ), +// (r) => false); +// } +// +// void showLeaveOptions() async { +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// bool isHost = await mySelf!.getIsHost(); +// +// Widget endSession; +// Widget leaveSession; +// Widget cancel = TextButton( +// child: const Text('Cancel'), +// onPressed: () { +// Navigator.pop(context); //close Dialog +// }, +// ); +// +// switch (defaultTargetPlatform) { +// case TargetPlatform.android: +// endSession = TextButton( +// child: const Text('End Session'), +// onPressed: () => onLeaveSession(true), +// ); +// leaveSession = TextButton( +// child: const Text('Leave Session'), +// onPressed: () => onLeaveSession(false), +// ); +// break; +// default: +// endSession = CupertinoActionSheetAction( +// isDestructiveAction: true, +// child: const Text('End Session'), +// onPressed: () => onLeaveSession(true), +// ); +// leaveSession = CupertinoActionSheetAction( +// child: const Text('Leave Session'), +// onPressed: () => onLeaveSession(false), +// ); +// break; +// } +// +// List options = [ +// leaveSession, +// cancel, +// ]; +// +// if (Platform.isAndroid) { +// if (isHost) { +// options.removeAt(1); +// options.insert(0, endSession); +// } +// showDialog( +// context: context, +// builder: (context) { +// return AlertDialog( +// content: const Text("Do you want to leave this session?"), +// shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), +// actions: options, +// ); +// }); +// } else { +// options.removeAt(1); +// if (isHost) { +// options.insert(1, endSession); +// } +// showCupertinoModalPopup( +// context: context, +// builder: (context) => CupertinoActionSheet( +// message: const Text('Are you sure that you want to leave the session?'), +// actions: options, +// cancelButton: cancel, +// ), +// ); +// } +// } +// +// final chatMessageController = TextEditingController(); +// +// void sendChatMessage(String message) async { +// await zoom.chatHelper.sendChatToAll(message); +// ZoomVideoSdkUser? self = await zoom.session.getMySelf(); +// ZoomVideoSdkCmdChannel cmdChannel = zoom.cmdChannel; +// for (var user in users.value) { +// if (user.userId != self?.userId) { +// await zoom.cmdChannel.sendCommand(user.userId, message); +// } +// } +// chatMessageController.clear(); +// // send the chat as a command +// } +// +// void onSelectedUser(ZoomVideoSdkUser user) async { +// setState(() { +// fullScreenUser.value = user; +// }); +// } +// +// changeNamePopup = Center( +// child: Stack( +// children: [ +// Visibility( +// visible: isRenameModalVisible.value, +// child: Row( +// mainAxisSize: MainAxisSize.min, +// children: [ +// Container( +// alignment: Alignment.bottomLeft, +// decoration: const BoxDecoration( +// borderRadius: BorderRadius.all(Radius.circular(10)), +// color: Colors.white, +// ), +// width: MediaQuery.of(context).size.width - 130, +// height: MediaQuery.of(context).size.height * 0.2, +// child: Center( +// child: (Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only(top: 20, left: 20), +// child: Text( +// 'Change Name', +// style: const TextStyle( +// fontSize: 18, +// fontWeight: FontWeight.w500, +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(top: 10, left: 20), +// child: SizedBox( +// width: MediaQuery.of(context).size.width - 230, +// child: TextField( +// onEditingComplete: () {}, +// autofocus: true, +// cursorColor: Colors.black, +// controller: changeNameController, +// decoration: InputDecoration( +// isDense: true, +// hintText: 'New name', +// hintStyle: TextStyle( +// fontSize: 14.0, +// color: chatTextColor, +// ), +// ), +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(top: 15), +// child: Row( +// children: [ +// Padding( +// padding: const EdgeInsets.only(left: 40), +// child: InkWell( +// child: Text( +// 'Apply', +// style: const TextStyle( +// fontSize: 16, +// ), +// ), +// onTap: () async { +// if (fullScreenUser.value != null) { +// ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); +// await zoom.userHelper.changeName((mySelf?.userId)!, changeNameController.text); +// changeNameController.clear(); +// } +// isRenameModalVisible.value = false; +// }, +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(left: 40), +// child: InkWell( +// child: Text( +// 'Cancel', +// style: const TextStyle( +// fontSize: 16, +// ), +// ), +// onTap: () async { +// isRenameModalVisible.value = false; +// }, +// ), +// ) +// ], +// ), +// ) +// ], +// )), +// ), +// ), +// ], +// )), +// ], +// ), +// ); +// +// Widget fullScreenView; +// Widget smallView; +// Widget cameraView; +// +// if (isInSession.value && fullScreenUser.value != null && users.value.isNotEmpty) { +// fullScreenView = AnimatedOpacity( +// opacity: opacityLevel, +// duration: const Duration(seconds: 3), +// child: VideoView( +// user: users.value.length > 1 ? users.value[1] : users.value[0], +// hasMultiCamera: false, +// isPiPView: isPiPView.value, +// sharing: sharingUser.value == null ? false : (sharingUser.value?.userId == fullScreenUser.value?.userId), +// preview: false, +// focused: false, +// multiCameraIndex: "0", +// videoAspect: VideoAspect.Original, +// fullScreen: true, +// resolution: VideoResolution.Resolution360, +// ), +// ); +// +// smallView = Container( +// height: 110, +// margin: const EdgeInsets.only(left: 20, right: 20), +// alignment: Alignment.center, +// child: ListView.separated( +// scrollDirection: Axis.horizontal, +// itemCount: users.value.length, +// itemBuilder: (BuildContext context, int index) { +// return InkWell( +// onTap: () async { +// onSelectedUser(users.value[index]); +// }, +// onDoubleTap: () async { +// onSelectedUserVolume(users.value[index]); +// }, +// child: Center( +// child: VideoView( +// user: users.value[index], +// hasMultiCamera: false, +// isPiPView: false, +// sharing: false, +// preview: false, +// focused: false, +// multiCameraIndex: "0", +// videoAspect: VideoAspect.Original, +// fullScreen: false, +// resolution: VideoResolution.Resolution180, +// ), +// ), +// ); +// }, +// separatorBuilder: (BuildContext context, int index) => const Divider(), +// ), +// ); +// } else { +// fullScreenView = Container( +// color: Colors.black, +// child: const Center( +// child: Text( +// "Connecting...", +// style: TextStyle( +// fontSize: 20, +// color: Colors.white, +// ), +// ), +// )); +// smallView = Container( +// height: 110, +// color: Colors.transparent, +// ); +// } +// +// cameraView = Offstage( +// offstage: !isSharedCamera.value, +// child: AnimatedOpacity( +// opacity: isSharedCamera.value ? 1.0 : 0.0, +// duration: const Duration(milliseconds: 300), +// child: cameraShareView, +// ), +// ); +// +// _changeOpacity; +// return Scaffold( +// resizeToAvoidBottomInset: false, +// backgroundColor: backgroundColor, +// body: Stack( +// children: [ +// // isScreenBeingShared ? fullScreenView : SizedBox.shrink(), +// isScreenBeingShared ? SizedBox.shrink() : fullScreenView, +// cameraView, +// Container( +// padding: const EdgeInsets.only(top: 35), +// child: Stack( +// children: [ +// Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// height: 80, +// width: 180, +// margin: const EdgeInsets.only(top: 16, left: 8), +// padding: const EdgeInsets.all(8), +// alignment: Alignment.topLeft, +// decoration: BoxDecoration( +// borderRadius: const BorderRadius.all(Radius.circular(8.0)), +// // color: buttonBackgroundColor, +// ), +// // child: InkWell( +// // onTap: () async { +// // showDialog( +// // context: context, +// // builder: (context) { +// // return Dialog( +// // elevation: 0.0, +// // insetPadding: const EdgeInsets.symmetric(horizontal: 40), +// // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), +// // child: FractionallySizedBox( +// // heightFactor: 0.2, +// // widthFactor: 0.3, +// // child: Column( +// // crossAxisAlignment: CrossAxisAlignment.stretch, +// // children: [ +// // ListView( +// // shrinkWrap: true, +// // children: ListTile.divideTiles( +// // context: context, +// // tiles: [ +// // ListTile( +// // title: Text( +// // 'Session Information', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 18, +// // fontWeight: FontWeight.w600, +// // ), +// // ), +// // ), +// // ), +// // ListTile( +// // title: Text( +// // 'Session Name', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // ), +// // ), +// // ), +// // subtitle: Text( +// // sessionName.value, +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 12, +// // ), +// // ), +// // ), +// // ), +// // ListTile( +// // title: Text( +// // 'Session Password', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // ), +// // ), +// // ), +// // subtitle: Text( +// // sessionPassword.value, +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 12, +// // ), +// // ), +// // ), +// // ), +// // ListTile( +// // title: Text( +// // 'Participants', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // ), +// // ), +// // ), +// // subtitle: Text( +// // '${users.value.length}', +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 12, +// // ), +// // ), +// // ), +// // ), +// // ], +// // ).toList(), +// // ), +// // ], +// // ), +// // )); +// // }); +// // }, +// // child: Stack( +// // children: [ +// // Column( +// // children: [ +// // const Padding(padding: EdgeInsets.symmetric(vertical: 4)), +// // Align( +// // alignment: Alignment.centerLeft, +// // child: Text( +// // sessionName.value, +// // overflow: TextOverflow.ellipsis, +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.w600, +// // color: Colors.white, +// // ), +// // ), +// // ), +// // ), +// // const Padding(padding: EdgeInsets.symmetric(vertical: 5)), +// // Align( +// // alignment: Alignment.centerLeft, +// // child: Text( +// // "Participants: ${users.value.length}", +// // style: GoogleFonts.lato( +// // textStyle: const TextStyle( +// // fontSize: 14, +// // fontWeight: FontWeight.w600, +// // color: Colors.white, +// // ), +// // ), +// // ), +// // ) +// // ], +// // ), +// // Container( +// // alignment: Alignment.centerRight, +// // child: Image.asset( +// // "assets/icons/unlocked@2x.png", +// // height: 22, +// // )), +// // ], +// // ), +// // ), +// ), +// TextButton( +// onPressed: (showLeaveOptions), +// child: Container( +// alignment: Alignment.topRight, +// margin: const EdgeInsets.only(top: 16, right: 8), +// padding: const EdgeInsets.only(top: 5, bottom: 5, left: 16, right: 16), +// height: 28, +// decoration: BoxDecoration( +// borderRadius: const BorderRadius.all(Radius.circular(20.0)), +// color: buttonBackgroundColor, +// ), +// child: const Text( +// "LEAVE", +// style: TextStyle( +// fontSize: 14, +// fontWeight: FontWeight.bold, +// color: Color(0xFFE02828), +// ), +// ), +// )), +// ], +// ), +// Align( +// alignment: Alignment.centerRight, +// child: FractionallySizedBox( +// widthFactor: 0.2, +// heightFactor: 0.6, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// IconButton( +// onPressed: onPressAudio, +// icon: isMuted.value ? Image.asset("assets/images/png/zoom/unmute@2x.png") : Image.asset("assets/images/png/zoom/mute@2x.png"), +// iconSize: circleButtonSize, +// tooltip: isMuted.value == true ? "Unmute" : "Mute", +// ), +// IconButton( +// onPressed: onPressShare, +// icon: isSharing.value ? Image.asset("assets/images/png/zoom/share-off@2x.png") : Image.asset("assets/images/png/zoom/share-on@2x.png"), +// iconSize: circleButtonSize, +// ), +// IconButton( +// onPressed: onPressVideo, +// iconSize: circleButtonSize, +// icon: isVideoOn.value ? Image.asset("assets/images/png/zoom/video-off@2x.png") : Image.asset("assets/images/png/zoom/video-on@2x.png"), +// ), +// Column( +// children: [ +// IconButton( +// onPressed: () async { +// onPressCameraList(); +// }, +// icon: Icon(Icons.cameraswitch, color: Colors.white), +// color: Colors.white, +// iconSize: 40.h, +// ), +// "Switch Camera".toText12(color: AppColors.whiteColor, isCenter: true, isBold: true) +// ], +// ), +// ], +// ), +// )), +// Container( +// margin: const EdgeInsets.only(left: 16, right: 16, bottom: 40, top: 10), +// alignment: Alignment.bottomCenter, +// child: SizedBox( +// height: MediaQuery.of(context).viewInsets.bottom == 0 ? 65 : MediaQuery.of(context).viewInsets.bottom + 18, +// child: TextField( +// maxLines: 1, +// textAlign: TextAlign.left, +// style: TextStyle(color: chatTextColor), +// cursorColor: chatTextColor, +// textAlignVertical: TextAlignVertical.center, +// controller: chatMessageController, +// decoration: InputDecoration( +// contentPadding: const EdgeInsets.only(left: 16, top: 10, bottom: 10, right: 16), +// enabledBorder: OutlineInputBorder( +// borderSide: BorderSide(width: 1, color: chatTextColor), //<-- SEE HERE +// ), +// hintText: 'Type your message here...', +// hintStyle: TextStyle( +// fontSize: 14.0, +// color: chatTextColor, +// ), +// ), +// onSubmitted: (String str) { +// sendChatMessage(str); +// }, +// ), +// ), +// ), +// Container( +// alignment: Alignment.bottomLeft, +// margin: const EdgeInsets.only(bottom: 120), +// child: smallView, +// ), +// // CommentList(zoom: zoom, eventListener: eventListener), +// changeNamePopup, +// ], +// )), +// ], +// )); +// } +// } +// +// class CallArguments { +// final bool isJoin; +// final String sessionName; +// final String sessionPwd; +// final String displayName; +// final String sessionIdleTimeoutMins; +// final String role; +// final int callType; +// +// CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin, this.callType); +// } +// +// class JoinArguments { +// final bool isJoin; +// final String sessionName; +// final String sessionPwd; +// final String displayName; +// final String sessionTimeout; +// final String roleType; +// +// JoinArguments(this.isJoin, this.sessionName, this.sessionPwd, this.displayName, this.sessionTimeout, this.roleType); +// } diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart index 78045b5..9fd4b1a 100644 --- a/lib/routes/app_routes.dart +++ b/lib/routes/app_routes.dart @@ -73,7 +73,7 @@ class AppRoutes { register: (context) => RegisterNew(), registerStepTwo: (context) => RegisterNewStep2(), medicalFilePage: (context) => MedicalFilePage(), - zoomCallPage: (context) => CallScreen(), + zoomCallPage: (context) => MedicalFilePage(), eReferralPage: (context) => NewReferralPage(), comprehensiveCheckupPage: (context) => ComprehensiveCheckupPage(), homeHealthCarePage: (context) => HhcProceduresPage(), diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index fd154c6..e978f29 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -5,6 +5,10 @@ import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:timezone/data/latest_all.dart' as tz; import 'package:timezone/timezone.dart' as tz show TZDateTime, local, setLocalLocation, getLocation; +///it will be used to not call init every time it has the live activity notification channel created +///will stop the calling reduntant code again and again +bool isNotificationChannelCreatedForLiveActivity = false; + /// Abstract class defining the notification service interface abstract class NotificationService { /// Initialize the notification service diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 043eefd..5a07123 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_callkit_incoming/entities/call_event.dart'; import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart'; -import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; +// import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; import 'package:get_it/get_it.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; @@ -50,10 +50,10 @@ class _SplashScreenState extends State { bool isAppOpenedFromCall = getIt.get().getBool(key: CacheConst.isAppOpenedFromCall) ?? false; // Initialize NotificationService using dependency injection - final notificationService = getIt.get(); - await notificationService.initialize(onNotificationClick: (payload) { - // Handle notification click here - }); + // final notificationService = getIt.get(); + // await notificationService.initialize(onNotificationClick: (payload) { + // // Handle notification click here + // }); if (isAppOpenedFromCall) { navigateToTeleConsult(); @@ -67,12 +67,12 @@ class _SplashScreenState extends State { } } }); - var zoom = ZoomVideoSdk(); - InitConfig initConfig = InitConfig( - domain: "zoom.us", - enableLog: false, - ); - zoom.initSdk(initConfig); + // var zoom = ZoomVideoSdk(); + // InitConfig initConfig = InitConfig( + // domain: "zoom.us", + // enableLog: false, + // ); + // zoom.initSdk(initConfig); } navigateToTeleConsult() async { @@ -84,14 +84,14 @@ class _SplashScreenState extends State { Navigator.of(GetIt.instance().navigatorKey.currentContext!) .pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation()))); - Navigator.pushReplacementNamed( - // context, - GetIt.instance().navigatorKey.currentContext!, - AppRoutes.zoomCallPage, - // arguments: CallArguments(appointmentID, "111", "Patient", "40", "1", true, 1), - arguments: CallArguments(roomID, "123", "Patient", "40", "0", true, 1), - // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), - ); + // Navigator.pushReplacementNamed( + // // context, + // GetIt.instance().navigatorKey.currentContext!, + // AppRoutes.zoomCallPage, + // // arguments: CallArguments(appointmentID, "111", "Patient", "40", "1", true, 1), + // arguments: CallArguments(roomID, "123", "Patient", "40", "0", true, 1), + // // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), + // ); } Future listenerEvent() async { diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 503fb43..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,1980 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _flutterfire_internals: - dependency: transitive - description: - name: _flutterfire_internals - sha256: ff0a84a2734d9e1089f8aedd5c0af0061b82fb94e95260d943404e0ef2134b11 - url: "https://pub.dev" - source: hosted - version: "1.3.59" - adaptive_number: - dependency: transitive - description: - name: adaptive_number - sha256: "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - amazon_payfort: - dependency: "direct main" - description: - name: amazon_payfort - sha256: "7732df0764aecbb814f910db36d0dca2f696e7e5ea380b49aa3ec62965768b33" - url: "https://pub.dev" - source: hosted - version: "1.1.4" - archive: - dependency: transitive - description: - name: archive - sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" - url: "https://pub.dev" - source: hosted - version: "4.0.7" - args: - dependency: transitive - description: - name: args - sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.dev" - source: hosted - version: "2.7.0" - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - audio_session: - dependency: transitive - description: - name: audio_session - sha256: "8f96a7fecbb718cb093070f868b4cdcb8a9b1053dce342ff8ab2fde10eb9afb7" - url: "https://pub.dev" - source: hosted - version: "0.2.2" - auto_size_text: - dependency: "direct main" - description: - name: auto_size_text - sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - barcode_scan2: - dependency: "direct main" - description: - name: barcode_scan2 - url: "https://pub.dev" - source: hosted - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916" - url: "https://pub.dev" - source: hosted - version: "3.4.1" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" - url: "https://pub.dev" - source: hosted - version: "4.1.1" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - carp_serializable: - dependency: transitive - description: - name: carp_serializable - sha256: f039f8ea22e9437aef13fe7e9743c3761c76d401288dcb702eadd273c3e4dcef - url: "https://pub.dev" - source: hosted - version: "2.0.1" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - chewie: - dependency: transitive - description: - name: chewie - sha256: "44bcfc5f0dfd1de290c87c9d86a61308b3282a70b63435d5557cfd60f54a69ca" - url: "https://pub.dev" - source: hosted - version: "1.13.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - connectivity_plus: - dependency: "direct main" - description: - name: connectivity_plus - sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec - url: "https://pub.dev" - source: hosted - version: "6.1.5" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - convert: - dependency: transitive - description: - name: convert - sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 - url: "https://pub.dev" - source: hosted - version: "3.1.2" - cross_file: - dependency: transitive - description: - name: cross_file - url: "https://pub.dev" - source: hosted - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dev" - source: hosted - csslib: - dependency: transitive - description: - name: csslib - sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - dart_jsonwebtoken: - dependency: "direct main" - description: - name: dart_jsonwebtoken - sha256: "0de65691c1d736e9459f22f654ddd6fd8368a271d4e41aa07e53e6301eff5075" - url: "https://pub.dev" - source: hosted - version: "3.3.1" - dartz: - dependency: "direct main" - description: - name: dartz - sha256: e6acf34ad2e31b1eb00948692468c30ab48ac8250e0f0df661e29f12dd252168 - url: "https://pub.dev" - source: hosted - version: "0.10.1" - dbus: - dependency: transitive - description: - name: dbus - sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - device_calendar: - dependency: "direct main" - description: - path: "." - ref: HEAD - resolved-ref: "5ea5ed9e2bb499c0633383b53103f2920b634755" - url: "https://github.com/bardram/device_calendar" - source: git - version: "4.3.1" - device_calendar_plus: - dependency: "direct main" - description: - name: device_calendar_plus - sha256: "1da6ace56a748afc65b039e1f30243f1beeade833e533d0c909f3edda3f41ca2" - url: "https://pub.dev" - source: hosted - version: "0.3.1" - device_calendar_plus_android: - dependency: transitive - description: - name: device_calendar_plus_android - sha256: f66f363273e0b174fdb3f98030a8c67ae9e9dfcb6122e4ca842881f976313db0 - url: "https://pub.dev" - source: hosted - version: "0.3.1" - device_calendar_plus_ios: - dependency: transitive - description: - name: device_calendar_plus_ios - sha256: c9b234091d3edc78871ed524077c262ce66217b960b7942ef071032e47b60fa8 - url: "https://pub.dev" - source: hosted - version: "0.3.1" - device_calendar_plus_platform_interface: - dependency: transitive - description: - name: device_calendar_plus_platform_interface - sha256: fb4d893d04b10ab00bc175be8a374aad08a7c4ad7d763c7ff48036d76be7604b - url: "https://pub.dev" - source: hosted - version: "0.3.1" - device_info_plus: - dependency: "direct main" - description: - name: device_info_plus - sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a" - url: "https://pub.dev" - source: hosted - version: "11.5.0" - device_info_plus_platform_interface: - dependency: transitive - description: - name: device_info_plus_platform_interface - sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f - url: "https://pub.dev" - source: hosted - version: "7.0.3" - dropdown_search: - dependency: "direct main" - description: - name: dropdown_search - sha256: c29b3e5147a82a06a4a08b3b574c51cb48cc17ad89893d53ee72a6f86643622e - url: "https://pub.dev" - source: hosted - version: "6.0.2" - easy_localization: - dependency: "direct main" - description: - name: easy_localization - sha256: "2ccdf9db8fe4d9c5a75c122e6275674508fd0f0d49c827354967b8afcc56bbed" - url: "https://pub.dev" - source: hosted - version: "3.0.8" - easy_logger: - dependency: transitive - description: - name: easy_logger - sha256: c764a6e024846f33405a2342caf91c62e357c24b02c04dbc712ef232bf30ffb7 - url: "https://pub.dev" - source: hosted - version: "0.0.2" - ed25519_edwards: - dependency: transitive - description: - name: ed25519_edwards - sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd" - url: "https://pub.dev" - source: hosted - version: "0.3.1" - equatable: - dependency: "direct main" - description: - name: equatable - sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" - url: "https://pub.dev" - source: hosted - version: "2.0.7" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - ffi: - dependency: transitive - description: - name: ffi - sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - file_picker: - dependency: "direct main" - description: - name: file_picker - url: "https://pub.dev" - source: hosted - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - url: "https://pub.dev" - source: hosted - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - url: "https://pub.dev" - source: hosted - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - url: "https://pub.dev" - source: hosted - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - url: "https://pub.dev" - source: hosted - firebase_analytics: - dependency: "direct main" - description: - name: firebase_analytics - sha256: "4f85b161772e1d54a66893ef131c0a44bd9e552efa78b33d5f4f60d2caa5c8a3" - url: "https://pub.dev" - source: hosted - version: "11.6.0" - firebase_analytics_platform_interface: - dependency: transitive - description: - name: firebase_analytics_platform_interface - sha256: a44b6d1155ed5cae7641e3de7163111cfd9f6f6c954ca916dc6a3bdfa86bf845 - url: "https://pub.dev" - source: hosted - version: "4.4.3" - firebase_analytics_web: - dependency: transitive - description: - name: firebase_analytics_web - sha256: c7d1ed1f86ae64215757518af5576ff88341c8ce5741988c05cc3b2e07b0b273 - url: "https://pub.dev" - source: hosted - version: "0.5.10+16" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - sha256: "7be63a3f841fc9663342f7f3a011a42aef6a61066943c90b1c434d79d5c995c5" - url: "https://pub.dev" - source: hosted - version: "3.15.2" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - url: "https://pub.dev" - source: hosted - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - sha256: "0ed0dc292e8f9ac50992e2394e9d336a0275b6ae400d64163fdf0a8a8b556c37" - url: "https://pub.dev" - source: hosted - version: "2.24.1" - firebase_messaging: - dependency: "direct main" - description: - name: firebase_messaging - sha256: "60be38574f8b5658e2f22b7e311ff2064bea835c248424a383783464e8e02fcc" - url: "https://pub.dev" - source: hosted - version: "15.2.10" - firebase_messaging_platform_interface: - dependency: transitive - description: - name: firebase_messaging_platform_interface - sha256: "685e1771b3d1f9c8502771ccc9f91485b376ffe16d553533f335b9183ea99754" - url: "https://pub.dev" - source: hosted - version: "4.6.10" - firebase_messaging_web: - dependency: transitive - description: - name: firebase_messaging_web - sha256: "0d1be17bc89ed3ff5001789c92df678b2e963a51b6fa2bdb467532cc9dbed390" - url: "https://pub.dev" - source: hosted - version: "3.10.10" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be - url: "https://pub.dev" - source: hosted - version: "1.1.1" - fl_chart: - dependency: "direct main" - description: - name: fl_chart - sha256: "577aeac8ca414c25333334d7c4bb246775234c0e44b38b10a82b559dd4d764e7" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_app_group_directory: - dependency: transitive - description: - name: flutter_app_group_directory - sha256: "680ef9b2dee84c237cd7bb7fc78bc45867b32556a8a5f0de61278078b9fefd05" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" - url: "https://pub.dev" - source: hosted - version: "3.4.1" - description: - url: "https://pub.dev" - source: hosted - flutter_inappwebview: - dependency: "direct main" - description: - name: flutter_inappwebview - sha256: "80092d13d3e29b6227e25b67973c67c7210bd5e35c4b747ca908e31eb71a46d5" - url: "https://pub.dev" - source: hosted - version: "6.1.5" - flutter_inappwebview_android: - dependency: transitive - description: - name: flutter_inappwebview_android - sha256: "62557c15a5c2db5d195cb3892aab74fcaec266d7b86d59a6f0027abd672cddba" - url: "https://pub.dev" - source: hosted - version: "1.1.3" - flutter_inappwebview_internal_annotations: - dependency: transitive - description: - name: flutter_inappwebview_internal_annotations - sha256: "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - flutter_inappwebview_ios: - dependency: transitive - description: - name: flutter_inappwebview_ios - sha256: "5818cf9b26cf0cbb0f62ff50772217d41ea8d3d9cc00279c45f8aabaa1b4025d" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - flutter_inappwebview_macos: - dependency: transitive - description: - name: flutter_inappwebview_macos - sha256: c1fbb86af1a3738e3541364d7d1866315ffb0468a1a77e34198c9be571287da1 - url: "https://pub.dev" - source: hosted - version: "1.1.2" - flutter_inappwebview_platform_interface: - dependency: transitive - description: - name: flutter_inappwebview_platform_interface - sha256: cf5323e194096b6ede7a1ca808c3e0a078e4b33cc3f6338977d75b4024ba2500 - url: "https://pub.dev" - source: hosted - version: "1.3.0+1" - flutter_inappwebview_web: - dependency: transitive - description: - name: flutter_inappwebview_web - sha256: "55f89c83b0a0d3b7893306b3bb545ba4770a4df018204917148ebb42dc14a598" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - flutter_inappwebview_windows: - dependency: transitive - description: - name: flutter_inappwebview_windows - sha256: "8b4d3a46078a2cdc636c4a3d10d10f2a16882f6be607962dbfff8874d1642055" - url: "https://pub.dev" - source: hosted - version: "0.6.0" - flutter_ios_voip_kit_karmm: - dependency: "direct main" - description: - name: flutter_ios_voip_kit_karmm - sha256: "31a445d78aacacdf128a0354efb9f4e424285dfe4c0af3ea872e64f03e6f6bfc" - url: "https://pub.dev" - source: hosted - version: "0.8.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - flutter_local_notifications: - dependency: "direct main" - description: - name: flutter_local_notifications - url: "https://pub.dev" - source: hosted - flutter_local_notifications_linux: - dependency: transitive - description: - name: flutter_local_notifications_linux - sha256: e3c277b2daab8e36ac5a6820536668d07e83851aeeb79c446e525a70710770a5 - url: "https://pub.dev" - source: hosted - version: "6.0.0" - flutter_local_notifications_platform_interface: - dependency: transitive - description: - name: flutter_local_notifications_platform_interface - sha256: "277d25d960c15674ce78ca97f57d0bae2ee401c844b6ac80fcd972a9c99d09fe" - url: "https://pub.dev" - source: hosted - version: "9.1.0" - flutter_local_notifications_windows: - dependency: transitive - description: - name: flutter_local_notifications_windows - sha256: "8d658f0d367c48bd420e7cf2d26655e2d1130147bca1eea917e576ca76668aaf" - url: "https://pub.dev" - source: hosted - version: "1.0.3" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_nfc_kit: - dependency: "direct main" - description: - name: flutter_nfc_kit - url: "https://pub.dev" - source: hosted - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - url: "https://pub.dev" - source: hosted - flutter_rating_bar: - dependency: "direct main" - description: - name: flutter_rating_bar - sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 - url: "https://pub.dev" - source: hosted - version: "4.0.1" - flutter_staggered_animations: - dependency: "direct main" - description: - name: flutter_staggered_animations - sha256: "81d3c816c9bb0dca9e8a5d5454610e21ffb068aedb2bde49d2f8d04f75538351" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - flutter_svg: - dependency: "direct main" - description: - name: flutter_svg - url: "https://pub.dev" - source: hosted - flutter_swiper_view: - dependency: "direct main" - description: - name: flutter_swiper_view - sha256: "2a165b259e8a4c49d4da5626b967ed42a73dac2d075bd9e266ad8d23b9f01879" - url: "https://pub.dev" - source: hosted - version: "1.1.8" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - flutter_widget_from_html: - dependency: "direct main" - description: - name: flutter_widget_from_html - sha256: "7f1daefcd3009c43c7e7fb37501e6bb752d79aa7bfad0085fb0444da14e89bd0" - url: "https://pub.dev" - source: hosted - version: "0.17.1" - flutter_widget_from_html_core: - dependency: transitive - description: - name: flutter_widget_from_html_core - sha256: "1120ee6ed3509ceff2d55aa6c6cbc7b6b1291434422de2411b5a59364dd6ff03" - url: "https://pub.dev" - source: hosted - version: "0.17.0" - flutter_zoom_videosdk: - dependency: "direct main" - description: - name: flutter_zoom_videosdk - sha256: "22731485fe48472a34ff0c7e787a382f5e1ec662fd89186e58e760974fc2a0cb" - url: "https://pub.dev" - source: hosted - version: "2.3.0" - fluttertoast: - dependency: "direct main" - description: - name: fluttertoast - sha256: "90778fe0497fe3a09166e8cf2e0867310ff434b794526589e77ec03cf08ba8e8" - url: "https://pub.dev" - source: hosted - version: "8.2.14" - fwfh_cached_network_image: - dependency: transitive - description: - name: fwfh_cached_network_image - sha256: "484cb5f8047f02cfac0654fca5832bfa91bb715fd7fc651c04eb7454187c4af8" - url: "https://pub.dev" - source: hosted - version: "0.16.1" - fwfh_chewie: - dependency: transitive - description: - name: fwfh_chewie - sha256: ae74fc26798b0e74f3983f7b851e74c63b9eeb2d3015ecd4b829096b2c3f8818 - url: "https://pub.dev" - source: hosted - version: "0.16.1" - fwfh_just_audio: - dependency: transitive - description: - name: fwfh_just_audio - sha256: dfd622a0dfe049ac647423a2a8afa7f057d9b2b93d92710b624e3d370b1ac69a - url: "https://pub.dev" - source: hosted - version: "0.17.0" - fwfh_svg: - dependency: transitive - description: - name: fwfh_svg - sha256: "2e6bb241179eeeb1a7941e05c8c923b05d332d36a9085233e7bf110ea7deb915" - url: "https://pub.dev" - source: hosted - version: "0.16.1" - fwfh_url_launcher: - dependency: transitive - description: - name: fwfh_url_launcher - sha256: c38aa8fb373fda3a89b951fa260b539f623f6edb45eee7874cb8b492471af881 - url: "https://pub.dev" - source: hosted - version: "0.16.1" - fwfh_webview: - dependency: transitive - description: - name: fwfh_webview - sha256: f71b0aa16e15d82f3c017f33560201ff5ae04e91e970cab5d12d3bcf970b870c - url: "https://pub.dev" - source: hosted - version: "0.15.6" - geoclue: - dependency: transitive - description: - name: geoclue - sha256: c2a998c77474fc57aa00c6baa2928e58f4b267649057a1c76738656e9dbd2a7f - url: "https://pub.dev" - source: hosted - version: "0.1.1" - geolocator: - dependency: "direct main" - description: - name: geolocator - sha256: "79939537046c9025be47ec645f35c8090ecadb6fe98eba146a0d25e8c1357516" - url: "https://pub.dev" - source: hosted - version: "14.0.2" - geolocator_android: - dependency: transitive - description: - name: geolocator_android - sha256: "179c3cb66dfa674fc9ccbf2be872a02658724d1c067634e2c427cf6df7df901a" - url: "https://pub.dev" - source: hosted - version: "5.0.2" - geolocator_apple: - dependency: transitive - description: - name: geolocator_apple - sha256: dbdd8789d5aaf14cf69f74d4925ad1336b4433a6efdf2fce91e8955dc921bf22 - url: "https://pub.dev" - source: hosted - version: "2.3.13" - geolocator_linux: - dependency: transitive - description: - name: geolocator_linux - sha256: c4e966f0a7a87e70049eac7a2617f9e16fd4c585a26e4330bdfc3a71e6a721f3 - url: "https://pub.dev" - source: hosted - version: "0.2.3" - geolocator_platform_interface: - dependency: transitive - description: - name: geolocator_platform_interface - sha256: "30cb64f0b9adcc0fb36f628b4ebf4f731a2961a0ebd849f4b56200205056fe67" - url: "https://pub.dev" - source: hosted - version: "4.2.6" - geolocator_web: - dependency: transitive - description: - name: geolocator_web - sha256: b1ae9bdfd90f861fde8fd4f209c37b953d65e92823cb73c7dee1fa021b06f172 - url: "https://pub.dev" - source: hosted - version: "4.1.3" - geolocator_windows: - dependency: transitive - description: - name: geolocator_windows - sha256: "175435404d20278ffd220de83c2ca293b73db95eafbdc8131fe8609be1421eb6" - url: "https://pub.dev" - source: hosted - version: "0.2.5" - get_it: - dependency: "direct main" - description: - name: get_it - url: "https://pub.dev" - source: hosted - gms_check: - dependency: "direct main" - description: - name: gms_check - sha256: b3fc08fd41da233f9761f9981303346aa9778b4802e90ce9bd8122674fcca6f0 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - google_api_availability: - dependency: "direct main" - description: - name: google_api_availability - sha256: "2ffdc91e1e0cf4e7974fef6c2988a24cefa81f03526ff04b694df6dc0fcbca03" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - google_api_availability_android: - dependency: transitive - description: - name: google_api_availability_android - sha256: "4794147f43a8f3eee6b514d3ae30dbe6f7b9048cae8cd2a74cb4055cd28d74a8" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - google_api_availability_platform_interface: - dependency: transitive - description: - name: google_api_availability_platform_interface - sha256: "65b7da62fe5b582bb3d508628ad827d36d890710ea274766a992a56fa5420da6" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - google_maps: - dependency: transitive - description: - name: google_maps - sha256: "5d410c32112d7c6eb7858d359275b2aa04778eed3e36c745aeae905fb2fa6468" - url: "https://pub.dev" - source: hosted - version: "8.2.0" - google_maps_flutter: - dependency: "direct main" - description: - name: google_maps_flutter - url: "https://pub.dev" - source: hosted - google_maps_flutter_android: - dependency: transitive - description: - name: google_maps_flutter_android - url: "https://pub.dev" - source: hosted - google_maps_flutter_ios: - dependency: transitive - description: - name: google_maps_flutter_ios - url: "https://pub.dev" - source: hosted - google_maps_flutter_platform_interface: - dependency: transitive - description: - name: google_maps_flutter_platform_interface - url: "https://pub.dev" - source: hosted - google_maps_flutter_web: - dependency: transitive - description: - name: google_maps_flutter_web - url: "https://pub.dev" - source: hosted - gsettings: - dependency: transitive - description: - name: gsettings - sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c" - url: "https://pub.dev" - source: hosted - version: "0.2.8" - health: - dependency: "direct main" - description: - name: health - sha256: "320633022fb2423178baa66508001c4ca5aee5806ffa2c913e66488081e9fd47" - url: "https://pub.dev" - source: hosted - version: "13.1.4" - hijri_gregorian_calendar: - dependency: "direct main" - description: - name: hijri_gregorian_calendar - sha256: aecdbe3c9365fac55f17b5e1f24086a81999b1e5c9372cb08888bfbe61e07fa1 - url: "https://pub.dev" - source: hosted - version: "0.1.1" - html: - dependency: transitive - description: - name: html - sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" - url: "https://pub.dev" - source: hosted - version: "0.15.6" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dev" - source: hosted - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - huawei_location: - dependency: "direct main" - description: - name: huawei_location - url: "https://pub.dev" - source: hosted - huawei_map: - dependency: "direct main" - description: - path: flutter-hms-map - ref: HEAD - resolved-ref: "9a16541e4016e3bf58a2571e6aa658a4751af399" - url: "https://github.com/fleoparra/hms-flutter-plugin.git" - source: git - version: "6.11.2+303" - image: - dependency: transitive - description: - name: image - sha256: "51555e36056541237b15b57afc31a0f53d4f9aefd9bd00873a6dc0090e54e332" - url: "https://pub.dev" - source: hosted - version: "4.6.0" - image_picker: - dependency: "direct main" - description: - name: image_picker - url: "https://pub.dev" - source: hosted - image_picker_android: - dependency: transitive - description: - name: image_picker_android - url: "https://pub.dev" - source: hosted - image_picker_for_web: - dependency: transitive - description: - name: image_picker_for_web - url: "https://pub.dev" - source: hosted - image_picker_ios: - dependency: transitive - description: - name: image_picker_ios - url: "https://pub.dev" - source: hosted - image_picker_linux: - dependency: transitive - description: - name: image_picker_linux - sha256: "1f81c5f2046b9ab724f85523e4af65be1d47b038160a8c8deed909762c308ed4" - url: "https://pub.dev" - source: hosted - version: "0.2.2" - image_picker_macos: - dependency: transitive - description: - name: image_picker_macos - url: "https://pub.dev" - source: hosted - image_picker_platform_interface: - dependency: transitive - description: - name: image_picker_platform_interface - url: "https://pub.dev" - source: hosted - image_picker_windows: - dependency: transitive - description: - name: image_picker_windows - sha256: d248c86554a72b5495a31c56f060cf73a41c7ff541689327b1a7dbccc33adfae - url: "https://pub.dev" - source: hosted - version: "0.2.2" - intl: - dependency: "direct main" - description: - name: intl - sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.dev" - source: hosted - version: "0.20.2" - jiffy: - dependency: "direct main" - description: - name: jiffy - url: "https://pub.dev" - source: hosted - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - just_audio: - dependency: "direct main" - description: - name: just_audio - sha256: "9694e4734f515f2a052493d1d7e0d6de219ee0427c7c29492e246ff32a219908" - url: "https://pub.dev" - source: hosted - version: "0.10.5" - just_audio_platform_interface: - dependency: transitive - description: - name: just_audio_platform_interface - sha256: "2532c8d6702528824445921c5ff10548b518b13f808c2e34c2fd54793b999a6a" - url: "https://pub.dev" - source: hosted - version: "4.6.0" - just_audio_web: - dependency: transitive - description: - name: just_audio_web - sha256: "6ba8a2a7e87d57d32f0f7b42856ade3d6a9fbe0f1a11fabae0a4f00bb73f0663" - url: "https://pub.dev" - source: hosted - version: "0.4.16" - keyboard_actions: - dependency: "direct main" - description: - name: keyboard_actions - url: "https://pub.dev" - source: hosted - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" - url: "https://pub.dev" - source: hosted - version: "11.0.2" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" - url: "https://pub.dev" - source: hosted - version: "3.0.10" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - lints: - dependency: transitive - description: - name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 - url: "https://pub.dev" - source: hosted - version: "5.1.1" - live_activities: - dependency: "direct main" - description: - name: live_activities - sha256: d1bbc466ddb0c9eea11d6e3e34673319b5b46bcad03a4997e55769261f643601 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - local_auth: - dependency: "direct main" - description: - name: local_auth - sha256: "434d854cf478f17f12ab29a76a02b3067f86a63a6d6c4eb8fbfdcfe4879c1b7b" - url: "https://pub.dev" - source: hosted - version: "2.3.0" - local_auth_android: - dependency: transitive - description: - name: local_auth_android - url: "https://pub.dev" - source: hosted - local_auth_darwin: - dependency: transitive - description: - name: local_auth_darwin - sha256: "699873970067a40ef2f2c09b4c72eb1cfef64224ef041b3df9fdc5c4c1f91f49" - url: "https://pub.dev" - source: hosted - version: "1.6.1" - local_auth_platform_interface: - dependency: transitive - description: - name: local_auth_platform_interface - url: "https://pub.dev" - source: hosted - local_auth_windows: - dependency: transitive - description: - name: local_auth_windows - sha256: bc4e66a29b0fdf751aafbec923b5bed7ad6ed3614875d8151afe2578520b2ab5 - url: "https://pub.dev" - source: hosted - version: "1.0.11" - location: - dependency: "direct main" - description: - name: location - sha256: b080053c181c7d152c43dd576eec6436c40e25f326933051c330da563ddd5333 - url: "https://pub.dev" - source: hosted - version: "8.0.1" - location_platform_interface: - dependency: transitive - description: - name: location_platform_interface - sha256: ca8700bb3f6b1e8b2afbd86bd78b2280d116c613ca7bfa1d4d7b64eba357d749 - url: "https://pub.dev" - source: hosted - version: "6.0.1" - location_web: - dependency: transitive - description: - name: location_web - sha256: b8e3add5efe0d65c5e692b7a135d80a4015c580d3ea646fa71973e97668dd868 - url: "https://pub.dev" - source: hosted - version: "6.0.1" - logger: - dependency: "direct main" - description: - name: logger - url: "https://pub.dev" - source: hosted - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - lottie: - dependency: "direct main" - description: - name: lottie - sha256: "8ae0be46dbd9e19641791dc12ee480d34e1fd3f84c749adc05f3ad9342b71b95" - url: "https://pub.dev" - source: hosted - version: "3.3.2" - manage_calendar_events: - dependency: "direct main" - description: - name: manage_calendar_events - sha256: f17600fcb7dc7047120c185993045e493d686930237b4e3c2689c26a64513d66 - url: "https://pub.dev" - source: hosted - version: "2.0.3" - maps_launcher: - dependency: "direct main" - description: - name: maps_launcher - sha256: dac4c609720211fa6336b5903d917fe45e545c6b5665978efc3db2a3f436b1ae - url: "https://pub.dev" - source: hosted - version: "3.0.0+1" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - ndef: - dependency: transitive - description: - name: ndef - url: "https://pub.dev" - source: hosted - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - network_info_plus: - dependency: "direct main" - description: - name: network_info_plus - sha256: f926b2ba86aa0086a0dfbb9e5072089bc213d854135c1712f1d29fc89ba3c877 - url: "https://pub.dev" - source: hosted - version: "6.1.4" - network_info_plus_platform_interface: - dependency: transitive - description: - name: network_info_plus_platform_interface - sha256: "7e7496a8a9d8136859b8881affc613c4a21304afeb6c324bcefc4bd0aff6b94b" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - nm: - dependency: transitive - description: - name: nm - sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - octo_image: - dependency: transitive - description: - name: octo_image - sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - open_filex: - dependency: "direct main" - description: - name: open_filex - sha256: "9976da61b6a72302cf3b1efbce259200cd40232643a467aac7370addf94d6900" - url: "https://pub.dev" - source: hosted - version: "4.7.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968" - url: "https://pub.dev" - source: hosted - version: "8.3.1" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" - url: "https://pub.dev" - source: hosted - version: "2.1.5" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dev" - source: hosted - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - url: "https://pub.dev" - source: hosted - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - permission_handler: - dependency: "direct main" - description: - name: permission_handler - sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1 - url: "https://pub.dev" - source: hosted - version: "12.0.1" - permission_handler_android: - dependency: transitive - description: - name: permission_handler_android - sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6" - url: "https://pub.dev" - source: hosted - version: "13.0.1" - permission_handler_apple: - dependency: transitive - description: - name: permission_handler_apple - sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 - url: "https://pub.dev" - source: hosted - version: "9.4.7" - permission_handler_html: - dependency: transitive - description: - name: permission_handler_html - sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" - url: "https://pub.dev" - source: hosted - version: "0.1.3+5" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 - url: "https://pub.dev" - source: hosted - version: "4.3.0" - permission_handler_windows: - dependency: transitive - description: - name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" - url: "https://pub.dev" - source: hosted - version: "0.2.1" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" - url: "https://pub.dev" - source: hosted - version: "7.0.1" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.dev" - source: hosted - version: "3.1.6" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5" - url: "https://pub.dev" - source: hosted - version: "4.0.0" - posix: - dependency: transitive - description: - name: posix - sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" - url: "https://pub.dev" - source: hosted - version: "6.0.3" - protobuf: - dependency: transitive - description: - name: protobuf - url: "https://pub.dev" - source: hosted - provider: - dependency: "direct main" - description: - name: provider - sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" - url: "https://pub.dev" - source: hosted - version: "6.1.5+1" - quiver: - dependency: transitive - description: - name: quiver - sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - rrule: - dependency: transitive - description: - name: rrule - sha256: b7425410c594d4b6717c9f17ec8ef83c9d1ff2e513c428a135b5924fc2e8e045 - url: "https://pub.dev" - source: hosted - version: "0.2.17" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" - url: "https://pub.dev" - source: hosted - version: "0.28.0" - sanitize_html: - dependency: transitive - description: - name: sanitize_html - sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - scrollable_positioned_list: - dependency: "direct main" - description: - name: scrollable_positioned_list - sha256: "1b54d5f1329a1e263269abc9e2543d90806131aa14fe7c6062a8054d57249287" - url: "https://pub.dev" - source: hosted - version: "0.3.8" - share_plus: - dependency: "direct main" - description: - name: share_plus - sha256: d7dc0630a923883c6328ca31b89aa682bacbf2f8304162d29f7c6aaff03a27a1 - url: "https://pub.dev" - source: hosted - version: "11.1.0" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - sha256: "88023e53a13429bd65d8e85e11a9b484f49d4c190abbd96c7932b74d6927cc9a" - url: "https://pub.dev" - source: hosted - version: "6.1.0" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" - url: "https://pub.dev" - source: hosted - version: "2.5.3" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - url: "https://pub.dev" - source: hosted - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - url: "https://pub.dev" - source: hosted - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 - url: "https://pub.dev" - source: hosted - version: "2.4.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shimmer: - dependency: "direct main" - description: - name: shimmer - sha256: "5f88c883a22e9f9f299e5ba0e4f7e6054857224976a5d9f839d4ebdc94a14ac9" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - sizer: - dependency: "direct main" - description: - name: sizer - sha256: "9963c89e4d30d7c2108de3eafc0a7e6a4a8009799376ea6be5ef0a9ad87cfbad" - url: "https://pub.dev" - source: hosted - version: "3.1.3" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - smooth_corner: - dependency: "direct main" - description: - name: smooth_corner - sha256: "112d7331f82ead81ec870c5d1eb0624f2e7e367eccd166c2fffe4c11d4f87c4f" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - sms_otp_auto_verify: - dependency: "direct main" - description: - name: sms_otp_auto_verify - sha256: ee02af0d6b81d386ef70d7d0317a1929bc0b4a3a30a451284450bbcf6901ba1a - url: "https://pub.dev" - source: hosted - version: "2.2.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - sqflite: - dependency: transitive - description: - name: sqflite - sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - sqflite_android: - dependency: transitive - description: - name: sqflite_android - sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88 - url: "https://pub.dev" - source: hosted - version: "2.4.2+2" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6" - url: "https://pub.dev" - source: hosted - version: "2.5.6" - sqflite_darwin: - dependency: transitive - description: - name: sqflite_darwin - sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - sqflite_platform_interface: - dependency: transitive - description: - name: sqflite_platform_interface - sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 - url: "https://pub.dev" - source: hosted - version: "2.1.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - syncfusion_flutter_calendar: - dependency: "direct main" - description: - name: syncfusion_flutter_calendar - sha256: "8e8a4eef01d6a82ae2c17e76d497ff289ded274de014c9f471ffabc12d1e2e71" - url: "https://pub.dev" - source: hosted - version: "30.2.7" - syncfusion_flutter_core: - dependency: transitive - description: - name: syncfusion_flutter_core - sha256: bfd026c0f9822b49ff26fed11cd3334519acb6a6ad4b0c81d9cd18df6af1c4c0 - url: "https://pub.dev" - source: hosted - version: "30.2.7" - syncfusion_flutter_datepicker: - dependency: transitive - description: - name: syncfusion_flutter_datepicker - sha256: b5f35cc808e91b229d41613efe71dadab1549a35bfd493f922fc06ccc2fe908c - url: "https://pub.dev" - source: hosted - version: "30.2.7" - syncfusion_localizations: - dependency: transitive - description: - name: syncfusion_localizations - sha256: bb32b07879b4c1dee5d4c8ad1c57343a4fdae55d65a87f492727c11b68f23164 - url: "https://pub.dev" - source: hosted - version: "30.2.7" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 - url: "https://pub.dev" - source: hosted - version: "3.4.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" - url: "https://pub.dev" - source: hosted - version: "0.7.6" - time: - dependency: transitive - description: - name: time - url: "https://pub.dev" - source: hosted - timezone: - dependency: transitive - description: - name: timezone - sha256: dd14a3b83cfd7cb19e7888f1cbc20f258b8d71b54c06f79ac585f14093a287d1 - url: "https://pub.dev" - source: hosted - version: "0.10.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - universal_platform: - dependency: transitive - description: - name: universal_platform - sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 - url: "https://pub.dev" - source: hosted - version: "6.3.2" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - url: "https://pub.dev" - source: hosted - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - url: "https://pub.dev" - source: hosted - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - url: "https://pub.dev" - source: hosted - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - url: "https://pub.dev" - source: hosted - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - url: "https://pub.dev" - source: hosted - uuid: - dependency: "direct main" - description: - name: uuid - url: "https://pub.dev" - source: hosted - vector_graphics: - dependency: transitive - description: - name: vector_graphics - sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 - url: "https://pub.dev" - source: hosted - version: "1.1.19" - vector_graphics_codec: - dependency: transitive - description: - name: vector_graphics_codec - sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" - url: "https://pub.dev" - source: hosted - version: "1.1.13" - vector_graphics_compiler: - dependency: transitive - description: - name: vector_graphics_compiler - sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc - url: "https://pub.dev" - source: hosted - version: "1.1.19" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b - url: "https://pub.dev" - source: hosted - version: "2.2.0" - video_player: - dependency: transitive - description: - name: video_player - url: "https://pub.dev" - source: hosted - video_player_android: - dependency: transitive - description: - name: video_player_android - url: "https://pub.dev" - source: hosted - video_player_avfoundation: - dependency: transitive - description: - name: video_player_avfoundation - url: "https://pub.dev" - source: hosted - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - url: "https://pub.dev" - source: hosted - video_player_web: - dependency: transitive - description: - name: video_player_web - sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" - url: "https://pub.dev" - source: hosted - version: "15.0.2" - wakelock_plus: - dependency: transitive - description: - name: wakelock_plus - sha256: "61713aa82b7f85c21c9f4cd0a148abd75f38a74ec645fcb1e446f882c82fd09b" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - wakelock_plus_platform_interface: - dependency: transitive - description: - name: wakelock_plus_platform_interface - sha256: "036deb14cd62f558ca3b73006d52ce049fabcdcb2eddfe0bf0fe4e8a943b5cf2" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - web: - dependency: "direct main" - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - webview_flutter: - dependency: transitive - description: - name: webview_flutter - sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba - url: "https://pub.dev" - source: hosted - version: "4.13.0" - webview_flutter_android: - dependency: transitive - description: - name: webview_flutter_android - url: "https://pub.dev" - source: hosted - webview_flutter_platform_interface: - dependency: transitive - description: - name: webview_flutter_platform_interface - sha256: "63d26ee3aca7256a83ccb576a50272edd7cfc80573a4305caa98985feb493ee0" - url: "https://pub.dev" - source: hosted - version: "2.14.0" - webview_flutter_wkwebview: - dependency: transitive - description: - name: webview_flutter_wkwebview - url: "https://pub.dev" - source: hosted - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dev" - source: hosted - win32_registry: - dependency: transitive - description: - name: win32_registry - sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - xml: - dependency: transitive - description: - name: xml - sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" - url: "https://pub.dev" - source: hosted - version: "6.6.1" -sdks: - dart: ">=3.9.0 <4.0.0" - flutter: ">=3.35.0" diff --git a/pubspec.yaml b/pubspec.yaml index fa0e4a5..64f160b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -77,7 +77,7 @@ dependencies: amazon_payfort: ^1.1.4 network_info_plus: ^6.1.4 flutter_nfc_kit: ^3.6.0 - barcode_scan2: ^4.5.1 +# barcode_scan2: ^4.5.1 keyboard_actions: ^4.2.0 path_provider: ^2.0.8 open_filex: ^4.7.0