diff --git a/ios/Podfile b/ios/Podfile index e0283052..9ea6dc53 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -58,7 +58,7 @@ post_install do |installer| ## dart: PermissionGroup.notification 'PERMISSION_NOTIFICATIONS=1', ] - build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' + build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'i386 x86_64' build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' build_configuration.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' xcconfig_path = build_configuration.base_configuration_reference.real_path diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c1045afb..ccc93210 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 094EF77E011152A3DF3536B2 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30E602807D9C203A2FA83417 /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; @@ -38,7 +39,6 @@ 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 */; }; - E770DD0A01C1858ADA957540 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09A5B486A6530B3BB024E598 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -78,15 +78,15 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 09A5B486A6530B3BB024E598 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 21DDD86357889D25E534D20D /* 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 = ""; }; + 30E602807D9C203A2FA83417 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 478CFA932E638C8E0064F3D7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 478CFA952E6E20A60064F3D7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; + 4D6281A38B453C42FAC24BD5 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7676C28D308F37EA004CF793 /* PenguinModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinModel.swift; sourceTree = ""; }; @@ -113,8 +113,7 @@ 76B714D1300E58B1004DE37A /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7E7114E2A230EE71FB6D6D7C /* 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 = ""; }; - 9616FEAD6BEF8328D85974DF /* 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 = ""; }; + 8522EA4C54B9CA21B71F91CC /* 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 = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -122,6 +121,7 @@ 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 = ""; }; + 9C0E63FC9D84AA7D3BB0A547 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -133,8 +133,8 @@ 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, 7676C2C7308F3D03004CF793 /* PenguinINRenderer.xcframework in Frameworks */, - E770DD0A01C1858ADA957540 /* Pods_Runner.framework in Frameworks */, 7676C2C9308F3D04004CF793 /* PenNavUI.xcframework in Frameworks */, + 094EF77E011152A3DF3536B2 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -164,7 +164,7 @@ 7676C2C1308F3C52004CF793 /* PenNavUI.xcframework */, 76B714CF300E58B1004DE37A /* WidgetKit.framework */, 76B714D1300E58B1004DE37A /* SwiftUI.framework */, - 09A5B486A6530B3BB024E598 /* Pods_Runner.framework */, + 30E602807D9C203A2FA83417 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -201,9 +201,9 @@ 79DD2093A1D9674C94359FC8 /* Pods */ = { isa = PBXGroup; children = ( - 21DDD86357889D25E534D20D /* Pods-Runner.debug.xcconfig */, - 9616FEAD6BEF8328D85974DF /* Pods-Runner.release.xcconfig */, - 7E7114E2A230EE71FB6D6D7C /* Pods-Runner.profile.xcconfig */, + 8522EA4C54B9CA21B71F91CC /* Pods-Runner.debug.xcconfig */, + 9C0E63FC9D84AA7D3BB0A547 /* Pods-Runner.release.xcconfig */, + 4D6281A38B453C42FAC24BD5 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -287,7 +287,7 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - E08B80DF84B0E0D872D7D950 /* [CP] Check Pods Manifest.lock */, + DE4E6538EB74D09D8F3A8FE7 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, @@ -295,8 +295,8 @@ 765A5A922F35CD8B0003FF7D /* Embed Frameworks */, 76B714E4300E58B2004DE37A /* Embed Foundation Extensions */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - CD8EB7D84DD1FEE84642007B /* [CP] Embed Pods Frameworks */, - 592872084F2202E73671D38F /* [CP] Copy Pods Resources */, + 824B1289AE3D15AB765B1BBF /* [CP] Embed Pods Frameworks */, + 6F08875CF9A6CF013C44F482 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -341,7 +341,7 @@ ); mainGroup = 97C146E51CF9000F007C117D; packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */, ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; @@ -393,7 +393,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n"; }; - 592872084F2202E73671D38F /* [CP] Copy Pods Resources */ = { + 6F08875CF9A6CF013C44F482 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -401,48 +401,56 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + 824B1289AE3D15AB765B1BBF /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); inputPaths = ( ); - name = "Run Script"; + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - CD8EB7D84DD1FEE84642007B /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + name = "Run Script"; + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; - E08B80DF84B0E0D872D7D950 /* [CP] Check Pods Manifest.lock */ = { + DE4E6538EB74D09D8F3A8FE7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -593,6 +601,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Dr. Alhabib"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; @@ -600,7 +609,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.6.044; + MARKETING_VERSION = 4.6.050; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -780,6 +789,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Dr. Alhabib"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; @@ -787,7 +797,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.6.044; + MARKETING_VERSION = 4.6.050; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -810,6 +820,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 3A359E86ZF; ENABLE_BITCODE = NO; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Dr. Alhabib"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; @@ -817,7 +828,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.6.044; + MARKETING_VERSION = 4.6.050; PRODUCT_BUNDLE_IDENTIFIER = "com.HMG.HMG-Smartphone"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -863,7 +874,7 @@ /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = { isa = XCLocalSwiftPackageReference; relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; }; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c3fedb29..78f3f325 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -91,6 +91,9 @@ ReferencedContainer = "container:Runner.xcodeproj"> + + Bool { + FirebaseApp.configure() + application.registerForRemoteNotifications() GMSServices.provideAPIKey("AIzaSyB6TERnxIr0yJ3qG4ULBZbu0sAD4tGqtng") -// FirebaseApp.configure() initializePlatformChannels() -// GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } + func initializePlatformChannels(){ DispatchQueue.main.async { [weak self] in diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 00161451..5aee1311 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -6,7 +6,7 @@ import 'package:myfatoorah_flutter/myfatoorah_flutter.dart'; class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT diff --git a/lib/core/utils/push_notification_handler.dart b/lib/core/utils/push_notification_handler.dart index 30e251e1..85643902 100644 --- a/lib/core/utils/push_notification_handler.dart +++ b/lib/core/utils/push_notification_handler.dart @@ -15,6 +15,7 @@ import 'package:flutter_callkit_incoming/entities/notification_params.dart'; import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart'; import 'package:flutter_ios_voip_kit_karmm/call_state_type.dart'; import 'package:flutter_ios_voip_kit_karmm/flutter_ios_voip_kit.dart'; +import 'package:get_it/get_it.dart'; import 'package:hmg_patient_app_new/core/api/api_client.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/cache_consts.dart'; @@ -22,9 +23,14 @@ import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart'; +import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/notifications/notification_details_page.dart'; +import 'package:hmg_patient_app_new/presentation/onboarding/splash_animation_screen.dart'; +import 'package:hmg_patient_app_new/presentation/tele_consultation/zoom/call_screen.dart'; +import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/services/navigation_service.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:permission_handler/permission_handler.dart'; import 'package:uuid/uuid.dart'; import 'package:huawei_push/huawei_push.dart' as h_push; @@ -383,6 +389,9 @@ class PushNotificationHandler { ) async { try { log('🎈 example: onDidRejectIncomingCall $uuid - $callerId'); + await voIPKit.endCall(); + await voIPKit.dispose(); + await FlutterCallkitIncoming.endAllCalls(); timeOutTimer.cancel(); // Cleanup on reject with API call if (_currentCallId != null) { @@ -398,7 +407,10 @@ class PushNotificationHandler { String callerId, ) async { log('🎈 example: onDidAcceptIncomingCall $uuid - $callerId'); - await voIPKit.acceptIncomingCall(callerState: CallStateType.calling); + + String zoomSessionID = callerId.split("_").sublist(0, callerId.split("_").length - 1).join("_"); + + await voIPKit.acceptIncomingCall(callerState: CallStateType.idle); await voIPKit.callConnected(); // Cleanup on accept - cancel timer and reset flags @@ -406,21 +418,24 @@ class PushNotificationHandler { _callTimeoutTimer = null; _isCallInProgress = false; _currentCallId = null; - await Future.delayed(Duration(seconds: 2)).then((val) async { + await Future.delayed(Duration(milliseconds: 1500)).then((val) async { await voIPKit.endCall(); + await voIPKit.dispose(); + await FlutterCallkitIncoming.endAllCalls(); }); - // Navigator.pushNamed( - // locator().navigatorKey.currentContext!, - // "zoom_call_page", - // arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false), - // ); - - // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN, - // arguments: VideoArgus( - // reservationId: int.parse(callerId), token: null, isVideo: true)); - - // timeOutTimer.cancel(); + await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, zoomSessionID); + + Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall); + 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(zoomSessionID, "123", "Patient", "40", "0", true, int.parse("1")), + // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), + ); }; } diff --git a/lib/features/book_appointments/book_appointments_repo.dart b/lib/features/book_appointments/book_appointments_repo.dart index caf97cb8..3707ab6f 100644 --- a/lib/features/book_appointments/book_appointments_repo.dart +++ b/lib/features/book_appointments/book_appointments_repo.dart @@ -1,12 +1,15 @@ +import 'dart:io'; import 'package:dartz/dartz.dart'; import 'package:hmg_patient_app_new/core/api/api_client.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; +import 'package:hmg_patient_app_new/core/cache_consts.dart'; import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; +import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/appointment_nearest_gate_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/dental_chief_complaints_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctor_profile_response_model.dart'; @@ -757,6 +760,10 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo { "InitialSlotDuration": initialSlotDuration, "StrAppointmentDate": selectedDate, "IsVirtual": false, + "DeviceType": Platform.isIOS ? 'iOS' : 'Android', + "DeviceToken": await Utils.getStringFromPrefs(CacheConst.pushToken), + "VoipToken": await Utils.getStringFromPrefs(CacheConst.voipToken), + "IsVoip": Platform.isIOS ? true : false, "BookedBy": 102, "VisitType": 1, "VisitFor": 1, diff --git a/lib/features/immediate_livecare/immediate_livecare_view_model.dart b/lib/features/immediate_livecare/immediate_livecare_view_model.dart index 57bf6553..3fce9d22 100644 --- a/lib/features/immediate_livecare/immediate_livecare_view_model.dart +++ b/lib/features/immediate_livecare/immediate_livecare_view_model.dart @@ -236,7 +236,7 @@ class ImmediateLiveCareViewModel extends ChangeNotifier { Future addNewCallRequestForImmediateLiveCare(String transID, {Function(dynamic)? onSuccess, Function(String)? onError}) async { final result = await immediateLiveCareRepo.addNewCallRequestForImmediateLiveCare(_appState.getAuthenticatedUser()!.age!, _appState.getAuthenticatedUser()!.gender!, - immediateLiveCareSelectedClinic.serviceID!, transID, liveCareSelectedCallType, false, _appState.deviceToken, await Utils.getStringFromPrefs(CacheConst.voipToken)); + immediateLiveCareSelectedClinic.serviceID!, transID, liveCareSelectedCallType, false, await Utils.getStringFromPrefs(CacheConst.pushToken), await Utils.getStringFromPrefs(CacheConst.voipToken)); result.fold( (failure) async { diff --git a/lib/features/my_appointments/my_appointments_repo.dart b/lib/features/my_appointments/my_appointments_repo.dart index 313fe56a..46d24eb7 100644 --- a/lib/features/my_appointments/my_appointments_repo.dart +++ b/lib/features/my_appointments/my_appointments_repo.dart @@ -622,7 +622,7 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo { "AcceptedBy": patientAppointmentHistoryResponseModel.doctorID, "IsFlutter": true, "DeviceToken": await Utils.getStringFromPrefs(CacheConst.pushToken), - "VoipToken": "", // TODO: Add VoIP Token functionality + "VoipToken": await Utils.getStringFromPrefs(CacheConst.voipToken), "IsVoip": Platform.isIOS ? true : false }; diff --git a/lib/presentation/medical_report/medical_reports_page.dart b/lib/presentation/medical_report/medical_reports_page.dart index 33f9e6e3..8fdae4df 100644 --- a/lib/presentation/medical_report/medical_reports_page.dart +++ b/lib/presentation/medical_report/medical_reports_page.dart @@ -159,7 +159,8 @@ class _MedicalReportsPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ CustomButton( - text: "${medicalFileVM.patientMedicalReportsViewList[index].medicalReportsList!.length} Reports Available", + text: + "${medicalFileVM.patientMedicalReportsViewList[index].medicalReportsList!.length} ${medicalFileVM.patientMedicalReportsViewList[index].medicalReportsList!.length > 1 ? 'Reports' : 'Report'}", onPressed: () {}, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, diff --git a/lib/services/remote_config_service.dart b/lib/services/remote_config_service.dart index d39a7fbe..81f57026 100644 --- a/lib/services/remote_config_service.dart +++ b/lib/services/remote_config_service.dart @@ -45,7 +45,7 @@ class RemoteConfigServiceImp implements RemoteConfigService { // Release/profile builds keep a 1-hour minimum interval — // balances timely occasion-theme rollout against not hammering // Remote Config across the whole user base. - minimumFetchInterval: kDebugMode ? Duration.zero : const Duration(hours: 1), + minimumFetchInterval: kDebugMode ? Duration.zero : const Duration(minutes: 15), ), ); diff --git a/pubspec.yaml b/pubspec.yaml index 35a5c50f..d7b449bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,8 +2,8 @@ name: hmg_patient_app_new description: "New HMG Patient App" publish_to: 'none' # Remove this line if you wish to publish to pub.dev -#version: 4.6.046+1 -version: 4.6.1004+40501004 +version: 4.6.050+1 +#version: 4.6.1004+40501004 environment: sdk: ">=3.6.0 <4.0.0" @@ -25,10 +25,11 @@ dependencies: easy_localization: ^3.0.8 fluttertoast: ^8.2.12 flutter_rating_bar: ^4.0.1 - firebase_messaging: ^16.7.0 - # firebase_messaging: any - firebase_core: ^4.15.0 - # firebase_core: ^3.13.1 + firebase_messaging: 17.0.0 + firebase_core: 5.0.0 + firebase_analytics: 13.0.0 + firebase_crashlytics: 6.0.0 + firebase_remote_config: 7.0.0 permission_handler: ^12.0.1 flutter_local_notifications: ^19.4.1 timezone: ^0.10.0 @@ -63,14 +64,11 @@ dependencies: geolocator: ^14.0.2 dropdown_search: ^6.0.2 google_maps_flutter: ^2.13.1 - flutter_zoom_videosdk: 2.1.10 + flutter_zoom_videosdk: 2.6.0 dart_jsonwebtoken: ^3.2.0 dartz: ^0.10.1 equatable: ^2.0.7 google_api_availability: ^5.0.1 - firebase_analytics: ^12.6.0 - firebase_crashlytics: ^5.4.0 - firebase_remote_config: ^6.7.0 jiffy: ^6.4.3 # hijri_gregorian_calendar: # path: /Users/aamir/StudioProjects/hijri_gregorian_calendar