diff --git a/android/app/build.gradle b/android/app/build.gradle
index 79716a9f..5ef4c760 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -20,12 +20,12 @@ if (project.hasProperty('google-services.json')) {
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
- flutterVersionCode = "63"
+ flutterVersionCode = "5"
}
def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
- flutterVersionName = "1.0.62"
+ flutterVersionName = "1.0.5"
}
def keystorePropertiesFile = rootProject.file("key.properties")
@@ -33,7 +33,7 @@ def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
- namespace = "ae.gov.fcsc.frontend"
+ namespace = "ae.gov.fcsc.stats"
compileSdk = flutter.compileSdkVersion
// ndkVersion = flutter.ndkVersion
ndkVersion = "25.1.8937393"
@@ -48,10 +48,10 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId = "ae.gov.fcsc.frontend"
+ applicationId = "ae.gov.fcsc.stats"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
- minSdk = 23
+ minSdkVersion = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
diff --git a/android/app/google-services.json b/android/app/google-services.json
index 2dfa060b..d8d13fd2 100644
--- a/android/app/google-services.json
+++ b/android/app/google-services.json
@@ -12,7 +12,12 @@
"package_name": "ae.gov.fcsc.frontend"
}
},
- "oauth_client": [],
+ "oauth_client": [
+ {
+ "client_id": "62132243005-rnqthdakjs2ccs1ri7hnh79eh8t6hojl.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
"api_key": [
{
"current_key": "AIzaSyB-QQbnq366f7rrKLVVFJKnSZgR9LcDWFI"
@@ -20,7 +25,41 @@
],
"services": {
"appinvite_service": {
- "other_platform_oauth_client": []
+ "other_platform_oauth_client": [
+ {
+ "client_id": "62132243005-rnqthdakjs2ccs1ri7hnh79eh8t6hojl.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:62132243005:android:a50184ce50e0407d7c7854",
+ "android_client_info": {
+ "package_name": "ae.gov.fcsc.stats"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "62132243005-rnqthdakjs2ccs1ri7hnh79eh8t6hojl.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyB-QQbnq366f7rrKLVVFJKnSZgR9LcDWFI"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "62132243005-rnqthdakjs2ccs1ri7hnh79eh8t6hojl.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
}
}
}
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index a4b15385..a26708e9 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -2,6 +2,7 @@
+
CFBundleVersion
1.0
MinimumOSVersion
- 12.0
+ 13.0
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index dd052587..b92e9ca2 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -76,28 +76,28 @@ PODS:
- AppCheckCore (~> 11.0)
- GTMAppAuth (~> 5.0)
- GTMSessionFetcher/Core (~> 3.3)
- - GoogleUtilities/AppDelegateSwizzler (8.0.2):
+ - GoogleUtilities/AppDelegateSwizzler (8.1.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- - GoogleUtilities/Environment (8.0.2):
+ - GoogleUtilities/Environment (8.1.0):
- GoogleUtilities/Privacy
- - GoogleUtilities/Logger (8.0.2):
+ - GoogleUtilities/Logger (8.1.0):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- - GoogleUtilities/Network (8.0.2):
+ - GoogleUtilities/Network (8.1.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- - "GoogleUtilities/NSData+zlib (8.0.2)":
+ - "GoogleUtilities/NSData+zlib (8.1.0)":
- GoogleUtilities/Privacy
- - GoogleUtilities/Privacy (8.0.2)
- - GoogleUtilities/Reachability (8.0.2):
+ - GoogleUtilities/Privacy (8.1.0)
+ - GoogleUtilities/Reachability (8.1.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- - GoogleUtilities/UserDefaults (8.0.2):
+ - GoogleUtilities/UserDefaults (8.1.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMAppAuth (5.0.0):
@@ -233,14 +233,14 @@ SPEC CHECKSUMS:
FirebaseCoreInternal: ef4505d2afb1d0ebbc33162cb3795382904b5679
FirebaseInstallations: 9980995bdd06ec8081dfb6ab364162bdd64245c3
FirebaseMessaging: 2b9f56aa4ed286e1f0ce2ee1d413aabb8f9f5cb9
- Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
+ Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_native_splash: 6cad9122ea0fad137d23137dd14b937f3e90b145
flutter_secure_storage_darwin: ce237a8775b39723566dc72571190a3769d70468
fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
google_sign_in_ios: 205742c688aea0e64db9da03c33121694a365109
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleSignIn: c7f09cfbc85a1abf69187be091997c317cc33b77
- GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
+ GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
GTMAppAuth: 217a876b249c3c585a54fd6f73e6b58c4f5c4238
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index a737e729..47057df0 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -9,14 +9,14 @@
/* Begin PBXBuildFile section */
0A3628072DBA1754003BB600 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0A3628062DBA1754003BB600 /* GoogleService-Info.plist */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 24C5313A956552DACC6A2F25 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55598A82C8C267A1C98A4CAB /* Pods_Runner.framework */; };
+ 240B527598875F1FE339FA22 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21E5D4AD0E73EDB191B0D3AB /* Pods_Runner.framework */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
- 8ED4634D514CEE8AAD6C53BF /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FA41CC2D981AE62980D7CDE /* Pods_RunnerTests.framework */; };
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 */; };
+ C95A12418F9FFCB720BD8393 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4469EAF9D5EEA501A0DFB6F8 /* Pods_RunnerTests.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -43,22 +43,22 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 0444FC1B1408261D7136E027 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
0A3628062DBA1754003BB600 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; };
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 = ""; };
- 1A00CF12F959681F51F0DFF1 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
+ 21E5D4AD0E73EDB191B0D3AB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 22E09441D41F6799CBD1B240 /* 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 = ""; };
+ 24B0F467E9CA8104D381B202 /* 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 = ""; };
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 = ""; };
+ 4469EAF9D5EEA501A0DFB6F8 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4DE1959C2C14DFF100B07B30 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; };
- 55598A82C8C267A1C98A4CAB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 5FA41CC2D981AE62980D7CDE /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 6CDA306B9D63C636C5E386EA /* 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 = ""; };
+ 5B2FBD20ED5FAB8AE3E2ADF2 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
+ 64832D0DB3389F2E98B4DB8B /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7C6ACEA576E5C2F6C934190C /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.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; };
@@ -66,8 +66,8 @@
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 = ""; };
- D3C1C8E1C6847D14747D5CA0 /* 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 = ""; };
- F3C942613F32EA1A640F6253 /* 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 = ""; };
+ A017ACC7D044E0AB9F6181D9 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
+ DD3A539579E9051D3B376D8C /* 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 */
@@ -75,7 +75,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 24C5313A956552DACC6A2F25 /* Pods_Runner.framework in Frameworks */,
+ 240B527598875F1FE339FA22 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -83,13 +83,22 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 8ED4634D514CEE8AAD6C53BF /* Pods_RunnerTests.framework in Frameworks */,
+ C95A12418F9FFCB720BD8393 /* Pods_RunnerTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 28284A5C1F887F28AE69A945 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 21E5D4AD0E73EDB191B0D3AB /* Pods_Runner.framework */,
+ 4469EAF9D5EEA501A0DFB6F8 /* Pods_RunnerTests.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
@@ -98,15 +107,6 @@
path = RunnerTests;
sourceTree = "";
};
- 749F29DBA04D4F0AC77B3B06 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 55598A82C8C267A1C98A4CAB /* Pods_Runner.framework */,
- 5FA41CC2D981AE62980D7CDE /* Pods_RunnerTests.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@@ -127,7 +127,7 @@
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
F25EA3847C6F2AAFB1DC01FE /* Pods */,
- 749F29DBA04D4F0AC77B3B06 /* Frameworks */,
+ 28284A5C1F887F28AE69A945 /* Frameworks */,
);
sourceTree = "";
};
@@ -159,12 +159,12 @@
F25EA3847C6F2AAFB1DC01FE /* Pods */ = {
isa = PBXGroup;
children = (
- 6CDA306B9D63C636C5E386EA /* Pods-Runner.debug.xcconfig */,
- D3C1C8E1C6847D14747D5CA0 /* Pods-Runner.release.xcconfig */,
- F3C942613F32EA1A640F6253 /* Pods-Runner.profile.xcconfig */,
- 0444FC1B1408261D7136E027 /* Pods-RunnerTests.debug.xcconfig */,
- 1A00CF12F959681F51F0DFF1 /* Pods-RunnerTests.release.xcconfig */,
- 7C6ACEA576E5C2F6C934190C /* Pods-RunnerTests.profile.xcconfig */,
+ 24B0F467E9CA8104D381B202 /* Pods-Runner.debug.xcconfig */,
+ DD3A539579E9051D3B376D8C /* Pods-Runner.release.xcconfig */,
+ 22E09441D41F6799CBD1B240 /* Pods-Runner.profile.xcconfig */,
+ 5B2FBD20ED5FAB8AE3E2ADF2 /* Pods-RunnerTests.debug.xcconfig */,
+ A017ACC7D044E0AB9F6181D9 /* Pods-RunnerTests.release.xcconfig */,
+ 64832D0DB3389F2E98B4DB8B /* Pods-RunnerTests.profile.xcconfig */,
);
path = Pods;
sourceTree = "";
@@ -176,7 +176,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
- 6F0848DEFB39009965C02737 /* [CP] Check Pods Manifest.lock */,
+ ABF7856C364A999DB2217720 /* [CP] Check Pods Manifest.lock */,
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
E02DE8038B90180AEC767AB8 /* Frameworks */,
@@ -195,15 +195,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- EE784DB7875630E76CDE549A /* [CP] Check Pods Manifest.lock */,
+ 74896B3972D4DFE648762369 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 81850966CE8A19C86242963D /* [CP] Embed Pods Frameworks */,
- BBDC9308AF5C3BFCEC84ACC5 /* [CP] Copy Pods Resources */,
+ D647B226474A988311A876B7 /* [CP] Embed Pods Frameworks */,
+ 9DC7C3CC7EB907CC8713FB78 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -292,7 +292,61 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 6F0848DEFB39009965C02737 /* [CP] Check Pods Manifest.lock */ = {
+ 74896B3972D4DFE648762369 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+ 9DC7C3CC7EB907CC8713FB78 /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Copy Pods Resources";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ ABF7856C364A999DB2217720 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -314,7 +368,7 @@
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;
};
- 81850966CE8A19C86242963D /* [CP] Embed Pods Frameworks */ = {
+ D647B226474A988311A876B7 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -322,77 +376,15 @@
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",
);
- outputPaths = (
- );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
- BBDC9308AF5C3BFCEC84ACC5 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- 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;
- };
- EE784DB7875630E76CDE549A /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -487,7 +479,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;
@@ -506,7 +498,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 9;
+ CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_ASSET_PATHS = Runner/Assets.xcassets;
DEVELOPMENT_TEAM = 9N5SRFUGK2;
ENABLE_BITCODE = NO;
@@ -517,7 +509,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.8;
+ MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = ae.gov.fcsc.frontend.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -534,7 +526,7 @@
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 0444FC1B1408261D7136E027 /* Pods-RunnerTests.debug.xcconfig */;
+ baseConfigurationReference = 5B2FBD20ED5FAB8AE3E2ADF2 /* Pods-RunnerTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -552,7 +544,7 @@
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 1A00CF12F959681F51F0DFF1 /* Pods-RunnerTests.release.xcconfig */;
+ baseConfigurationReference = A017ACC7D044E0AB9F6181D9 /* Pods-RunnerTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -568,7 +560,7 @@
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7C6ACEA576E5C2F6C934190C /* Pods-RunnerTests.profile.xcconfig */;
+ baseConfigurationReference = 64832D0DB3389F2E98B4DB8B /* Pods-RunnerTests.profile.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
@@ -632,7 +624,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;
@@ -684,7 +676,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;
@@ -705,7 +697,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 9;
+ CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_ASSET_PATHS = Runner/Assets.xcassets;
DEVELOPMENT_TEAM = 9N5SRFUGK2;
ENABLE_BITCODE = NO;
@@ -716,7 +708,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.8;
+ MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = ae.gov.fcsc.frontend.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -742,7 +734,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 9;
+ CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_ASSET_PATHS = Runner/Assets.xcassets;
DEVELOPMENT_TEAM = 9N5SRFUGK2;
ENABLE_BITCODE = NO;
@@ -753,7 +745,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 1.0.8;
+ MARKETING_VERSION = 1.0.12;
PRODUCT_BUNDLE_IDENTIFIER = ae.gov.fcsc.frontend.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index b7ffc95c..df04d300 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
We need camera access
NSLocalNetworkUsageDescription
This app uses the local network to debug and connect to the Flutter development service.
- NSUserTrackingUsageDescription
- This identifier will be used to deliver personalized ads to you.
UIApplicationSupportsIndirectInputEvents
UIBackgroundModes
diff --git a/lib/config/api_config.dart b/lib/config/api_config.dart
index 997fb132..c32efc27 100644
--- a/lib/config/api_config.dart
+++ b/lib/config/api_config.dart
@@ -1,5 +1,5 @@
// api_config.dart
// const String apiUrl = 'http://127.0.0.1:8090';
// const String apiUrl = 'https://pbdev.venbait.in/';
-// const String apiUrl = 'https://pb.venbait.in/';
-const String apiUrl = 'https://pocket.fcsc.gov.ae/';
+const String apiUrl = 'https://pb.venbait.in/';
+// const String apiUrl = 'https://pocket.fcsc.gov.ae/';
diff --git a/lib/config/app_links_helper.dart b/lib/config/app_links_helper.dart
index e21cdd96..6a8d0b81 100644
--- a/lib/config/app_links_helper.dart
+++ b/lib/config/app_links_helper.dart
@@ -61,7 +61,7 @@ class AppLinksHelper {
}
static void _openAppLinkSettingsAndroid() {
- const packageName = 'ae.gov.fcsc.frontend'; // 🔁 Replace with your app's package
+ const packageName = 'ae.gov.fcsc.stats'; // 🔁 Replace with your app's package
final intent = AndroidIntent(
action: 'android.settings.APP_OPEN_BY_DEFAULT_SETTINGS',
data: 'package:$packageName',
diff --git a/lib/config/sessionCheckScreen.dart b/lib/config/sessionCheckScreen.dart
index 558fb384..12afd8c3 100644
--- a/lib/config/sessionCheckScreen.dart
+++ b/lib/config/sessionCheckScreen.dart
@@ -24,7 +24,7 @@ class _SessionCheckScreenState extends ConsumerState {
bool _isLoading = true;
String get playStoreUrl =>
- "https://play.google.com/store/apps/details?id=ae.gov.fcsc.frontend";
+ "https://play.google.com/store/apps/details?id=ae.gov.fcsc.stats";
@override
void initState() {
diff --git a/lib/main.dart b/lib/main.dart
index 6557ef42..c8bdd643 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -188,7 +188,7 @@ class _MainAppState extends ConsumerState {
appsflyerSdk=AppsflyerSdk(
AppsFlyerOptions(
afDevKey: '7TwqHnPoWcAUuiFGpuCVtF',
- appId: 'ae.gov.fcsc.frontend',
+ appId: 'ae.gov.fcsc.stats',
showDebug: true,
timeToWaitForATTUserAuthorization: 0,
),
diff --git a/lib/presentation/Screens/auth_verification/create_new_pw.dart b/lib/presentation/Screens/auth_verification/create_new_pw.dart
index a33ef3ff..84823353 100644
--- a/lib/presentation/Screens/auth_verification/create_new_pw.dart
+++ b/lib/presentation/Screens/auth_verification/create_new_pw.dart
@@ -14,6 +14,7 @@ import 'package:uae_stat/domain/use_cases/language.dart';
import 'package:uae_stat/infrastructure/data/p_auth_repo.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart';
+import 'package:uae_stat/infrastructure/services/pocketbase_service.dart';
import 'package:uae_stat/presentation/Screens/profilepage.dart';
import 'package:uae_stat/presentation/components/indicators/locale_provider.dart';
import 'package:uae_stat/presentation/components/my_toggle.dart';
@@ -148,26 +149,9 @@ class _CreateNewPwState extends ConsumerState {
setState(() {
isLoading = true;
});
- // Authenticate as admin
- // final adminAuth = await _pb.admins
- // .authWithPassword('pb@venbainfotech.com', 'pb@venbainfotech.com');
-
- final auth = ref.watch(authProvider);
-
- // final adminAuth = await pb.admins.authWithPassword(
- // auth.email,
- // auth.password,
- // );
- // final token = adminAuth.token;
-
- final themeService = ThemeBaseService();
- final token = await themeService.getAdminToken(
- email: auth.email,
- password: auth.password,
- );
final headers = {
- 'Authorization': 'Bearer $token',
+ 'Authorization': 'Bearer ${PocketBaseService.authStore.token}',
};
bool isPasswordValid =
diff --git a/lib/presentation/Screens/auth_verification/forgot_password.dart b/lib/presentation/Screens/auth_verification/forgot_password.dart
index fd2f5cb9..178b1c55 100644
--- a/lib/presentation/Screens/auth_verification/forgot_password.dart
+++ b/lib/presentation/Screens/auth_verification/forgot_password.dart
@@ -6,21 +6,20 @@ import 'package:pocketbase/pocketbase.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:uae_stat/config/api_config.dart';
import 'package:uae_stat/config/connectivity_provider.dart';
-import 'package:uae_stat/config/my_router.dart';
-import 'package:uae_stat/config/theme/auth_provider.dart';
-import 'package:uae_stat/config/theme/service.dart';
import 'package:uae_stat/config/theme/theme_provider.dart';
+import 'package:uae_stat/config/my_router.dart';
import 'package:uae_stat/domain/use_cases/language.dart';
import 'package:uae_stat/infrastructure/data/p_auth_repo.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart';
-import 'package:uae_stat/l10n/app_localizations.dart';
+import 'package:uae_stat/infrastructure/services/pocketbase_service.dart';
import 'package:uae_stat/presentation/Screens/profilepage.dart';
import 'package:uae_stat/presentation/components/indicators/locale_provider.dart';
import 'package:uae_stat/presentation/components/my_toggle.dart';
import 'package:uae_stat/presentation/components/space.dart';
+// import 'package:flutter_gen/gen_l10n/app_localizations.dart';
+import 'package:uae_stat/l10n/app_localizations.dart';
import 'package:uae_stat/config/my_theme.dart';
-import 'package:uae_stat/presentation/routes/drawer_routes/Drawer%20Items/notification/notification.dart';
class ForgotPassword extends ConsumerStatefulWidget {
final String email;
@@ -43,9 +42,12 @@ class _ForgotPasswordState extends ConsumerState {
String? _newPassword;
String? _confirmPassword;
- final fcscBanner = Image.asset(
- BannerAssetPath.fcscLogoLight,
- height: 40,
+ final fcscBanner = Padding(
+ padding: const EdgeInsets.all(30.0),
+ child: Image.asset(
+ BannerAssetPath.fcscLogoLight,
+ height: 40,
+ ),
);
String? _validateNewPassword(String? value) {
@@ -179,31 +181,17 @@ class _ForgotPasswordState extends ConsumerState {
// Authenticate as admin
// final adminAuth = await _pb.admins
// .authWithPassword('pb@venbainfotech.com', 'pb@venbainfotech.com');
-
- final auth = ref.watch(authProvider);
-
- // final adminAuth = await pb.admins.authWithPassword(
- // auth.email,
- // auth.password,
- // );
- //
// final token = adminAuth.token;
- final themeService = ThemeBaseService();
- final token = await themeService.getAdminToken(
- email: auth.email,
- password: auth.password,
- );
-
final headers = {
- 'Authorization': 'Bearer $token',
+ 'Authorization': 'Bearer ${PocketBaseService.authStore.token}',
};
// Step 1: Find User by Email
final result = await _pb.collection('users').getList(
- filter: 'email = "$email"',
- headers: headers,
- );
+ filter: 'email = "$email"',
+ headers: headers,
+ );
if (result.items.isEmpty) {
// throw Exception("User not found");
@@ -213,9 +201,9 @@ class _ForgotPasswordState extends ConsumerState {
'User not found',
style: TextStyle(
fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )),
+ 'Roboto',
+ 'NotoKufi',
+ )),
),
backgroundColor: Colors.red,
),
@@ -226,13 +214,13 @@ class _ForgotPasswordState extends ConsumerState {
// Step 3: Update Password
await _pb.collection('users').update(
- userId,
- body: {
- 'password': newPassword,
- 'passwordConfirm': newPassword,
- },
- headers: headers,
- );
+ userId,
+ body: {
+ 'password': newPassword,
+ 'passwordConfirm': newPassword,
+ },
+ headers: headers,
+ );
setState(() {
isLoading = false;
@@ -245,9 +233,9 @@ class _ForgotPasswordState extends ConsumerState {
AppLocalizations.of(context)!.password_update_successfully,
style: TextStyle(
fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )),
+ 'Roboto',
+ 'NotoKufi',
+ )),
),
backgroundColor: Colors.green,
),
@@ -265,9 +253,9 @@ class _ForgotPasswordState extends ConsumerState {
'Failed to update password: $e',
style: TextStyle(
fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )),
+ 'Roboto',
+ 'NotoKufi',
+ )),
),
backgroundColor: Colors.red,
),
@@ -295,14 +283,13 @@ class _ForgotPasswordState extends ConsumerState {
}
});
- // final themeMode = ref.read(themeProvider);
- // final themeMode = ThemeMode.dark;
- final isDarkTheme = ref.read(themeProvider) == ThemeMode.dark ||
- (ref.read(themeProvider) == ThemeMode.system &&
+ final themeMode = ref.read(themeProvider);
+ final isDarkTheme = themeMode == ThemeMode.dark ||
+ (themeMode == ThemeMode.system &&
MediaQuery.of(context).platformBrightness == Brightness.dark);
return Scaffold(
- backgroundColor: Colors.white,
+ backgroundColor: isDarkTheme ? Color(0xFF111111) : Colors.white,
body: Stack(children: [
SingleChildScrollView(
child: SafeArea(
@@ -313,9 +300,7 @@ class _ForgotPasswordState extends ConsumerState {
),
if (isLoading)
Container(
- color: isDarkTheme
- ? Colors.black
- : Colors.white, // Semi-transparent background
+ color: Color(0x98FFFCE5), // Semi-transparent background
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -325,9 +310,9 @@ class _ForgotPasswordState extends ConsumerState {
child: LinearProgressIndicator(
minHeight: 5, // Adjust thickness
backgroundColor:
- Colors.grey[100], // Optional: Background color
+ Colors.grey[100], // Optional: Background color
valueColor: AlwaysStoppedAnimation(
- Color(0xFFAA8E83)), // Loader color
+ Color(0xFFB68A34)), // Loader color
),
),
],
@@ -338,6 +323,10 @@ class _ForgotPasswordState extends ConsumerState {
Widget _buildPasswordForm(
WidgetRef ref, double screenHeight, double screenWidth) {
+ final themeMode = ref.read(themeProvider);
+ final isDarkTheme = themeMode == ThemeMode.dark ||
+ (themeMode == ThemeMode.system &&
+ MediaQuery.of(context).platformBrightness == Brightness.dark);
final passwordLocale = ref.watch(localeProvider);
return Form(
key: _formKey,
@@ -363,7 +352,7 @@ class _ForgotPasswordState extends ConsumerState {
// Icons.close,
Icons.arrow_back_ios,
size: 24, // Icon size
- color: Colors.black, // Icon color
+ color: isDarkTheme ? Colors.white : Colors.black, // Icon color
),
),
), // Left icon
@@ -412,6 +401,7 @@ class _ForgotPasswordState extends ConsumerState {
'NotoKufi',
),
fontWeight: FontWeight.w300,
+ color: isDarkTheme ? Colors.white : Color(0xFF111111),
),
),
SizedBox(height: 10),
@@ -426,7 +416,7 @@ class _ForgotPasswordState extends ConsumerState {
),
style: TextStyle(
fontSize:
- passwordLocale?.languageCode == 'ar' ? 14 : 15,
+ passwordLocale?.languageCode == 'ar' ? 14 : 15,
fontWeight: FontWeight.w700,
color: Color(0xFF898C81),
fontFamily: context.translate(
@@ -443,7 +433,7 @@ class _ForgotPasswordState extends ConsumerState {
'NotoKufi',
),
fontSize:
- passwordLocale?.languageCode == 'ar' ? 14 : 15,
+ passwordLocale?.languageCode == 'ar' ? 14 : 15,
color: Color(0xFF898C81),
fontWeight: FontWeight.w700),
),
@@ -480,10 +470,17 @@ class _ForgotPasswordState extends ConsumerState {
fit: BoxFit.fitHeight,
height: 25,
width: 25,
- color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
+ color: Color(0xFFB68A34),
+ // color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
+ ),
+ ),
+ errorStyle: TextStyle(
+ color: Color(0xFFD83731),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
),
),
-
suffixIcon: IconButton(
// icon: Icon(
// _obscureNewPassword
@@ -511,15 +508,12 @@ class _ForgotPasswordState extends ConsumerState {
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
- borderSide: BorderSide(
- color:
- MyTheme.topicColor(IndicatorTopic.economy).shade400,
- width: 1),
+ borderSide: BorderSide(color: Color(0xFFB68A34), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color: Colors.deepPurple, width: 2), // Focused border
+ color: Color(0xFFB68A34), width: 2), // Focused border
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
@@ -563,10 +557,16 @@ class _ForgotPasswordState extends ConsumerState {
fit: BoxFit.fitHeight,
height: 25,
width: 25,
- color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
+ color: Color(0xFFB68A34),
+ ),
+ ),
+ errorStyle: TextStyle(
+ color: Color(0xFFD83731),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
),
),
-
suffixIcon: IconButton(
// icon: Icon(
// _obscureConfirmPassword
@@ -594,15 +594,12 @@ class _ForgotPasswordState extends ConsumerState {
// border: OutlineInputBorder(),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
- borderSide: BorderSide(
- color:
- MyTheme.topicColor(IndicatorTopic.economy).shade400,
- width: 1),
+ borderSide: BorderSide(color: Color(0xFFB68A34), width: 1),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color: Colors.deepPurple, width: 2), // Focused border
+ color: Color(0xFFB68A34), width: 2), // Focused border
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
@@ -635,7 +632,7 @@ class _ForgotPasswordState extends ConsumerState {
}
},
style: ElevatedButton.styleFrom(
- backgroundColor: Colors.brown[300],
+ backgroundColor: Color(0xFFB68A34),
padding: EdgeInsets.symmetric(horizontal: 80, vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
@@ -648,7 +645,7 @@ class _ForgotPasswordState extends ConsumerState {
AppLocalizations.of(context)!.save,
style: TextStyle(
fontSize:
- passwordLocale?.languageCode == 'ar' ? 14 : 18,
+ passwordLocale?.languageCode == 'ar' ? 14 : 18,
color: Colors.white,
fontFamily: context.translate(
'Roboto',
@@ -677,7 +674,14 @@ class _ForgotPasswordState extends ConsumerState {
// ),
// ),
// ),
- child: fcscBanner,
+ child: Padding(
+ padding: EdgeInsets.all(30.0),
+ child: Image.asset(
+ isDarkTheme ? BannerAssetPath.fcscLogoDark :
+ BannerAssetPath.fcscLogoLight,
+ height: 40,
+ ),
+ ),
),
],
),
@@ -686,6 +690,12 @@ class _ForgotPasswordState extends ConsumerState {
}
Widget _buildSuccessContent(double screenHeight, double screenWidth) {
+
+ final themeMode = ref.read(themeProvider);
+ final isDarkTheme = themeMode == ThemeMode.dark ||
+ (themeMode == ThemeMode.system &&
+ MediaQuery.of(context).platformBrightness == Brightness.dark);
+
print('IN');
return Padding(
padding: EdgeInsets.all(20.0),
@@ -732,7 +742,7 @@ class _ForgotPasswordState extends ConsumerState {
),
),
backgroundColor: WidgetStatePropertyAll(
- MyTheme.topicColor(IndicatorTopic.social),
+ Color(0xFFB68A34),
),
// surfaceTintColor: MaterialStatePropertyAll(
// MyTheme.economy[800],
@@ -776,10 +786,17 @@ class _ForgotPasswordState extends ConsumerState {
// ),
// ),
// ),
- child: fcscBanner,
+ child: Padding(
+ padding: EdgeInsets.all(30.0),
+ child: Image.asset(
+ isDarkTheme ? BannerAssetPath.fcscLogoDark :
+ BannerAssetPath.fcscLogoLight,
+ height: 40,
+ ),
+ ),
),
],
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart
index 9451cb10..12204ac2 100644
--- a/lib/presentation/Screens/charts/screens/chart_screen.dart
+++ b/lib/presentation/Screens/charts/screens/chart_screen.dart
@@ -144,29 +144,11 @@ class _ChartScreen1State extends ConsumerState {
final prefs = await SharedPreferences.getInstance();
final userID = prefs.getString('userId');
try {
- // final adminAuth = await _pb.admins.authWithPassword(
- // 'pb@venbainfotech.com',
- // 'pb@venbainfotech.com',
- // );
-
- final auth = ref.watch(authProvider);
-
- // final adminAuth = await pb.admins.authWithPassword(
- // auth.email,
- // auth.password,
- // );
- // final adminToken = adminAuth.token;
-
- final themeService = ThemeBaseService();
- // final adminToken = await themeService.getAdminToken(
- // email: auth.email,
- // password: auth.password,
- // );
final result = await _pb.collection('bookmark').getList(
filter: "user_id = '${userID}' && dataset = '${widget.dataSets}'",
headers: {
- 'Authorization': PocketBaseService.authStore.token, // Pass the admin token
+ 'Authorization': 'Bearer ${PocketBaseService.authStore.token}' // Pass the admin token
},
);
@@ -186,16 +168,7 @@ class _ChartScreen1State extends ConsumerState {
final prefs = await SharedPreferences.getInstance();
final userID = prefs.getString('userId');
try {
- // final adminAuth = await _pb.admins
- // .authWithPassword('pb@venbainfotech.com', 'pb@venbainfotech.com');
- final auth = ref.watch(authProvider);
-
- // final adminAuth = await pb.admins.authWithPassword(
- // auth.email,
- // auth.password,
- // );
- // final adminToken = adminAuth.token;
final response = await _pb.collection('bookmark').create(body: {
'user_id': userID,
'dataset': widget.dataSets,
@@ -204,7 +177,7 @@ class _ChartScreen1State extends ConsumerState {
'title': widget.title,
'keyParam': widget.keyParam,
}, headers: {
- 'Authorization': PocketBaseService.authStore.token
+ 'Authorization': 'Bearer ${PocketBaseService.authStore.token}'
});
setState(() {
diff --git a/lib/presentation/Screens/charts/widgets/chart_widget.dart b/lib/presentation/Screens/charts/widgets/chart_widget.dart
index 7ee6ea7a..b51db701 100644
--- a/lib/presentation/Screens/charts/widgets/chart_widget.dart
+++ b/lib/presentation/Screens/charts/widgets/chart_widget.dart
@@ -12,10 +12,10 @@ import 'package:d_chart/d_chart.dart';
class ChartWidget extends StatelessWidget {
ChartWidget(
{Key? key,
- required this.chartData,
- required this.bodyColor,
- required this.chartHeader,
- required this.isDarkTheme})
+ required this.chartData,
+ required this.bodyColor,
+ required this.chartHeader,
+ required this.isDarkTheme})
: super(key: key);
final dynamic chartData;
final Color bodyColor;
@@ -28,64 +28,86 @@ class ChartWidget extends StatelessWidget {
// Define color lists
final Map> colorMap = {
"ECONOMY": [
- Color(0xFF648CBA),
- Color(0xFF90B0D5),
- Color(0xFF98BCE5),
- Color(0xFFA7B5C5),
- Color(0xFFBED3EC),
- Color(0xFFD4E3F4),
+ Color(0xFF89AFD8), // base
+ Color(0xFF6D99CC),
+ Color(0xFF4F82BA),
+ Color(0xFF3A6FA9),
+ Color(0xFF255B96),
],
"SOCIAL": [
- Color(0xFFD9BB99),
- Color(0xFF87766E),
- Color(0xFFC6A885),
- Color(0xFFA28565),
- Color(0xFFBFB29B),
- Color(0xFFE8D8BB),
+ Color(0xFF675863), // base
+ Color(0xFF7A6B76),
+ Color(0xFF8C7E8A),
+ Color(0xFFA0909D),
+ Color(0xFFB4A3B0),
],
"ENVIRONMENT": [
- Color(0xFF376C79),
- Color(0xFF578D9C),
- Color(0xFF7DAFBC),
- Color(0xFF86C7D9),
- // Color(0xFF989898),
+ Color(0xFFB3CF99), // base
+ Color(0xFF9DC280),
+ Color(0xFF86B568),
+ Color(0xFF6FA84F),
+ Color(0xFF5A9C39),
],
+ // "ECONOMY": [
+ // Color(0xFF648CBA),
+ // Color(0xFF90B0D5),
+ // Color(0xFF98BCE5),
+ // Color(0xFFA7B5C5),
+ // Color(0xFFBED3EC),
+ // Color(0xFFD4E3F4),
+ // ],
+ // "SOCIAL": [
+ // Color(0xFFD9BB99),
+ // Color(0xFF87766E),
+ // Color(0xFFC6A885),
+ // Color(0xFFA28565),
+ // Color(0xFFBFB29B),
+ // Color(0xFFE8D8BB),
+ // ],
+ // "ENVIRONMENT": [
+ // Color(0xFF376C79),
+ // Color(0xFF578D9C),
+ // Color(0xFF7DAFBC),
+ // Color(0xFF86C7D9),
+ // // Color(0xFF989898),
+ // ],
};
final Map> colorMapForFour = {
"ECONOMY": [
- Color(0xFF648CBA),
- Color(0xFF90B0D5),
- Color(0xFF98BCE5),
- Color(0xFFA7B5C5),
- Color(0xFFBED3EC),
+ Color(0xFF89AFD8), // base
+ Color(0xFF6D99CC),
+ Color(0xFF4F82BA),
+ Color(0xFF3A6FA9),
+ Color(0xFF255B96),
],
"SOCIAL": [
- Color(0xFFD9BB99),
- Color(0xFF87766E),
- Color(0xFFC6A885),
- Color(0xFFA28565),
- Color(0xFFBFB29B),
+ Color(0xFF675863), // base
+ Color(0xFF7A6B76),
+ Color(0xFF8C7E8A),
+ Color(0xFFA0909D),
+ Color(0xFFB4A3B0),
],
"ENVIRONMENT": [
- Color(0xFF376C79),
- Color(0xFF578D9C),
- Color(0xFF7DAFBC),
- Color(0xFF86C7D9),
+ Color(0xFFB3CF99), // base
+ Color(0xFF9DC280),
+ Color(0xFF86B568),
+ Color(0xFF6FA84F),
+ Color(0xFF5A9C39),
],
};
final Map> colorMapForThree = {
- "ECONOMY": [Color(0xFF648CBA), Color(0xFF90B0D5), Color(0xFF98BCE5)],
- "SOCIAL": [Color(0xFFD9BB99), Color(0xFF87766E), Color(0xFFC6A885)],
- "ENVIRONMENT": [Color(0xFF376C79), Color(0xFF578D9C), Color(0xFF7DAFBC)],
+ "ECONOMY": [Color(0xFF89AFD8), Color(0xFF6D99CC), Color(0xFF4F82BA)],
+ "SOCIAL": [Color(0xFF675863), Color(0xFF7A6B76), Color(0xFF8C7E8A)],
+ "ENVIRONMENT": [Color(0xFFB3CF99), Color(0xFF9DC280), Color(0xFF86B568)],
};
// Define color lists
final Map> colorMapForTwo = {
- "ECONOMY": [Color(0xFF648CBA), Color(0xFF90B0D5)],
- "SOCIAL": [Color(0xFFD9BB99), Color(0xFF87766E)],
- "ENVIRONMENT": [Color(0xFF376C79), Color(0xFF578D9C)],
+ "ECONOMY": [Color(0xFF89AFD8), Color(0xFF6D99CC)],
+ "SOCIAL": [Color(0xFF675863), Color(0xFF7A6B76)],
+ "ENVIRONMENT": [Color(0xFFB3CF99), Color(0xFF9DC280)],
};
// List get uniqueColors => colorMap[chartHeader] ?? [Colors.grey]; // Default to grey if header is unknown
@@ -175,10 +197,10 @@ class ChartWidget extends StatelessWidget {
}
String formatNumberConversion(
- double value,
- String chartConversion,
- String numberFormat,
- ) {
+ double value,
+ String chartConversion,
+ String numberFormat,
+ ) {
// Convert the input value to base unit (actual value)
double baseValue = value;
@@ -209,10 +231,10 @@ class ChartWidget extends StatelessWidget {
}
List parseStackedBarChartData(
- dynamic chartData,
- String groupByKey,
- String groupByValue,
- ) {
+ dynamic chartData,
+ String groupByKey,
+ String groupByValue,
+ ) {
return chartData['response']
.where((entry) => entry['ObsKey'][groupByKey] == groupByValue)
.map((entry) {
@@ -292,8 +314,8 @@ class ChartWidget extends StatelessWidget {
}
return chartData['response'].asMap().entries.map((
- entry,
- ) {
+ entry,
+ ) {
int index = entry.key;
var data = entry.value;
@@ -332,12 +354,12 @@ class ChartWidget extends StatelessWidget {
// displayTitle = '${title.substring(0, endIndex)}...';
displayTitle =
- title.length > 12 ? '${title.substring(0, 12)}...' : title;
+ title.length > 12 ? '${title.substring(0, 12)}...' : title;
} else {
print("DPT2");
String part1 = title.substring(0, min(12, title.length));
String part2 =
- title.length > 12 ? title.substring(12, min(24, title.length)) : '';
+ title.length > 12 ? title.substring(12, min(24, title.length)) : '';
displayTitle = part2.isNotEmpty ? '$part1\n-$part2' : part1;
}
@@ -447,7 +469,7 @@ class ChartWidget extends StatelessWidget {
String title = data['ObsKey'][groupByKeyValue] ?? '';
// String value = data['ObsValue']['Value'].toString();
String shortTitle =
- title.length > 10 ? '${title.substring(0, 10)}…' : title;
+ title.length > 10 ? '${title.substring(0, 10)}…' : title;
// Handle different types: int, double, and String
double value = 0.0;
@@ -506,7 +528,7 @@ class ChartWidget extends StatelessWidget {
return Row(
crossAxisAlignment:
- CrossAxisAlignment.start, // Aligns dot to text start
+ CrossAxisAlignment.start, // Aligns dot to text start
children: [
Container(
width: 10,
@@ -558,9 +580,9 @@ class ChartWidget extends StatelessWidget {
}
List generateIndicatorsBar(
- Map chartData,
- List groupByValues,
- ) {
+ Map chartData,
+ List groupByValues,
+ ) {
List indicators = [];
for (int i = 0; i < groupByValues.length; i++) {
@@ -633,80 +655,80 @@ class ChartWidget extends StatelessWidget {
print('groupByValues $groupByValues');
switch (chartData['chart_type_json']['chart_type']) {
- // case 'stacked_bar':
- // String chartTitle =
- // capitalizeAndSplit(chartData['chart_heading'] ?? '');
- // // Define a list of colors
- // final List uniqueColors = [
- // Color(0xFF648CBA),
- // Color(0xFF90B0D5),
- // Color(0xFF98BCE5),
- // Color(0xFFA7B5C5),
- // Color(0xFFBED3EC),
- // Color(0xFFD4E3F4),
- // ];
- // return SfCartesianChart(
- // primaryXAxis: CategoryAxis(),
- // title: ChartTitle(text: chartData['chart_heading']),
- // legend: Legend(
- // isVisible: true,
- // position: LegendPosition.bottom,
- // overflowMode: LegendItemOverflowMode.scroll,
- // ),
- // tooltipBehavior: TooltipBehavior(
- // enable: true, // Enable tooltips
- // format: 'point.x : point.y', // Custom tooltip format
- // ),
- // series: >[
- // for (int i = 0; i < groupByValues.length; i++)
- // StackedBarSeries(
- // dataSource: parseStackedBarChartData(
- // chartData, groupByKey, groupByValues.elementAt(i)),
- // xValueMapper: (ChartData data, _) => data.x ?? '',
- // yValueMapper: (ChartData data, _) => data.y,
- // name: groupByValues.elementAt(i),
- // color: uniqueColors[i % uniqueColors.length],
- // enableTooltip: true,
- // ),
- // ],
- // );
- // case 'stacked_column':
- // String chartTitle =
- // capitalizeAndSplit(chartData['chart_heading'] ?? '');
- // // Define a list of colors
- // final List uniqueColors = [
- // Color(0xFF648CBA),
- // Color(0xFF90B0D5),
- // Color(0xFF98BCE5),
- // Color(0xFFA7B5C5),
- // Color(0xFFBED3EC),
- // Color(0xFFD4E3F4),
- // ];
- // return SfCartesianChart(
- // primaryXAxis: CategoryAxis(),
- // title: ChartTitle(text: chartData['chart_heading']),
- // legend: Legend(
- // isVisible: true,
- // position: LegendPosition.bottom,
- // overflowMode: LegendItemOverflowMode.scroll,
- // ),
- // tooltipBehavior: TooltipBehavior(
- // enable: true, // Enable tooltips
- // format: 'point.x : point.y', // Custom tooltip format
- // ),
- // series: >[
- // for (int i = 0; i < groupByValues.length; i++)
- // StackedColumnSeries(
- // dataSource: parseStackedBarChartData(
- // chartData, groupByKey, groupByValues.elementAt(i)),
- // xValueMapper: (ChartData data, _) => data.x ?? '',
- // yValueMapper: (ChartData data, _) => data.y,
- // name: groupByValues.elementAt(i),
- // color: uniqueColors[i % uniqueColors.length],
- // enableTooltip: true,
- // ),
- // ],
- // );
+ // case 'stacked_bar':
+ // String chartTitle =
+ // capitalizeAndSplit(chartData['chart_heading'] ?? '');
+ // // Define a list of colors
+ // final List uniqueColors = [
+ // Color(0xFF648CBA),
+ // Color(0xFF90B0D5),
+ // Color(0xFF98BCE5),
+ // Color(0xFFA7B5C5),
+ // Color(0xFFBED3EC),
+ // Color(0xFFD4E3F4),
+ // ];
+ // return SfCartesianChart(
+ // primaryXAxis: CategoryAxis(),
+ // title: ChartTitle(text: chartData['chart_heading']),
+ // legend: Legend(
+ // isVisible: true,
+ // position: LegendPosition.bottom,
+ // overflowMode: LegendItemOverflowMode.scroll,
+ // ),
+ // tooltipBehavior: TooltipBehavior(
+ // enable: true, // Enable tooltips
+ // format: 'point.x : point.y', // Custom tooltip format
+ // ),
+ // series: >[
+ // for (int i = 0; i < groupByValues.length; i++)
+ // StackedBarSeries(
+ // dataSource: parseStackedBarChartData(
+ // chartData, groupByKey, groupByValues.elementAt(i)),
+ // xValueMapper: (ChartData data, _) => data.x ?? '',
+ // yValueMapper: (ChartData data, _) => data.y,
+ // name: groupByValues.elementAt(i),
+ // color: uniqueColors[i % uniqueColors.length],
+ // enableTooltip: true,
+ // ),
+ // ],
+ // );
+ // case 'stacked_column':
+ // String chartTitle =
+ // capitalizeAndSplit(chartData['chart_heading'] ?? '');
+ // // Define a list of colors
+ // final List uniqueColors = [
+ // Color(0xFF648CBA),
+ // Color(0xFF90B0D5),
+ // Color(0xFF98BCE5),
+ // Color(0xFFA7B5C5),
+ // Color(0xFFBED3EC),
+ // Color(0xFFD4E3F4),
+ // ];
+ // return SfCartesianChart(
+ // primaryXAxis: CategoryAxis(),
+ // title: ChartTitle(text: chartData['chart_heading']),
+ // legend: Legend(
+ // isVisible: true,
+ // position: LegendPosition.bottom,
+ // overflowMode: LegendItemOverflowMode.scroll,
+ // ),
+ // tooltipBehavior: TooltipBehavior(
+ // enable: true, // Enable tooltips
+ // format: 'point.x : point.y', // Custom tooltip format
+ // ),
+ // series: >[
+ // for (int i = 0; i < groupByValues.length; i++)
+ // StackedColumnSeries(
+ // dataSource: parseStackedBarChartData(
+ // chartData, groupByKey, groupByValues.elementAt(i)),
+ // xValueMapper: (ChartData data, _) => data.x ?? '',
+ // yValueMapper: (ChartData data, _) => data.y,
+ // name: groupByValues.elementAt(i),
+ // color: uniqueColors[i % uniqueColors.length],
+ // enableTooltip: true,
+ // ),
+ // ],
+ // );
case 'column_chart': // Case 3 for fl_chart column chart
return BarChart(
BarChartData(
@@ -723,8 +745,8 @@ class ChartWidget extends StatelessWidget {
return (value is num)
? value.toDouble()
: value is String
- ? double.tryParse(value) ?? 0.0
- : 0.0;
+ ? double.tryParse(value) ?? 0.0
+ : 0.0;
}).fold(0.0, (prev, element) => prev + element);
ValueNotifier touchedIndex = ValueNotifier(null);
@@ -776,7 +798,7 @@ class ChartWidget extends StatelessWidget {
.touchedSection!.touchedSectionIndex;
} else {
touchedIndex.value =
- null; // Reset when not touching
+ null; // Reset when not touching
}
},
),
@@ -810,7 +832,7 @@ class ChartWidget extends StatelessWidget {
// Change Row to Column
crossAxisAlignment: CrossAxisAlignment.start,
children:
- generateIndicators(chartData, totalValue, context),
+ generateIndicators(chartData, totalValue, context),
),
),
),
@@ -820,7 +842,7 @@ class ChartWidget extends StatelessWidget {
],
);
case 'fl_stacked_bar':
- // Divide groupByValuesList into chunks of 5 items per row
+ // Divide groupByValuesList into chunks of 5 items per row
List groupByValuesList = groupByValues.toList();
int chunkSize = 5;
List> chunkedGroupByValues = [];
@@ -881,11 +903,11 @@ class ChartWidget extends StatelessWidget {
tooltipMargin: 16,
getTooltipColor: (colorMap) => Colors.black,
getTooltipItem: (
- groupData,
- groupIndex,
- rodData,
- rodIndex,
- ) {
+ groupData,
+ groupIndex,
+ rodData,
+ rodIndex,
+ ) {
// Get the list of group names dynamically
List groupNames = [];
@@ -1084,8 +1106,8 @@ class ChartWidget extends StatelessWidget {
List years = (chartData['response'] as List)
.map(
(entry) =>
- int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0,
- )
+ int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0,
+ )
.toList();
// Sort in ascending order
years.sort();
@@ -1115,7 +1137,7 @@ class ChartWidget extends StatelessWidget {
// Filter chart data to only include entries within the last 5 years
List filteredData =
- (chartData['response'] as List).where((entry) {
+ (chartData['response'] as List).where((entry) {
int year = int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0;
return year >= minYear && year <= maxYear;
}).toList();
@@ -1128,7 +1150,7 @@ class ChartWidget extends StatelessWidget {
Set uniqueXValues = filteredData.map((entry) {
String? timePeriod =
- entry['ObsKey']['TIME_PERIOD']; // Nullable String
+ entry['ObsKey']['TIME_PERIOD']; // Nullable String
print('TIME_PERIOD- $timePeriod');
if (timePeriod == null) {
@@ -1214,9 +1236,9 @@ class ChartWidget extends StatelessWidget {
// Now map to Color
Map parsedChartBarColors = chartBarColrs.map((
- key,
- value,
- ) {
+ key,
+ value,
+ ) {
return MapEntry(key, _hexToColor(value));
});
@@ -1225,10 +1247,10 @@ class ChartWidget extends StatelessWidget {
for (String group in groupByValues) {
if (hasBarColors && chartData['dataset'] == 'population') {
groupColorMap[group] =
- parsedChartBarColors[group]!; // Directly assign as Color
+ parsedChartBarColors[group]!; // Directly assign as Color
} else {
groupColorMap[group] =
- uniqueColors[colorIndex % uniqueColors.length];
+ uniqueColors[colorIndex % uniqueColors.length];
}
colorIndex++;
}
@@ -1343,8 +1365,8 @@ class ChartWidget extends StatelessWidget {
List years = (chartData['response'] as List)
.map(
(entry) =>
- int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0,
- )
+ int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0,
+ )
.toList();
if (years.isEmpty) {
@@ -1365,7 +1387,7 @@ class ChartWidget extends StatelessWidget {
// Filter chart data to include only the selected years
List filteredData =
- (chartData['response'] as List).where((entry) {
+ (chartData['response'] as List).where((entry) {
int year = int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0;
return selectedYears.contains(year);
}).toList();
@@ -1373,7 +1395,7 @@ class ChartWidget extends StatelessWidget {
Set uniqueXValues = filteredData
.map(
(entry) => double.parse(entry['ObsKey']['TIME_PERIOD']),
- )
+ )
.toSet();
var chartBarColors = chartData['chart_bar_color'] ?? {};
@@ -1402,10 +1424,10 @@ class ChartWidget extends StatelessWidget {
for (String group in groupByValues) {
if (parsedChartBarColors.containsKey(group)) {
groupColorMap[group] =
- parsedChartBarColors[group]!; // Directly assign as Color
+ parsedChartBarColors[group]!; // Directly assign as Color
} else {
groupColorMap[group] =
- uniqueColors[colorIndex % uniqueColors.length];
+ uniqueColors[colorIndex % uniqueColors.length];
}
colorIndex++;
}
@@ -1487,7 +1509,7 @@ class ChartWidget extends StatelessWidget {
});
return Scaffold(
- backgroundColor: isDarkTheme ? Colors.transparent : Colors.white,
+ backgroundColor: Colors.transparent,
body: Padding(
padding: const EdgeInsets.all(10),
child: LayoutBuilder(
@@ -1496,9 +1518,9 @@ class ChartWidget extends StatelessWidget {
final chartHeight = constraints.maxHeight;
final allSpots = lineBars.expand((line) => line.spots);
final minY =
- allSpots.map((e) => e.y).reduce((a, b) => a < b ? a : b);
+ allSpots.map((e) => e.y).reduce((a, b) => a < b ? a : b);
final maxY =
- allSpots.map((e) => e.y).reduce((a, b) => a > b ? a : b);
+ allSpots.map((e) => e.y).reduce((a, b) => a > b ? a : b);
final xValues = allSpots.map((e) => e.x).toList();
final minX = xValues.reduce((a, b) => a < b ? a : b).toInt();
@@ -1511,7 +1533,7 @@ class ChartWidget extends StatelessWidget {
return Column(
crossAxisAlignment:
- CrossAxisAlignment.center, // ensures center alignment
+ CrossAxisAlignment.center, // ensures center alignment
children: [
Padding(
padding: const EdgeInsets.only(top: 0),
@@ -1567,7 +1589,7 @@ class ChartWidget extends StatelessWidget {
? Colors.white
: Colors.black,
margin:
- EdgeInsets.only(bottom: 2),
+ EdgeInsets.only(bottom: 2),
),
Text(value.toInt().toString(),
style: style),
@@ -1637,15 +1659,15 @@ class ChartWidget extends StatelessWidget {
final xPos = ((spot.x - minX) / (maxX - minX)) *
chartWidth;
final yPos = (1 -
- (spot.y - chartMinY) /
- (chartMaxY - chartMinY)) *
+ (spot.y - chartMinY) /
+ (chartMaxY - chartMinY)) *
chartHeight;
// Prevent label from going outside on the left
double adjustedLeft = math.max(0, xPos - 30);
return Stack(children: [
Positioned(
left:
- adjustedLeft, // fine-tune horizontal position
+ adjustedLeft, // fine-tune horizontal position
top: yPos - 60, // fine-tune vertical position
child: Text(
formatNumber(spot.y),
@@ -1685,7 +1707,7 @@ class ChartWidget extends StatelessWidget {
style: TextStyle(
fontSize: 14,
fontFamily:
- context.translate('Roboto', 'NotoKufi'),
+ context.translate('Roboto', 'NotoKufi'),
),
),
],
@@ -1711,8 +1733,8 @@ class ChartWidget extends StatelessWidget {
List years = (chartData['response'] as List)
.map(
(entry) =>
- int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0,
- )
+ int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0,
+ )
.toList();
if (years.isEmpty) {
@@ -1733,7 +1755,7 @@ class ChartWidget extends StatelessWidget {
// Filter chart data to include only the selected years
List filteredData =
- (chartData['response'] as List).where((entry) {
+ (chartData['response'] as List).where((entry) {
int year = int.tryParse(entry['ObsKey']['TIME_PERIOD'] ?? '0') ?? 0;
return selectedYears.contains(year);
}).toList();
@@ -1741,7 +1763,7 @@ class ChartWidget extends StatelessWidget {
Set uniqueXValues = filteredData
.map(
(entry) => double.parse(entry['ObsKey']['TIME_PERIOD']),
- )
+ )
.toSet();
var chartBarColors = chartData['chart_bar_color'] ?? {};
@@ -1770,10 +1792,10 @@ class ChartWidget extends StatelessWidget {
for (String group in groupByValues) {
if (parsedChartBarColors.containsKey(group)) {
groupColorMap[group] =
- parsedChartBarColors[group]!; // Directly assign as Color
+ parsedChartBarColors[group]!; // Directly assign as Color
} else {
groupColorMap[group] =
- uniqueColors[colorIndex % uniqueColors.length];
+ uniqueColors[colorIndex % uniqueColors.length];
}
colorIndex++;
}
@@ -1878,7 +1900,7 @@ class ChartWidget extends StatelessWidget {
});
return Scaffold(
- backgroundColor: isDarkTheme ? Colors.transparent : Colors.white,
+ backgroundColor: Colors.transparent,
body: Padding(
padding: const EdgeInsets.all(10),
child: LayoutBuilder(
@@ -1887,9 +1909,9 @@ class ChartWidget extends StatelessWidget {
final chartHeight = constraints.maxHeight;
final allSpots = lineBars.expand((line) => line.spots);
final minY =
- allSpots.map((e) => e.y).reduce((a, b) => a < b ? a : b);
+ allSpots.map((e) => e.y).reduce((a, b) => a < b ? a : b);
final maxY =
- allSpots.map((e) => e.y).reduce((a, b) => a > b ? a : b);
+ allSpots.map((e) => e.y).reduce((a, b) => a > b ? a : b);
final xValues = allSpots.map((e) => e.x).toList();
final minX = xValues.reduce((a, b) => a < b ? a : b).toInt();
@@ -1902,7 +1924,7 @@ class ChartWidget extends StatelessWidget {
return Column(
crossAxisAlignment:
- CrossAxisAlignment.center, // ensures center alignment
+ CrossAxisAlignment.center, // ensures center alignment
children: [
Padding(
padding: const EdgeInsets.only(top: 0),
@@ -1958,7 +1980,7 @@ class ChartWidget extends StatelessWidget {
? Colors.white
: Colors.black,
margin:
- EdgeInsets.only(bottom: 2),
+ EdgeInsets.only(bottom: 2),
),
Text(value.toInt().toString(),
style: style),
@@ -2014,7 +2036,7 @@ class ChartWidget extends StatelessWidget {
// Check the group name (plantType) from your groupedData order
final plantType =
- groupedData.keys.toList()[barIndex];
+ groupedData.keys.toList()[barIndex];
print('plantType $plantType');
if (plantType != "Male" &&
@@ -2042,15 +2064,15 @@ class ChartWidget extends StatelessWidget {
final xPos = ((spot.x - minX) / (maxX - minX)) *
chartWidth;
final yPos = (1 -
- (spot.y - chartMinY) /
- (chartMaxY - chartMinY)) *
+ (spot.y - chartMinY) /
+ (chartMaxY - chartMinY)) *
chartHeight;
// Prevent label from going outside on the left
double adjustedLeft = math.max(0, xPos - 30);
return Stack(children: [
Positioned(
left:
- adjustedLeft, // fine-tune horizontal position
+ adjustedLeft, // fine-tune horizontal position
top: yPos - 70, // fine-tune vertical position
child: Text(
formatNumber(spot.y),
@@ -2099,7 +2121,7 @@ class ChartWidget extends StatelessWidget {
),
);
case 'bar_chart':
- // Extract groupBy values and their corresponding y-axis values
+ // Extract groupBy values and their corresponding y-axis values
List xAxisData = [];
List yAxisData = [];
List yAxisLabels = [];
@@ -2116,7 +2138,7 @@ class ChartWidget extends StatelessWidget {
var unitMsr = entry['ObsKey']['UNIT_MEASURE'];
var yValue = entry['ObsValue']['Value'];
var xadditionalgroup =
- chartData['chart_type_json']['additional_x_group'];
+ chartData['chart_type_json']['additional_x_group'];
print('chartData response: ${chartData['response']}');
@@ -2139,12 +2161,12 @@ class ChartWidget extends StatelessWidget {
// Extract QUARTER and convert "Q1", "Q2", etc. to numeric values
int quarterA = int.tryParse(
- a['ObsKey']['QUARTER'].toString().replaceAll('Q', ''),
- ) ??
+ a['ObsKey']['QUARTER'].toString().replaceAll('Q', ''),
+ ) ??
0;
int quarterB = int.tryParse(
- b['ObsKey']['QUARTER'].toString().replaceAll('Q', ''),
- ) ??
+ b['ObsKey']['QUARTER'].toString().replaceAll('Q', ''),
+ ) ??
0;
// First, sort by TIME_PERIOD. If equal, sort by QUARTER
@@ -2179,7 +2201,7 @@ class ChartWidget extends StatelessWidget {
var xTimePeriod = entry['ObsKey']['TIME_PERIOD'];
var yValue = entry['ObsValue']['Value'];
var xadditionalgroup =
- chartData['chart_type_json']['additional_x_group'];
+ chartData['chart_type_json']['additional_x_group'];
if (xValue != null) {
String xLabel = xValue.toString();
@@ -2241,7 +2263,7 @@ class ChartWidget extends StatelessWidget {
child: ConstrainedBox(
constraints: BoxConstraints(
minWidth:
- screenWidth, // Ensure it at least fills available width
+ screenWidth, // Ensure it at least fills available width
maxWidth: chartWidth > screenWidth
? chartWidth
: screenWidth, // Prevent non-normalized constraints
@@ -2255,9 +2277,9 @@ class ChartWidget extends StatelessWidget {
alignment: BarChartAlignment.spaceAround,
maxY: yAxisData.isNotEmpty
? yAxisData.reduce(
- (a, b) => a > b ? a : b,
- ) *
- 1.2
+ (a, b) => a > b ? a : b,
+ ) *
+ 1.2
: 10,
// barTouchData: BarTouchData(
// enabled: true,
@@ -2284,36 +2306,36 @@ class ChartWidget extends StatelessWidget {
handleBuiltInTouches: false,
touchTooltipData: BarTouchTooltipData(
getTooltipColor: (group) =>
- Colors.transparent,
+ Colors.transparent,
// fitInsideHorizontally: true,
// fitInsideVertically: true,
// tooltipPadding: const EdgeInsets.all(8),
tooltipMargin: 1,
getTooltipItem: (
- group,
- groupIndex,
- rod,
- rodIndex,
- ) {
+ group,
+ groupIndex,
+ rod,
+ rodIndex,
+ ) {
// String unitMsrLabel = yAxisLabels.isNotEmpty && groupIndex < yAxisLabels.length
// ? yAxisLabels[groupIndex]
// : '';
// if (rod.toY == 0) return null;
final originalValue =
- rod.toY == 0.1 ? 0.0 : rod.toY;
+ rod.toY == 0.1 ? 0.0 : rod.toY;
String displayValue;
if (originalValue == 0.0) {
displayValue = '0'; // 🔥 clean and simple
} else {
displayValue = (chartConversion != null &&
- chartConversion.isNotEmpty &&
- number_format != null &&
- chartConversion.isNotEmpty)
+ chartConversion.isNotEmpty &&
+ number_format != null &&
+ chartConversion.isNotEmpty)
? formatNumberConversion(
- originalValue,
- chartConversion,
- number_format,
- )
+ originalValue,
+ chartConversion,
+ number_format,
+ )
: formatNumber(originalValue);
}
@@ -2340,9 +2362,9 @@ class ChartWidget extends StatelessWidget {
showTitles: false,
interval: (yAxisData.isNotEmpty
? yAxisData.reduce(
- (a, b) => a > b ? a : b,
- ) /
- 5
+ (a, b) => a > b ? a : b,
+ ) /
+ 5
: 1),
getTitlesWidget: (value, meta) {
return Padding(
@@ -2353,9 +2375,9 @@ class ChartWidget extends StatelessWidget {
'${value.toInt()}',
style: TextStyle(
fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )),
+ 'Roboto',
+ 'NotoKufi',
+ )),
),
);
},
@@ -2374,7 +2396,7 @@ class ChartWidget extends StatelessWidget {
// : title;
String displayTitle = title.length > 10
- ? '${title.substring(0, 7)}\n${title.substring(7, 12)}..'
+ ? '${title.substring(0, 10)}..'
: title;
print('barChartVALUECHECKTITLE $title');
print(
@@ -2387,7 +2409,7 @@ class ChartWidget extends StatelessWidget {
),
child: SizedBox(
width:
- 100, // Limit width to force wrapping
+ 100, // Limit width to force wrapping
child: Transform.rotate(
// angle: -0.5,
angle: 0,
@@ -2401,13 +2423,13 @@ class ChartWidget extends StatelessWidget {
.black, // Change background color
// color: Colors.blueGrey[800], // Change background color
borderRadius:
- BorderRadius.circular(
+ BorderRadius.circular(
8,
), // Optional: rounded corners
),
textStyle: TextStyle(
fontFamily:
- context.translate(
+ context.translate(
'Roboto',
'NotoKufi',
),
@@ -2424,7 +2446,7 @@ class ChartWidget extends StatelessWidget {
textAlign: TextAlign.center,
style: TextStyle(
fontFamily:
- context.translate(
+ context.translate(
'Roboto',
'NotoKufi',
),
@@ -2524,7 +2546,7 @@ class ChartWidget extends StatelessWidget {
],
);
case 'bar_chart_horizontal':
- // Extract groupBy values and their corresponding y-axis values
+ // Extract groupBy values and their corresponding y-axis values
List xAxisData = [];
List yAxisData = [];
List