98 Commits

Author SHA1 Message Date
763c4cdb54 QOL: Build number update to 103 2025-11-05 10:04:30 +02:00
b37f0f71db BUG: Get patient data from tile 2025-11-05 09:59:58 +02:00
8ceb443964 QOL: Update Mzansi AI System PRompt 2025-11-05 09:44:54 +02:00
a87e52d22c NFC deep linking 2025-11-04 12:29:55 +02:00
46c281d288 QOL: Update build to 101 2025-11-04 12:07:47 +02:00
5289cf8511 favourite business fix 2025-11-04 12:07:00 +02:00
22ae804c2d IOS encryption compliance 2025-11-04 12:06:49 +02:00
1a7293fc12 deeplinking fix 2025-11-04 11:43:47 +02:00
e318e03805 QOL: Update build to 100 2025-11-04 11:36:04 +02:00
11b6ec9edb BUG: Update Appointment & Clear Coltrollers 2025-11-04 11:34:28 +02:00
2a7e3e17ce BUG: Bookmarked businesses data load 2025-11-04 11:00:29 +02:00
9cbdc849b1 BUG: back Nav from favourite business selection 2025-11-04 10:17:38 +02:00
0cabe11ab7 BUG: Business Profile Tool Transitions 2025-11-04 10:15:34 +02:00
a561f4fa5f BUG: Set up patient flow 2025-11-03 19:28:52 +02:00
429e91b638 QOL: update guide 2025-11-03 13:12:16 +02:00
c0d152002c QOL: Change reset game to start new game 2025-11-03 11:30:46 +02:00
1329c8aba4 BUG: MIH Ad Display Strategy 2025-11-03 11:27:44 +02:00
52f9eb7ba6 BUG: Add card refresh list 2025-11-03 10:18:29 +02:00
bcff545dd7 BUG: Menue showing in claims in personal mode 2025-11-03 09:25:16 +02:00
6a5b4f7f4b QOL: Location compliance update for app store 2025-11-03 09:20:14 +02:00
yaso-meth
b2b9d8f046 Merge pull request #260 from yaso-meth/V.1.2.2
V.1.2.2
2025-10-31 13:16:34 +02:00
yaso-meth
4c39e9163b Merge branch 'main' into V.1.2.2 2025-10-31 13:15:41 +02:00
yaso-meth
6541ac883f Merge pull request #259 from yaso-meth/V.1.2.1
Add Meta Add Mediation & Build Update
2025-10-31 13:14:47 +02:00
ffe9f6e9fb NEW: Version Update 2025-10-31 12:53:37 +02:00
8e6f3d7d45 Android Config Changes 2025-10-31 12:52:58 +02:00
abd56d5a14 Clean up 2025-10-31 12:18:13 +02:00
cb25b932ba NEW: Patient Manager Provider Setup pt4 2025-10-31 11:55:49 +02:00
771d809ce2 NEW: MIH MineSweeper Package pt4 2025-10-31 11:55:31 +02:00
d6f1629485 NEW: MIH MineSweeper Package Pt 3 2025-10-30 11:58:46 +02:00
39a42048c2 NEW: Patient Manager Provider Setup pt3 2025-10-29 15:43:05 +02:00
99d0fa4aa8 NEW: Patient Manager Provider Setup pt2 2025-10-29 13:59:09 +02:00
79ed959b42 BUG: Dropdown search text disabled 2025-10-29 13:17:05 +02:00
23c3cf4173 NEW: MIH MineSweeper Package pt2 2025-10-29 13:06:55 +02:00
f548db7d82 NEW: Patient Manager Provider Setup pt1 2025-10-27 18:46:20 +02:00
fd2f3a2138 BUG: Fix MIH Logo press on app drawer 2025-10-24 13:11:42 +02:00
1fe817919f QOL: Fix New User Setup flow 2025-10-24 13:00:19 +02:00
656e1cd3d7 QOL: reset providers on signout and signin 2025-10-24 12:59:11 +02:00
a9ea3594b9 QOL: Add reset function to providers 2025-10-24 12:58:29 +02:00
7de2cb7b36 QOL: Update Alert title size 2025-10-24 12:57:49 +02:00
ac22e50eca Change patient profile folder to patient manager 2025-10-23 11:01:39 +02:00
9bd039ca25 NEW: Mzansi Directory Provider Setup 2025-10-22 14:43:01 +02:00
b0d38b4b11 NEW: MIH Access Controlls Provider Setup 2025-10-21 15:42:38 +02:00
926b749fa8 NEW: MIH Calendar Provider Setup 2025-10-21 13:00:52 +02:00
b2ed1e0b51 NEW: About MIH Provider Setup pt2 2025-10-21 10:46:50 +02:00
3dc9ce30e6 NEW: MIH Calc Provider Setup pt2 2025-10-21 10:45:15 +02:00
91241aa399 NEW: Mzansi AI Provider Setup 2025-10-21 10:40:40 +02:00
c79904d132 NEW: complete provider mzansi wallet 2025-10-21 10:22:20 +02:00
15106d0a00 NEW: fix home nav 2025-10-21 09:53:37 +02:00
2e69e1dd92 NEW: MIH Home & Mzansi Profile Provider Setup pt 2 done 2025-10-20 16:41:24 +02:00
c89932755f BUG: Tab movement on password fields 2025-10-20 11:18:06 +02:00
540e13dfe0 mine sweeper pt2 2025-10-17 08:24:23 +02:00
d51603ff5d NEW: MIH Home & Mzansi Profile Provider Setup pt 1 2025-10-16 10:16:18 +02:00
553d22dd6b BUG: Package Auth Loop 2025-10-16 09:59:52 +02:00
5f5107ee99 QOL: Add Long Press to mih button 2025-10-16 09:46:02 +02:00
6ecce1e9ff NEW: MIH MineSweeper Package pt1 2025-10-16 09:45:17 +02:00
22d8c64994 QOL: Change Users to People in About MIH 2025-10-16 09:03:02 +02:00
ebd78eb72b NEW: MIH Authentication Provider Setup 2025-10-13 11:14:11 +02:00
f828ba1786 NEW: About MIH Provider Setup 2025-10-13 10:45:30 +02:00
bbadc58ab8 NEW: MIH Calculator Provider Setup 2025-10-08 15:06:04 +02:00
a1b7a3ef28 NEW: MIH Banner Ads Provider Set Up 2025-10-08 14:43:03 +02:00
7373a1b8cb NEW: Mzansi Wallet Provider Setup 2025-10-08 13:35:47 +02:00
0edbfadc90 NEW: Import & Set Up Provider 2025-10-08 12:53:09 +02:00
ef479b633d NEW: Add Test Device to main dev 2025-10-08 12:51:52 +02:00
081e7d5533 BUG: Special Chars in Business Type 2025-10-08 09:40:34 +02:00
18e8217ce1 NEW: Engen Card Added to Mzansi Wallet 2025-10-07 11:45:37 +02:00
cadd51535e Add Meta Ads SDK 2025-10-07 10:38:26 +02:00
ba394e7fea BUG: Business QR Code Picture Display 2025-10-07 10:38:04 +02:00
04c92804b8 BUG: Fix blank screen on load 2025-10-07 09:49:18 +02:00
a5d72d745d Add Meta Add Mediation & Build Update 2025-10-03 11:04:04 +02:00
yaso-meth
a2d1bebca1 Merge pull request #258 from yaso-meth/V.1.2.1
app sign pt2
2025-10-03 09:49:37 +02:00
69d225f22f app sign pt2 2025-10-02 15:49:12 +02:00
yaso-meth
1a448572ea Merge pull request #257 from yaso-meth/V.1.2.1
app signing
2025-10-02 15:35:25 +02:00
eb4bf4b77b app signing 2025-10-02 15:32:08 +02:00
yaso-meth
04b247aa99 Merge pull request #256 from yaso-meth/V.1.2.1
BUG: Mzansi Wallet Card Scanner
2025-10-02 13:55:34 +02:00
4a1e35d700 BUG: Mzansi Wallet Card Scanner 2025-10-01 20:59:45 +02:00
yaso-meth
aa0d756979 Merge pull request #255 from yaso-meth/V.1.2.1
fix docker compose alignment
2025-10-01 09:27:13 +02:00
f6c631c221 fix docker compose alignment 2025-10-01 09:26:34 +02:00
yaso-meth
16f50f826b Merge pull request #254 from yaso-meth/V.1.2.1
V.1.2.1 First Push
2025-10-01 09:22:45 +02:00
eb2f70e721 miscalanius changes 2 2025-10-01 08:57:35 +02:00
07009f832a miscalanious changes 2025-09-30 19:51:15 +02:00
bcdaf55761 QOL: Selectable Text in Mzansi AI Thoughts 2025-09-30 19:50:40 +02:00
81c932a0e6 NEW: Update version to 1.2.1+98 2025-09-30 11:44:01 +02:00
aabaf21248 QOL: Align fonsize of text pt2 2025-09-30 11:43:36 +02:00
7a2ba21156 QOL: Comment out phpMyAdmin from docker compose 2025-09-30 11:26:55 +02:00
d7af659b23 NEW: Privacy Policy and TOS Popup 2025-09-30 11:12:58 +02:00
9d807f7d28 BUG: Fix PP & TOS in Drawer 2025-09-30 11:11:13 +02:00
6a12fa9e6e BUG: Fix screen brightness changing 2025-09-29 10:57:09 +02:00
de4b6e8fcc QOL: Align fonsize of text 2025-09-29 10:56:44 +02:00
0f0e19b6f3 . 2025-09-25 11:26:22 +02:00
a4be7fb74d QOL: Download Full Business QR Code Image 2025-09-25 11:26:22 +02:00
291882abc5 BUG: Fix Profile Picture Alignment 2025-09-25 11:26:22 +02:00
ffcee3b7a7 NEW: Add user and business count to about MIH 2025-09-25 11:26:22 +02:00
5548a23f69 NEW: Simplified Chinese Privacy Policy and TOS 2025-09-25 11:26:22 +02:00
93e10aad46 QOL: toggle elavation 2025-09-25 11:26:22 +02:00
d7023b8505 Update MIH Pop Up alert 2025-09-25 11:26:22 +02:00
52b71cef61 update android build 2025-09-25 11:26:22 +02:00
058e852e68 Update minio server version 2025-09-25 11:26:22 +02:00
e4dc84647d Add Simplified Chinese Verson of Privacy Policy 2025-09-25 11:26:22 +02:00
263 changed files with 17224 additions and 12158 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited. # This file should be version controlled and should not be manually edited.
version: version:
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49" revision: "8defaa71a77c16e8547abdbfad2053ce3a6e2d5b"
channel: "stable" channel: "stable"
project_type: app project_type: app
@@ -13,11 +13,26 @@ project_type: app
migration: migration:
platforms: platforms:
- platform: root - platform: root
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
- platform: android
create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
- platform: ios
create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
- platform: linux
create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
- platform: macos
create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
- platform: web - platform: web
create_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 761747bfc538b5af34aa0d3fac380f1bc331ec49 base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
- platform: windows
create_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
base_revision: 8defaa71a77c16e8547abdbfad2053ce3a6e2d5b
# User provided section # User provided section

View File

@@ -5,9 +5,10 @@ gradle-wrapper.jar
/gradlew.bat /gradlew.bat
/local.properties /local.properties
GeneratedPluginRegistrant.java GeneratedPluginRegistrant.java
.cxx/
# Remember to never publicly share your keystore. # Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app # See https://flutter.dev/to/reference-keystore
key.properties key.properties
**/*.keystore **/*.keystore
**/*.jks **/*.jks

View File

@@ -1,57 +0,0 @@
{
"agcgw_all":{
"CN":"connect-drcn.dbankcloud.cn",
"CN_back":"connect-drcn.hispace.hicloud.com",
"DE":"connect-dre.dbankcloud.cn",
"DE_back":"connect-dre.hispace.hicloud.com",
"RU":"connect-drru.hispace.dbankcloud.ru",
"RU_back":"connect-drru.hispace.dbankcloud.cn",
"SG":"connect-dra.dbankcloud.cn",
"SG_back":"connect-dra.hispace.hicloud.com"
},
"websocketgw_all":{
"CN":"connect-ws-drcn.hispace.dbankcloud.cn",
"CN_back":"connect-ws-drcn.hispace.dbankcloud.com",
"DE":"connect-ws-dre.hispace.dbankcloud.cn",
"DE_back":"connect-ws-dre.hispace.dbankcloud.com",
"RU":"connect-ws-drru.hispace.dbankcloud.ru",
"RU_back":"connect-ws-drru.hispace.dbankcloud.cn",
"SG":"connect-ws-dra.hispace.dbankcloud.cn",
"SG_back":"connect-ws-dra.hispace.dbankcloud.com"
},
"client":{
"cp_id":"30027000028342692",
"product_id":"461323198429473763",
"client_id":"1605107650066918016",
"client_secret":"F0A7DCFC40BBE823749E9CDAFA95BC7EF6CF37AE4CCC47F20E3434521625E1E1",
"project_id":"461323198429473763",
"app_id":"113315335",
"api_key":"DQEDAFJrB8PGLd+BmY2xafYqt6NgGE+W3ShbW2/b8xNkMTX1Elf1u7NLU73LkMl676mVHeQvLkwluYHi0FEJXEzfXtLR6P6jmW5q5A==",
"package_name":"za.co.mzansiinnovationhub.mih"
},
"oauth_client":{
"client_id":"113315335",
"client_type":1
},
"app_info":{
"app_id":"113315335",
"package_name":"za.co.mzansiinnovationhub.mih"
},
"configuration_version":"3.0",
"appInfos":[
{
"package_name":"za.co.mzansiinnovationhub.mih",
"client":{
"app_id":"113315335"
},
"app_info":{
"package_name":"za.co.mzansiinnovationhub.mih",
"app_id":"113315335"
},
"oauth_client":{
"client_type":1,
"client_id":"113315335"
}
}
]
}

View File

@@ -1,103 +0,0 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
namespace "za.co.mzansiinnovationhub.mih"
compileSdkVersion flutter.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "za.co.mzansiinnovationhub.mih"
// 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.
minSdkVersion 24 //flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
// signingConfig signingConfigs.debug
signingConfig = signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
// implementation("com.google.android.material:material:<version>")
implementation "com.google.android.material:material:1.12.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version"))
// implementation 'com.google.android.gms:play-services-ads:23.1.0'
// implementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
}
// apply plugin: 'com.huawei.agconnect'
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
if (!details.requested.version.startsWith(rootProject.ext.kotlin_version)) {
details.useVersion rootProject.ext.kotlin_version
}
}
}
}
}

View File

@@ -0,0 +1,69 @@
import java.util.Properties
import java.io.FileInputStream
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "za.co.mzansiinnovationhub.mih"
compileSdk = 35
ndkVersion = "27.0.12077973"
// ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "za.co.mzansiinnovationhub.mih"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 23
//minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as String
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("release")
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
}
flutter {
source = "../.."
}

View File

@@ -0,0 +1,5 @@
# R8/ProGuard rules to prevent removal of necessary Facebook Infer annotations
-keep class com.facebook.infer.annotation.** { *; }
-keep interface com.facebook.infer.annotation.** { *; }
-dontwarn com.facebook.infer.annotation.Nullsafe$Mode
-dontwarn com.facebook.infer.annotation.Nullsafe

View File

@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<!-- <uses-permission android:name="com.google.android.gms.permission.AD_ID" <!-- <uses-permission android:name="com.google.android.gms.permission.AD_ID"
tools:node="merge"/> --> tools:node="merge"/> -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" tools:ignore="ProtectedPermissions"/> <uses-permission android:name="android.permission.WRITE_SETTINGS" tools:ignore="ProtectedPermissions"/>
@@ -15,8 +15,6 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" android:maxSdkVersion="32"
tools:replace="android:maxSdkVersion" /> tools:replace="android:maxSdkVersion" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<application <application
android:label="MIH" android:label="MIH"
@@ -27,6 +25,7 @@
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
@@ -63,46 +62,42 @@
<data android:scheme="http" android:host="app.mzansi-innovation-hub.co.za" /> <data android:scheme="http" android:host="app.mzansi-innovation-hub.co.za" />
<data android:scheme="https" android:host="app.mzansi-innovation-hub.co.za" /> <data android:scheme="https" android:host="app.mzansi-innovation-hub.co.za" />
</intent-filter> </intent-filter>
<!-- Old Deep Linking -->
<!-- <intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="app.mzansi-innovation-hub.co.za" />
</intent-filter> -->
</activity> </activity>
<!-- Don't delete the meta-data below. <!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data <meta-data
android:name="flutterEmbedding" android:name="flutterEmbedding"
android:value="2" /> android:value="2" />
<meta-data
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID" android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-4781880856775334~7553757584"/> android:value="ca-app-pub-4781880856775334~7553757584"/>
</application> </application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
<!-- Provide required visibility configuration for API level 30 and above --> In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries> <queries>
<!-- If your app checks for SMS support --> <!-- If your app checks for SMS support -->
<intent> <intent>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" /> <data android:scheme="sms" />
</intent> </intent>
<!-- If your app checks for call support --> <!-- If your app checks for call support -->
<intent> <intent>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" /> <data android:scheme="tel" />
</intent> </intent>
<!-- If your application checks for inAppBrowserView launch mode support --> <!-- If your application checks for inAppBrowserView launch mode support -->
<intent> <intent>
<action android:name="android.support.customtabs.action.CustomTabsService" /> <action android:name="android.support.customtabs.action.CustomTabsService" />
</intent> </intent>
<!-- Text to speech android 11 --> <intent>
<intent> <action android:name="android.intent.action.PROCESS_TEXT"/>
<action android:name="android.intent.action.TTS_SERVICE" /> <data android:mimeType="text/plain"/>
</intent> </intent>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries> </queries>
</manifest> </manifest>

View File

@@ -2,5 +2,4 @@ package za.co.mzansiinnovationhub.mih
import io.flutter.embedding.android.FlutterFragmentActivity import io.flutter.embedding.android.FlutterFragmentActivity
class MainActivity: FlutterFragmentActivity() { class MainActivity : FlutterFragmentActivity()
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/> <background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/> <foreground>
<inset
android:drawable="@drawable/ic_launcher_foreground"
android:inset="16%" />
</foreground>
</adaptive-icon> </adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,34 +0,0 @@
buildscript {
ext.kotlin_version = '2.1.21'
repositories {
google()
mavenCentral()
// maven { url 'https://developer.huawei.com/repo/' }
}
dependencies {
classpath "com.android.tools.build:gradle:8.8.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath 'com.huawei.agconnect:agcp:1.5.2.300'
}
}
allprojects {
repositories {
google()
mavenCentral()
// maven {url 'https://developer.huawei.com/repo/'}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
//subprojects {
// project.evaluationDependsOn(':app')
//}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@@ -0,0 +1,21 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}

View File

@@ -1,6 +1,3 @@
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

View File

@@ -1,7 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip

View File

@@ -1,30 +0,0 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
id "org.jetbrains.kotlin.android" version "2.1.21" apply false
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.8.1' apply false
}
include ":app"

View File

@@ -0,0 +1,25 @@
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.3" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}
include(":app")

View File

@@ -1,16 +1,16 @@
# flutter pub run flutter_launcher_icons # flutter pub run flutter_launcher_icons
flutter_launcher_icons: flutter_launcher_icons:
image_path: "images/app_icon/App_Icon_3.png" image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
android: "launcher_icon" android: "launcher_icon"
# image_path_android: "assets/icon/icon.png" # image_path_android: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21 min_sdk_android: 21 # android min sdk min:16, default 21
adaptive_icon_background: "#3A4454" adaptive_icon_background: "#3A4454"
adaptive_icon_foreground: "images/app_icon/App_Icon_3.png" adaptive_icon_foreground: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
# adaptive_icon_monochrome: "assets/icon/monochrome.png" # adaptive_icon_monochrome: "assets/icon/monochrome.png"
ios: true ios: true
image_path_ios: "images/app_icon/mih_app_icon.png" image_path_ios: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
remove_alpha_channel_ios: true remove_alpha_channel_ios: true
# image_path_ios_dark_transparent: "assets/icon/icon_dark.png" # image_path_ios_dark_transparent: "assets/icon/icon_dark.png"
# image_path_ios_tinted_grayscale: "assets/icon/icon_tinted.png" # image_path_ios_tinted_grayscale: "assets/icon/icon_tinted.png"
@@ -18,15 +18,15 @@ flutter_launcher_icons:
web: web:
generate: true generate: true
image_path: "images/app_icon/circle_logo.png" image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"
background_color: "#3A4454" background_color: "#3A4454"
theme_color: "#3A4454" theme_color: "#3A4454"
windows: windows:
generate: true generate: true
image_path: "images/app_icon/circle_logo.png" image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"
icon_size: 48 # min:48, max:256, default: 48 icon_size: 48 # min:48, max:256, default: 48
macos: macos:
generate: true generate: true
image_path: "images/app_icon/circle_logo.png" image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"

View File

@@ -34,9 +34,12 @@ PODS:
- DKPhotoGallery/Resource (0.0.19): - DKPhotoGallery/Resource (0.0.19):
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
- FBAudienceNetwork (6.20.1)
- file_picker (0.0.1): - file_picker (0.0.1):
- DKImagePickerController/PhotoGallery - DKImagePickerController/PhotoGallery
- Flutter - Flutter
- file_saver (0.0.1):
- Flutter
- fl_downloader (0.0.1): - fl_downloader (0.0.1):
- Flutter - Flutter
- Flutter (1.0.0) - Flutter (1.0.0)
@@ -47,12 +50,18 @@ PODS:
- geolocator_apple (1.2.0): - geolocator_apple (1.2.0):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- gma_mediation_meta (1.4.1):
- Flutter
- GoogleMobileAdsMediationFacebook (~> 6.20.1.0)
- Google-Mobile-Ads-SDK (12.2.0): - Google-Mobile-Ads-SDK (12.2.0):
- GoogleUserMessagingPlatform (>= 1.1) - GoogleUserMessagingPlatform (>= 1.1)
- google_mobile_ads (6.0.0): - google_mobile_ads (6.0.0):
- Flutter - Flutter
- Google-Mobile-Ads-SDK (~> 12.2.0) - Google-Mobile-Ads-SDK (~> 12.2.0)
- webview_flutter_wkwebview - webview_flutter_wkwebview
- GoogleMobileAdsMediationFacebook (6.20.1.0):
- FBAudienceNetwork (= 6.20.1)
- Google-Mobile-Ads-SDK (~> 12.0)
- GoogleUserMessagingPlatform (3.0.0) - GoogleUserMessagingPlatform (3.0.0)
- local_auth_darwin (0.0.1): - local_auth_darwin (0.0.1):
- Flutter - Flutter
@@ -60,6 +69,8 @@ PODS:
- mobile_scanner (7.0.0): - mobile_scanner (7.0.0):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
@@ -91,14 +102,17 @@ DEPENDENCIES:
- app_settings (from `.symlinks/plugins/app_settings/ios`) - app_settings (from `.symlinks/plugins/app_settings/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`)
- file_saver (from `.symlinks/plugins/file_saver/ios`)
- fl_downloader (from `.symlinks/plugins/fl_downloader/ios`) - fl_downloader (from `.symlinks/plugins/fl_downloader/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`) - flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`) - geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`)
- gma_mediation_meta (from `.symlinks/plugins/gma_mediation_meta/ios`)
- google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) - google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`) - mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- printing (from `.symlinks/plugins/printing/ios`) - printing (from `.symlinks/plugins/printing/ios`)
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`) - screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
@@ -113,7 +127,9 @@ SPEC REPOS:
trunk: trunk:
- DKImagePickerController - DKImagePickerController
- DKPhotoGallery - DKPhotoGallery
- FBAudienceNetwork
- Google-Mobile-Ads-SDK - Google-Mobile-Ads-SDK
- GoogleMobileAdsMediationFacebook
- GoogleUserMessagingPlatform - GoogleUserMessagingPlatform
- SDWebImage - SDWebImage
- SwiftyGif - SwiftyGif
@@ -125,6 +141,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/device_info_plus/ios" :path: ".symlinks/plugins/device_info_plus/ios"
file_picker: file_picker:
:path: ".symlinks/plugins/file_picker/ios" :path: ".symlinks/plugins/file_picker/ios"
file_saver:
:path: ".symlinks/plugins/file_saver/ios"
fl_downloader: fl_downloader:
:path: ".symlinks/plugins/fl_downloader/ios" :path: ".symlinks/plugins/fl_downloader/ios"
Flutter: Flutter:
@@ -135,12 +153,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_tts/ios" :path: ".symlinks/plugins/flutter_tts/ios"
geolocator_apple: geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/darwin" :path: ".symlinks/plugins/geolocator_apple/darwin"
gma_mediation_meta:
:path: ".symlinks/plugins/gma_mediation_meta/ios"
google_mobile_ads: google_mobile_ads:
:path: ".symlinks/plugins/google_mobile_ads/ios" :path: ".symlinks/plugins/google_mobile_ads/ios"
local_auth_darwin: local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin" :path: ".symlinks/plugins/local_auth_darwin/darwin"
mobile_scanner: mobile_scanner:
:path: ".symlinks/plugins/mobile_scanner/darwin" :path: ".symlinks/plugins/mobile_scanner/darwin"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin" :path: ".symlinks/plugins/path_provider_foundation/darwin"
printing: printing:
@@ -165,17 +187,22 @@ SPEC CHECKSUMS:
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60 DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
FBAudienceNetwork: 08e86d63a05b3a5a59414af12e4af8d756943c80
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
fl_downloader: dc99aa8dd303f862cccb830087f37acc9b0156ee fl_downloader: dc99aa8dd303f862cccb830087f37acc9b0156ee
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833 flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833
geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e
gma_mediation_meta: 44defcf3b61414cdca65c0f897360e31b9332a09
Google-Mobile-Ads-SDK: 1dfb0c3cb46c7e2b00b0f4de74a1e06d9ea25d67 Google-Mobile-Ads-SDK: 1dfb0c3cb46c7e2b00b0f4de74a1e06d9ea25d67
google_mobile_ads: 535223588a6791b7a3cc3513a1bc7b89d12f3e62 google_mobile_ads: 535223588a6791b7a3cc3513a1bc7b89d12f3e62
GoogleMobileAdsMediationFacebook: b11a92ae3bfdae19853b882252b7e62791c18162
GoogleUserMessagingPlatform: f8d0cdad3ca835406755d0a69aa634f00e76d576 GoogleUserMessagingPlatform: f8d0cdad3ca835406755d0a69aa634f00e76d576
local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391 local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93 mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07 printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07
screen_brightness_ios: 9953fd7da5bd480f1a93990daeec2eb42d4f3b52 screen_brightness_ios: 9953fd7da5bd480f1a93990daeec2eb42d4f3b52

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -2,6 +2,19 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v9wttpbfk9.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>n38lu8286q.skadnetwork</string>
</dict>
</array>
<key>GADApplicationIdentifier</key> <key>GADApplicationIdentifier</key>
<string>ca-app-pub-4781880856775334~6935644635</string> <string>ca-app-pub-4781880856775334~6935644635</string>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
@@ -41,6 +54,8 @@
<string>Why is my app authenticating using face id?</string> <string>Why is my app authenticating using face id?</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string> <string>This app needs access to location when open.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to your location at all times to provide [Explain your specific, complete reason here, e.g., real-time tracking, background updates, etc.].</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>This app needs to access your photo library to select images.</string> <string>This app needs to access your photo library to select images.</string>
<key>NSDownloadsFolderUsageDescription</key> <key>NSDownloadsFolderUsageDescription</key>

View File

@@ -1,6 +1,20 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/about_mih_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_access_controlls_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_authentication_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_banner_ad_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_calculator_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_calendar_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_mine_sweeper_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_ai_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_directory_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_wallet_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/patient_manager_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:provider/provider.dart';
import 'package:upgrader/upgrader.dart';
import 'mih_config/mih_env.dart'; import 'mih_config/mih_env.dart';
import 'mih_config/mih_theme.dart'; import 'mih_config/mih_theme.dart';
@@ -65,13 +79,66 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
double width = MediaQuery.sizeOf(context).width; double width = MediaQuery.sizeOf(context).width;
theme.setScreenType(width); theme.setScreenType(width);
precacheImage(theme.loadingImage(), context); precacheImage(theme.loadingImage(), context);
return MaterialApp.router( return MultiProvider(
title: getTitle(), providers: [
themeMode: ThemeMode.dark, ChangeNotifierProvider(
theme: theme.getThemeData(), create: (context) => MihAuthenticationProvider(),
darkTheme: theme.getThemeData(), ),
debugShowCheckedModeBanner: false, ChangeNotifierProvider(
routerConfig: widget.router, create: (context) => MzansiProfileProvider(),
),
ChangeNotifierProvider(
create: (context) => MzansiWalletProvider(),
),
ChangeNotifierProvider(
create: (context) => MzansiAiProvider(),
),
ChangeNotifierProvider(
create: (context) => MzansiDirectoryProvider(),
),
ChangeNotifierProvider(
create: (context) => MihBannerAdProvider(),
),
ChangeNotifierProvider(
create: (context) => MihCalculatorProvider(),
),
ChangeNotifierProvider(
create: (context) => MihAccessControllsProvider(),
),
ChangeNotifierProvider(
create: (context) => MihCalendarProvider(),
),
ChangeNotifierProvider(
create: (context) => AboutMihProvider(),
),
ChangeNotifierProvider(
create: (context) => MihMineSweeperProvider(),
),
ChangeNotifierProvider(
create: (context) => PatientManagerProvider(),
),
],
child: MaterialApp.router(
title: getTitle(),
themeMode: ThemeMode.dark,
theme: theme.getThemeData(),
darkTheme: theme.getThemeData(),
debugShowCheckedModeBanner: false,
routerConfig: widget.router,
builder: (context, child) {
if (child == null) {
return const Scaffold(
body: Center(
child: CircularProgressIndicator(),
),
);
}
return UpgradeAlert(
navigatorKey: widget.router.routerDelegate.navigatorKey,
child: child,
);
},
),
); );
} }
} }

View File

@@ -20,6 +20,12 @@ void main() async {
apiBasePath: "/auth", apiBasePath: "/auth",
); );
if (!kIsWeb) { if (!kIsWeb) {
const List<String> testDeviceIds = ['733d4c68-9b54-453a-9622-2df407310f40'];
MobileAds.instance.updateRequestConfiguration(
RequestConfiguration(
testDeviceIds: testDeviceIds,
),
);
MobileAds.instance.initialize(); MobileAds.instance.initialize();
} else { } else {
usePathUrlStrategy(); usePathUrlStrategy();
@@ -29,5 +35,7 @@ void main() async {
}); });
final GoRouter appRouter = MihGoRouter().mihRouter; final GoRouter appRouter = MihGoRouter().mihRouter;
FlutterNativeSplash.remove(); FlutterNativeSplash.remove();
runApp(MzansiInnovationHub(router: appRouter,)); runApp(MzansiInnovationHub(
router: appRouter,
));
} }

View File

@@ -0,0 +1,42 @@
class MinesweeperPlayerScore {
String app_id;
String username;
String proPicUrl;
String difficulty;
String game_time;
double game_score;
DateTime played_date;
MinesweeperPlayerScore({
required this.app_id,
required this.username,
required this.proPicUrl,
required this.difficulty,
required this.game_time,
required this.game_score,
required this.played_date,
});
factory MinesweeperPlayerScore.fromJson(Map<String, dynamic> json) {
return MinesweeperPlayerScore(
app_id: json['app_id'],
username: json['username'],
proPicUrl: json['proPicUrl'],
difficulty: json['difficulty'],
game_time: json['game_time'],
game_score: json['game_score'],
played_date: DateTime.parse(json['played_date']),
);
}
Map<String, dynamic> toJson() {
return {
'app_id': app_id,
'username': username,
'proPicUrl': proPicUrl,
'difficulty': difficulty,
'game_time': game_score,
'played_date': played_date.toIso8601String(),
};
}
}

View File

@@ -0,0 +1,29 @@
class UserConsent {
String app_id;
DateTime privacy_policy_accepted;
DateTime terms_of_services_accepted;
UserConsent({
required this.app_id,
required this.privacy_policy_accepted,
required this.terms_of_services_accepted,
});
factory UserConsent.fromJson(Map<String, dynamic> json) {
return UserConsent(
app_id: json['app_id'],
privacy_policy_accepted: DateTime.parse(json['privacy_policy_accepted']),
terms_of_services_accepted:
DateTime.parse(json['terms_of_services_accepted']),
);
}
Map<String, dynamic> toJson() {
return {
'app_id': app_id,
'privacy_policy_accepted': privacy_policy_accepted.toIso8601String(),
'terms_of_services_accepted':
terms_of_services_accepted.toIso8601String(),
};
}
}

View File

@@ -396,7 +396,6 @@ class _PackageToolOneState extends State<PackageToolOne> {
return widget.business != null return widget.business != null
? MihBusinessProfilePreview( ? MihBusinessProfilePreview(
business: widget.business!, business: widget.business!,
myLocation: myLocation,
) )
: Text("NoBusiness Data"); : Text("NoBusiness Data");
} }
@@ -424,7 +423,7 @@ class _PackageToolOneState extends State<PackageToolOne> {
"rating", "rating",
"mission_vision", "mission_vision",
), ),
startUpSearch: '', // startUpSearch: '',
width: 300, width: 300,
).redacted( ).redacted(
context: context, context: context,

View File

@@ -1,10 +1,10 @@
@font-face { @font-face {
font-family: 'Mih_Icons'; font-family: 'icomoon';
src: url('fonts/Mih_Icons.eot?blbuxz'); src: url('fonts/icomoon.eot?8flwgj');
src: url('fonts/Mih_Icons.eot?blbuxz#iefix') format('embedded-opentype'), src: url('fonts/icomoon.eot?8flwgj#iefix') format('embedded-opentype'),
url('fonts/Mih_Icons.ttf?blbuxz') format('truetype'), url('fonts/icomoon.ttf?8flwgj') format('truetype'),
url('fonts/Mih_Icons.woff?blbuxz') format('woff'), url('fonts/icomoon.woff?8flwgj') format('woff'),
url('fonts/Mih_Icons.svg?blbuxz#Mih_Icons') format('svg'); url('fonts/icomoon.svg?8flwgj#icomoon') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
@@ -13,7 +13,7 @@
[class^="icon-"], [class^="icon-"],
[class*=" icon-"] { [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */ /* use !important to prevent issues with browser extensions that change fonts */
font-family: 'Mih_Icons' !important; font-family: 'icomoon' !important;
/* speak: never; */ /* speak: never; */
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
@@ -26,70 +26,74 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-mzansi_directory:before { .icon-mine_sweeper:before {
content: "\e900"; content: "\e900";
} }
.icon-personal_profile:before { .icon-mzansi_directory:before {
content: "\e901"; content: "\e901";
} }
.icon-about_mih:before { .icon-personal_profile:before {
content: "\e902"; content: "\e902";
} }
.icon-access_control:before { .icon-about_mih:before {
content: "\e903"; content: "\e903";
} }
.icon-business_profile:before { .icon-access_control:before {
content: "\e904"; content: "\e904";
} }
.icon-business_setup:before { .icon-business_profile:before {
content: "\e905"; content: "\e905";
} }
.icon-i_dont_know:before { .icon-business_setup:before {
content: "\e906"; content: "\e906";
} }
.icon-mih_logo:before { .icon-calculator:before {
content: "\e907"; content: "\e907";
} }
.icon-mih_ring:before { .icon-calendar:before {
content: "\e908"; content: "\e908";
} }
.icon-mzansi_ai:before { .icon-i_dont_know:before {
content: "\e909"; content: "\e909";
} }
.icon-mzansi_wallet:before { .icon-mih_logo:before {
content: "\e90a"; content: "\e90a";
} }
.icon-notifications:before { .icon-mih_ring:before {
content: "\e90b"; content: "\e90b";
} }
.icon-patient_manager:before { .icon-mzansi_ai:before {
content: "\e90c"; content: "\e90c";
} }
.icon-patient_profile:before { .icon-mzansi_wallet:before {
content: "\e90d"; content: "\e90d";
} }
.icon-profile_setup:before { .icon-notifications:before {
content: "\e90e"; content: "\e90e";
} }
.icon-calculator:before { .icon-patient_manager:before {
content: "\e940"; content: "\e90f";
} }
.icon-calendar:before { .icon-patient_profile:before {
content: "\e953"; content: "\e910";
}
.icon-profile_setup:before {
content: "\e911";
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_banner_ad_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:provider/provider.dart';
class MihBannerAd extends StatefulWidget { class MihBannerAd extends StatefulWidget {
const MihBannerAd({super.key}); const MihBannerAd({super.key});
@@ -10,66 +12,44 @@ class MihBannerAd extends StatefulWidget {
} }
class _MihBannerAdState extends State<MihBannerAd> { class _MihBannerAdState extends State<MihBannerAd> {
BannerAd? _bannerAd;
bool _isBannerAdLoaded = false;
final adUnitId = AppEnviroment.bannerAdUnitId;
String errorMessage = '';
void _loadBannerAd() {
_bannerAd = BannerAd(
adUnitId: adUnitId,
request: const AdRequest(),
size: AdSize.banner,
listener: BannerAdListener(
onAdLoaded: (ad) {
debugPrint('$ad loaded.');
setState(() {
_isBannerAdLoaded = true;
});
},
onAdFailedToLoad: (ad, err) {
debugPrint('BannerAd failed to load: $err');
setState(() {
errorMessage =
'Failed to load ad- Message: ${err.message} Code :${err.code}';
});
ad.dispose(); // Dispose the ad to free resources
},
onAdOpened: (Ad ad) => debugPrint('$ad opened.'),
onAdClosed: (Ad ad) => debugPrint('$ad closed.'),
onAdImpression: (Ad ad) => debugPrint('$ad impression.'),
),
);
_bannerAd!.load();
}
@override @override
void dispose() { void dispose() {
_bannerAd?.dispose(); // Dispose the ad when the widget is removed
super.dispose(); super.dispose();
} }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_loadBannerAd(); MihBannerAdProvider adProvider = context.read<MihBannerAdProvider>();
WidgetsBinding.instance.addPostFrameCallback((_) {
adProvider.reset();
adProvider.loadBannerAd();
});
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Consumer<MihBannerAdProvider>(
children: [ builder: (context, bannerAdProvider, child) {
_bannerAd != null && _isBannerAdLoaded if (!bannerAdProvider.isBannerAdLoaded) {
? SizedBox( return SizedBox();
width: _bannerAd!.size.width.toDouble(), }
height: _bannerAd!.size.height.toDouble(), return Column(
child: AdWidget(ad: _bannerAd!)) children: [
: SizedBox( bannerAdProvider.bannerAd != null &&
child: bannerAdProvider.isBannerAdLoaded
Text(AppEnviroment.getEnv() == "Dev" ? errorMessage : ""), ? SizedBox(
), width: bannerAdProvider.bannerAd!.size.width.toDouble(),
], height: bannerAdProvider.bannerAd!.size.height.toDouble(),
child: AdWidget(ad: bannerAdProvider.bannerAd!))
: SizedBox(
child: Text(AppEnviroment.getEnv() == "Dev"
? bannerAdProvider.errorMessage
: ""),
),
],
);
},
); );
} }
} }

View File

@@ -4,17 +4,17 @@ import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_directory_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart';
import 'package:provider/provider.dart';
class MihBusinessProfilePreview extends StatefulWidget { class MihBusinessProfilePreview extends StatefulWidget {
final Business business; final Business business;
final String? myLocation;
const MihBusinessProfilePreview({ const MihBusinessProfilePreview({
super.key, super.key,
required this.business, required this.business,
required this.myLocation,
}); });
@override @override
@@ -26,10 +26,10 @@ class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
late Future<String> futureImageUrl; late Future<String> futureImageUrl;
PlatformFile? file; PlatformFile? file;
String calculateDistance() { String calculateDistance(MzansiDirectoryProvider directoryProvider) {
try { try {
double distanceInKm = MIHLocationAPI().getDistanceInMeaters( double distanceInKm = MIHLocationAPI().getDistanceInMeaters(
widget.myLocation!, widget.business.gps_location) / directoryProvider.userLocation, widget.business.gps_location) /
1000; 1000;
return "${distanceInKm.toStringAsFixed(2)} km"; return "${distanceInKm.toStringAsFixed(2)} km";
} catch (error) { } catch (error) {
@@ -41,80 +41,88 @@ class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
futureImageUrl =
MihFileApi.getMinioFileUrl(widget.business.logo_path, context);
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double profilePictureWidth = 60; double profilePictureWidth = 60;
return Row( return Consumer<MzansiDirectoryProvider>(
children: [ builder: (BuildContext context, MzansiDirectoryProvider directoryProvider,
FutureBuilder( Widget? child) {
future: futureImageUrl, return Row(
builder: (context, asyncSnapshot) {
if (asyncSnapshot.connectionState == ConnectionState.done &&
asyncSnapshot.hasData) {
if (asyncSnapshot.requireData != "") {
return MihCircleAvatar(
imageFile: NetworkImage(asyncSnapshot.requireData),
width: profilePictureWidth,
editable: false,
fileNameController: TextEditingController(),
userSelectedfile: file,
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
onChange: () {},
);
} else {
return Icon(
MihIcons.iDontKnow,
size: profilePictureWidth,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
} else {
return Icon(
MihIcons.mihRing,
size: profilePictureWidth,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
}
}),
const SizedBox(width: 15),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( FutureBuilder(
widget.business.Name, future: MihFileApi.getMinioFileUrl(
style: TextStyle( widget.business.logo_path, context),
fontWeight: FontWeight.bold, builder: (context, asyncSnapshot) {
fontSize: 18, if (asyncSnapshot.connectionState == ConnectionState.done &&
), asyncSnapshot.hasData) {
), if (asyncSnapshot.requireData != "") {
Text( return MihCircleAvatar(
widget.business.type, imageFile: NetworkImage(asyncSnapshot.requireData),
style: TextStyle( width: profilePictureWidth,
fontWeight: FontWeight.bold, editable: false,
fontSize: 15, fileNameController: TextEditingController(),
), userSelectedfile: file,
), frameColor: MihColors.getSecondaryColor(
Text( MzansiInnovationHub.of(context)!.theme.mode ==
widget.myLocation != null || widget.myLocation!.isEmpty "Dark"),
? calculateDistance() backgroundColor: MihColors.getPrimaryColor(
: "0.00 km", MzansiInnovationHub.of(context)!.theme.mode ==
style: TextStyle( "Dark"),
fontWeight: FontWeight.bold, onChange: () {},
fontSize: 10, );
), } else {
), return Icon(
MihIcons.iDontKnow,
size: profilePictureWidth,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
);
}
} else {
return Icon(
MihIcons.mihRing,
size: profilePictureWidth,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
);
}
}),
const SizedBox(width: 15),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.business.Name,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
Text(
widget.business.type,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15,
),
),
Text(
directoryProvider.userPosition != null
? calculateDistance(directoryProvider)
: "0.00 km",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
],
)
], ],
) );
], },
); );
} }
} }

View File

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
class MihButton extends StatelessWidget { class MihButton extends StatelessWidget {
final void Function()? onPressed; final void Function()? onPressed;
final void Function()? onLongPressed;
final Color buttonColor; final Color buttonColor;
final double? width; final double? width;
final double? height; final double? height;
@@ -12,6 +13,7 @@ class MihButton extends StatelessWidget {
const MihButton({ const MihButton({
super.key, super.key,
required this.onPressed, required this.onPressed,
this.onLongPressed,
required this.buttonColor, required this.buttonColor,
this.width, this.width,
this.height, this.height,
@@ -49,6 +51,7 @@ class MihButton extends StatelessWidget {
highlightColor: rippleColor.withValues(alpha: 0.2), highlightColor: rippleColor.withValues(alpha: 0.2),
hoverColor: rippleColor.withValues(alpha: 0.3), hoverColor: rippleColor.withValues(alpha: 0.3),
onTap: onPressed, onTap: onPressed,
onLongPress: onLongPressed,
child: Container( child: Container(
width: width, width: width,
height: height, height: height,

View File

@@ -1,6 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_calendar_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:provider/provider.dart';
import 'package:table_calendar/table_calendar.dart'; import 'package:table_calendar/table_calendar.dart';
class MIHCalendar extends StatefulWidget { class MIHCalendar extends StatefulWidget {
@@ -19,16 +22,29 @@ class MIHCalendar extends StatefulWidget {
} }
class _MIHCalendarState extends State<MIHCalendar> { class _MIHCalendarState extends State<MIHCalendar> {
DateTime selectedDay = DateTime.now(); late DateTime selectedDay;
CalendarFormat _calendarFormat = CalendarFormat.week; CalendarFormat _calendarFormat = CalendarFormat.week;
void onDaySelected(DateTime day, DateTime focusedDay) { void onDaySelected(DateTime day, DateTime focusedDay) {
KenLogger.success("Selected Day: $day");
setState(() { setState(() {
selectedDay = day; selectedDay = day;
}); });
widget.setDate(selectedDay.toString().split(" ")[0]); widget.setDate(selectedDay.toString().split(" ")[0]);
} }
@override
void initState() {
super.initState();
MihCalendarProvider mihCalendarProvider =
context.read<MihCalendarProvider>();
if (mihCalendarProvider.selectedDay.isNotEmpty) {
selectedDay = DateTime.parse(mihCalendarProvider.selectedDay);
} else {
selectedDay = DateTime.now();
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SizedBox( return SizedBox(

View File

@@ -10,7 +10,7 @@ class MihCircleAvatar extends StatefulWidget {
final ImageProvider<Object>? imageFile; final ImageProvider<Object>? imageFile;
final double width; final double width;
final bool editable; final bool editable;
final TextEditingController fileNameController; final TextEditingController? fileNameController;
final onChange; final onChange;
final PlatformFile? userSelectedfile; final PlatformFile? userSelectedfile;
final Color frameColor; final Color frameColor;
@@ -73,6 +73,7 @@ class _MihCircleAvatarState extends State<MihCircleAvatar> {
Visibility( Visibility(
visible: imagePreview != null, visible: imagePreview != null,
child: Positioned( child: Positioned(
right: widget.width * 0.03,
child: CircleAvatar( child: CircleAvatar(
radius: widget.width / 2.2, radius: widget.width / 2.2,
backgroundColor: widget.backgroundColor, backgroundColor: widget.backgroundColor,
@@ -129,7 +130,7 @@ class _MihCircleAvatarState extends State<MihCircleAvatar> {
}); });
setState(() { setState(() {
widget.fileNameController.text = selectedFile.name; widget.fileNameController!.text = selectedFile.name;
}); });
} else { } else {
if (result != null) { if (result != null) {
@@ -147,7 +148,7 @@ class _MihCircleAvatarState extends State<MihCircleAvatar> {
}); });
setState(() { setState(() {
widget.fileNameController.text = widget.fileNameController!.text =
file.path.split('/').last; file.path.split('/').last;
}); });
} else { } else {
@@ -156,7 +157,7 @@ class _MihCircleAvatarState extends State<MihCircleAvatar> {
} }
} }
} catch (e) { } catch (e) {
print("Error: $e"); print("Here Error: $e");
} }
}, },
icon: Icon( icon: Icon(

View File

@@ -10,6 +10,7 @@ class MihDropdownField extends StatefulWidget {
final bool editable; final bool editable;
final bool enableSearch; final bool enableSearch;
final FormFieldValidator<String>? validator; final FormFieldValidator<String>? validator;
final Function(String?)? onSelected;
const MihDropdownField({ const MihDropdownField({
super.key, super.key,
@@ -20,6 +21,7 @@ class MihDropdownField extends StatefulWidget {
required this.editable, required this.editable,
required this.enableSearch, required this.enableSearch,
this.validator, this.validator,
this.onSelected,
}); });
@override @override
@@ -117,8 +119,10 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
enableSearch: widget.enableSearch, enableSearch: widget.enableSearch,
enableFilter: widget.enableSearch, enableFilter: widget.enableSearch,
enabled: widget.editable, enabled: widget.editable,
textInputAction: TextInputAction.search, textInputAction: widget.enableSearch
requestFocusOnTap: true, ? TextInputAction.search
: TextInputAction.none,
requestFocusOnTap: widget.enableSearch,
menuHeight: 400, menuHeight: 400,
expandedInsets: EdgeInsets.zero, expandedInsets: EdgeInsets.zero,
textStyle: TextStyle( textStyle: TextStyle(
@@ -153,6 +157,7 @@ class _MihDropdownFieldState extends State<MihDropdownField> {
), ),
onSelected: (String? selectedValue) { onSelected: (String? selectedValue) {
field.didChange(selectedValue); field.didChange(selectedValue);
widget.onSelected?.call(selectedValue);
}, },
menuStyle: MenuStyle( menuStyle: MenuStyle(
backgroundColor: WidgetStatePropertyAll( backgroundColor: WidgetStatePropertyAll(

View File

@@ -11,54 +11,57 @@ class MihIcons {
// IconData constants based on your style.css file // IconData constants based on your style.css file
// Note: We convert the hex code from CSS (\eXXX) to an integer (0xeXXX) // Note: We convert the hex code from CSS (\eXXX) to an integer (0xeXXX)
static const IconData mzansiDirectory = static const IconData mineSweeper =
IconData(0xe900, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe900, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData personalProfile = static const IconData mzansiDirectory =
IconData(0xe901, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe901, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData aboutMih = static const IconData personalProfile =
IconData(0xe902, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe902, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData accessControl = static const IconData aboutMih =
IconData(0xe903, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe903, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData businessProfile = static const IconData accessControl =
IconData(0xe904, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe904, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData businessSetup = static const IconData businessProfile =
IconData(0xe905, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe905, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData iDontKnow = static const IconData businessSetup =
IconData(0xe906, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe906, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData mihLogo = static const IconData calculator =
IconData(0xe907, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe907, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData mihRing = static const IconData calendar =
IconData(0xe908, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe908, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData mzansiAi = static const IconData iDontKnow =
IconData(0xe909, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe909, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData mzansiWallet = static const IconData mihLogo =
IconData(0xe90a, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe90a, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData notifications = static const IconData mihRing =
IconData(0xe90b, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe90b, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData patientManager = static const IconData mzansiAi =
IconData(0xe90c, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe90c, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData patientProfile = static const IconData mzansiWallet =
IconData(0xe90d, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe90d, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData profileSetup = static const IconData notifications =
IconData(0xe90e, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe90e, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData calculator = static const IconData patientManager =
IconData(0xe940, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe90f, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData calendar = static const IconData patientProfile =
IconData(0xe953, fontFamily: _mihFontFam, fontPackage: _mihFontPkg); IconData(0xe910, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
static const IconData profileSetup =
IconData(0xe911, fontFamily: _mihFontFam, fontPackage: _mihFontPkg);
} }

View File

@@ -2,6 +2,7 @@ import 'dart:io';
import 'package:file_picker/file_picker.dart'; import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
@@ -32,19 +33,9 @@ class _MihImageDisplayState extends State<MihImageDisplay> {
late ImageProvider<Object>? imagePreview; late ImageProvider<Object>? imagePreview;
ImageProvider<Object>? getImage() { ImageProvider<Object>? getImage() {
Color dark = const Color(0XFF3A4454); KenLogger.success(widget.imageFile.toString());
if (widget.imageFile == null) { if (widget.imageFile == null) {
if (MihColors.getSecondaryColor( return null;
MzansiInnovationHub.of(context)!.theme.mode == "Dark") ==
dark) {
print("here in light icon");
return const AssetImage(
'lib/mih_components/mih_package_components/assets/images/i-dont-know-dark.png');
} else {
print("here in dark icon");
return const AssetImage(
'lib/mih_components/mih_package_components/assets/images/i-dont-know-light.png');
}
} else { } else {
return widget.imageFile; return widget.imageFile;
} }
@@ -69,10 +60,26 @@ class _MihImageDisplayState extends State<MihImageDisplay> {
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
ClipRRect( imagePreview != null
borderRadius: BorderRadius.circular(widget.width * 0.1), ? ClipRRect(
child: Image(image: imagePreview!), borderRadius: BorderRadius.circular(widget.width * 0.1),
), child: Image(image: imagePreview!),
)
: Container(
width: widget.width,
height: widget.height,
decoration: BoxDecoration(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
borderRadius: BorderRadius.circular(widget.width * 0.1),
),
child: Icon(
Icons.image_not_supported_rounded,
size: widget.width * 0.3,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
),
Visibility( Visibility(
visible: widget.editable, visible: widget.editable,
child: Positioned( child: Positioned(
@@ -133,7 +140,7 @@ class _MihImageDisplayState extends State<MihImageDisplay> {
} }
} }
} catch (e) { } catch (e) {
print("Error: $e"); print("here 2 Error: $e");
} }
}, },
icon: const Icon( icon: const Icon(

View File

@@ -1,3 +1,4 @@
import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
@@ -34,7 +35,7 @@ class _MihPackageAlertState extends State<MihPackageAlert> {
setState(() { setState(() {
popUpWidth = (size!.width / 4) * 2; popUpWidth = (size!.width / 4) * 2;
popUpheight = null; popUpheight = null;
popUpTitleSize = 25.0; popUpTitleSize = 30.0;
popUpSubtitleSize = 20.0; popUpSubtitleSize = 20.0;
popUpBodySize = 15; popUpBodySize = 15;
popUpPaddingSize = 25.0; popUpPaddingSize = 25.0;
@@ -44,7 +45,7 @@ class _MihPackageAlertState extends State<MihPackageAlert> {
setState(() { setState(() {
popUpWidth = size!.width - (size!.width * 0.1); popUpWidth = size!.width - (size!.width * 0.1);
popUpheight = null; popUpheight = null;
popUpTitleSize = 20.0; popUpTitleSize = 25.0;
popUpSubtitleSize = 18.0; popUpSubtitleSize = 18.0;
popUpBodySize = 15; popUpBodySize = 15;
popUpPaddingSize = 15.0; popUpPaddingSize = 15.0;
@@ -99,7 +100,7 @@ class _MihPackageAlertState extends State<MihPackageAlert> {
height: 50, height: 50,
child: IconButton( child: IconButton(
onPressed: () { onPressed: () {
Navigator.pop(context); context.pop();
}, },
icon: Icon( icon: Icon(
Icons.close, Icons.close,

View File

@@ -191,18 +191,21 @@ class _MihTextFormFieldState extends State<MihTextFormField> {
), ),
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: widget.passwordMode == true suffixIcon: widget.passwordMode == true
? IconButton( ? FocusScope(
icon: Icon( canRequestFocus: false,
_obscureText child: IconButton(
? Icons.visibility_off icon: Icon(
: Icons.visibility, _obscureText
color: widget.inputColor, ? Icons.visibility_off
: Icons.visibility,
color: widget.inputColor,
),
onPressed: () {
setState(() {
_obscureText = !_obscureText;
});
},
), ),
onPressed: () {
setState(() {
_obscureText = !_obscureText;
});
},
) )
: null, : null,
errorStyle: const TextStyle( errorStyle: const TextStyle(

View File

@@ -8,6 +8,7 @@ class MihToggle extends StatefulWidget {
final Color fillColor; final Color fillColor;
final Color secondaryFillColor; final Color secondaryFillColor;
final bool? readOnly; final bool? readOnly;
final double? elevation;
final void Function(bool) onChange; final void Function(bool) onChange;
const MihToggle({ const MihToggle({
super.key, super.key,
@@ -16,6 +17,7 @@ class MihToggle extends StatefulWidget {
required this.fillColor, required this.fillColor,
required this.secondaryFillColor, required this.secondaryFillColor,
this.readOnly, this.readOnly,
this.elevation,
required this.onChange, required this.onChange,
}); });
@@ -59,49 +61,73 @@ class _MihToggleState extends State<MihToggle> {
), ),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
Switch( // Material(
value: togglePosition, // elevation: widget.elevation ?? 0.01,
trackOutlineColor: WidgetStateProperty.resolveWith<Color?>( // shadowColor: widget.secondaryFillColor.withOpacity(0.5),
(states) { // color: Colors.transparent,
if (widget.readOnly == true) { // shape: StadiumBorder(),
return Colors.grey; Container(
} decoration: BoxDecoration(
if (states.contains(WidgetState.selected)) { color: Colors.transparent,
return MihColors.getGreenColor( borderRadius: BorderRadius.circular(
30), // Adjust the border radius to match the toggle
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
offset: Offset(
0, widget.elevation ?? 10), // Adjust the vertical offset
blurRadius: widget.elevation ?? 10,
spreadRadius: 0,
),
],
),
child: Switch(
value: togglePosition,
trackOutlineColor: WidgetStateProperty.resolveWith<Color?>(
(states) {
if (widget.readOnly == true) {
return Colors.grey;
}
if (states.contains(WidgetState.selected)) {
return MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"); // Outline color when active
}
return MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"); // Outline color when active "Dark"); // Outline color when active
} },
return MihColors.getRedColor( ),
MzansiInnovationHub.of(context)!.theme.mode == activeColor: widget.readOnly == true
"Dark"); // Outline color when active ? Colors.grey
}, : widget.secondaryFillColor,
activeTrackColor: widget.readOnly == true
? Colors.grey.shade400
: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inactiveThumbColor: widget.readOnly == true
? Colors.grey
: widget.secondaryFillColor,
inactiveTrackColor: widget.readOnly == true
? Colors.grey.shade400
: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// activeColor: widget.secondaryFillColor,
// activeTrackColor: widget.fillColor,
// inactiveThumbColor: widget.fillColor,
// inactiveTrackColor: widget.secondaryFillColor,
// onChanged: widget.readOnly != true ? widget.onChange : null,
onChanged: widget.readOnly != true
? (newValue) {
setState(() {
togglePosition = newValue; // Update internal state
});
widget.onChange(newValue); // Call the parent's onChange
}
: null,
), ),
activeColor:
widget.readOnly == true ? Colors.grey : widget.secondaryFillColor,
activeTrackColor: widget.readOnly == true
? Colors.grey.shade400
: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
inactiveThumbColor:
widget.readOnly == true ? Colors.grey : widget.secondaryFillColor,
inactiveTrackColor: widget.readOnly == true
? Colors.grey.shade400
: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// activeColor: widget.secondaryFillColor,
// activeTrackColor: widget.fillColor,
// inactiveThumbColor: widget.fillColor,
// inactiveTrackColor: widget.secondaryFillColor,
// onChanged: widget.readOnly != true ? widget.onChange : null,
onChanged: widget.readOnly != true
? (newValue) {
setState(() {
togglePosition = newValue; // Update internal state
});
widget.onChange(newValue); // Call the parent's onChange
}
: null,
), ),
const SizedBox(width: 10),
], ],
); );
} }

View File

@@ -0,0 +1,19 @@
import 'package:flutter/foundation.dart';
class AboutMihProvider extends ChangeNotifier {
int toolIndex;
AboutMihProvider({
this.toolIndex = 0,
});
void reset() {
toolIndex = 0;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
}

View File

@@ -0,0 +1,37 @@
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
class MihAccessControllsProvider extends ChangeNotifier {
int toolIndex;
List<PatientAccess>? accessList;
MihAccessControllsProvider({
this.toolIndex = 0,
});
void reset() {
toolIndex = 0;
accessList = null;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
}
void setAccessList(List<PatientAccess> accesses) {
accessList = accesses;
notifyListeners();
}
void editAccessItem(PatientAccess updatedAccess) {
if (accessList == null) return;
int index = accessList!.indexWhere((access) =>
access.app_id == updatedAccess.app_id &&
access.business_id == updatedAccess.business_id);
if (index != -1) {
accessList![index] = updatedAccess;
notifyListeners();
}
}
}

View File

@@ -0,0 +1,19 @@
import 'package:flutter/foundation.dart';
class MihAuthenticationProvider extends ChangeNotifier {
int toolIndex;
MihAuthenticationProvider({
this.toolIndex = 0,
});
void reset() {
toolIndex = 0;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
}

View File

@@ -0,0 +1,62 @@
import 'package:flutter/foundation.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
class MihBannerAdProvider extends ChangeNotifier {
BannerAd? bannerAd;
final adUnitId = AppEnviroment.bannerAdUnitId;
bool isBannerAdLoaded = false;
String errorMessage = '';
MihBannerAdProvider({
this.bannerAd,
this.isBannerAdLoaded = false,
this.errorMessage = '',
});
void reset() {
bannerAd = null;
isBannerAdLoaded = false;
errorMessage = "";
notifyListeners();
}
@override
void dispose() {
bannerAd?.dispose();
super.dispose();
}
void loadBannerAd() {
if (bannerAd != null) {
bannerAd!.dispose();
bannerAd = null;
isBannerAdLoaded = false;
}
bannerAd = BannerAd(
adUnitId: adUnitId,
request: const AdRequest(),
size: AdSize.banner,
listener: BannerAdListener(
onAdLoaded: (ad) {
debugPrint('$ad loaded.');
isBannerAdLoaded = true;
notifyListeners();
},
onAdFailedToLoad: (ad, err) {
debugPrint('BannerAd failed to load: $err');
errorMessage =
'Failed to load ad- Message: ${err.message} Code :${err.code}';
ad.dispose(); // Dispose the ad to free resources
isBannerAdLoaded = false; // ⬅️ Explicitly set to false
bannerAd = null; // ⬅️ Explicitly set to null
notifyListeners();
},
onAdOpened: (Ad ad) => debugPrint('$ad opened.'),
onAdClosed: (Ad ad) => debugPrint('$ad closed.'),
onAdImpression: (Ad ad) => debugPrint('$ad impression.'),
),
);
bannerAd!.load();
}
}

View File

@@ -0,0 +1,27 @@
import 'package:flutter/foundation.dart';
class MihCalculatorProvider extends ChangeNotifier {
List<String> availableCurrencies;
int toolIndex;
MihCalculatorProvider({
this.availableCurrencies = const [],
this.toolIndex = 0,
});
void reset() {
availableCurrencies = [];
toolIndex = 0;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
void setAvailableCurrencies({required List<String> currencies}) async {
availableCurrencies = currencies;
notifyListeners();
}
}

View File

@@ -0,0 +1,89 @@
import 'package:flutter/foundation.dart';
import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/appointment.dart';
class MihCalendarProvider extends ChangeNotifier {
int toolIndex;
String selectedDay = DateTime.now().toString().split(" ")[0];
List<Appointment>? personalAppointments;
List<Appointment>? businessAppointments;
MihCalendarProvider({
this.toolIndex = 0,
});
void reset() {
toolIndex = 0;
personalAppointments = null;
businessAppointments = null;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
void setSelectedDay(String day) {
selectedDay = day;
notifyListeners();
}
void resetSelectedDay() {
selectedDay = DateTime.now().toString().split(" ")[0];
notifyListeners();
}
void setPersonalAppointments({required List<Appointment> appointments}) {
personalAppointments = appointments;
notifyListeners();
}
void setBusinessAppointments({required List<Appointment> appointments}) {
businessAppointments = appointments;
notifyListeners();
}
void addPersonalAppointment({required Appointment newAppointment}) {
personalAppointments?.add(newAppointment);
notifyListeners();
}
void addBusinessAppointment({required Appointment newAppointment}) {
businessAppointments?.add(newAppointment);
notifyListeners();
}
void editPersonalAppointment({required Appointment updatedAppointment}) {
int index = personalAppointments?.indexWhere((appointment) =>
appointment.idappointments == updatedAppointment.idappointments) ??
-1;
KenLogger.success("Edit Patient Index: $index");
if (index != -1) {
personalAppointments?[index] = updatedAppointment;
notifyListeners();
}
}
void editBusinessAppointment({required Appointment updatedAppointment}) {
int index = businessAppointments?.indexWhere((appointment) =>
appointment.idappointments == updatedAppointment.idappointments) ??
-1;
if (index != -1) {
businessAppointments?[index] = updatedAppointment;
notifyListeners();
}
}
void deletePersonalAppointment({required int appointmentId}) {
personalAppointments?.removeWhere(
(appointment) => appointment.idappointments == appointmentId);
notifyListeners();
}
void deleteBusinessAppointment({required int appointmentId}) {
businessAppointments?.removeWhere(
(appointment) => appointment.idappointments == appointmentId);
notifyListeners();
}
}

View File

@@ -0,0 +1,81 @@
import 'package:flutter/widgets.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/minesweeper_player_score.dart';
class MihMineSweeperProvider extends ChangeNotifier {
String difficulty;
int toolIndex;
int rowCount;
int columnCount;
int totalMines;
List<MinesweeperPlayerScore>? leaderboard;
List<MinesweeperPlayerScore>? myScoreboard;
List<ImageProvider<Object>?> leaderboardUserPictures = [];
MihMineSweeperProvider({
this.difficulty = "Easy",
this.toolIndex = 0,
this.rowCount = 10,
this.columnCount = 10,
this.totalMines = 15,
});
void reset() {
difficulty = "Easy";
toolIndex = 0;
rowCount = 10;
columnCount = 10;
totalMines = 15;
notifyListeners();
}
void setDifficulty(String difficulty) {
this.difficulty = difficulty;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
void setRowCount(int rowCount) {
this.rowCount = rowCount;
notifyListeners();
}
void setCoulmnCount(int columnCount) {
this.columnCount = columnCount;
notifyListeners();
}
void setTotalMines(int totalMines) {
this.totalMines = totalMines;
notifyListeners();
}
void setLeaderboard({required List<MinesweeperPlayerScore>? leaderboard}) {
if (leaderboard == null) {
this.leaderboard = [];
} else {
this.leaderboard = leaderboard;
}
notifyListeners();
}
void setMyScoreboard({
required List<MinesweeperPlayerScore>? myScoreboard,
}) {
if (myScoreboard == null) {
this.myScoreboard = [];
} else {
this.myScoreboard = myScoreboard;
}
notifyListeners();
}
void setLeaderboardUserPictures(
{required List<ImageProvider<Object>?> leaderboardUserPictures}) {
this.leaderboardUserPictures = leaderboardUserPictures;
notifyListeners();
}
}

View File

@@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
class MzansiAiProvider extends ChangeNotifier {
int toolIndex;
String? startUpQuestion;
MzansiAiProvider({
this.toolIndex = 0,
});
void reset() {
toolIndex = 0;
startUpQuestion = null;
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
void setStartUpQuestion(String? question) {
startUpQuestion = question;
notifyListeners();
}
}

View File

@@ -0,0 +1,104 @@
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/bookmarked_business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
class MzansiDirectoryProvider extends ChangeNotifier {
int toolIndex;
Position? userPosition;
String userLocation;
bool personalSearch;
List<BookmarkedBusiness> bookmarkedBusinesses = [];
List<Business>? favouriteBusinessesList;
List<Business>? searchedBusinesses;
Business? selectedBusiness;
List<AppUser>? searchedUsers;
AppUser? selectedUser;
String searchTerm;
String businessTypeFilter;
MzansiDirectoryProvider({
this.toolIndex = 0,
this.personalSearch = true,
this.userLocation = "Unknown Location",
this.searchTerm = "",
this.businessTypeFilter = "",
});
void reset() {
toolIndex = 0;
userPosition = null;
userLocation = "Unknown Location";
personalSearch = true;
bookmarkedBusinesses = [];
searchedBusinesses = null;
selectedBusiness = null;
searchedUsers = null;
selectedUser = null;
searchTerm = "";
businessTypeFilter = "";
notifyListeners();
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
void setUserPosition(Position? position) {
userPosition = position;
if (position == null) {
userLocation = "Unknown Location";
} else {
userLocation = "${position.latitude}, ${position.longitude}";
}
notifyListeners();
}
void setPersonalSearch(bool personal) {
personalSearch = personal;
notifyListeners();
}
void setBookmarkedeBusinesses(
{required List<BookmarkedBusiness> businesses}) {
bookmarkedBusinesses = businesses;
notifyListeners();
}
void setFavouriteBusinesses({required List<Business> businesses}) {
favouriteBusinessesList = businesses;
notifyListeners();
}
void setSearchedBusinesses({required List<Business> searchedBusinesses}) {
this.searchedBusinesses = searchedBusinesses;
notifyListeners();
}
void setSelectedBusiness({required Business business}) {
selectedBusiness = business;
notifyListeners();
}
void setSearchedUsers({required List<AppUser> searchedUsers}) {
this.searchedUsers = searchedUsers;
notifyListeners();
}
void setSelectedUser({required AppUser user}) {
selectedUser = user;
notifyListeners();
}
void setSearchTerm({required String searchTerm}) {
this.searchTerm = searchTerm;
notifyListeners();
}
void setBusinessTypeFilter({required String businessTypeFilter}) {
this.businessTypeFilter = businessTypeFilter;
notifyListeners();
}
}

View File

@@ -0,0 +1,141 @@
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_employee.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/user_consent.dart';
class MzansiProfileProvider extends ChangeNotifier {
bool personalHome;
int personalIndex;
int businessIndex;
AppUser? user;
String? userProfilePicUrl;
ImageProvider<Object>? userProfilePicture;
Business? business;
String? businessProfilePicUrl;
ImageProvider<Object>? businessProfilePicture;
BusinessUser? businessUser;
String? businessUserSignatureUrl;
ImageProvider<Object>? businessUserSignature;
UserConsent? userConsent;
List<BusinessEmployee>? employeeList;
List<AppUser> userSearchResults = [];
MzansiProfileProvider({
this.personalHome = true,
this.personalIndex = 0,
this.businessIndex = 0,
});
void reset() {
personalHome = true;
personalIndex = 0;
businessIndex = 0;
user = null;
userProfilePicUrl = null;
userProfilePicture = null;
business = null;
businessProfilePicUrl = null;
businessProfilePicture = null;
businessUser = null;
businessUserSignatureUrl = null;
businessUserSignature = null;
userConsent = null;
notifyListeners();
}
void setPersonalHome(bool isPersonalHome) {
personalHome = isPersonalHome;
notifyListeners();
}
void setPersonalIndex(int index) {
personalIndex = index;
notifyListeners();
}
void setBusinessIndex(int index) {
businessIndex = index;
notifyListeners();
}
void setUser({
required AppUser newUser,
}) {
user = newUser;
notifyListeners();
}
void setUserProfilePicUrl(String url) {
userProfilePicUrl = url;
userProfilePicture = url.isNotEmpty ? NetworkImage(url) : null;
notifyListeners();
}
void setBusiness({
Business? newBusiness,
}) {
business = newBusiness;
notifyListeners();
}
void setBusinessProfilePicUrl(String url) {
businessProfilePicUrl = url;
businessProfilePicture = url.isNotEmpty ? NetworkImage(url) : null;
notifyListeners();
}
void setBusinessUser({required BusinessUser newBusinessUser}) {
businessUser = newBusinessUser;
notifyListeners();
}
void setBusinessUserSignatureUrl(String url) {
businessUserSignatureUrl = url;
businessUserSignature = url.isNotEmpty ? NetworkImage(url) : null;
notifyListeners();
}
void setUserConsent(UserConsent? newUserConsent) {
userConsent = newUserConsent;
notifyListeners();
}
void setEmployeeList({required List<BusinessEmployee> employeeList}) {
this.employeeList = employeeList;
notifyListeners();
}
void addLoyaltyCard({required BusinessEmployee newEmployee}) {
employeeList!.add(newEmployee);
notifyListeners();
}
void updateEmplyeeDetails({required BusinessEmployee updatedEmployee}) {
int index = employeeList!.indexWhere((employee) =>
employee.business_id == updatedEmployee.business_id &&
employee.app_id == updatedEmployee.app_id);
if (index != -1) {
employeeList![index] = updatedEmployee;
notifyListeners();
}
}
void deleteEmplyee({required BusinessEmployee deletedEmployee}) {
employeeList!.removeWhere((employee) =>
employee.business_id == deletedEmployee.business_id &&
employee.app_id == deletedEmployee.app_id);
notifyListeners();
}
void addEmployee({required BusinessEmployee newEmployee}) {
employeeList!.add(newEmployee);
notifyListeners();
}
void setUserearchResults({required List<AppUser> userSearchResults}) {
this.userSearchResults = userSearchResults;
notifyListeners();
}
}

View File

@@ -0,0 +1,49 @@
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/loyalty_card.dart';
class MzansiWalletProvider extends ChangeNotifier {
List<MIHLoyaltyCard> loyaltyCards;
List<MIHLoyaltyCard> favouriteCards;
int toolIndex;
MzansiWalletProvider({
this.loyaltyCards = const [],
this.favouriteCards = const [],
this.toolIndex = 0,
});
void reset() {
toolIndex = 0;
loyaltyCards = [];
favouriteCards = [];
}
void setToolIndex(int index) {
toolIndex = index;
notifyListeners();
}
void setLoyaltyCards({required List<MIHLoyaltyCard> cards}) async {
loyaltyCards = cards;
notifyListeners();
}
void setFavouriteCards({required List<MIHLoyaltyCard> cards}) async {
favouriteCards = cards;
notifyListeners();
}
void deleteLoyaltyCard({required int cardId}) {
loyaltyCards.removeWhere((card) => card.idloyalty_cards == cardId);
notifyListeners();
}
void editLoyaltyCard({required MIHLoyaltyCard updatedCard}) {
int index = loyaltyCards.indexWhere(
(card) => card.idloyalty_cards == updatedCard.idloyalty_cards);
if (index != -1) {
loyaltyCards[index] = updatedCard;
notifyListeners();
}
}
}

View File

@@ -0,0 +1,84 @@
import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/claim_statement_file.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/files.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/notes.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patients.dart';
class PatientManagerProvider extends ChangeNotifier {
int patientProfileIndex;
int patientManagerIndex;
int fileViewerIndex;
bool personalMode;
List<PatientAccess>? myPaitentList;
Patient? selectedPatient;
List<Note>? consultationNotes;
List<PFile>? patientDocuments;
List<ClaimStatementFile>? patientClaimsDocuments;
List<Patient> patientSearchResults = [];
PatientManagerProvider({
this.patientProfileIndex = 0,
this.patientManagerIndex = 0,
this.fileViewerIndex = 0,
this.personalMode = true,
});
void reset() {
patientProfileIndex = 0;
patientManagerIndex = 0;
personalMode = true;
selectedPatient = null;
}
void setPatientProfileIndex(int index) {
patientProfileIndex = index;
notifyListeners();
}
void setPatientManagerIndex(int index) {
patientManagerIndex = index;
notifyListeners();
}
void setFileViewerIndex(int index) {
patientProfileIndex = index;
notifyListeners();
}
void setPersonalMode(bool personalMode) {
this.personalMode = personalMode;
notifyListeners();
}
void setSelectedPatient({required Patient? selectedPatient}) {
this.selectedPatient = selectedPatient;
notifyListeners();
}
void setMyPatientList({required List<PatientAccess>? myPaitentList}) {
this.myPaitentList = myPaitentList ?? [];
notifyListeners();
}
void setConsultationNotes({required List<Note>? consultationNotes}) {
this.consultationNotes = consultationNotes ?? [];
notifyListeners();
}
void setPatientDocuments({required List<PFile>? patientDocuments}) {
this.patientDocuments = patientDocuments ?? [];
notifyListeners();
}
void setClaimsDocuments(
{required List<ClaimStatementFile>? patientClaimsDocuments}) {
this.patientClaimsDocuments = patientClaimsDocuments ?? [];
notifyListeners();
}
void setPatientSearchResults({required List<Patient> patientSearchResults}) {
this.patientSearchResults = patientSearchResults;
notifyListeners();
}
}

View File

@@ -37,7 +37,7 @@ class MihColors {
if (darkMode == true) { if (darkMode == true) {
return const Color(0xff8ae290); return const Color(0xff8ae290);
} else { } else {
return const Color(0xffB0F2B4); return const Color(0xFF41B349);
} }
} }
@@ -63,7 +63,7 @@ class MihColors {
return const Color(0xffd69d7d); return const Color(0xffd69d7d);
} else { } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xffd69d7d); return const Color(0xFFBD7145);
} }
} }
@@ -81,7 +81,7 @@ class MihColors {
return const Color(0xff6e7dcc); return const Color(0xff6e7dcc);
} else { } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xff6e7dcc); return const Color(0xFF5567C0);
} }
} }
@@ -90,7 +90,34 @@ class MihColors {
return const Color(0xffb682e7); return const Color(0xffb682e7);
} else { } else {
// Add a different shade of pink for light mode // Add a different shade of pink for light mode
return const Color(0xffb682e7); return const Color(0xFF9857D4);
}
}
static Color getGoldColor(bool darkMode) {
if (darkMode == true) {
return const Color(0xFFD4AF37);
} else {
// Add a different shade of pink for light mode
return const Color(0xffFFD700);
}
}
static Color getSilverColor(bool darkMode) {
if (darkMode == true) {
return const Color(0xffC0C0C0);
} else {
// Add a different shade of pink for light mode
return const Color(0xFFA6A6A6);
}
}
static Color getBronze(bool darkMode) {
if (darkMode == true) {
return const Color(0xffB1560F);
} else {
// Add a different shade of pink for light mode
return const Color(0xFFCD7F32);
} }
} }
} }

View File

@@ -1,9 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_print_prevew.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_print_prevew.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_test.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_test.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_directory_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/about_mih.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/about_mih.dart';
import 'package:mzansi_innovation_hub/mih_packages/access_review/mih_access.dart'; import 'package:mzansi_innovation_hub/mih_packages/access_review/mih_access.dart';
import 'package:mzansi_innovation_hub/mih_packages/calculator/mih_calculator.dart'; import 'package:mzansi_innovation_hub/mih_packages/calculator/mih_calculator.dart';
@@ -13,21 +14,22 @@ import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_auth_p
import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_authentication.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_authentication.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_home.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_home.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_route_error.dart'; import 'package:mzansi_innovation_hub/mih_packages/mih_home/mih_route_error.dart';
import 'package:mzansi_innovation_hub/mih_packages/mine_sweeper/mih_mine_sweeper.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_ai/mzansi_ai.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_ai/mzansi_ai.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/mzansi_directory.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/mzansi_directory.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/mzansi_business_profile.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/busines_profile.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/mzansi_business_profile_view.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/mzansi_business_profile_view.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/profile_business_add.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/mzansi_set_up_business_profile.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/personal_profile/mzansi_profile.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/personal_profile/mzansi_profile_view.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/personal_profile/mzansi_profile_view.dart';
import 'package:ken_logger/ken_logger.dart'; import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_wallet/mih_wallet.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_wallet/mih_wallet.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_manager/pat_manager.dart'; import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_manager/pat_manager.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/add_or_view_patient.dart'; import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_profile/components/full_screen_file.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/components/full_screen_file.dart'; import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_profile/patient_profile.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/patient_edit.dart'; import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_profile/patient_set_up.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/patient_profile.dart'; import 'package:provider/provider.dart';
import 'package:supertokens_flutter/supertokens.dart'; import 'package:supertokens_flutter/supertokens.dart';
class MihGoRouterPaths { class MihGoRouterPaths {
@@ -50,7 +52,6 @@ class MihGoRouterPaths {
static const String businessProfileView = '/business-profile/view'; static const String businessProfileView = '/business-profile/view';
static const String patientProfile = '/patient-profile'; static const String patientProfile = '/patient-profile';
static const String patientProfileSetup = '/patient-profile/set-up'; static const String patientProfileSetup = '/patient-profile/set-up';
static const String patientProfileEdit = '/patient-profile/edit';
static const String mzansiWallet = '/mzansi-wallet'; static const String mzansiWallet = '/mzansi-wallet';
static const String mzansiDirectory = '/mzansi-directory'; static const String mzansiDirectory = '/mzansi-directory';
static const String mihAccess = '/mih-access'; static const String mihAccess = '/mih-access';
@@ -63,6 +64,7 @@ class MihGoRouterPaths {
static const String barcodeScanner = '/scanner'; static const String barcodeScanner = '/scanner';
static const String calculator = '/calculator'; static const String calculator = '/calculator';
static const String mzansiAi = '/mzansi-ai'; static const String mzansiAi = '/mzansi-ai';
static const String mihMineSweeper = '/mih-minesweeper';
static const String packageDevTest = '/package-dev'; static const String packageDevTest = '/package-dev';
} }
@@ -131,16 +133,8 @@ class MihGoRouter {
path: MihGoRouterPaths.mihHome, path: MihGoRouterPaths.mihHome,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihHome"); KenLogger.success("MihGoRouter: mihHome");
if (state.extra != null) {
final bool personalSelected = state.extra as bool;
return MihHome(
key: UniqueKey(),
personalSelected: personalSelected,
);
}
return MihHome( return MihHome(
key: UniqueKey(), key: UniqueKey(),
personalSelected: true,
); );
}, },
), ),
@@ -150,14 +144,7 @@ class MihGoRouter {
path: MihGoRouterPaths.aboutMih, path: MihGoRouterPaths.aboutMih,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: aboutMih"); KenLogger.success("MihGoRouter: aboutMih");
final AboutArguments? args = state.extra as AboutArguments?; return AboutMih();
int index = 0;
bool personalSelected = true;
if (args != null) {
index = args.packageIndex ?? 0;
personalSelected = args.personalSelected;
}
return AboutMih(arguments: AboutArguments(personalSelected, index));
}, },
), ),
// ========================== Mzansi Profile Personal ================================== // ========================== Mzansi Profile Personal ==================================
@@ -166,15 +153,13 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiProfileManage, path: MihGoRouterPaths.mzansiProfileManage,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiProfileManage"); KenLogger.success("MihGoRouter: mzansiProfileManage");
final AppProfileUpdateArguments? args = if (context.watch<MzansiProfileProvider>().user == null) {
state.extra as AppProfileUpdateArguments?;
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return MzansiProfile(arguments: args); return MzansiProfile();
}, },
), ),
GoRoute( GoRoute(
@@ -182,14 +167,15 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiProfileView, path: MihGoRouterPaths.mzansiProfileView,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiProfileView"); KenLogger.success("MihGoRouter: mzansiProfileView");
final AppUser? user = state.extra as AppUser?; MzansiDirectoryProvider directoryProvider =
if (user == null) { context.read<MzansiDirectoryProvider>();
if (directoryProvider.selectedUser == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return MzansiProfileView(user: user); return MzansiProfileView();
}, },
), ),
// ========================== Mzansi Profile Business ================================== // ========================== Mzansi Profile Business ==================================
@@ -198,17 +184,16 @@ class MihGoRouter {
path: MihGoRouterPaths.businessProfileManage, path: MihGoRouterPaths.businessProfileManage,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: businessProfileManage"); KenLogger.success("MihGoRouter: businessProfileManage");
final BusinessArguments? args = state.extra as BusinessArguments?; if (context.watch<MzansiProfileProvider>().business == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return MzansiBusinessProfile( return BusinesProfile();
key: UniqueKey(), // return MzansiBusinessProfile(
arguments: args, // key: UniqueKey(),
); // );
}, },
), ),
GoRoute( GoRoute(
@@ -218,9 +203,10 @@ class MihGoRouter {
KenLogger.success("MihGoRouter: businessProfileView"); KenLogger.success("MihGoRouter: businessProfileView");
String? businessId = state.uri.queryParameters['business_id']; String? businessId = state.uri.queryParameters['business_id'];
KenLogger.success("businessId: $businessId"); KenLogger.success("businessId: $businessId");
final BusinessViewArguments? args = MzansiDirectoryProvider directoryProvider =
state.extra as BusinessViewArguments?; context.read<MzansiDirectoryProvider>();
if (args == null && businessId == null) { if (directoryProvider.selectedBusiness == null &&
businessId == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
@@ -228,7 +214,6 @@ class MihGoRouter {
} }
return MzansiBusinessProfileView( return MzansiBusinessProfileView(
key: UniqueKey(), key: UniqueKey(),
arguments: args,
businessId: businessId, businessId: businessId,
); );
}, },
@@ -238,8 +223,7 @@ class MihGoRouter {
path: MihGoRouterPaths.businessProfileSetup, path: MihGoRouterPaths.businessProfileSetup,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: businessProfileSetup"); KenLogger.success("MihGoRouter: businessProfileSetup");
final AppUser? signedInUser = state.extra as AppUser?; return MzansiSetUpBusinessProfile();
return ProfileBusinessAdd(signedInUser: signedInUser!);
}, },
), ),
// ========================== MIH Calculator ================================== // ========================== MIH Calculator ==================================
@@ -248,12 +232,7 @@ class MihGoRouter {
path: MihGoRouterPaths.calculator, path: MihGoRouterPaths.calculator,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihCalculator"); KenLogger.success("MihGoRouter: mihCalculator");
final bool? personalSelected = state.extra as bool?; return MIHCalculator();
bool personal = true;
if (personalSelected != null) {
personal = personalSelected;
}
return MIHCalculator(personalSelected: personal);
}, },
), ),
// ========================== MIH Calculator ================================== // ========================== MIH Calculator ==================================
@@ -262,8 +241,7 @@ class MihGoRouter {
path: MihGoRouterPaths.calendar, path: MihGoRouterPaths.calendar,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihCalendar"); KenLogger.success("MihGoRouter: mihCalendar");
final CalendarArguments? args = state.extra as CalendarArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
@@ -271,7 +249,6 @@ class MihGoRouter {
} }
return MzansiCalendar( return MzansiCalendar(
key: UniqueKey(), key: UniqueKey(),
arguments: args,
); );
}, },
), ),
@@ -281,14 +258,13 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiAi, path: MihGoRouterPaths.mzansiAi,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiAi"); KenLogger.success("MihGoRouter: mzansiAi");
final MzansiAiArguments? args = state.extra as MzansiAiArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return MzansiAi(arguments: args); return MzansiAi();
}, },
), ),
// ========================== Mzansi Wallet ================================== // ========================== Mzansi Wallet ==================================
@@ -297,8 +273,7 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiWallet, path: MihGoRouterPaths.mzansiWallet,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiWallet"); KenLogger.success("MihGoRouter: mzansiWallet");
final WalletArguments? args = state.extra as WalletArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
@@ -306,7 +281,6 @@ class MihGoRouter {
} }
return MihWallet( return MihWallet(
key: UniqueKey(), key: UniqueKey(),
arguments: args,
); );
}, },
), ),
@@ -347,8 +321,8 @@ class MihGoRouter {
name: "mihAccess", name: "mihAccess",
path: MihGoRouterPaths.mihAccess, path: MihGoRouterPaths.mihAccess,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
final AppUser? signedInUser = state.extra as AppUser?; KenLogger.success("MihGoRouter: mihAccess");
if (signedInUser == null) { if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
@@ -356,7 +330,6 @@ class MihGoRouter {
} }
return MihAccess( return MihAccess(
key: UniqueKey(), key: UniqueKey(),
signedInUser: signedInUser,
); );
}, },
), ),
@@ -365,44 +338,36 @@ class MihGoRouter {
name: "patientProfile", name: "patientProfile",
path: MihGoRouterPaths.patientProfile, path: MihGoRouterPaths.patientProfile,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
final PatientViewArguments? args = KenLogger.success("MihGoRouter: patientProfile");
state.extra as PatientViewArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return AddOrViewPatient( return PatientProfile();
key: UniqueKey(),
arguments: args,
);
}, },
), ),
GoRoute( GoRoute(
name: "patientProfileEdit", name: "patientProfileSetup",
path: MihGoRouterPaths.patientProfileEdit, path: MihGoRouterPaths.patientProfileSetup,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
final PatientEditArguments? args = KenLogger.success("MihGoRouter: patientProfileSetup");
state.extra as PatientEditArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return EditPatient( return PatientSetUp();
signedInUser: args.signedInUser,
selectedPatient: args.selectedPatient,
);
}, },
), ),
GoRoute( GoRoute(
name: "patientManager", name: "patientManager",
path: MihGoRouterPaths.patientManager, path: MihGoRouterPaths.patientManager,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
final PatManagerArguments? args = state.extra as PatManagerArguments?; KenLogger.success("MihGoRouter: patientManager");
if (args == null) { if (context.watch<MzansiProfileProvider>().business == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
@@ -410,7 +375,6 @@ class MihGoRouter {
} }
return PatManager( return PatManager(
key: UniqueKey(), key: UniqueKey(),
arguments: args,
); );
}, },
), ),
@@ -418,15 +382,14 @@ class MihGoRouter {
name: "patientManagerPatient", name: "patientManagerPatient",
path: MihGoRouterPaths.patientManagerPatient, path: MihGoRouterPaths.patientManagerPatient,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
final PatientViewArguments? args = KenLogger.success("MihGoRouter: patientManagerPatient");
state.extra as PatientViewArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return PatientProfile(arguments: args); return PatientProfile();
}, },
), ),
// ========================== Mzansi Directory ================================== // ========================== Mzansi Directory ==================================
@@ -434,15 +397,14 @@ class MihGoRouter {
name: "mzansiDirectory", name: "mzansiDirectory",
path: MihGoRouterPaths.mzansiDirectory, path: MihGoRouterPaths.mzansiDirectory,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
final MzansiDirectoryArguments? args = KenLogger.success("MihGoRouter: mzansiDirectory");
state.extra as MzansiDirectoryArguments?; if (context.watch<MzansiProfileProvider>().user == null) {
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome); context.go(MihGoRouterPaths.mihHome);
}); });
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return MzansiDirectory(arguments: args); return MzansiDirectory();
}, },
), ),
// ========================== End ================================== // ========================== End ==================================
@@ -450,6 +412,7 @@ class MihGoRouter {
name: "fileViewer", name: "fileViewer",
path: MihGoRouterPaths.fileViewer, path: MihGoRouterPaths.fileViewer,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: fileViewer");
final FileViewArguments? args = state.extra as FileViewArguments?; final FileViewArguments? args = state.extra as FileViewArguments?;
return FullScreenFileViewer(arguments: args!); return FullScreenFileViewer(arguments: args!);
}, },
@@ -458,11 +421,27 @@ class MihGoRouter {
name: "printPreview", name: "printPreview",
path: MihGoRouterPaths.printPreview, path: MihGoRouterPaths.printPreview,
builder: (BuildContext context, GoRouterState state) { builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: printPreview");
final PrintPreviewArguments? args = final PrintPreviewArguments? args =
state.extra as PrintPreviewArguments?; state.extra as PrintPreviewArguments?;
return MIHPrintPreview(arguments: args!); return MIHPrintPreview(arguments: args!);
}, },
), ),
// ========================== MIH Minesweeper ==================================
GoRoute(
name: "mihMinesweeper",
path: MihGoRouterPaths.mihMineSweeper,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihMineSweeper");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MihMineSweeper();
},
),
// ========================== End ================================== // ========================== End ==================================
// GoRoute( // GoRoute(
// name: "notifications", // name: "notifications",

View File

@@ -14,7 +14,7 @@ class MihTheme {
late String loadingAssetText; late String loadingAssetText;
late TargetPlatform platform; late TargetPlatform platform;
bool kIsWeb = const bool.fromEnvironment('dart.library.js_util'); bool kIsWeb = const bool.fromEnvironment('dart.library.js_util');
String latestVersion = "1.2.0"; String latestVersion = "1.2.2";
// Options:- // Options:-
// f3f9d2 = Cream // f3f9d2 = Cream
// f0f0c9 = cream2 // f0f0c9 = cream2

View File

@@ -1,19 +1,18 @@
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/about_mih_provider.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_%20attributes.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_%20attributes.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_info.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_info.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_privacy_policy.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_privacy_policy.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_terms_of_service.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tools/mih_terms_of_service.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AboutMih extends StatefulWidget { class AboutMih extends StatefulWidget {
final AboutArguments? arguments;
const AboutMih({ const AboutMih({
super.key, super.key,
this.arguments,
}); });
@override @override
@@ -21,21 +20,9 @@ class AboutMih extends StatefulWidget {
} }
class _AboutMihState extends State<AboutMih> { class _AboutMihState extends State<AboutMih> {
late int _selcetedIndex;
late bool _personalSelected;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
setState(() {
if (widget.arguments == null) {
_selcetedIndex = 0;
_personalSelected = true;
} else {
_selcetedIndex = widget.arguments!.packageIndex!;
_personalSelected = widget.arguments!.personalSelected;
}
});
} }
@override @override
@@ -45,12 +32,9 @@ class _AboutMihState extends State<AboutMih> {
appTools: getTools(), appTools: getTools(),
appBody: getToolBody(), appBody: getToolBody(),
appToolTitles: getToolTitle(), appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex, selectedbodyIndex: context.watch<AboutMihProvider>().toolIndex,
onIndexChange: (newValue) { onIndexChange: (newIndex) {
setState(() { context.read<AboutMihProvider>().setToolIndex(newIndex);
_selcetedIndex = newValue;
});
// print("Index: $_selcetedIndex");
}, },
); );
} }
@@ -62,7 +46,6 @@ class _AboutMihState extends State<AboutMih> {
onTap: () { onTap: () {
context.goNamed( context.goNamed(
'mihHome', 'mihHome',
extra: _personalSelected,
); );
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
}, },
@@ -72,28 +55,20 @@ class _AboutMihState extends State<AboutMih> {
MihPackageTools getTools() { MihPackageTools getTools() {
Map<Widget, void Function()?> temp = {}; Map<Widget, void Function()?> temp = {};
temp[const Icon(Icons.info)] = () { temp[const Icon(Icons.info)] = () {
setState(() { context.read<AboutMihProvider>().setToolIndex(0);
_selcetedIndex = 0;
});
}; };
temp[const Icon(Icons.policy)] = () { temp[const Icon(Icons.policy)] = () {
setState(() { context.read<AboutMihProvider>().setToolIndex(1);
_selcetedIndex = 1;
});
}; };
temp[const Icon(Icons.design_services)] = () { temp[const Icon(Icons.design_services)] = () {
setState(() { context.read<AboutMihProvider>().setToolIndex(2);
_selcetedIndex = 2;
});
}; };
temp[const Icon(Icons.star_rounded)] = () { temp[const Icon(Icons.star_rounded)] = () {
setState(() { context.read<AboutMihProvider>().setToolIndex(3);
_selcetedIndex = 3;
});
}; };
return MihPackageTools( return MihPackageTools(
tools: temp, tools: temp,
selcetedIndex: _selcetedIndex, selcetedIndex: context.watch<AboutMihProvider>().toolIndex,
); );
} }

View File

@@ -1,60 +0,0 @@
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_action.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_header.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_layout_builder.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart';
import 'package:flutter/material.dart';
class MIHPrivacyPolocyExternal extends StatefulWidget {
const MIHPrivacyPolocyExternal({super.key});
@override
State<MIHPrivacyPolocyExternal> createState() =>
_MIHPrivacyPolocyExternalState();
}
class _MIHPrivacyPolocyExternalState extends State<MIHPrivacyPolocyExternal> {
MIHAction getActionButton() {
return MIHAction(
icon: const Icon(Icons.arrow_back),
iconSize: 35,
onTap: () {
Navigator.of(context).pushNamedAndRemoveUntil(
'/',
arguments: AuthArguments(true, false),
(route) => false,
);
},
);
}
MIHHeader getHeader() {
return const MIHHeader(
headerAlignment: MainAxisAlignment.center,
headerItems: [],
);
}
MIHBody getBody() {
return MIHBody(
borderOn: false,
bodyItems: PolicyAndTermsText().getPrivacyPolicyText(context),
);
}
@override
Widget build(BuildContext context) {
return MIHLayoutBuilder(
actionButton: getActionButton(),
header: getHeader(),
secondaryActionButton: null,
body: getBody(),
actionDrawer: null,
secondaryActionDrawer: null,
bottomNavBar: null,
pullDownToRefresh: false,
onPullDown: () async {},
);
}
}

View File

@@ -1,60 +0,0 @@
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_action.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_body.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_header.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_layout_builder.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart';
import 'package:flutter/material.dart';
class MIHTermsOfServiceExternal extends StatefulWidget {
const MIHTermsOfServiceExternal({super.key});
@override
State<MIHTermsOfServiceExternal> createState() =>
_MIHTermsOfServiceExternalState();
}
class _MIHTermsOfServiceExternalState extends State<MIHTermsOfServiceExternal> {
MIHAction getActionButton() {
return MIHAction(
icon: const Icon(Icons.arrow_back),
iconSize: 35,
onTap: () {
Navigator.of(context).pushNamedAndRemoveUntil(
'/',
arguments: AuthArguments(true, false),
(route) => false,
);
},
);
}
MIHHeader getHeader() {
return const MIHHeader(
headerAlignment: MainAxisAlignment.center,
headerItems: [],
);
}
MIHBody getBody() {
return MIHBody(
borderOn: false,
bodyItems: PolicyAndTermsText().getTermsOfServiceText(context),
);
}
@override
Widget build(BuildContext context) {
return MIHLayoutBuilder(
actionButton: getActionButton(),
header: getHeader(),
secondaryActionButton: null,
body: getBody(),
actionDrawer: null,
secondaryActionDrawer: null,
bottomNavBar: null,
pullDownToRefresh: false,
onPullDown: () async {},
);
}
}

View File

@@ -4,27 +4,36 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class PolicyAndTermsText { class PolicyAndTermsText {
List<Widget> getPrivacyPolicyText(BuildContext context) { List<Widget> getPrivacyPolicyText(BuildContext context, bool english) {
String effectDate = "6 December 2024"; String effectDate = english ? "6 December 2024" : "2024年12月6日";
String intro = String intro = english
"Mzansi Innovation Hub - MIH (\"we,\" \"our,\" \"us\") values your privacy and is committed to protecting your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our app, Mzansi Innovation Hub - MIH, available globally."; ? "Mzansi Innovation Hub - MIH (\"we,\" \"our,\" \"us\") values your privacy and is committed to protecting your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our app, Mzansi Innovation Hub - MIH, available globally."
String infoCollect = : "Mzansi Innovation Hub - MIH“我们”重视您的隐私并致力于保护您的个人数据。本隐私政策解释了当您使用我们面向全球推出的应用程序 Mzansi Innovation Hub - MIH 时,我们如何收集、使用、披露和保护您的信息。";
"We collect the following personal information to provide and improve our services:\n• Personal Details: Name, ID, address, phone number etc.\n• Medical Information: Medical aid details (if applicable).\n• Loyalty Card Information: Loyalty card numbers for the Mzansi Wallet feature."; String infoCollect = english
String useInfo = ? "We collect the following personal information to provide and improve our services:\n• Personal Details: Name, ID, address, phone number etc.\n• Medical Information: Medical aid details (if applicable).\n• Loyalty Card Information: Loyalty card numbers for the Mzansi Wallet feature."
"Your personal information is used for the following purposes:\n• To create and manage your account.\n• To facilitate interactions between clients and businesses.\n• To enable the storage of loyalty card information within the Mzansi Wallet.\n• To provide technical support and improve our app's functionality."; : "我们收集以下个人信息以提供和改进我们的服务:\n• 个人详细信息:姓名、身份证、地址、电话号码等。\n• 医疗信息:医疗援助详情(如适用)。\n• 忠诚卡信息Mzansi Wallet 功能的忠诚卡号码。";
String dataShare = String useInfo = english
"We only share your data under the following conditions:\nWith Your Consent: Businesses can access your information only with your explicit permission.\n• Legal Obligations: We may disclose information to comply with applicable laws or regulations."; ? "Your personal information is used for the following purposes:\nTo create and manage your account.\n• To facilitate interactions between clients and businesses.\n• To enable the storage of loyalty card information within the Mzansi Wallet.\n• To provide technical support and improve our app's functionality."
String dataSec = : "您的个人信息用于以下目的:\n• 创建和管理您的账户。\n• 促进客户与企业之间的互动。\n• 使忠诚卡信息能够存储在 Mzansi Wallet 中。\n• 提供技术支持并改进我们应用程序的功能。";
"We implement advanced security measures to protect your personal data:\n• Data encryption during transmission.\n• Secure authentication protocols to prevent unauthorized access.\n• Regular audits to identify and address vulnerabilities."; String dataShare = english
? "We only share your data under the following conditions:\n• With Your Consent: Businesses can access your information only with your explicit permission.\n• Legal Obligations: We may disclose information to comply with applicable laws or regulations."
: "我们仅在以下情况下共享您的数据:\n• 经您同意:企业只能在您明确许可的情况下访问您的信息。\n• 法律义务:我们可能会披露信息以遵守适用的法律或法规。";
String dataSec = english
? "We implement advanced security measures to protect your personal data:\n• Data encryption during transmission.\n• Secure authentication protocols to prevent unauthorized access.\n• Regular audits to identify and address vulnerabilities."
: "我们实施先进的安全措施来保护您的个人数据:\n• 传输过程中对数据进行加密。\n• 安全的身份验证协议以防止未经授权的访问。\n• 定期审计以识别和解决漏洞。";
String yourRights = String yourRights = english
"You have the following rights regarding your personal data:\n• Access and Correction: View and update your information via your account settings.\n• Data Deletion: Request the deletion of your account and associated data.\n• Withdrawal of Consent: Revoke permissions for businesses to access your data is restricted once granted.\n• To exercise these rights, contact us at mzansi.innovation.hub@gmail.com."; ? "You have the following rights regarding your personal data:\n• Access and Correction: View and update your information via your account settings.\n• Data Deletion: Request the deletion of your account and associated data.\n• Withdrawal of Consent: Revoke permissions for businesses to access your data is restricted once granted.\n• To exercise these rights, contact us at mzansi.innovation.hub@gmail.com."
String dataRet = : "您对您的个人数据享有以下权利:\n• 访问和更正:通过您的账户设置查看和更新您的信息。\n• 数据删除:请求删除您的账户及相关数据。\n• 撤回同意:一旦授予权限,撤销企业访问您数据的权限将受到限制。\n• 要行使这些权利,请通过 mzansi.innovation.hub@gmail.com 与我们联系。";
"We retain your personal data for as long as necessary to provide our services. Upon account deletion, your data will be permanently removed unless required by law to retain certain records."; String dataRet = english
String policyChanges = ? "We retain your personal data for as long as necessary to provide our services. Upon account deletion, your data will be permanently removed unless required by law to retain certain records."
"We may update this Privacy Policy to reflect changes in our practices or legal requirements. We will notify you of significant updates via in app notifications and/ or email."; : "我们会在提供服务所需的时间内保留您的个人数据。账户删除后,您的数据将被永久删除,除非法律要求保留某些记录。";
String contactUs = String policyChanges = english
"If you have questions or concerns about this Privacy Policy, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"; ? "We may update this Privacy Policy to reflect changes in our practices or legal requirements. We will notify you of significant updates via in app notifications and/ or email."
: "我们可能会更新本隐私政策以反映我们的做法或法律要求的变化。我们将通过应用内通知和/或电子邮件通知您重大更新。";
String contactUs = english
? "If you have questions or concerns about this Privacy Policy, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"
: "如果您对本隐私政策有任何疑问或担忧,请通过以下方式与我们联系:\n• 电子邮件: mzansi.innovation.hub@gmail.com.\n• 电话: +27 655 530 195";
return [ return [
SizedBox( SizedBox(
width: 165, width: 165,
@@ -42,8 +51,8 @@ class PolicyAndTermsText {
width: 1250, width: 1250,
child: Row( child: Row(
children: [ children: [
const Text( Text(
"Effective Date: ", english ? "Effective Date: " : "生效日期: ",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -86,13 +95,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 1. Information We Collect =============== //=============== 1. Information We Collect ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"1. Information We Collect", english ? "1. Information We Collect" : "1. 我们收集的信息",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -124,13 +133,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 2. How We Use Your Information =============== //=============== 2. How We Use Your Information ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"2. How We Use Your Information", english ? "2. How We Use Your Information" : "2. 我们如何使用您的信息",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -162,13 +171,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 3. Data Sharing =============== //=============== 3. Data Sharing ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"3. Data Sharing", english ? "3. Data Sharing" : "3. 数据共享",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -200,13 +209,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 4. Data Security =============== //=============== 4. Data Security ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"4. Data Security", english ? "4. Data Security" : "4. 数据安全",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -238,13 +247,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 5. Your Rights =============== //=============== 5. Your Rights ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"5. Your Rights", english ? "5. Your Rights" : "5. 您的权利",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -276,13 +285,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 6. Data Retention =============== //=============== 6. Data Retention ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"6. Data Retention", english ? "6. Data Retention" : "6. 数据保留",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -314,13 +323,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 7. Changes to This Privacy Policy =============== //=============== 7. Changes to This Privacy Policy ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"7. Changes to This Privacy Policy", english ? "7. Changes to This Privacy Policy" : "7. 本隐私政策的变更",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -352,13 +361,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 8. Contact Us =============== //=============== 8. Contact Us ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"8. Contact Us", english ? "8. Contact Us" : "8. 联系我们",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -392,37 +401,51 @@ class PolicyAndTermsText {
]; ];
} }
List<Widget> getTermsOfServiceText(BuildContext context) { List<Widget> getTermsOfServiceText(BuildContext context, bool english) {
String effectDate = "6 December 2024"; String effectDate = english ? "6 December 2024" : "2024年12月6日";
String intro = String intro = english
"Welcome to Mzansi Innovation Hub (MIH)! These Terms of Service (\"Terms\") govern your access to and use of our application and services (\"Services\"). By accessing or using Mzansi Innovation Hub (MIH), you agree to these Terms."; ? "Welcome to Mzansi Innovation Hub (MIH)! These Terms of Service (\"Terms\") govern your access to and use of our application and services (\"Services\"). By accessing or using Mzansi Innovation Hub (MIH), you agree to these Terms."
String acceptTerms = : "欢迎使用 Mzansi Innovation Hub (MIH)!本服务条款(“条款”)管理您对我们应用程序和服务(“服务”)的访问和使用。通过访问或使用 Mzansi Innovation Hub (MIH),您同意这些条款。";
"By creating an account or using the app, you agree to be bound by these Terms. If you do not agree, please do not use the Services."; String acceptTerms = english
String eligib = ? "By creating an account or using the app, you agree to be bound by these Terms. If you do not agree, please do not use the Services."
"You must be at least 18 years old or the age of majority in your jurisdiction to use this app. By using the app, you represent and warrant that you meet these eligibility requirements."; : "通过创建账户或使用该应用程序,您同意受这些条款的约束。如果您不同意,请不要使用该服务。";
String yourResponse = String eligib = english
"• Account Security: You are responsible for maintaining the confidentiality of your login credentials.\n• Accurate Information: Ensure that all data you provide is accurate and up to date.\n• Prohibited Uses:\n\t\t• Do not use the app for unlawful purposes.\n\t\t• Do not engage in activities that could harm the app or its users, such as hacking, data scraping, or introducing malware."; ? "You must be at least 18 years old or the age of majority in your jurisdiction to use this app. By using the app, you represent and warrant that you meet these eligibility requirements."
String ourServ = : "您必须年满18岁或达到您所在司法管辖区的法定年龄才能使用此应用程序。通过使用该应用程序您声明并保证您符合这些资格要求。";
"• We provide tools to help businesses and clients interact, including a patient manager and the Mzansi Wallet etc.\n• We do not guarantee uninterrupted or error-free services, though we strive to maintain high reliability."; String yourResponse = english
? "• Account Security: You are responsible for maintaining the confidentiality of your login credentials.\n• Accurate Information: Ensure that all data you provide is accurate and up to date.\n• Prohibited Uses:\n\t\t• Do not use the app for unlawful purposes.\n\t\t• Do not engage in activities that could harm the app or its users, such as hacking, data scraping, or introducing malware."
: "• 账户安全:您有责任维护您的登录凭据的机密性。\n• 准确信息:确保您提供的所有数据都是准确和最新的。\n• 禁止使用:\n\t\t• 不得将该应用程序用于非法目的。\n\t\t• 不得从事可能损害该应用程序或其用户的活动,例如黑客攻击、数据抓取或引入恶意软件。";
String ourServ = english
? "• We provide tools to help businesses and clients interact, including a patient manager and the Mzansi Wallet etc.\n• We do not guarantee uninterrupted or error-free services, though we strive to maintain high reliability."
: "• 我们提供工具来帮助企业和客户互动,包括患者管理器和 Mzansi Wallet 等。\n• 我们不保证服务不中断或无错误,但我们努力保持高可靠性。";
String dataCol = String dataCol = english
"Your use of the app is subject to our Privacy Policy, which explains how we collect, use, and protect your data. By using the app, you consent to these practices."; ? "Your use of the app is subject to our Privacy Policy, which explains how we collect, use, and protect your data. By using the app, you consent to these practices."
String userContent = : "您对该应用程序的使用受我们的隐私政策约束,该政策解释了我们如何收集、使用和保护您的数据。通过使用该应用程序,您同意这些做法。";
"• Ownership: Any content you submit to the app (e.g., loyalty card data, client profiles) remains your property.\n• License: By using the app, you grant us a non-exclusive license to use your content solely to operate the app and provide services."; String userContent = english
String intelProp = ? "• Ownership: Any content you submit to the app (e.g., loyalty card data, client profiles) remains your property.\n• License: By using the app, you grant us a non-exclusive license to use your content solely to operate the app and provide services."
"All rights to the app, including designs, code, and trademarks, belong to Mzansi Innovation Hub.\n• Users may not copy, distribute, or reverse-engineer any part of the app."; : "所有权:您提交到该应用程序的任何内容(例如,忠诚卡数据、客户档案)仍然是您的财产。\n• 许可:通过使用该应用程序,您授予我们非独占许可,仅用于运营该应用程序和提供服务。";
String termUse = String intelProp = english
"We reserve the right to suspend or terminate your account for violations of these Terms or if required by law."; ? "• All rights to the app, including designs, code, and trademarks, belong to Mzansi Innovation Hub.\n• Users may not copy, distribute, or reverse-engineer any part of the app."
String disclaimerWarens = : "• 该应用程序的所有权利,包括设计、代码和商标,均属于 Mzansi Innovation Hub。\n• 用户不得复制、分发或反向工程该应用程序的任何部分。";
"The app and services are provided \"as is\" without warranties of any kind, whether express or implied. We do not guarantee that the app will meet your expectations or requirements."; String termUse = english
String limitLiability = ? "We reserve the right to suspend or terminate your account for violations of these Terms or if required by law."
"To the maximum extent permitted by law, we are not liable for:\n• Indirect, incidental, or consequential damages arising from the use or inability to use the app.\n• Loss of data, revenue, or profits."; : "我们保留因违反这些条款或法律要求而暂停或终止您账户的权利。";
String modifyTerms = String disclaimerWarens = english
"We may update these Terms periodically. Continued use of the app after changes are posted constitutes your acceptance of the new Terms."; ? "The app and services are provided \"as is\" without warranties of any kind, whether express or implied. We do not guarantee that the app will meet your expectations or requirements."
String governLaw = : "该应用程序和服务按“原样”提供,不附带任何形式的明示或暗示保证。我们不保证该应用程序将满足您的期望或要求。";
"These Terms are governed by the laws of South Africa. Any disputes will be resolved in courts located in South Africa."; String limitLiability = english
String contactUs = ? "To the maximum extent permitted by law, we are not liable for:\n• Indirect, incidental, or consequential damages arising from the use or inability to use the app.\n• Loss of data, revenue, or profits."
"If you have questions about these Terms, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"; : "在法律允许的最大范围内,我们不对以下事项承担责任:\n• 因使用或无法使用该应用程序而产生的间接、附带或后果性损害。\n• 数据、收入或利润的损失。";
String modifyTerms = english
? "We may update these Terms periodically. Continued use of the app after changes are posted constitutes your acceptance of the new Terms."
: "我们可能会定期更新这些条款。在更改发布后继续使用该应用程序即表示您接受新的条款。";
String governLaw = english
? "These Terms are governed by the laws of South Africa. Any disputes will be resolved in courts located in South Africa."
: "这些条款受南非法律管辖。任何争议将由位于南非的法院解决。";
String contactUs = english
? "If you have questions about these Terms, please contact us:\n• Email: mzansi.innovation.hub@gmail.com\n• Phone: +27 655 530 195\n"
: "如果您对这些条款有任何疑问,请通过以下方式与我们联系:\n• 电子邮件: mzansi.innovation.hub@gmail.com.\n• 电话: +27 655 530 195";
return [ return [
SizedBox( SizedBox(
width: 165, width: 165,
@@ -442,8 +465,8 @@ class PolicyAndTermsText {
width: 1250, width: 1250,
child: Row( child: Row(
children: [ children: [
const Text( Text(
"Effective Date: ", english ? "Effective Date: " : "生效日期: ",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@@ -486,13 +509,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 1. Acceptance of Terms =============== //=============== 1. Acceptance of Terms ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"1. Acceptance of Terms", english ? "1. Acceptance of Terms" : "1. 接受条款",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -524,13 +547,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 2. Eligibility =============== //=============== 2. Eligibility ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"2. Eligibility", english ? "2. Eligibility" : "2. 资格",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -562,13 +585,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 3. Your Responsibilities =============== //=============== 3. Your Responsibilities ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"3. Your Responsibilities", english ? "3. Your Responsibilities" : "3. 您的责任",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -600,13 +623,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 4. Data Security =============== //=============== 4. Data Security ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"4. Our Services", english ? "4. Our Services" : "4. 我们的服务",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -638,13 +661,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 5. Data Collection and Privacy =============== //=============== 5. Data Collection and Privacy ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"5. Data Collection and Privacy", english ? "5. Data Collection and Privacy" : "5. 数据收集和隐私",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -676,13 +699,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 6. User-Generated Content =============== //=============== 6. User-Generated Content ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"6. User-Generated Content", english ? "6. User-Generated Content" : "6. 用户生成的内容",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -714,13 +737,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 7. Intellectual Property =============== //=============== 7. Intellectual Property ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"7. Intellectual Property", english ? "7. Intellectual Property" : "7. 知识产权",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -752,13 +775,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 8. Termination of Use =============== //=============== 8. Termination of Use ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"8. Termination of Use", english ? "8. Termination of Use" : "8. 使用终止",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -790,13 +813,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 9. Disclaimer of Warranties =============== //=============== 9. Disclaimer of Warranties ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"9. Disclaimer of Warranties", english ? "9. Disclaimer of Warranties" : "9. 免责声明",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -828,13 +851,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 10. Limitation of Liability =============== //=============== 10. Limitation of Liability ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"10. Limitation of Liability", english ? "10. Limitation of Liability" : "10. 责任限制",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -866,13 +889,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 11. Modifications to Terms =============== //=============== 11. Modifications to Terms ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"11. Modifications to Terms", english ? "11. Modifications to Terms" : "11. 条款修改",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -904,13 +927,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 12. Governing Law =============== //=============== 12. Governing Law ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"12. Governing Law", english ? "12. Governing Law" : "12. 适用法律",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
@@ -942,13 +965,13 @@ class PolicyAndTermsText {
height: 10, height: 10,
), ),
//=============== 13. Contact Information =============== //=============== 13. Contact Information ===============
const SizedBox( SizedBox(
width: 1250, width: 1250,
child: Row( child: Row(
// crossAxisAlignment: WrapCrossAlignment.start, // crossAxisAlignment: WrapCrossAlignment.start,
children: [ children: [
Text( Text(
"13. Contact Information", english ? "13. Contact Information" : "13. 联系信息",
textAlign: TextAlign.start, textAlign: TextAlign.start,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(

View File

@@ -1,6 +1,5 @@
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
@@ -8,11 +7,9 @@ import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class AboutMihTile extends StatefulWidget { class AboutMihTile extends StatefulWidget {
final double packageSize; final double packageSize;
final bool personalSelected;
const AboutMihTile({ const AboutMihTile({
super.key, super.key,
required this.packageSize, required this.packageSize,
required this.personalSelected,
}); });
@override @override
@@ -26,10 +23,6 @@ class _AboutMihTileState extends State<AboutMihTile> {
onTap: () { onTap: () {
context.goNamed( context.goNamed(
"aboutMih", "aboutMih",
extra: AboutArguments(
widget.personalSelected,
0,
),
); );
// Navigator.of(context).pushNamed( // Navigator.of(context).pushNamed(
// '/about', // '/about',

View File

@@ -1,6 +1,7 @@
import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_tile.dart';
@@ -11,7 +12,9 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:redacted/redacted.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
class MihInfo extends StatefulWidget { class MihInfo extends StatefulWidget {
@@ -22,6 +25,8 @@ class MihInfo extends StatefulWidget {
} }
class _MihInfoState extends State<MihInfo> { class _MihInfoState extends State<MihInfo> {
late Future<int> _futureUserCount;
late Future<int> _futureBusinessCount;
final Uri _tiktokUrl = final Uri _tiktokUrl =
Uri.parse('https://www.tiktok.com/@mzansi.innovation.hub'); Uri.parse('https://www.tiktok.com/@mzansi.innovation.hub');
final Uri _whatsappUrl = final Uri _whatsappUrl =
@@ -87,7 +92,7 @@ class _MihInfoState extends State<MihInfo> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 17,
), ),
), ),
), ),
@@ -144,7 +149,7 @@ class _MihInfoState extends State<MihInfo> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 17,
), ),
), ),
], ],
@@ -178,7 +183,7 @@ class _MihInfoState extends State<MihInfo> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
//fontWeight: FontWeight.bold, //fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 17,
), ),
), ),
], ],
@@ -501,11 +506,128 @@ class _MihInfoState extends State<MihInfo> {
void shareMIHLink(BuildContext context, String message, String link) { void shareMIHLink(BuildContext context, String message, String link) {
String shareText = "$message: $link"; String shareText = "$message: $link";
Share.share( SharePlus.instance.share(
shareText, ShareParams(text: shareText),
); );
} }
Widget displayBusinessCount() {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
FutureBuilder<int>(
future: _futureBusinessCount,
builder: (context, snapshot) {
bool isLoading = true;
String userCount = "⚠️";
if (snapshot.connectionState == ConnectionState.waiting) {
isLoading = true;
} else if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasError) {
isLoading = false;
} else if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
isLoading = false;
userCount = snapshot.data.toString();
} else {
isLoading = true;
}
return SizedBox(
child: Text(
userCount,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 23,
),
),
).redacted(
context: context,
redact: isLoading,
configuration: RedactedConfiguration(
defaultBorderRadius: BorderRadius.circular(5),
redactedColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
),
),
);
},
),
const SizedBox(width: 10),
Text(
"Businesses",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 20,
),
),
],
);
}
Widget displayUserCount() {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
FutureBuilder<int>(
future: _futureUserCount,
builder: (context, snapshot) {
bool isLoading = true;
String userCount = "⚠️";
if (snapshot.connectionState == ConnectionState.waiting) {
isLoading = true;
} else if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasError) {
isLoading = false;
} else if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
isLoading = false;
userCount = snapshot.data.toString();
} else {
isLoading = true;
}
return SizedBox(
child: Text(
userCount,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 23,
),
),
).redacted(
context: context,
redact: isLoading,
configuration: RedactedConfiguration(
defaultBorderRadius: BorderRadius.circular(5),
redactedColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
),
),
);
},
),
const SizedBox(width: 10),
Text(
"People",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.normal,
fontSize: 20,
),
),
],
);
}
@override
void initState() {
super.initState();
_futureUserCount = MihUserServices().fetchUserCount();
_futureBusinessCount = MihBusinessDetailsServices().fetchBusinessCount();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MihPackageToolBody( return MihPackageToolBody(
@@ -536,6 +658,7 @@ class _MihInfoState extends State<MihInfo> {
), ),
const Text( const Text(
"Mzansi Innovation Hub", "Mzansi Innovation Hub",
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 30, fontSize: 30,
@@ -543,30 +666,83 @@ class _MihInfoState extends State<MihInfo> {
), ),
Text( Text(
"MIH App Version: ${MzansiInnovationHub.of(context)!.theme.getLatestVersion()}", "MIH App Version: ${MzansiInnovationHub.of(context)!.theme.getLatestVersion()}",
textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 15, fontSize: 15,
), ),
), ),
const Padding( // ===================== Divider
padding: EdgeInsets.symmetric(vertical: 10.0), // Padding(
child: Divider(), // padding: EdgeInsets.symmetric(
// vertical: 10.0,
// horizontal: 25,
// ),
// child: Divider(
// thickness: 1,
// color: MihColors.getGreyColor(
// MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// ),
// ),
const SizedBox(
height: 10,
),
// Text(
// "The MIH Community",
// textAlign: TextAlign.center,
// style: TextStyle(
// fontWeight: FontWeight.bold,
// fontSize: 22,
// ),
// ),
Wrap(
alignment: WrapAlignment.spaceAround,
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 25,
runSpacing: 10,
children: [
displayUserCount(),
displayBusinessCount(),
],
),
Text(
"The MIH Community",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
),
),
// ===================== Divider
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0,
horizontal: 25,
),
child: Divider(
thickness: 1,
color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
), ),
// const SizedBox( // const SizedBox(
// height: 10, // height: 10,
// ), // ),
Wrap( Padding(
alignment: WrapAlignment.start, padding: const EdgeInsets.symmetric(horizontal: 25.0),
crossAxisAlignment: WrapCrossAlignment.start, child: Wrap(
spacing: 10, alignment: WrapAlignment.start,
runSpacing: 10, crossAxisAlignment: WrapCrossAlignment.start,
children: [ spacing: 10,
ourVision(), runSpacing: 10,
ourMission(), children: [
], ourVision(),
ourMission(),
],
),
), ),
const SizedBox( const SizedBox(
height: 10, height: 25,
), ),
Wrap( Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
@@ -658,9 +834,17 @@ class _MihInfoState extends State<MihInfo> {
const SizedBox( const SizedBox(
height: 10, height: 10,
), ),
const Padding( // ===================== Divider
padding: EdgeInsets.symmetric(vertical: 10.0), Padding(
child: Divider(), padding: EdgeInsets.symmetric(
vertical: 10.0,
horizontal: 25,
),
child: Divider(
thickness: 1,
color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
), ),
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@@ -673,9 +857,17 @@ class _MihInfoState extends State<MihInfo> {
founderBio(), founderBio(),
], ],
), ),
const Padding( // ===================== Divider
padding: EdgeInsets.symmetric(vertical: 10.0), Padding(
child: Divider(), padding: EdgeInsets.symmetric(
vertical: 10.0,
horizontal: 25,
),
child: Divider(
thickness: 1,
color: MihColors.getGreyColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
),
), ),
mihSocials(), mihSocials(),
], ],

View File

@@ -1,11 +1,20 @@
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MihPrivacyPolicy extends StatelessWidget { class MihPrivacyPolicy extends StatefulWidget {
const MihPrivacyPolicy({super.key}); const MihPrivacyPolicy({super.key});
@override
State<MihPrivacyPolicy> createState() => _MihPrivacyPolicyState();
}
class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
bool englishOn = true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MihPackageToolBody( return MihPackageToolBody(
@@ -16,9 +25,39 @@ class MihPrivacyPolicy extends StatelessWidget {
} }
Widget getBody(BuildContext context) { Widget getBody(BuildContext context) {
List<Widget> children = [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
MihButton(
onPressed: () {
setState(() {
englishOn = !englishOn;
});
},
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10,
child: Text(
englishOn ? "Simplified Chinese" : "English",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
],
),
const SizedBox(height: 10),
];
children
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
return MihSingleChildScroll( return MihSingleChildScroll(
child: Column( child: Column(
children: PolicyAndTermsText().getPrivacyPolicyText(context), mainAxisSize: MainAxisSize.max,
children: children,
), ),
); );
} }

View File

@@ -1,11 +1,20 @@
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart'; import 'package:mzansi_innovation_hub/mih_packages/about_mih/mih_policy_tos_ext/policy_and_terms_text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MIHTermsOfService extends StatelessWidget { class MIHTermsOfService extends StatefulWidget {
const MIHTermsOfService({super.key}); const MIHTermsOfService({super.key});
@override
State<MIHTermsOfService> createState() => _MIHTermsOfServiceState();
}
class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
bool englishOn = true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MihPackageToolBody( return MihPackageToolBody(
@@ -16,9 +25,38 @@ class MIHTermsOfService extends StatelessWidget {
} }
Widget getBody(BuildContext context) { Widget getBody(BuildContext context) {
List<Widget> children = [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
MihButton(
onPressed: () {
setState(() {
englishOn = !englishOn;
});
},
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
elevation: 10,
child: Text(
englishOn ? "Simplified Chinese" : "English",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
],
),
const SizedBox(height: 10),
];
children
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
return MihSingleChildScroll( return MihSingleChildScroll(
child: Column( child: Column(
children: PolicyAndTermsText().getTermsOfServiceText(context), children: children,
), ),
); );
} }

View File

@@ -2,7 +2,10 @@ import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:ken_logger/ken_logger.dart'; import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_access_controlls_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_access_controls_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_access_controls_services.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
@@ -10,18 +13,15 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_warning_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_warning_message.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:provider/provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/patient_access.dart';
class BuildBusinessAccessList extends StatefulWidget { class BuildBusinessAccessList extends StatefulWidget {
final List<PatientAccess> patientAccessList; final String filterText;
final AppUser signedInUser;
final void Function()? onSuccessUpate; final void Function()? onSuccessUpate;
const BuildBusinessAccessList({ const BuildBusinessAccessList({
super.key, super.key,
required this.patientAccessList, required this.filterText,
required this.signedInUser,
required this.onSuccessUpate, required this.onSuccessUpate,
}); });
@@ -60,18 +60,20 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
); );
} }
Widget displayQueue(int index) { Widget displayQueue(
String line1 = MzansiProfileProvider mzansiProfileProvider,
"Business Name: ${widget.patientAccessList[index].requested_by}"; MihAccessControllsProvider accessProvider,
int index,
List<PatientAccess> filteredList) {
String line1 = "Business Name: ${filteredList[index].requested_by}";
String line2 = ""; String line2 = "";
line2 += line2 +=
"Request Date: ${widget.patientAccessList[index].requested_on.substring(0, 16).replaceAll("T", " ")}\n"; "Request Date: ${filteredList[index].requested_on.substring(0, 16).replaceAll("T", " ")}\n";
line2 += line2 += "Profile Type: ${filteredList[index].type.toUpperCase()}\n";
"Profile Type: ${widget.patientAccessList[index].type.toUpperCase()}\n";
//subtitle += "Business Type: ${widget.patientAccessList[index].type}\n"; //subtitle += "Business Type: ${widget.patientAccessList[index].type}\n";
String line3 = "Status: "; String line3 = "Status: ";
String access = widget.patientAccessList[index].status.toUpperCase(); String access = filteredList[index].status.toUpperCase();
TextSpan accessWithColour; TextSpan accessWithColour;
if (access == "APPROVED") { if (access == "APPROVED") {
@@ -118,7 +120,7 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
// ), // ),
// ), // ),
onTap: () { onTap: () {
viewApprovalPopUp(index); viewApprovalPopUp(mzansiProfileProvider, accessProvider, index);
}, },
// trailing: Icon( // trailing: Icon(
// Icons.arrow_forward, // Icons.arrow_forward,
@@ -153,23 +155,24 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
} }
} }
void viewApprovalPopUp(int index) { void viewApprovalPopUp(MzansiProfileProvider mzansiProfileProvider,
MihAccessControllsProvider accessProvider, int index) {
String subtitle = String subtitle =
"Business Name: ${widget.patientAccessList[index].requested_by}\n"; "Business Name: ${accessProvider.accessList![index].requested_by}\n";
subtitle += subtitle +=
"Requested Date: ${widget.patientAccessList[index].requested_on.substring(0, 16).replaceAll("T", " ")}\n"; "Requested Date: ${accessProvider.accessList![index].requested_on.substring(0, 16).replaceAll("T", " ")}\n";
subtitle += subtitle +=
"Profile Type: ${widget.patientAccessList[index].type.toUpperCase()}\n"; "Profile Type: ${accessProvider.accessList![index].type.toUpperCase()}\n";
subtitle += subtitle +=
"Status: ${widget.patientAccessList[index].status.toUpperCase()}"; "Status: ${accessProvider.accessList![index].status.toUpperCase()}";
if (widget.patientAccessList[index].status == 'pending') { if (accessProvider.accessList![index].status == 'pending') {
// "\nYou are about to approve an access request to your patient profile.\nPlease be aware that once approved, ${widget.patientAccessList[index].requested_by} will have access to your profile forever and will be able to contribute to it.\nIf you are unsure about an upcoming appointment with ${widget.patientAccessList[index].requested_by}, please contact *Add Number here* for clarification before approving this request."; // "\nYou are about to approve an access request to your patient profile.\nPlease be aware that once approved, ${widget.patientAccessList[index].requested_by} will have access to your profile forever and will be able to contribute to it.\nIf you are unsure about an upcoming appointment with ${widget.patientAccessList[index].requested_by}, please contact *Add Number here* for clarification before approving this request.";
} else { } else {
subtitle += subtitle +=
"\nActioned By: ${widget.patientAccessList[index].approved_by}\n"; "\nActioned By: ${accessProvider.accessList![index].approved_by}\n";
subtitle += subtitle +=
"Actioned On: ${widget.patientAccessList[index].approved_on.substring(0, 16).replaceAll("T", " ")}"; "Actioned On: ${accessProvider.accessList![index].approved_on.substring(0, 16).replaceAll("T", " ")}";
// subtitle += // subtitle +=
// "You have approved this access request to your patient profile.\nPlease be aware that once approved, ${widget.patientAccessList[index].requested_by} will have access to your profile forever and will be able to contribute to it."; // "You have approved this access request to your patient profile.\nPlease be aware that once approved, ${widget.patientAccessList[index].requested_by} will have access to your profile forever and will be able to contribute to it.";
} }
@@ -199,7 +202,7 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
), ),
const SizedBox(height: 20.0), const SizedBox(height: 20.0),
Visibility( Visibility(
visible: widget.patientAccessList[index].status == 'pending', visible: accessProvider.accessList![index].status == 'pending',
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@@ -271,7 +274,7 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
), ),
), ),
Visibility( Visibility(
visible: widget.patientAccessList[index].status == 'approved', visible: accessProvider.accessList![index].status == 'approved',
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@@ -338,7 +341,7 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
height: 20, height: 20,
), ),
Visibility( Visibility(
visible: widget.patientAccessList[index].status == 'pending', visible: accessProvider.accessList![index].status == 'pending',
child: Wrap( child: Wrap(
runSpacing: 10, runSpacing: 10,
spacing: 10, spacing: 10,
@@ -348,15 +351,20 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
print("request declined"); print("request declined");
int statusCode = await MihAccessControlsServices() int statusCode = await MihAccessControlsServices()
.updatePatientAccessAPICall( .updatePatientAccessAPICall(
widget.patientAccessList[index].business_id, accessProvider.accessList![index].business_id,
widget.patientAccessList[index].requested_by, accessProvider.accessList![index].requested_by,
widget.patientAccessList[index].app_id, accessProvider.accessList![index].app_id,
"declined", "declined",
"${widget.signedInUser.fname} ${widget.signedInUser.lname}", "${mzansiProfileProvider.user!.fname} ${mzansiProfileProvider.user!.lname}",
widget.signedInUser, mzansiProfileProvider.user!,
context, context,
); );
if (statusCode == 200) { if (statusCode == 200) {
await MihAccessControlsServices()
.getBusinessAccessListOfPatient(
mzansiProfileProvider.user!.app_id,
accessProvider,
);
context.pop(); context.pop();
successPopUp("Successfully Actioned Request", successPopUp("Successfully Actioned Request",
"You have successfully Declined access request"); "You have successfully Declined access request");
@@ -384,15 +392,20 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
print("request approved"); print("request approved");
int statusCode = await MihAccessControlsServices() int statusCode = await MihAccessControlsServices()
.updatePatientAccessAPICall( .updatePatientAccessAPICall(
widget.patientAccessList[index].business_id, accessProvider.accessList![index].business_id,
widget.patientAccessList[index].requested_by, accessProvider.accessList![index].requested_by,
widget.patientAccessList[index].app_id, accessProvider.accessList![index].app_id,
"approved", "approved",
"${widget.signedInUser.fname} ${widget.signedInUser.lname}", "${mzansiProfileProvider.user!.fname} ${mzansiProfileProvider.user!.lname}",
widget.signedInUser, mzansiProfileProvider.user!,
context, context,
); );
if (statusCode == 200) { if (statusCode == 200) {
await MihAccessControlsServices()
.getBusinessAccessListOfPatient(
mzansiProfileProvider.user!.app_id,
accessProvider,
);
context.pop(); context.pop();
successPopUp("Successfully Actioned Request", successPopUp("Successfully Actioned Request",
"You have successfully Accepted access request"); "You have successfully Accepted access request");
@@ -487,6 +500,16 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
); );
} }
List<PatientAccess> filterAccessList(List<PatientAccess> accessList) {
if (widget.filterText == "All") {
return accessList;
}
return accessList
.where((item) =>
item.status.toLowerCase() == widget.filterText.toLowerCase())
.toList();
}
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
@@ -500,21 +523,30 @@ class _BuildPatientsListState extends State<BuildBusinessAccessList> {
height = size.height; height = size.height;
}); });
checkScreenSize(); checkScreenSize();
return ListView.separated( return Consumer2<MzansiProfileProvider, MihAccessControllsProvider>(
shrinkWrap: true, builder: (BuildContext context,
physics: const NeverScrollableScrollPhysics(), MzansiProfileProvider mzansiProfileProvider,
separatorBuilder: (BuildContext context, index) { MihAccessControllsProvider accessProvider,
return Divider( Widget? child) {
color: MihColors.getSecondaryColor( return ListView.separated(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"), shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
separatorBuilder: (BuildContext context, index) {
return Divider(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
);
},
itemCount: filterAccessList(accessProvider.accessList!).length,
itemBuilder: (context, index) {
//final patient = widget.patients[index].id_no.contains(widget.searchString);
//print(index);
final filteredList = filterAccessList(accessProvider.accessList!);
return displayQueue(
mzansiProfileProvider, accessProvider, index, filteredList);
},
); );
}, },
itemCount: widget.patientAccessList.length,
itemBuilder: (context, index) {
//final patient = widget.patients[index].id_no.contains(widget.searchString);
//print(index);
return displayQueue(index);
},
); );
} }
} }

View File

@@ -2,15 +2,14 @@ import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_access_controlls_provider.dart';
import 'package:mzansi_innovation_hub/mih_packages/access_review/package_tools/mih_access_requests.dart'; import 'package:mzansi_innovation_hub/mih_packages/access_review/package_tools/mih_access_requests.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MihAccess extends StatefulWidget { class MihAccess extends StatefulWidget {
final AppUser signedInUser;
const MihAccess({ const MihAccess({
super.key, super.key,
required this.signedInUser,
}); });
@override @override
@@ -18,7 +17,6 @@ class MihAccess extends StatefulWidget {
} }
class _MihAccessState extends State<MihAccess> { class _MihAccessState extends State<MihAccess> {
int _selcetedIndex = 0;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MihPackage( return MihPackage(
@@ -26,12 +24,9 @@ class _MihAccessState extends State<MihAccess> {
appTools: getTools(), appTools: getTools(),
appBody: getToolBody(), appBody: getToolBody(),
appToolTitles: getToolTitle(), appToolTitles: getToolTitle(),
selectedbodyIndex: _selcetedIndex, selectedbodyIndex: context.watch<MihAccessControllsProvider>().toolIndex,
onIndexChange: (newValue) { onIndexChange: (newValue) {
setState(() { context.read<MihAccessControllsProvider>().setToolIndex(newValue);
_selcetedIndex = newValue;
});
print("Index: $_selcetedIndex");
}, },
); );
} }
@@ -43,7 +38,6 @@ class _MihAccessState extends State<MihAccess> {
onTap: () { onTap: () {
context.goNamed( context.goNamed(
'mihHome', 'mihHome',
extra: true,
); );
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
}, },
@@ -53,21 +47,17 @@ class _MihAccessState extends State<MihAccess> {
MihPackageTools getTools() { MihPackageTools getTools() {
Map<Widget, void Function()?> temp = {}; Map<Widget, void Function()?> temp = {};
temp[const Icon(Icons.people)] = () { temp[const Icon(Icons.people)] = () {
setState(() { context.read<MihAccessControllsProvider>().setToolIndex(0);
_selcetedIndex = 0;
});
}; };
return MihPackageTools( return MihPackageTools(
tools: temp, tools: temp,
selcetedIndex: _selcetedIndex, selcetedIndex: context.watch<MihAccessControllsProvider>().toolIndex,
); );
} }
List<Widget> getToolBody() { List<Widget> getToolBody() {
List<Widget> toolBodies = [ List<Widget> toolBodies = [
MihAccessRequest( MihAccessRequest(),
signedInUser: widget.signedInUser,
),
]; ];
return toolBodies; return toolBodies;
} }

View File

@@ -2,17 +2,14 @@ import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tile.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihAccessTile extends StatefulWidget { class MihAccessTile extends StatefulWidget {
final AppUser signedInUser;
final double packageSize; final double packageSize;
const MihAccessTile({ const MihAccessTile({
super.key, super.key,
required this.signedInUser,
required this.packageSize, required this.packageSize,
}); });
@@ -28,7 +25,6 @@ class _MihAccessTileState extends State<MihAccessTile> {
onTap: () { onTap: () {
context.goNamed( context.goNamed(
"mihAccess", "mihAccess",
extra: widget.signedInUser,
); );
// Navigator.of(context).pushNamed( // Navigator.of(context).pushNamed(
// '/mih-access', // '/mih-access',

Some files were not shown because too many files have changed in this diff Show More