diff --git a/android/app/build.gradle b/android/app/build.gradle index 1901f3a..b7a7831 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.google.gms.google-services" id "dev.flutter.flutter-gradle-plugin" id "com.google.firebase.crashlytics" - id "com.huawei.agconnect" + // id "com.huawei.agconnect" } @@ -17,7 +17,7 @@ if (keystorePropertiesFile.exists()) { android { - namespace 'hmg.cloudSolutions.mohem' + namespace 'com.cloudsolutions.rsgmohemm' compileSdk 36 ndkVersion '28.2.13676358' @@ -32,7 +32,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "hmg.cloudSolutions.mohem" + applicationId "com.cloudsolutions.rsgmohemm" minSdkVersion 30 targetSdk 35 targetSdk = flutter.targetSdkVersion @@ -78,7 +78,7 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.20" implementation 'androidx.multidex:multidex:2.0.1' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' - implementation 'com.huawei.hms:push:6.11.0.300' + // implementation 'com.huawei.hms:push:6.11.0.300' } diff --git a/android/app/google-services.json b/android/app/google-services.json index 62fbaea..65f55cf 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -1,37 +1,26 @@ { "project_info": { - "project_number": "679409052782", - "firebase_url": "https://mohemm-dce93.firebaseio.com", - "project_id": "mohemm-dce93", - "storage_bucket": "mohemm-dce93.appspot.com" + "project_number": "257956774267", + "project_id": "rsg-mohem", + "storage_bucket": "rsg-mohem.firebasestorage.app" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:679409052782:android:dba155ac0859d7fea78a7f", + "mobilesdk_app_id": "1:257956774267:android:84844c63b199d17332bdde", "android_client_info": { - "package_name": "hmg.cloudSolutions.mohem" + "package_name": "com.cloudsolutions.rsgmohemm" } }, - "oauth_client": [ - { - "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com", - "client_type": 3 - } - ], + "oauth_client": [], "api_key": [ { - "current_key": "AIzaSyDgWjuSBIKGghWxYg_KGBRIZTi-O_UA8mU" + "current_key": "AIzaSyBkEDKQkJD0yT_JAs7ockH9DiR6CuVFolc" } ], "services": { "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "679409052782-mtd6d8rjltucnm9uatn6g7et08sm6lbv.apps.googleusercontent.com", - "client_type": 3 - } - ] + "other_platform_oauth_client": [] } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 6d2f83f..746a3d8 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -33,7 +33,7 @@ diff --git a/android/app/src/main/kotlin/hmg/cloudSolutions/mohem/MainActivity.kt b/android/app/src/main/kotlin/hmg/cloudSolutions/mohem/MainActivity.kt deleted file mode 100644 index 15133a2..0000000 --- a/android/app/src/main/kotlin/hmg/cloudSolutions/mohem/MainActivity.kt +++ /dev/null @@ -1,17 +0,0 @@ -package hmg.cloudSolutions.mohem - -//import io.flutter.embedding.android.FlutterActivity -// -//class MainActivity: FlutterActivity() { -//} - - -import io.flutter.embedding.android.FlutterFragmentActivity -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugins.GeneratedPluginRegistrant - -class MainActivity: FlutterFragmentActivity() { - override fun configureFlutterEngine(flutterEngine: FlutterEngine) { - GeneratedPluginRegistrant.registerWith(flutterEngine) - } -} \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index e352ee9..4e266e9 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 0734ec9..d423313 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index d1ba057..9eecf26 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 89029f4..010abe7 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4fa82b8..4d44fcf 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index ab98328..0000000 --- a/android/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #ffffff - \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 8a97f51..ea3567f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ buildscript { repositories { google() mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } + // maven { url 'https://developer.huawei.com/repo/' } } dependencies { classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10" classpath 'com.google.gms:google-services:4.3.15' - classpath 'com.huawei.agconnect:agcp:1.9.1.304' + // classpath 'com.huawei.agconnect:agcp:1.9.1.304' } } @@ -17,7 +17,7 @@ allprojects { repositories { google() mavenCentral() - maven { url 'https://developer.huawei.com/repo/' } + // maven { url 'https://developer.huawei.com/repo/' } } // Exclude old BouncyCastle globally to avoid duplicate classes diff --git a/android/settings.gradle b/android/settings.gradle index 10a4a8d..efc7af8 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -14,14 +14,14 @@ pluginManagement { google() mavenCentral() gradlePluginPortal() - maven { url 'https://developer.huawei.com/repo/' } + // maven { url 'https://developer.huawei.com/repo/' } } resolutionStrategy { eachPlugin { - if (requested.id.id == "com.huawei.agconnect") { - useModule("com.huawei.agconnect:agcp:1.9.1.304") - } + // if (requested.id.id == "com.huawei.agconnect") { + // useModule("com.huawei.agconnect:agcp:1.9.1.304") + // } } } @@ -35,7 +35,7 @@ plugins { id("com.google.gms.google-services") version "4.4.3" apply false id("com.google.firebase.crashlytics") version "3.0.4" apply false id('org.gradle.toolchains.foojay-resolver-convention') version '0.9.0' apply false - id "com.huawei.agconnect" version "1.9.1.304" apply false + // id "com.huawei.agconnect" version "1.9.1.304" apply false } @@ -44,7 +44,7 @@ dependencyResolutionManagement { google() mavenCentral() gradlePluginPortal() - maven { url 'https://developer.huawei.com/repo/' } + // maven { url 'https://developer.huawei.com/repo/' } maven { url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local" } diff --git a/assets/images/logos/icon.png b/assets/images/logos/icon.png new file mode 100644 index 0000000..34342bb Binary files /dev/null and b/assets/images/logos/icon.png differ diff --git a/assets/images/logos/main_mohemm_logo.png b/assets/images/logos/main_mohemm_logo.png index 8ea04aa..798f2f4 100644 Binary files a/assets/images/logos/main_mohemm_logo.png and b/assets/images/logos/main_mohemm_logo.png differ diff --git a/assets/images/logos/main_mohemm_logo__.png b/assets/images/logos/main_mohemm_logo__.png new file mode 100644 index 0000000..8ea04aa Binary files /dev/null and b/assets/images/logos/main_mohemm_logo__.png differ diff --git a/icon.png b/icon.png index 4745144..34342bb 100644 Binary files a/icon.png and b/icon.png differ diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 7c56964..1dc6cf7 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 12.0 + 13.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 6aac74d..df4af7b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -8,13 +8,13 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 1CCF895CFB3C95DEBB84A05F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8F0CC8EAC13AF3E07BEE567 /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 76AE113C28E078EA00513112 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 76AE113B28E078EA00513112 /* GoogleService-Info.plist */; }; 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 */; }; + E5E32A28CAF20A2246E751B7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0664AD500870E1FE65B6804F /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -31,15 +31,18 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0664AD500870E1FE65B6804F /* 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 = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 704606614DF2810DC48BA72A /* 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 = ""; }; + 530F003A39906D380BB86D2A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7627313328E45A2400F354F7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 76AE113B28E078EA00513112 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 85462A3201D2F5E5056484C6 /* 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 = ""; }; + 8A4FAD43239249C8938AAAD2 /* 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 = ""; }; 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; }; @@ -47,9 +50,6 @@ 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 = ""; }; - 9F5A5EF025608C139860C4F1 /* 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 = ""; }; - A51BF82DB767D6FBE2C19E26 /* 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 = ""; }; - D8F0CC8EAC13AF3E07BEE567 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,21 +57,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1CCF895CFB3C95DEBB84A05F /* Pods_Runner.framework in Frameworks */, + E5E32A28CAF20A2246E751B7 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 76443FF31582B5E7DA3B22CB /* Frameworks */ = { - isa = PBXGroup; - children = ( - D8F0CC8EAC13AF3E07BEE567 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -90,7 +82,7 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 9E11D7B9A1206344B2A65F43 /* Pods */, - 76443FF31582B5E7DA3B22CB /* Frameworks */, + BE4F4C6457462397C8D49712 /* Frameworks */, ); sourceTree = ""; }; @@ -122,13 +114,21 @@ 9E11D7B9A1206344B2A65F43 /* Pods */ = { isa = PBXGroup; children = ( - A51BF82DB767D6FBE2C19E26 /* Pods-Runner.debug.xcconfig */, - 9F5A5EF025608C139860C4F1 /* Pods-Runner.release.xcconfig */, - 704606614DF2810DC48BA72A /* Pods-Runner.profile.xcconfig */, + 85462A3201D2F5E5056484C6 /* Pods-Runner.debug.xcconfig */, + 530F003A39906D380BB86D2A /* Pods-Runner.release.xcconfig */, + 8A4FAD43239249C8938AAAD2 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; }; + BE4F4C6457462397C8D49712 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0664AD500870E1FE65B6804F /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -136,15 +136,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 2D06B7AD3B87C9C9059E4168 /* [CP] Check Pods Manifest.lock */, + F9F26C21D335A1528057A4B8 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - C4CFBC4C5CAC00182015ACD5 /* [CP] Embed Pods Frameworks */, - EF29CE25BB57F5AA48CE1136 /* [CP] Copy Pods Resources */, + 1B36B02E45F13203FDB7AF60 /* [CP] Embed Pods Frameworks */, + 72EE457DCAE80123A9F10E8F /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -204,26 +204,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2D06B7AD3B87C9C9059E4168 /* [CP] Check Pods Manifest.lock */ = { + 1B36B02E45F13203FDB7AF60 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { @@ -242,7 +237,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 6C6E76E4FB19FAF11C24005D /* [CP] Copy Pods Resources */ = { + 72EE457DCAE80123A9F10E8F /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -274,21 +269,26 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - C4CFBC4C5CAC00182015ACD5 /* [CP] Embed Pods Frameworks */ = { + F9F26C21D335A1528057A4B8 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -367,7 +367,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -390,14 +390,14 @@ DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Mohemm; + INFOPLIST_KEY_CFBundleDisplayName = "RSG MoheM"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 3.7.95; - PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm; + PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.rsgmohemm; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -454,7 +454,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -504,7 +504,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -529,14 +529,14 @@ DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Mohemm; + INFOPLIST_KEY_CFBundleDisplayName = "RSG MoheM"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 3.7.95; - PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm; + PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.rsgmohemm; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -560,14 +560,14 @@ DEVELOPMENT_TEAM = 99Z3UD3LJM; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Mohemm; + INFOPLIST_KEY_CFBundleDisplayName = "RSG MoheM"; IPHONEOS_DEPLOYMENT_TARGET = 15.6; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 3.7.95; - PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.mohemm; + PRODUCT_BUNDLE_IDENTIFIER = com.cloudsolutions.rsgmohemm; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index 65b74d7..d0d98aa 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1 +1 @@ -{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} \ No newline at end of file +{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index dc9ada4..5d6a757 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index adf1ee5..1c5203d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index b1f58f0..9fad919 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index d2e39f8..20e9861 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index f561dd4..53e4cfb 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 88904d6..404c76f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 5b7f086..3b7a259 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index b1f58f0..9fad919 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 78594ee..bcfb279 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index 4476421..250b432 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index 4476421..250b432 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index addf702..f4a29e6 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 74bfa80..9ff5c03 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index fa967ed..d5ffd42 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d1851c6..f1c22ee 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 51a5801..07a7eb5 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - MoheM + RSG MoheM CFBundlePackageType APPL CFBundleShortVersionString diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements index 304aa00..32ae978 100644 --- a/ios/Runner/Runner.entitlements +++ b/ios/Runner/Runner.entitlements @@ -5,13 +5,9 @@ aps-environment development com.apple.developer.icloud-container-identifiers - - iCloud.com.cloudsolutions.mohemm - + com.apple.developer.icloud-services - - CloudDocuments - + com.apple.developer.networking.HotspotConfiguration com.apple.developer.networking.networkextension @@ -22,9 +18,5 @@ TAG - com.apple.developer.ubiquity-container-identifiers - - iCloud.com.cloudsolutions.mohemm - diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index 7dc4894..64f376c 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -12,7 +12,13 @@ class ApiConsts { // static String baseUrl = "https://mohemm.hmg.com"; // New Live server static String ssoBaseUrl = "https://sso.hmg.com"; // New Live server // - static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver + + // static String baseUrl = "http://10.20.200.111:1010/"; + + + static String baseUrl = "https://rsgmohemm.hmg.com"; + + // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.20.200.111:1010/"; // static String baseUrl = "https://mohemm.hmg.com"; // New Live server //static String eLearningBaseUrl = "https://elearning.hmg.com/moodle_dev/api/"; // Elearning server UAT diff --git a/lib/classes/notifications.dart b/lib/classes/notifications.dart index 058606c..ee158e2 100644 --- a/lib/classes/notifications.dart +++ b/lib/classes/notifications.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; // import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; -import 'package:huawei_push/huawei_push.dart' as huawei_push; +// import 'package:huawei_push/huawei_push.dart' as huawei_push; import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/date_uitl.dart'; import 'package:mohem_flutter_app/classes/utils.dart'; @@ -28,6 +28,8 @@ class AppNotifications { String _huaweiToken = ''; + // ignore: unused_field + late BuildContext context; Future requestPermissions() async { @@ -79,16 +81,16 @@ class AppNotifications { if (Platform.isAndroid) { // await hmsApiAvailability.isHMSAvailable().then((value) async { if (!(await Utils.isGoogleServicesAvailable())) { - huawei_push.Push.enableLogger(); - var result = await huawei_push.Push.setAutoInitEnabled(true); + // huawei_push.Push.enableLogger(); + // var result = await huawei_push.Push.setAutoInitEnabled(true); - huawei_push.Push.onNotificationOpenedApp.listen((message) { - // newMessage(toFirebaseRemoteMessage(message)); - }, onError: (e) => print(e.toString())); + // huawei_push.Push.onNotificationOpenedApp.listen((message) { + // // newMessage(toFirebaseRemoteMessage(message)); + // }, onError: (e) => print(e.toString())); - huawei_push.Push.onMessageReceivedStream.listen((message) { - // newMessage(toFirebaseRemoteMessage(message)); - }, onError: (e) => print(e.toString())); + // huawei_push.Push.onMessageReceivedStream.listen((message) { + // // newMessage(toFirebaseRemoteMessage(message)); + // }, onError: (e) => print(e.toString())); } // }).catchError((err) { // print(err); @@ -99,7 +101,7 @@ class AppNotifications { void initHuaweiPush(Function loginCallback) { AppState().setIsHuawei = true; initTokenStream(loginCallback); - huawei_push.Push.getToken(""); + // huawei_push.Push.getToken(""); } // HUAWEI PUSH TOKEN IMPLEMENTATION @@ -115,11 +117,11 @@ class AppNotifications { } Future initTokenStream(Function loginCallback) async { - huawei_push.Push.getTokenStream.listen(_onTokenEvent, onError: _onTokenError).onData((data) { - AppState().setHuaweiPushToken = data; - debugPrint("HUAWEI PUSH TOKEN: $data"); - loginCallback(); - }); + // huawei_push.Push.getTokenStream.listen(_onTokenEvent, onError: _onTokenError).onData((data) { + // AppState().setHuaweiPushToken = data; + // debugPrint("HUAWEI PUSH TOKEN: $data"); + // loginCallback(); + // }); } void _handleMessage(RemoteMessage message) { diff --git a/lib/classes/utils.dart b/lib/classes/utils.dart index 2ae4fe3..ea96eaf 100644 --- a/lib/classes/utils.dart +++ b/lib/classes/utils.dart @@ -159,12 +159,29 @@ class Utils { ).center; } - static Uint8List getPostBytes(img) { + static Uint8List? getPostBytes(img) { try { + if (img == null) return null; var b64 = img.replaceFirst('data:image/png;base64,', ''); - if (img != null && Utils.isBase64(b64)) return Utils.dataFromBase64String(b64); + b64 = b64.replaceFirst('data:image/jpeg;base64,', ''); + b64 = b64.replaceFirst('data:image/jpg;base64,', ''); + if (Utils.isBase64(b64)) return Utils.dataFromBase64String(b64); } catch (e) {} - return Uint8List.fromList([]); + return null; + } + + static Uint8List? safeDataFromBase64String(String? base64String) { + if (base64String == null || base64String.isEmpty) return null; + try { + var b64 = base64String; + // Strip common data URL prefixes + var dataUrlPattern = RegExp(r'^data:image/[^;]+;base64,'); + b64 = b64.replaceFirst(dataUrlPattern, ''); + if (!Utils.isBase64(b64)) return null; + return base64Decode(b64); + } catch (e) { + return null; + } } static String getBase64FromJpeg(img) { diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart index 96ff0a9..cf8a6ea 100644 --- a/lib/provider/dashboard_provider_model.dart +++ b/lib/provider/dashboard_provider_model.dart @@ -133,12 +133,12 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin { drawerMenuItemList = [ DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile), DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation), - DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi), + // DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi), // DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.etqanOVR.tr(), AppRoutes.etqanOvr), - DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.keen.tr(), AppRoutes.etqanOvr), + // DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.keen.tr(), AppRoutes.etqanOvr), // DrawerMenuItem("assets/images/drawer/car_parking_icon.svg", LocaleKeys.parkingQr.tr(), AppRoutes.parkingQr), DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions), - DrawerMenuItem("assets/images/drawer/courses.svg", "courses".tr(), AppRoutes.courses), + // DrawerMenuItem("assets/images/drawer/courses.svg", "courses".tr(), AppRoutes.courses), //no need in RSG // DrawerMenuItem("assets/images/drawer/drawer_marathon.svg", LocaleKeys.brainMarathon.tr(), AppRoutes.marathonIntroScreen), DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword), ]; diff --git a/lib/ui/dialogs/id/business_card_dialog.dart b/lib/ui/dialogs/id/business_card_dialog.dart index a405ccf..8cecae5 100644 --- a/lib/ui/dialogs/id/business_card_dialog.dart +++ b/lib/ui/dialogs/id/business_card_dialog.dart @@ -1,3 +1,5 @@ +import 'dart:typed_data'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart'; @@ -40,9 +42,10 @@ class BusinessCardDialog extends StatelessWidget { ), ), Image.memory( - Utils.getPostBytes(AppState().memberInformationList!.businessCardQR ?? ""), + Utils.getPostBytes(AppState().memberInformationList!.businessCardQR ?? "") ?? Uint8List(0), width: 129, height: 129, + errorBuilder: (context, error, stackTrace) => const SizedBox(width: 129, height: 129), ), ], ).paddingOnly(top: 26, left: 8.5), diff --git a/lib/ui/dialogs/id/employee_digital_id_dialog.dart b/lib/ui/dialogs/id/employee_digital_id_dialog.dart index 63a5e29..c76ad22 100644 --- a/lib/ui/dialogs/id/employee_digital_id_dialog.dart +++ b/lib/ui/dialogs/id/employee_digital_id_dialog.dart @@ -1,3 +1,5 @@ +import 'dart:typed_data'; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -66,9 +68,10 @@ class EmployeeDigitialIdDialog extends StatelessWidget { ), ), Image.memory( - Utils.getPostBytes(AppState().memberInformationList!.employeeQR ?? ""), + Utils.getPostBytes(AppState().memberInformationList!.employeeQR ?? "") ?? Uint8List(0), width: 160, height: 160, + errorBuilder: (context, error, stackTrace) => const SizedBox(width: 160, height: 160), ), DefaultButton(LocaleKeys.close.tr(), () { Navigator.pop(context); diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart index 78d53a7..27e8ddc 100644 --- a/lib/ui/landing/dashboard_screen.dart +++ b/lib/ui/landing/dashboard_screen.dart @@ -48,7 +48,7 @@ class DashboardScreen extends StatefulWidget { class _DashboardScreenState extends State with WidgetsBindingObserver { late DashboardProviderModel data; - late MarathonProvider marathonProvider; + // late MarathonProvider marathonProvider; late ChatProviderModel cProvider; final GlobalKey _scaffoldState = GlobalKey(); @@ -62,13 +62,13 @@ class _DashboardScreenState extends State with WidgetsBindingOb void initState() { WidgetsBinding.instance.addObserver(this); super.initState(); + data = Provider.of(context, listen: false); cProvider = Provider.of(context, listen: false); scheduleMicrotask(() { - data = Provider.of(context, listen: false); - marathonProvider = Provider.of(context, listen: false); - if (checkIfPrivilegedForChat()) { - _bHubCon(); - } + // marathonProvider = Provider.of(context, listen: false); + // if (checkIfPrivilegedForChat()) { + // _bHubCon(); + // } _onRefresh(true); }); } @@ -157,8 +157,8 @@ class _DashboardScreenState extends State with WidgetsBindingOb data.fetchEventActivity(); data.getCategoryOffersListAPI(context); data.fetchGreetingCards(); - marathonProvider.getMarathonDetailsFromApi(); - marathonProvider.getMarathonTutorial(); + // marathonProvider.getMarathonDetailsFromApi(); + // marathonProvider.getMarathonTutorial(); if (isFromInit) { checkERMChannel(); } @@ -588,7 +588,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb ), ], - Column( + (data != null && data.getOffersList.isNotEmpty) ? Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -620,7 +620,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb }), ], ).paddingOnly(left: 21, right: 21), - Consumer( + Consumer( builder: (BuildContext context, DashboardProviderModel model, Widget? child) { return SizedBox( height: 103 + 33, @@ -677,7 +677,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb }, ), ], - ), + ) : const SizedBox(), Container( width: double.infinity, @@ -691,9 +691,9 @@ class _DashboardScreenState extends State with WidgetsBindingOb mainAxisSize: MainAxisSize.min, children: [ ServicesWidget(), - context - .watch() - .isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 8, top: 8), + // context + // .watch() + // .isLoading ? const MarathonBannerShimmer().paddingAll(20) : const MarathonBanner().paddingOnly(left: 21, right: 21, bottom: 8, top: 8), // context.watch().isTutorialLoading // ? const MarathonBannerShimmer().paddingAll(20) // : Container( diff --git a/lib/ui/landing/widget/app_drawer.dart b/lib/ui/landing/widget/app_drawer.dart index f1946b7..1ffa77c 100644 --- a/lib/ui/landing/widget/app_drawer.dart +++ b/lib/ui/landing/widget/app_drawer.dart @@ -43,7 +43,7 @@ class _AppDrawerState extends State { drawerMenuItemList = Provider.of(context, listen: false).drawerMenuItemList; } - return Drawer( + return SafeArea(child: Drawer( width: MediaQuery.of(context).size.width * 303 / 375, child: Column( children: [ @@ -56,17 +56,12 @@ class _AppDrawerState extends State { ).paddingOnly(left: 4, right: 14), Row( children: [ - AppState().memberInformationList!.eMPLOYEEIMAGE == null - ? SvgPicture.asset( - "assets/images/user.svg", - height: 52, - width: 52, - ) - : CircleAvatar( - radius: 52 / 2, - backgroundImage: MemoryImage(Utils.dataFromBase64String(AppState().memberInformationList!.eMPLOYEEIMAGE!)), - backgroundColor: Colors.black, - ), + Builder(builder: (context) { + var bytes = Utils.safeDataFromBase64String(AppState().memberInformationList!.eMPLOYEEIMAGE); + return bytes == null + ? SvgPicture.asset("assets/images/user.svg", height: 52, width: 52) + : CircleAvatar(radius: 52 / 2, backgroundImage: MemoryImage(bytes), backgroundColor: Colors.black); + }), 12.width, Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -144,7 +139,7 @@ class _AppDrawerState extends State { ).paddingOnly(left: 21, right: 21, top: 21) ], ).paddingOnly(top: 21, bottom: 21), - ); + )); } Widget menuItem(String icon, String title, String routeName, {Color? color, bool closeDrawer = true, VoidCallback? onPress}) { diff --git a/lib/ui/my_team/employee_details.dart b/lib/ui/my_team/employee_details.dart index e78c304..e168367 100644 --- a/lib/ui/my_team/employee_details.dart +++ b/lib/ui/my_team/employee_details.dart @@ -72,17 +72,22 @@ class _EmployeeDetailsState extends State { body: Stack( children: [ getEmployeeSubordinates!.eMPLOYEEIMAGE != null - ? Container( - height: 200, - margin: const EdgeInsets.only(top: 30), - decoration: BoxDecoration(image: DecorationImage(image: MemoryImage(Utils.dataFromBase64String(getEmployeeSubordinates!.eMPLOYEEIMAGE!)), fit: BoxFit.cover)), - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), - child: Container( - decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)), + ? Builder(builder: (context) { + var bytes = Utils.safeDataFromBase64String(getEmployeeSubordinates!.eMPLOYEEIMAGE); + return Container( + height: 200, + margin: const EdgeInsets.only(top: 30), + decoration: bytes != null + ? BoxDecoration(image: DecorationImage(image: MemoryImage(bytes), fit: BoxFit.cover)) + : const BoxDecoration(color: Colors.transparent), + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), + child: Container( + decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)), + ), ), - ), - ) + ); + }) : Container( decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)), ), @@ -203,9 +208,12 @@ class _EmployeeDetailsState extends State { ); } - Widget ProfileImage() => getEmployeeSubordinates?.eMPLOYEEIMAGE == null - ? SvgPicture.asset("assets/images/user.svg", height: 68, width: 68) - : CircleAvatar(radius: 68, backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinates?.eMPLOYEEIMAGE)), backgroundColor: Colors.black); + Widget ProfileImage() { + var bytes = Utils.getPostBytes(getEmployeeSubordinates?.eMPLOYEEIMAGE); + return bytes == null + ? SvgPicture.asset("assets/images/user.svg", height: 68, width: 68) + : CircleAvatar(radius: 68, backgroundImage: MemoryImage(bytes), backgroundColor: Colors.black); + } void setMenu() { menu = [ @@ -250,17 +258,12 @@ class _EmployeeDetailsState extends State { child: Column( children: [ Text(LocaleKeys.addFavoriteList).tr(namedArgs: {'name': '${getEmployeeSubordinates!.eMPLOYEENAME}'}), - getEmployeeSubordinates!.eMPLOYEEIMAGE == null - ? SvgPicture.asset( - "assets/images/user.svg", - height: 68, - width: 68, - ) - : CircleAvatar( - radius: 68, - backgroundImage: MemoryImage(Utils.dataFromBase64String(getEmployeeSubordinates!.eMPLOYEEIMAGE!)), - backgroundColor: Colors.black, - ), + Builder(builder: (context) { + var bytes = Utils.safeDataFromBase64String(getEmployeeSubordinates!.eMPLOYEEIMAGE); + return bytes == null + ? SvgPicture.asset("assets/images/user.svg", height: 68, width: 68) + : CircleAvatar(radius: 68, backgroundImage: MemoryImage(bytes), backgroundColor: Colors.black); + }), // Image.memory( // Utils.getPostBytes( // getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "", diff --git a/lib/ui/my_team/my_team.dart b/lib/ui/my_team/my_team.dart index 6e83972..3be6f25 100644 --- a/lib/ui/my_team/my_team.dart +++ b/lib/ui/my_team/my_team.dart @@ -130,21 +130,20 @@ class _MyTeamState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - getEmployeeSListOnSearch[index].eMPLOYEEIMAGE == null - ? SvgPicture.asset( - "assets/images/user.svg", - height: 34, - width: 34, - ).paddingOnly(top: 4) - : Container( - height: 34, - width: 34, - child: CircleAvatar( - radius: 25, - backgroundImage: MemoryImage(Utils.dataFromBase64String(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE!)), - backgroundColor: Colors.black, - ).paddingOnly(top: 4), - ), + Builder(builder: (context) { + var bytes = Utils.safeDataFromBase64String(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE); + return bytes == null + ? SvgPicture.asset("assets/images/user.svg", height: 34, width: 34).paddingOnly(top: 4) + : Container( + height: 34, + width: 34, + child: CircleAvatar( + radius: 25, + backgroundImage: MemoryImage(bytes), + backgroundColor: Colors.black, + ).paddingOnly(top: 4), + ); + }), 9.width, Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/my_team/team_members.dart b/lib/ui/my_team/team_members.dart index 8847c36..5743b49 100644 --- a/lib/ui/my_team/team_members.dart +++ b/lib/ui/my_team/team_members.dart @@ -82,21 +82,20 @@ class _TeamMembersState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - getEmployeeSubordinatesList[index].eMPLOYEEIMAGE == null - ? SvgPicture.asset( - "assets/images/user.svg", - height: 34, - width: 34, - ).paddingOnly(top: 4) - : Container( - height: 34, - width: 34, - child: CircleAvatar( - radius: 25, - backgroundImage: MemoryImage(Utils.dataFromBase64String(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE!)), - backgroundColor: Colors.black, - ).paddingOnly(top: 4), - ), + Builder(builder: (context) { + var bytes = Utils.safeDataFromBase64String(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE); + return bytes == null + ? SvgPicture.asset("assets/images/user.svg", height: 34, width: 34).paddingOnly(top: 4) + : Container( + height: 34, + width: 34, + child: CircleAvatar( + radius: 25, + backgroundImage: MemoryImage(bytes), + backgroundColor: Colors.black, + ).paddingOnly(top: 4), + ); + }), 9.width, Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/profile/profile_screen.dart b/lib/ui/profile/profile_screen.dart index 6060cbf..11702bf 100644 --- a/lib/ui/profile/profile_screen.dart +++ b/lib/ui/profile/profile_screen.dart @@ -47,23 +47,22 @@ class _ProfileScreenState extends State { body: Stack( children: [ memberInformationList!.eMPLOYEEIMAGE != null - ? Container( - height: 300, - margin: const EdgeInsets.only(top: 50), - decoration: BoxDecoration( - image: DecorationImage( - image: MemoryImage( - Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!), - ), - fit: BoxFit.cover), - ), - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), - child: Container( - color: Colors.white.withOpacity(0.0), + ? Builder(builder: (context) { + var bytes = Utils.safeDataFromBase64String(memberInformationList.eMPLOYEEIMAGE); + return Container( + height: 300, + margin: const EdgeInsets.only(top: 50), + decoration: bytes != null + ? BoxDecoration(image: DecorationImage(image: MemoryImage(bytes), fit: BoxFit.cover)) + : const BoxDecoration(color: Colors.transparent), + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), + child: Container( + color: Colors.white.withOpacity(0.0), + ), ), - ), - ) + ); + }) : Container( decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)), ), diff --git a/lib/ui/profile/widgets/profile_panel.dart b/lib/ui/profile/widgets/profile_panel.dart index 3440cc9..067ce1e 100644 --- a/lib/ui/profile/widgets/profile_panel.dart +++ b/lib/ui/profile/widgets/profile_panel.dart @@ -54,6 +54,7 @@ class ProfilePanel extends StatelessWidget { width: 68, height: 68, fit: BoxFit.fill, + errorBuilder: (context, error, stackTrace) => SvgPicture.asset("assets/images/user.svg", height: 68, width: 68), ), ); } diff --git a/lib/widgets/circular_avatar.dart b/lib/widgets/circular_avatar.dart index a18cf03..60cf975 100644 --- a/lib/widgets/circular_avatar.dart +++ b/lib/widgets/circular_avatar.dart @@ -35,6 +35,7 @@ class CircularAvatar extends StatelessWidget { child: Image.memory( base64Decode(base64String), fit: BoxFit.cover, + errorBuilder: (context, error, stackTrace) => const SizedBox.shrink(), ), ); } diff --git a/lib/widgets/mark_attendance_widget.dart b/lib/widgets/mark_attendance_widget.dart index ee258e1..ec3a400 100644 --- a/lib/widgets/mark_attendance_widget.dart +++ b/lib/widgets/mark_attendance_widget.dart @@ -5,7 +5,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:geolocator/geolocator.dart'; -import 'package:huawei_location/huawei_location.dart'; +// import 'package:huawei_location/huawei_location.dart'; import 'package:mohem_flutter_app/api/dashboard_api_client.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/classes/colors.dart'; @@ -71,63 +71,45 @@ class _MarkAttendanceWidgetState extends State { }); } - void checkHuaweiLocationPermission(String attendanceType) async { - // Permission_Handler permissionHandler = PermissionHandler(); - location.Location.isEnabled((bool isEnabled) async { - if (isEnabled) { - location.Location.havePermission((bool permission) async { - if (permission) { - getHuaweiCurrentLocation(attendanceType); - } else { - bool has = await requestPermissions(); - if (has) { - getHuaweiCurrentLocation(attendanceType); - } else { - showDialog( - context: context, - builder: (BuildContext cxt) => ConfirmDialog( - message: "You need to give location permission to mark attendance", - onTap: () { - Navigator.pop(context); - }, - ), - ); - } - } - }); - } else { - showDialog( - context: context, - builder: (BuildContext cxt) => ConfirmDialog( - message: "You need to enable location services to mark attendance", - onTap: () async { - Navigator.pop(context); - await Geolocator.openLocationSettings(); - }, - ), - ); - } - }); + // void checkHuaweiLocationPermission(String attendanceType) async { + // location.Location.isEnabled((bool isEnabled) async { + // if (isEnabled) { + // location.Location.havePermission((bool permission) async { + // if (permission) { + // getHuaweiCurrentLocation(attendanceType); + // } else { + // bool has = await requestPermissions(); + // if (has) { + // getHuaweiCurrentLocation(attendanceType); + // } else { + // showDialog( + // context: context, + // builder: (BuildContext cxt) => ConfirmDialog( + // message: "You need to give location permission to mark attendance", + // onTap: () { + // Navigator.pop(context); + // }, + // ), + // ); + // } + // } + // }); + // } else { + // showDialog( + // context: context, + // builder: (BuildContext cxt) => ConfirmDialog( + // message: "You need to enable location services to mark attendance", + // onTap: () async { + // Navigator.pop(context); + // await Geolocator.openLocationSettings(); + // }, + // ), + // ); + // } + // }); + // } - // if (await permissionHandler.hasLocationPermission()) { - // getHuaweiCurrentLocation(attendanceType); - // } else { - // bool has = await requestPermissions(); - // if (has) { - // getHuaweiCurrentLocation(attendanceType); - // } else { - // showDialog( - // context: context, - // builder: (BuildContext cxt) => ConfirmDialog( - // message: "You need to give location permission to mark attendance", - // onTap: () { - // Navigator.pop(context); - // }, - // ), - // ); - // } - // } - } + void checkHuaweiLocationPermission(String attendanceType) {} Future requestPermissions() async { var result = await [ @@ -330,77 +312,42 @@ class _MarkAttendanceWidgetState extends State { ); } - void getHuaweiCurrentLocation(String attendanceType) async { - try { - Utils.showLoading(context); - FusedLocationProviderClient locationService = FusedLocationProviderClient()..initFusedLocationService(); - LocationRequest locationRequest = LocationRequest(); - locationRequest.priority = LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY; - locationRequest.interval = 500; - List locationRequestList = [locationRequest]; - LocationSettingsRequest locationSettingsRequest = LocationSettingsRequest(requests: locationRequestList); + // void getHuaweiCurrentLocation(String attendanceType) async { + // try { + // Utils.showLoading(context); + // FusedLocationProviderClient locationService = FusedLocationProviderClient()..initFusedLocationService(); + // LocationRequest locationRequest = LocationRequest(); + // locationRequest.priority = LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY; + // locationRequest.interval = 500; + // List locationRequestList = [locationRequest]; + // LocationSettingsRequest locationSettingsRequest = LocationSettingsRequest(requests: locationRequestList); + // late StreamSubscription _streamSubscription; + // int requestCode = (await (locationService.requestLocationUpdates(locationRequest)))!; + // _streamSubscription = locationService.onLocationData!.listen( + // (Location location) async { + // Utils.hideLoading(context); + // await locationService.removeLocationUpdates(requestCode); + // if (attendanceType == "QR") { + // performQrCodeAttendance(widget.model, lat: location.latitude.toString() ?? "", lng: location.longitude.toString() ?? ""); + // } + // if (attendanceType == "WIFI") { + // performWifiAttendance(widget.model, lat: location.latitude.toString() ?? "", lng: location.longitude.toString() ?? ""); + // } + // if (attendanceType == "NFC") { + // performNfcAttendance(widget.model, lat: location.latitude.toString() ?? "", lng: location.longitude.toString() ?? ""); + // } + // requestCode = 0; + // }, + // ); + // } catch (error) { + // print("HUAWEI LOCATION ERROR!!!!!"); + // print(error); + // Utils.hideLoading(context); + // Utils.handleException(error, context, null); + // } + // } - late StreamSubscription _streamSubscription; - int requestCode = (await (locationService.requestLocationUpdates(locationRequest)))!; - - _streamSubscription = locationService.onLocationData!.listen( - (Location location) async { - Utils.hideLoading(context); - await locationService.removeLocationUpdates(requestCode); - if (attendanceType == "QR") { - performQrCodeAttendance(widget.model, lat: location.latitude.toString() ?? "", lng: location.longitude.toString() ?? ""); - } - if (attendanceType == "WIFI") { - performWifiAttendance(widget.model, lat: location.latitude.toString() ?? "", lng: location.longitude.toString() ?? ""); - } - if (attendanceType == "NFC") { - performNfcAttendance(widget.model, lat: location.latitude.toString() ?? "", lng: location.longitude.toString() ?? ""); - } - requestCode = 0; - }, - ); - - // locationService.checkLocationSettings(locationSettingsRequest).then((settings) async { - // await locationService.getLastLocation().then((value) { - // if (value.latitude == null || value.longitude == null) { - // showDialog( - // context: context, - // builder: (BuildContext cxt) => ConfirmDialog( - // message: "Unable to get your location, Please check your location settings & try again.", - // onTap: () { - // Navigator.pop(context); - // }, - // ), - // ); - // } else { - // if (attendanceType == "QR") { - // performQrCodeAttendance(widget.model, lat: value.latitude.toString() ?? "", lng: value.longitude.toString() ?? ""); - // } - // if (attendanceType == "WIFI") { - // performWifiAttendance(widget.model, lat: value.latitude.toString() ?? "", lng: value.longitude.toString() ?? ""); - // } - // if (attendanceType == "NFC") { - // performNfcAttendance(widget.model, lat: value.latitude.toString() ?? "", lng: value.longitude.toString() ?? ""); - // } - // } - // }).catchError((error) { - // print("HUAWEI LOCATION getLastLocation ERROR!!!!!"); - // print(error); - // }); - // }).catchError((error) { - // print("HUAWEI LOCATION checkLocationSettings ERROR!!!!!"); - // print(error); - // if (error.code == "LOCATION_SETTINGS_NOT_AVAILABLE") { - // // Location service not enabled. - // } - // }); - } catch (error) { - print("HUAWEI LOCATION ERROR!!!!!"); - print(error); - Utils.hideLoading(context); - Utils.handleException(error, context, null); - } - } + void getHuaweiCurrentLocation(String attendanceType) {} Future performNfcAttendance(DashboardProviderModel model, {String lat = "0", String lng = "0"}) async { if (Platform.isIOS) { diff --git a/pubspec.yaml b/pubspec.yaml index a4eda02..b32878e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -114,20 +114,20 @@ dependencies: flutter_layout_grid: ^2.0.1 jiffy: ^6.4.4 - #Huawei Dependencies + #Huawei Dependencies (commented out) # huawei_hmsavailability: ^6.6.0+300 -# huawei_location: 6.0.0+302 - huawei_location: ^6.14.2+301 -# huawei_push: ^6.7.0+300 - - huawei_map: - git: - url: https://github.com/fleoparra/hms-flutter-plugin.git - path: flutter-hms-map - huawei_push: - git: - url: https://github.com/crasowas/hms-flutter-plugin.git - path: flutter-hms-push + # huawei_location: 6.0.0+302 + # huawei_location: ^6.14.2+301 + # huawei_push: ^6.7.0+300 + + # huawei_map: + # git: + # url: https://github.com/fleoparra/hms-flutter-plugin.git + # path: flutter-hms-map + # huawei_push: + # git: + # url: https://github.com/crasowas/hms-flutter-plugin.git + # path: flutter-hms-push firebase_crashlytics: ^4.3.9 #Items for sale Image Carousel Slider @@ -164,6 +164,7 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^1.0.4 + flutter_launcher_icons: ^0.14.3 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -246,6 +247,3 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages - - -# Adding this to test the push from iMac