Compare commits
166 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a59d2bf336 | |||
| d5fcad8fa5 | |||
| 609828a26c | |||
| d0a5c6c858 | |||
| 4a293c0aa4 | |||
| d51d13a685 | |||
| bf6bda04a6 | |||
| b749dc62d9 | |||
| b82a5a72c7 | |||
| 56ab6bb950 | |||
| bb54605ddb | |||
| c4b3a12213 | |||
| 43d715f4f8 | |||
| a9d6ca1baa | |||
| dfcfced28f | |||
| d0474fed21 | |||
| f228307859 | |||
| ab9cbce41c | |||
| 70413cc294 | |||
| a4d510f023 | |||
| e99388711d | |||
| 00cd5488e3 | |||
| b69a52a5a8 | |||
| f5c05d7431 | |||
| 0403d8c4b5 | |||
| fb7bf4ad65 | |||
| 3417299989 | |||
| 66887d23f8 | |||
| f064730dcf | |||
| a49505c153 | |||
| 9d898d8dff | |||
| c517075197 | |||
| 2dc3396fcc | |||
| d318b17b18 | |||
| 4221ae73b9 | |||
| b49e93825e | |||
| 790bf0e4f8 | |||
| a0bd74b703 | |||
| 96daf77b45 | |||
| 77ffd95fb6 | |||
| 24cc7f64b5 | |||
| d76512c11f | |||
| e1e7542a6d | |||
| 121cde211f | |||
| b79decf04f | |||
| a26b826729 | |||
| cc3d1ae430 | |||
| 329e450f5b | |||
| 0a03b1c60c | |||
| 652d4bb2fd | |||
| 5903fcd31a | |||
| 66db154b02 | |||
| 5770f6c353 | |||
| c5713cf6e0 | |||
| 4fe544b35f | |||
| 6542f1c399 | |||
|
|
2f0b11e5ba | ||
| d9b2598bca | |||
| 0c15bd3e90 | |||
| 0daffb5041 | |||
| 9485213d6e | |||
| 9a8f157451 | |||
| a6f6cdaace | |||
| effbac2c91 | |||
| f8de726959 | |||
| 01220144c3 | |||
| 3f93cc9a7a | |||
| 83a16bad79 | |||
| d2f93db580 | |||
| a3c1963d30 | |||
| 8e6ef25954 | |||
| 580fa027f2 | |||
| 9346cccd20 | |||
| 51f2435c33 | |||
| ba5772f3ac | |||
| 662d20617d | |||
| e6d1cf0268 | |||
| ed7c5a2269 | |||
| 98beb20827 | |||
| 76a54ce969 | |||
| c53f30035d | |||
| ec01e2212b | |||
| f840418caf | |||
| 76d24a8e2b | |||
| 821cbc0a0d | |||
| ea25598144 | |||
| 70fc306789 | |||
| ba46f38497 | |||
| 67692967c3 | |||
| cc51afadb3 | |||
| d9fb9dd758 | |||
| d75da5389a | |||
|
|
efaf9b3574 | ||
| 763c4cdb54 | |||
| b37f0f71db | |||
| 8ceb443964 | |||
| a87e52d22c | |||
| 46c281d288 | |||
| 5289cf8511 | |||
| 22ae804c2d | |||
| 1a7293fc12 | |||
| e318e03805 | |||
| 11b6ec9edb | |||
| 2a7e3e17ce | |||
| 9cbdc849b1 | |||
| 0cabe11ab7 | |||
| a561f4fa5f | |||
| 429e91b638 | |||
| c0d152002c | |||
| 1329c8aba4 | |||
| 52f9eb7ba6 | |||
| bcff545dd7 | |||
| 6a5b4f7f4b | |||
|
|
b2b9d8f046 | ||
|
|
4c39e9163b | ||
|
|
6541ac883f | ||
| ffe9f6e9fb | |||
| 8e6f3d7d45 | |||
| abd56d5a14 | |||
| cb25b932ba | |||
| 771d809ce2 | |||
| d6f1629485 | |||
| 39a42048c2 | |||
| 99d0fa4aa8 | |||
| 79ed959b42 | |||
| 23c3cf4173 | |||
| f548db7d82 | |||
| fd2f3a2138 | |||
| 1fe817919f | |||
| 656e1cd3d7 | |||
| a9ea3594b9 | |||
| 7de2cb7b36 | |||
| ac22e50eca | |||
| 9bd039ca25 | |||
| b0d38b4b11 | |||
| 926b749fa8 | |||
| b2ed1e0b51 | |||
| 3dc9ce30e6 | |||
| 91241aa399 | |||
| c79904d132 | |||
| 15106d0a00 | |||
| 2e69e1dd92 | |||
| c89932755f | |||
| 540e13dfe0 | |||
| d51603ff5d | |||
| 553d22dd6b | |||
| 5f5107ee99 | |||
| 6ecce1e9ff | |||
| 22d8c64994 | |||
| ebd78eb72b | |||
| f828ba1786 | |||
| bbadc58ab8 | |||
| a1b7a3ef28 | |||
| 7373a1b8cb | |||
| 0edbfadc90 | |||
| ef479b633d | |||
| 081e7d5533 | |||
| 18e8217ce1 | |||
| cadd51535e | |||
| ba394e7fea | |||
| 04c92804b8 | |||
|
|
a2d1bebca1 | ||
|
|
1a448572ea | ||
|
|
04b247aa99 | ||
|
|
aa0d756979 | ||
|
|
16f50f826b |
@@ -55,6 +55,11 @@ android {
|
|||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
signingConfig = signingConfigs.getByName("release")
|
signingConfig = signingConfigs.getByName("release")
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
Frontend/android/app/proguard-rules.pro
vendored
Normal 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
|
||||||
@@ -11,15 +11,23 @@
|
|||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-feature android:name="android.hardware.camera" />
|
<uses-feature android:name="android.hardware.camera" />
|
||||||
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
|
tools:replace="android:maxSdkVersion"
|
||||||
|
android:maxSdkVersion="29"/>
|
||||||
<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-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="MIH"
|
android:label="MIH"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/launcher_icon">
|
android:icon="@mipmap/launcher_icon"
|
||||||
|
android:enableOnBackInvokedCallback="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
@@ -45,6 +53,10 @@
|
|||||||
android:name="flutter-deeplink"
|
android:name="flutter-deeplink"
|
||||||
android:value="true"
|
android:value="true"
|
||||||
/>
|
/>
|
||||||
|
<!-- Shortcut Icons -->
|
||||||
|
<meta-data
|
||||||
|
android:name="mih_shortcut_icons"
|
||||||
|
android:resource="@array/mih_shortcut_icons" />
|
||||||
<!-- New Deep Linking -->
|
<!-- New Deep Linking -->
|
||||||
<intent-filter android:autoVerify="true">
|
<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
@@ -98,5 +110,8 @@
|
|||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.TTS_SERVICE" />
|
<action android:name="android.intent.action.TTS_SERVICE" />
|
||||||
</intent>
|
</intent>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.speech.RecognitionService" />
|
||||||
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package za.co.mzansiinnovationhub.mih
|
package za.co.mzansiinnovationhub.mih
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||||
|
|
||||||
class MainActivity : FlutterActivity()
|
class MainActivity : FlutterFragmentActivity()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/calculator"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</layer-list>
|
||||||
14
Frontend/android/app/src/main/res/drawable/mih_home_sc.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/mih_logo"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</layer-list>
|
||||||
12
Frontend/android/app/src/main/res/drawable/mih_logo.xml
Normal file
9
Frontend/android/app/src/main/res/drawable/mzansi_ai.xml
Normal file
14
Frontend/android/app/src/main/res/drawable/mzansi_ai_sc.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/mzansi_ai"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</layer-list>
|
||||||
12
Frontend/android/app/src/main/res/drawable/mzansi_wallet.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/mzansi_wallet"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</layer-list>
|
||||||
12
Frontend/android/app/src/main/res/drawable/test.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
|
||||||
|
|
||||||
|
</vector>
|
||||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
9
Frontend/android/app/src/main/res/values/arrays.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<array name="mih_shortcut_icons">
|
||||||
|
<item>@drawable/mih_home_sc</item>
|
||||||
|
<item>@drawable/mzansi_wallet_sc</item>
|
||||||
|
<item>@drawable/mzansi_ai_sc</item>
|
||||||
|
<item>@drawable/mih_calculator_sc</item>
|
||||||
|
</array>
|
||||||
|
</resources>
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#3A4454</color>
|
<color name="ic_launcher_background">#6641b2</color>
|
||||||
|
<!-- Women For Change -->
|
||||||
|
<color name="mih_icon_background">#6641b2</color>
|
||||||
|
<color name="mih_icon_foreground">#E0D1FF</color>
|
||||||
|
<!-- Original -->
|
||||||
|
<!-- <color name="mih_icon_background">#3A4454</color>
|
||||||
|
<color name="mih_icon_foreground">#bedcfe</color> -->
|
||||||
</resources>
|
</resources>
|
||||||
663
Frontend/android/build/reports/problems/problems-report.html
Normal file
@@ -1,32 +1,46 @@
|
|||||||
# flutter pub run flutter_launcher_icons
|
# flutter pub run flutter_launcher_icons
|
||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
|
# Original
|
||||||
|
# image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_app.png"
|
||||||
|
|
||||||
|
# Women For Change
|
||||||
|
image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_app_w4c.png"
|
||||||
|
|
||||||
android: "launcher_icon"
|
android: "launcher_icon"
|
||||||
# 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"
|
# Original
|
||||||
adaptive_icon_foreground: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
|
# adaptive_icon_background: "#3A4454"
|
||||||
# adaptive_icon_monochrome: "assets/icon/monochrome.png"
|
# adaptive_icon_foreground: "lib/mih_package_components/assets/images/app_icon/mih_logo_app.png"
|
||||||
|
|
||||||
|
# Women For Change
|
||||||
|
adaptive_icon_background: "#6641b2"
|
||||||
|
adaptive_icon_foreground: "lib/mih_package_components/assets/images/app_icon/mih_logo_app_w4c.png"
|
||||||
|
|
||||||
ios: true
|
ios: true
|
||||||
image_path_ios: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
|
# Original
|
||||||
|
# image_path_ios: "lib/mih_package_components/assets/images/app_icon/mih_logo_app.png"
|
||||||
|
|
||||||
|
# Women For Change
|
||||||
|
image_path_ios: "lib/mih_package_components/assets/images/app_icon/mih_logo_app_w4c.png"
|
||||||
remove_alpha_channel_ios: true
|
remove_alpha_channel_ios: true
|
||||||
# image_path_ios_dark_transparent: "assets/icon/icon_dark.png"
|
|
||||||
# image_path_ios_tinted_grayscale: "assets/icon/icon_tinted.png"
|
|
||||||
# desaturate_tinted_to_grayscale_ios: true
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
generate: true
|
generate: true
|
||||||
image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"
|
# Original
|
||||||
background_color: "#3A4454"
|
# image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_web.png"
|
||||||
theme_color: "#3A4454"
|
# background_color: "#3A4454"
|
||||||
|
# theme_color: "#3A4454"
|
||||||
|
|
||||||
|
# Women For Change
|
||||||
|
image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_web_w4c.png"
|
||||||
|
background_color: "#6641b2"
|
||||||
|
theme_color: "#6641b2"
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
generate: true
|
generate: true
|
||||||
image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"
|
image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_web.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: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"
|
image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_web.png"
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- app_settings (5.1.1):
|
- app_settings (5.1.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- AppCheckCore (11.2.0):
|
||||||
|
- GoogleUtilities/Environment (~> 8.0)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||||
|
- PromisesObjC (~> 2.4)
|
||||||
|
- camera_avfoundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- CwlCatchException (2.2.1):
|
||||||
|
- CwlCatchExceptionSupport (~> 2.2.1)
|
||||||
|
- CwlCatchExceptionSupport (2.2.1)
|
||||||
- device_info_plus (0.0.1):
|
- device_info_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- DKImagePickerController/Core (4.3.9):
|
- DKImagePickerController/Core (4.3.9):
|
||||||
@@ -34,11 +43,56 @@ 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):
|
- file_saver (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- file_selector_ios (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- Firebase/Auth (12.4.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAuth (~> 12.4.0)
|
||||||
|
- Firebase/CoreOnly (12.4.0):
|
||||||
|
- FirebaseCore (~> 12.4.0)
|
||||||
|
- firebase_app_check (0.4.1-2):
|
||||||
|
- Firebase/CoreOnly (~> 12.4.0)
|
||||||
|
- firebase_core
|
||||||
|
- FirebaseAppCheck (~> 12.4.0)
|
||||||
|
- Flutter
|
||||||
|
- firebase_auth (6.1.2):
|
||||||
|
- Firebase/Auth (= 12.4.0)
|
||||||
|
- firebase_core
|
||||||
|
- Flutter
|
||||||
|
- firebase_core (4.2.1):
|
||||||
|
- Firebase/CoreOnly (= 12.4.0)
|
||||||
|
- Flutter
|
||||||
|
- FirebaseAppCheck (12.4.0):
|
||||||
|
- AppCheckCore (~> 11.0)
|
||||||
|
- FirebaseAppCheckInterop (~> 12.4.0)
|
||||||
|
- FirebaseCore (~> 12.4.0)
|
||||||
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 8.1)
|
||||||
|
- FirebaseAppCheckInterop (12.4.0)
|
||||||
|
- FirebaseAuth (12.4.0):
|
||||||
|
- FirebaseAppCheckInterop (~> 12.4.0)
|
||||||
|
- FirebaseAuthInterop (~> 12.4.0)
|
||||||
|
- FirebaseCore (~> 12.4.0)
|
||||||
|
- FirebaseCoreExtension (~> 12.4.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
|
||||||
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
|
- GTMSessionFetcher/Core (< 6.0, >= 3.4)
|
||||||
|
- RecaptchaInterop (~> 101.0)
|
||||||
|
- FirebaseAuthInterop (12.4.0)
|
||||||
|
- FirebaseCore (12.4.0):
|
||||||
|
- FirebaseCoreInternal (~> 12.4.0)
|
||||||
|
- GoogleUtilities/Environment (~> 8.1)
|
||||||
|
- GoogleUtilities/Logger (~> 8.1)
|
||||||
|
- FirebaseCoreExtension (12.4.0):
|
||||||
|
- FirebaseCore (~> 12.4.0)
|
||||||
|
- FirebaseCoreInternal (12.4.0):
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 8.1)"
|
||||||
- fl_downloader (0.0.1):
|
- fl_downloader (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
@@ -49,13 +103,46 @@ 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)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Network
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Environment (8.1.0):
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Logger (8.1.0):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Network (8.1.0):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- "GoogleUtilities/NSData+zlib"
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Reachability
|
||||||
|
- "GoogleUtilities/NSData+zlib (8.1.0)":
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Privacy (8.1.0)
|
||||||
|
- GoogleUtilities/Reachability (8.1.0):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/UserDefaults (8.1.0):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GTMSessionFetcher/Core (5.0.0)
|
||||||
|
- image_picker_ios (0.0.1):
|
||||||
|
- Flutter
|
||||||
- local_auth_darwin (0.0.1):
|
- local_auth_darwin (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@@ -69,6 +156,12 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- printing (1.0.0):
|
- printing (1.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- PromisesObjC (2.4.0)
|
||||||
|
- quick_actions_ios (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- RecaptchaInterop (101.0.0)
|
||||||
|
- record_ios (1.1.0):
|
||||||
|
- Flutter
|
||||||
- screen_brightness_ios (0.1.0):
|
- screen_brightness_ios (0.1.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- SDWebImage (5.20.0):
|
- SDWebImage (5.20.0):
|
||||||
@@ -79,6 +172,10 @@ PODS:
|
|||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- speech_to_text (7.2.0):
|
||||||
|
- CwlCatchException
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- sqflite_darwin (0.0.4):
|
- sqflite_darwin (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@@ -93,23 +190,33 @@ PODS:
|
|||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- app_settings (from `.symlinks/plugins/app_settings/ios`)
|
- app_settings (from `.symlinks/plugins/app_settings/ios`)
|
||||||
|
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/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`)
|
- file_saver (from `.symlinks/plugins/file_saver/ios`)
|
||||||
|
- file_selector_ios (from `.symlinks/plugins/file_selector_ios/ios`)
|
||||||
|
- firebase_app_check (from `.symlinks/plugins/firebase_app_check/ios`)
|
||||||
|
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
||||||
|
- firebase_core (from `.symlinks/plugins/firebase_core/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`)
|
||||||
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/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`)
|
- 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`)
|
||||||
|
- quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
|
||||||
|
- record_ios (from `.symlinks/plugins/record_ios/ios`)
|
||||||
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
|
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
|
||||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- speech_to_text (from `.symlinks/plugins/speech_to_text/darwin`)
|
||||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
||||||
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
|
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
@@ -117,22 +224,49 @@ DEPENDENCIES:
|
|||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
|
- AppCheckCore
|
||||||
|
- CwlCatchException
|
||||||
|
- CwlCatchExceptionSupport
|
||||||
- DKImagePickerController
|
- DKImagePickerController
|
||||||
- DKPhotoGallery
|
- DKPhotoGallery
|
||||||
|
- FBAudienceNetwork
|
||||||
|
- Firebase
|
||||||
|
- FirebaseAppCheck
|
||||||
|
- FirebaseAppCheckInterop
|
||||||
|
- FirebaseAuth
|
||||||
|
- FirebaseAuthInterop
|
||||||
|
- FirebaseCore
|
||||||
|
- FirebaseCoreExtension
|
||||||
|
- FirebaseCoreInternal
|
||||||
- Google-Mobile-Ads-SDK
|
- Google-Mobile-Ads-SDK
|
||||||
|
- GoogleMobileAdsMediationFacebook
|
||||||
- GoogleUserMessagingPlatform
|
- GoogleUserMessagingPlatform
|
||||||
|
- GoogleUtilities
|
||||||
|
- GTMSessionFetcher
|
||||||
|
- PromisesObjC
|
||||||
|
- RecaptchaInterop
|
||||||
- SDWebImage
|
- SDWebImage
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
app_settings:
|
app_settings:
|
||||||
:path: ".symlinks/plugins/app_settings/ios"
|
:path: ".symlinks/plugins/app_settings/ios"
|
||||||
|
camera_avfoundation:
|
||||||
|
:path: ".symlinks/plugins/camera_avfoundation/ios"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
: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:
|
file_saver:
|
||||||
:path: ".symlinks/plugins/file_saver/ios"
|
:path: ".symlinks/plugins/file_saver/ios"
|
||||||
|
file_selector_ios:
|
||||||
|
:path: ".symlinks/plugins/file_selector_ios/ios"
|
||||||
|
firebase_app_check:
|
||||||
|
:path: ".symlinks/plugins/firebase_app_check/ios"
|
||||||
|
firebase_auth:
|
||||||
|
:path: ".symlinks/plugins/firebase_auth/ios"
|
||||||
|
firebase_core:
|
||||||
|
:path: ".symlinks/plugins/firebase_core/ios"
|
||||||
fl_downloader:
|
fl_downloader:
|
||||||
:path: ".symlinks/plugins/fl_downloader/ios"
|
:path: ".symlinks/plugins/fl_downloader/ios"
|
||||||
Flutter:
|
Flutter:
|
||||||
@@ -143,8 +277,12 @@ 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"
|
||||||
|
image_picker_ios:
|
||||||
|
:path: ".symlinks/plugins/image_picker_ios/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:
|
||||||
@@ -155,12 +293,18 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
printing:
|
printing:
|
||||||
:path: ".symlinks/plugins/printing/ios"
|
:path: ".symlinks/plugins/printing/ios"
|
||||||
|
quick_actions_ios:
|
||||||
|
:path: ".symlinks/plugins/quick_actions_ios/ios"
|
||||||
|
record_ios:
|
||||||
|
:path: ".symlinks/plugins/record_ios/ios"
|
||||||
screen_brightness_ios:
|
screen_brightness_ios:
|
||||||
:path: ".symlinks/plugins/screen_brightness_ios/ios"
|
:path: ".symlinks/plugins/screen_brightness_ios/ios"
|
||||||
share_plus:
|
share_plus:
|
||||||
:path: ".symlinks/plugins/share_plus/ios"
|
:path: ".symlinks/plugins/share_plus/ios"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||||
|
speech_to_text:
|
||||||
|
:path: ".symlinks/plugins/speech_to_text/darwin"
|
||||||
sqflite_darwin:
|
sqflite_darwin:
|
||||||
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
||||||
syncfusion_flutter_pdfviewer:
|
syncfusion_flutter_pdfviewer:
|
||||||
@@ -172,28 +316,55 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
|
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
|
||||||
|
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
|
||||||
|
camera_avfoundation: be3be85408cd4126f250386828e9b1dfa40ab436
|
||||||
|
CwlCatchException: 7acc161b299a6de7f0a46a6ed741eae2c8b4d75a
|
||||||
|
CwlCatchExceptionSupport: 54ccab8d8c78907b57f99717fb19d4cc3bce02dc
|
||||||
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
|
file_saver: 6cdbcddd690cb02b0c1a0c225b37cd805c2bf8b6
|
||||||
|
file_selector_ios: f92e583d43608aebc2e4a18daac30b8902845502
|
||||||
|
Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e
|
||||||
|
firebase_app_check: 61fb3578a0761c806533482aca240a2d5cc5b5ef
|
||||||
|
firebase_auth: 9225db04db5d8e3b46dc8940e04bc6aec6833e27
|
||||||
|
firebase_core: f1aafb21c14f497e5498f7ffc4dc63cbb52b2594
|
||||||
|
FirebaseAppCheck: 73721d98fa29cf199da6004e57715cbaddd49651
|
||||||
|
FirebaseAppCheckInterop: f734c802f21fe1da0837708f0f9a27218c8a4ed0
|
||||||
|
FirebaseAuth: 4a2aed737c84114a9d9b33d11ae1b147d6b94889
|
||||||
|
FirebaseAuthInterop: 858e6b754966e70740a4370dd1503dfffe6dbb49
|
||||||
|
FirebaseCore: bb595f3114953664e3c1dc032f008a244147cfd3
|
||||||
|
FirebaseCoreExtension: 7e1f7118ee970e001a8013719fb90950ee5e0018
|
||||||
|
FirebaseCoreInternal: d7f5a043c2cd01a08103ab586587c1468047bca6
|
||||||
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
|
||||||
|
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||||
|
GTMSessionFetcher: 02d6e866e90bc236f48a703a041dfe43e6221a29
|
||||||
|
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
|
||||||
local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391
|
local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391
|
||||||
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
|
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
|
||||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||||
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
||||||
printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07
|
printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07
|
||||||
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
|
quick_actions_ios: 4b07fb49d8d8f3518d7565fbb7a91014067a7d82
|
||||||
|
RecaptchaInterop: 11e0b637842dfb48308d242afc3f448062325aba
|
||||||
|
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
|
||||||
screen_brightness_ios: 9953fd7da5bd480f1a93990daeec2eb42d4f3b52
|
screen_brightness_ios: 9953fd7da5bd480f1a93990daeec2eb42d4f3b52
|
||||||
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
|
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
|
||||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||||
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
||||||
|
speech_to_text: 3b313d98516d3d0406cea424782ec25470c59d19
|
||||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||||
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 654 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.9 KiB |
6
Frontend/ios/Runner/Assets.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
16
Frontend/ios/Runner/Assets.xcassets/mih_calculator_sc.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "calculator.svg",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"preserves-vector-representation" : true,
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
||||||
21
Frontend/ios/Runner/Assets.xcassets/mih_calculator_sc.imageset/calculator.svg
vendored
Normal file
|
After Width: | Height: | Size: 16 KiB |
16
Frontend/ios/Runner/Assets.xcassets/mih_home_sc.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "mih_logo.svg",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"preserves-vector-representation" : true,
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
||||||
21
Frontend/ios/Runner/Assets.xcassets/mih_home_sc.imageset/mih_logo.svg
vendored
Normal file
|
After Width: | Height: | Size: 13 KiB |
16
Frontend/ios/Runner/Assets.xcassets/mzansi_ai_sc.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "mzansi_ai.svg",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"preserves-vector-representation" : true,
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
||||||
21
Frontend/ios/Runner/Assets.xcassets/mzansi_ai_sc.imageset/mzansi_ai.svg
vendored
Normal file
|
After Width: | Height: | Size: 17 KiB |
16
Frontend/ios/Runner/Assets.xcassets/mzansi_wallet_sc.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "mzansi_wallet.svg",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"preserves-vector-representation" : true,
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
||||||
21
Frontend/ios/Runner/Assets.xcassets/mzansi_wallet_sc.imageset/mzansi_wallet.svg
vendored
Normal file
|
After Width: | Height: | Size: 14 KiB |
@@ -2,6 +2,29 @@
|
|||||||
<!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>NSMicrophoneUsageDescription</key>
|
||||||
|
<string>This app needs access to your microphone to enable voice input for the chat.</string>
|
||||||
|
<key>NSSpeechRecognitionUsageDescription</key>
|
||||||
|
<string>This app uses speech recognition to convert your voice messages into text.</string>
|
||||||
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
<false/>
|
||||||
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
|
<string>This app needs access to your microphone to enable voice input for the chat.</string>
|
||||||
|
<key>NSSpeechRecognitionUsageDescription</key>
|
||||||
|
<string>This app uses speech recognition to convert your voice messages into text.</string>
|
||||||
|
<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 +64,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>
|
||||||
|
|||||||
@@ -1,6 +1,22 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
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_config/mih_colors.dart';
|
import 'package:ken_logger/ken_logger.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/about_mih_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_access_controlls_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_authentication_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_banner_ad_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_calculator_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_calendar_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_file_viewer_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mih_mine_sweeper_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mzansi_ai_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mzansi_directory_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mzansi_profile_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/mzansi_wallet_provider.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/patient_manager_provider.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:quick_actions/quick_actions.dart';
|
||||||
import 'package:upgrader/upgrader.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';
|
||||||
@@ -22,41 +38,64 @@ class MzansiInnovationHub extends StatefulWidget {
|
|||||||
|
|
||||||
class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
||||||
late MihTheme theme;
|
late MihTheme theme;
|
||||||
|
final QuickActions quickActions = QuickActions();
|
||||||
|
String shortcut = 'no action set';
|
||||||
|
|
||||||
Color getPrimany() {
|
void _initializeQuickActions() {
|
||||||
return MihColors.getPrimaryColor(theme.mode == "Dark");
|
quickActions.initialize((String shortcutType) {
|
||||||
}
|
|
||||||
|
|
||||||
String getTitle() {
|
|
||||||
if (AppEnviroment.getEnv() == "Dev") {
|
|
||||||
return "Dev | MIH App: Mzansi Innovation Hub";
|
|
||||||
} else {
|
|
||||||
return "MIH App: Mzansi Innovation Hub";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void changeTheme(ThemeMode themeMode) {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
if (themeMode == ThemeMode.light) {
|
shortcut = shortcutType;
|
||||||
setState(() {
|
|
||||||
theme.mode = "Light";
|
|
||||||
});
|
|
||||||
} else if (themeMode == ThemeMode.dark) {
|
|
||||||
setState(() {
|
|
||||||
theme.mode = "Dark";
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
theme.mode = "Dark";
|
|
||||||
});
|
});
|
||||||
|
if (shortcutType == 'mihHome') {
|
||||||
|
KenLogger.success("ShortCut: mihHome");
|
||||||
|
widget.router.goNamed("mihHome");
|
||||||
}
|
}
|
||||||
|
if (shortcutType == 'mzansiWallet') {
|
||||||
|
KenLogger.success("ShortCut: mzansiWallet");
|
||||||
|
widget.router.goNamed("mzansiWallet");
|
||||||
|
}
|
||||||
|
if (shortcutType == 'mzansiAi') {
|
||||||
|
KenLogger.success("ShortCut: mzansiAi");
|
||||||
|
widget.router.goNamed("mzansiAi");
|
||||||
|
}
|
||||||
|
if (shortcutType == 'mihCalculator') {
|
||||||
|
KenLogger.success("ShortCut: mihCalculator");
|
||||||
|
widget.router.goNamed("mihCalculator");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// Set the quick actions
|
||||||
|
quickActions.setShortcutItems(<ShortcutItem>[
|
||||||
|
const ShortcutItem(
|
||||||
|
type: 'mzansiWallet',
|
||||||
|
localizedTitle: 'Mzansi Wallet',
|
||||||
|
icon: 'mzansi_wallet_sc',
|
||||||
|
),
|
||||||
|
const ShortcutItem(
|
||||||
|
type: 'mzansiAi',
|
||||||
|
localizedTitle: 'Mzansi AI',
|
||||||
|
icon: 'mzansi_ai_sc',
|
||||||
|
),
|
||||||
|
const ShortcutItem(
|
||||||
|
type: 'mihCalculator',
|
||||||
|
localizedTitle: 'MIH Calc',
|
||||||
|
icon: 'mih_calculator_sc',
|
||||||
|
),
|
||||||
|
]).then((void _) {
|
||||||
|
setState(() {
|
||||||
|
if (shortcut == 'no action set') {
|
||||||
|
shortcut = 'mih_home_sc';
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
theme = MihTheme();
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
if (!kIsWeb) {
|
||||||
|
_initializeQuickActions();
|
||||||
|
}
|
||||||
|
theme = MihTheme();
|
||||||
theme.mode = "Dark";
|
theme.mode = "Dark";
|
||||||
theme.platform = Theme.of(context).platform;
|
theme.platform = Theme.of(context).platform;
|
||||||
}
|
}
|
||||||
@@ -65,20 +104,71 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double width = MediaQuery.sizeOf(context).width;
|
double width = MediaQuery.sizeOf(context).width;
|
||||||
theme.setScreenType(width);
|
theme.setScreenType(width);
|
||||||
precacheImage(theme.loadingImage(), context);
|
return MultiProvider(
|
||||||
return MaterialApp.router(
|
providers: [
|
||||||
title: getTitle(),
|
ChangeNotifierProvider(
|
||||||
|
create: (context) => MihAuthenticationProvider(),
|
||||||
|
),
|
||||||
|
ChangeNotifierProvider(
|
||||||
|
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(),
|
||||||
|
),
|
||||||
|
ChangeNotifierProvider(
|
||||||
|
create: (context) => MihFileViewerProvider(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
child: MaterialApp.router(
|
||||||
|
title: AppEnviroment.getEnv() == "Dev"
|
||||||
|
? "Dev | MIH App: Mzansi Innovation Hub"
|
||||||
|
: "MIH App: Mzansi Innovation Hub",
|
||||||
themeMode: ThemeMode.dark,
|
themeMode: ThemeMode.dark,
|
||||||
theme: theme.getThemeData(),
|
theme: theme.getThemeData(),
|
||||||
darkTheme: theme.getThemeData(),
|
darkTheme: theme.getThemeData(),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
routerConfig: widget.router,
|
routerConfig: widget.router,
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
|
if (child == null) {
|
||||||
|
return const Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
return UpgradeAlert(
|
return UpgradeAlert(
|
||||||
navigatorKey: widget.router.routerDelegate.navigatorKey,
|
navigatorKey: widget.router.routerDelegate.navigatorKey,
|
||||||
child: child ?? const Text('Upgrade Alert'),
|
child: child,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MIHAction extends StatefulWidget {
|
|
||||||
final void Function()? onTap;
|
|
||||||
final double iconSize;
|
|
||||||
final Widget icon;
|
|
||||||
const MIHAction({
|
|
||||||
super.key,
|
|
||||||
required this.icon,
|
|
||||||
required this.iconSize,
|
|
||||||
required this.onTap,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHAction> createState() => _MIHActionState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHActionState extends State<MIHAction> {
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return IconButton(
|
|
||||||
iconSize: widget.iconSize,
|
|
||||||
padding: const EdgeInsets.all(0),
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
icon: widget.icon,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
import '../../main.dart';
|
|
||||||
|
|
||||||
class MIHBody extends StatefulWidget {
|
|
||||||
final bool borderOn;
|
|
||||||
final List<Widget> bodyItems;
|
|
||||||
const MIHBody({
|
|
||||||
super.key,
|
|
||||||
required this.borderOn,
|
|
||||||
required this.bodyItems,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHBody> createState() => _MIHBodyState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHBodyState extends State<MIHBody> {
|
|
||||||
//double paddingSize = 10;
|
|
||||||
|
|
||||||
double getHorizontalPaddingSize(Size screenSize) {
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
if (widget.borderOn) {
|
|
||||||
return 10;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// mobile
|
|
||||||
if (widget.borderOn) {
|
|
||||||
return 10;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
double getVerticalPaddingSize(Size screenSize) {
|
|
||||||
// mobile
|
|
||||||
if (widget.borderOn) {
|
|
||||||
return 10;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Decoration? getBoader() {
|
|
||||||
if (widget.borderOn) {
|
|
||||||
return BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 3.0),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
Size screenSize = MediaQuery.sizeOf(context);
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: getHorizontalPaddingSize(screenSize),
|
|
||||||
right: getHorizontalPaddingSize(screenSize),
|
|
||||||
bottom: getVerticalPaddingSize(screenSize),
|
|
||||||
top: 0,
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: 10,
|
|
||||||
right: 10,
|
|
||||||
bottom: 10,
|
|
||||||
top: getVerticalPaddingSize(screenSize),
|
|
||||||
),
|
|
||||||
width: screenSize.width,
|
|
||||||
height: screenSize.height,
|
|
||||||
decoration: getBoader(),
|
|
||||||
child: ScrollConfiguration(
|
|
||||||
behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: widget.bodyItems,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MIHHeader extends StatefulWidget {
|
|
||||||
final MainAxisAlignment headerAlignment;
|
|
||||||
final List<Widget> headerItems;
|
|
||||||
const MIHHeader({
|
|
||||||
super.key,
|
|
||||||
required this.headerAlignment,
|
|
||||||
required this.headerItems,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHHeader> createState() => _MIHHeaderState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHHeaderState extends State<MIHHeader> {
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SizedBox(
|
|
||||||
height: 50,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: widget.headerAlignment,
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: widget.headerItems,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,152 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import '../../mih_packages/mih_home/components/mih_app_drawer.dart';
|
|
||||||
import 'mih_body.dart';
|
|
||||||
import 'mih_header.dart';
|
|
||||||
|
|
||||||
class MIHLayoutBuilder extends StatefulWidget {
|
|
||||||
final Widget actionButton;
|
|
||||||
final Widget? secondaryActionButton;
|
|
||||||
final MIHHeader header;
|
|
||||||
final MIHBody body;
|
|
||||||
final MIHAppDrawer? actionDrawer;
|
|
||||||
final Widget? secondaryActionDrawer;
|
|
||||||
final Widget? bottomNavBar;
|
|
||||||
final bool pullDownToRefresh;
|
|
||||||
final Future<void> Function() onPullDown;
|
|
||||||
//final String type;
|
|
||||||
const MIHLayoutBuilder({
|
|
||||||
super.key,
|
|
||||||
required this.actionButton,
|
|
||||||
required this.header,
|
|
||||||
required this.secondaryActionButton,
|
|
||||||
required this.body,
|
|
||||||
required this.actionDrawer,
|
|
||||||
required this.secondaryActionDrawer,
|
|
||||||
required this.bottomNavBar,
|
|
||||||
required this.pullDownToRefresh,
|
|
||||||
required this.onPullDown,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHLayoutBuilder> createState() => _MIHLayoutBuilderState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHLayoutBuilderState extends State<MIHLayoutBuilder> {
|
|
||||||
List<Widget> getList() {
|
|
||||||
List<Widget> temp = [];
|
|
||||||
temp.add(widget.header);
|
|
||||||
temp.add(widget.body);
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
// openTheDrawer() {
|
|
||||||
// _scaffoldKey.currentState!.openEndDrawer();
|
|
||||||
// }
|
|
||||||
|
|
||||||
Widget getLayoutHeader() {
|
|
||||||
List<Widget> temp = [];
|
|
||||||
temp.add(widget.actionButton);
|
|
||||||
temp.add(Flexible(child: widget.header));
|
|
||||||
if (widget.secondaryActionButton != null) {
|
|
||||||
temp.add(widget.secondaryActionButton!);
|
|
||||||
} else {
|
|
||||||
//print(widget.header.headerItems.length);
|
|
||||||
if (widget.header.headerItems.length == 1) {
|
|
||||||
temp.add(const SizedBox(
|
|
||||||
width: 50,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: temp,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget getBody(double width, double height) {
|
|
||||||
if (widget.pullDownToRefresh == true) {
|
|
||||||
return SafeArea(
|
|
||||||
child: LayoutBuilder(builder: (context, BoxConstraints constraints) {
|
|
||||||
double newheight = constraints.maxHeight;
|
|
||||||
//print(newheight);
|
|
||||||
return RefreshIndicator(
|
|
||||||
onRefresh: widget.onPullDown,
|
|
||||||
child: ListView.builder(
|
|
||||||
itemCount: 1,
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
return SafeArea(
|
|
||||||
child: SizedBox(
|
|
||||||
width: width,
|
|
||||||
height: newheight,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
getLayoutHeader(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Expanded(child: widget.body),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// child: SafeArea(
|
|
||||||
// child: SizedBox(
|
|
||||||
// width: width,
|
|
||||||
// height: height,
|
|
||||||
// child: Column(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// getLayoutHeader(),
|
|
||||||
// Expanded(child: widget.body),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return SafeArea(
|
|
||||||
child: SizedBox(
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
getLayoutHeader(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Expanded(child: widget.body),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
Size screenSize = MediaQuery.sizeOf(context);
|
|
||||||
return Scaffold(
|
|
||||||
//drawerEnableOpenDragGesture: true,
|
|
||||||
drawer: widget.actionDrawer,
|
|
||||||
endDrawer: widget.secondaryActionDrawer,
|
|
||||||
body: getBody(screenSize.width, screenSize.height),
|
|
||||||
bottomNavigationBar: widget.bottomNavBar,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_yt_video_player.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
|
|
||||||
class MIHTile extends StatefulWidget {
|
|
||||||
final String tileName;
|
|
||||||
final String? videoID;
|
|
||||||
final Widget tileIcon;
|
|
||||||
final void Function() onTap;
|
|
||||||
// final Widget tileIcon;
|
|
||||||
final Color p;
|
|
||||||
final Color s;
|
|
||||||
|
|
||||||
const MIHTile({
|
|
||||||
super.key,
|
|
||||||
required this.onTap,
|
|
||||||
required this.tileName,
|
|
||||||
this.videoID,
|
|
||||||
required this.tileIcon,
|
|
||||||
required this.p,
|
|
||||||
required this.s,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHTile> createState() => _MIHTileState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHTileState extends State<MIHTile> {
|
|
||||||
late Color mainC;
|
|
||||||
late Color secondC;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
mainC = widget.p;
|
|
||||||
secondC = widget.s;
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
void displayHint() {
|
|
||||||
if (widget.videoID != null) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return MihPackageWindow(
|
|
||||||
fullscreen: false,
|
|
||||||
windowTitle: widget.tileName,
|
|
||||||
onWindowTapClose: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
windowBody: Column(
|
|
||||||
children: [
|
|
||||||
MIHYTVideoPlayer(videoYTLink: widget.videoID!),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
// print(
|
|
||||||
// "Tile Name: ${widget.tileName}\nTitle Type: ${widget.tileIcon.runtimeType.toString()}");
|
|
||||||
return FittedBox(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
AnimatedContainer(
|
|
||||||
//alignment: Alignment.center,
|
|
||||||
width: 250,
|
|
||||||
height: 250,
|
|
||||||
duration: const Duration(seconds: 2),
|
|
||||||
child: Material(
|
|
||||||
color: mainC,
|
|
||||||
// shadowColor:
|
|
||||||
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
// elevation: 5,
|
|
||||||
borderRadius: BorderRadius.circular(80),
|
|
||||||
child: InkWell(
|
|
||||||
borderRadius: BorderRadius.circular(80),
|
|
||||||
// ho
|
|
||||||
onTap: widget.onTap,
|
|
||||||
onLongPress: () {
|
|
||||||
displayHint();
|
|
||||||
},
|
|
||||||
// hoverDuration: ,
|
|
||||||
splashColor: MihColors.getHighlightColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
highlightColor: MihColors.getHighlightColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
child: widget.tileIcon,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
SizedBox(
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
widget.tileName,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
softWrap: true,
|
|
||||||
overflow: TextOverflow.visible,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: 40.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/main.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_alert.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/Example/package_tools/package_tool_one.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_tools/package_tool_two.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
|
|
||||||
class PackageTest extends StatefulWidget {
|
|
||||||
// final AppUser user;
|
|
||||||
// final Business business;
|
|
||||||
final TestArguments arguments;
|
|
||||||
const PackageTest({
|
|
||||||
super.key,
|
|
||||||
required this.arguments,
|
|
||||||
// required this.user,
|
|
||||||
// required this.business,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<PackageTest> createState() => _PackageTestState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _PackageTestState extends State<PackageTest> {
|
|
||||||
int _selcetedIndex = 0;
|
|
||||||
|
|
||||||
MihPackageAction getAction() {
|
|
||||||
return MihPackageAction(
|
|
||||||
icon: const Icon(Icons.arrow_back),
|
|
||||||
iconSize: 35,
|
|
||||||
onTap: () {
|
|
||||||
context.goNamed(
|
|
||||||
'mihHome',
|
|
||||||
extra: true,
|
|
||||||
);
|
|
||||||
FocusScope.of(context).unfocus();
|
|
||||||
// Navigator.of(context).pop();
|
|
||||||
// Navigator.of(context).popAndPushNamed(
|
|
||||||
// '/',
|
|
||||||
// arguments: AuthArguments(true, false),
|
|
||||||
// );
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
MihPackageTools getTools() {
|
|
||||||
Map<Widget, void Function()?> temp = Map();
|
|
||||||
temp[const Icon(Icons.inbox)] = () {
|
|
||||||
setState(() {
|
|
||||||
_selcetedIndex = 0;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
temp[const Icon(Icons.outbond)] = () {
|
|
||||||
setState(() {
|
|
||||||
_selcetedIndex = 1;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return MihPackageTools(
|
|
||||||
tools: temp,
|
|
||||||
selcetedIndex: _selcetedIndex,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void showAlert() {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return MihPackageAlert(
|
|
||||||
alertIcon: Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: 100,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
alertTitle: "Oops! Looks like some fields are missing.",
|
|
||||||
alertBody: Column(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: 15,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: 15,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: "Here's a quick tip: ",
|
|
||||||
style: TextStyle(
|
|
||||||
fontStyle: FontStyle.italic,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"))),
|
|
||||||
const TextSpan(text: "Look for fields with an asterisk ("),
|
|
||||||
TextSpan(
|
|
||||||
text: "*",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"))),
|
|
||||||
const TextSpan(
|
|
||||||
text: ") next to them, as these are mandatory."),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
alertColour: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Widget> getToolBody() {
|
|
||||||
List<Widget> toolBodies = [
|
|
||||||
PackageToolOne(
|
|
||||||
user: widget.arguments.user,
|
|
||||||
business: widget.arguments.business,
|
|
||||||
),
|
|
||||||
const PackageToolTwo(),
|
|
||||||
];
|
|
||||||
return toolBodies;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<String> getToolTitle() {
|
|
||||||
List<String> toolTitles = [
|
|
||||||
"Tool One",
|
|
||||||
"Tool Two",
|
|
||||||
];
|
|
||||||
return toolTitles;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return MihPackage(
|
|
||||||
appActionButton: getAction(),
|
|
||||||
appTools: getTools(),
|
|
||||||
appBody: getToolBody(),
|
|
||||||
appToolTitles: getToolTitle(),
|
|
||||||
selectedbodyIndex: _selcetedIndex,
|
|
||||||
onIndexChange: (newValue) {
|
|
||||||
setState(() {
|
|
||||||
_selcetedIndex = newValue;
|
|
||||||
});
|
|
||||||
print("Index: $_selcetedIndex");
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 41 KiB |
@@ -1,75 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
|
|
||||||
|
|
||||||
class MihBannerAd extends StatefulWidget {
|
|
||||||
const MihBannerAd({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MihBannerAd> createState() => _MihBannerAdState();
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
void dispose() {
|
|
||||||
_bannerAd?.dispose(); // Dispose the ad when the widget is removed
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_loadBannerAd();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
_bannerAd != null && _isBannerAdLoaded
|
|
||||||
? SizedBox(
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!))
|
|
||||||
: SizedBox(
|
|
||||||
child:
|
|
||||||
Text(AppEnviroment.getEnv() == "Dev" ? errorMessage : ""),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
import 'package:file_picker/file_picker.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
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_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_config/mih_colors.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_location_services.dart';
|
|
||||||
|
|
||||||
class MihBusinessProfilePreview extends StatefulWidget {
|
|
||||||
final Business business;
|
|
||||||
final String? myLocation;
|
|
||||||
const MihBusinessProfilePreview({
|
|
||||||
super.key,
|
|
||||||
required this.business,
|
|
||||||
required this.myLocation,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MihBusinessProfilePreview> createState() =>
|
|
||||||
_MihBusinessProfilePreviewState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
|
|
||||||
late Future<String> futureImageUrl;
|
|
||||||
PlatformFile? file;
|
|
||||||
|
|
||||||
String calculateDistance() {
|
|
||||||
try {
|
|
||||||
double distanceInKm = MIHLocationAPI().getDistanceInMeaters(
|
|
||||||
widget.myLocation!, widget.business.gps_location) /
|
|
||||||
1000;
|
|
||||||
return "${distanceInKm.toStringAsFixed(2)} km";
|
|
||||||
} catch (error) {
|
|
||||||
print(error);
|
|
||||||
return "*.** km";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
futureImageUrl =
|
|
||||||
MihFileApi.getMinioFileUrl(widget.business.logo_path, context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
double profilePictureWidth = 60;
|
|
||||||
return Row(
|
|
||||||
children: [
|
|
||||||
FutureBuilder(
|
|
||||||
future: futureImageUrl,
|
|
||||||
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: [
|
|
||||||
Text(
|
|
||||||
widget.business.Name,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.business.type,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 15,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.myLocation != null || widget.myLocation!.isEmpty
|
|
||||||
? calculateDistance()
|
|
||||||
: "0.00 km",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 10,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
import 'package:go_router/go_router.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
|
|
||||||
class MihPackageAlert extends StatefulWidget {
|
|
||||||
final Widget alertIcon;
|
|
||||||
final String alertTitle;
|
|
||||||
final Widget alertBody;
|
|
||||||
final Color alertColour;
|
|
||||||
const MihPackageAlert({
|
|
||||||
super.key,
|
|
||||||
required this.alertIcon,
|
|
||||||
required this.alertTitle,
|
|
||||||
required this.alertBody,
|
|
||||||
required this.alertColour,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MihPackageAlert> createState() => _MihPackageAlertState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MihPackageAlertState extends State<MihPackageAlert> {
|
|
||||||
late double popUpWidth;
|
|
||||||
late double? popUpheight;
|
|
||||||
late double popUpTitleSize;
|
|
||||||
late double popUpSubtitleSize;
|
|
||||||
late double popUpBodySize;
|
|
||||||
late double popUpIconSize;
|
|
||||||
late double popUpPaddingSize;
|
|
||||||
Size? size;
|
|
||||||
|
|
||||||
void checkScreenSize() {
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = (size!.width / 4) * 2;
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 25.0;
|
|
||||||
popUpSubtitleSize = 20.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 25.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = size!.width - (size!.width * 0.1);
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 20.0;
|
|
||||||
popUpSubtitleSize = 18.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 15.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
size = MediaQuery.of(context).size;
|
|
||||||
checkScreenSize();
|
|
||||||
return Dialog(
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(color: widget.alertColour, width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
widget.alertIcon,
|
|
||||||
//const SizedBox(height: 5),
|
|
||||||
Text(
|
|
||||||
widget.alertTitle,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: widget.alertColour,
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
widget.alertBody,
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
context.pop();
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/main.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_floating_menu.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
|
|
||||||
class MihPackageWindow extends StatefulWidget {
|
|
||||||
final String windowTitle;
|
|
||||||
final Widget windowBody;
|
|
||||||
final List<SpeedDialChild>? menuOptions;
|
|
||||||
final void Function() onWindowTapClose;
|
|
||||||
final bool fullscreen;
|
|
||||||
const MihPackageWindow({
|
|
||||||
super.key,
|
|
||||||
required this.fullscreen,
|
|
||||||
required this.windowTitle,
|
|
||||||
this.menuOptions,
|
|
||||||
required this.onWindowTapClose,
|
|
||||||
required this.windowBody,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MihPackageWindow> createState() => _MihPackageWindowState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MihPackageWindowState extends State<MihPackageWindow> {
|
|
||||||
late double windowTitleSize;
|
|
||||||
late double horizontralWindowPadding;
|
|
||||||
late double vertticalWindowPadding;
|
|
||||||
late double windowWidth;
|
|
||||||
late double windowHeight;
|
|
||||||
late double width;
|
|
||||||
late double height;
|
|
||||||
|
|
||||||
void checkScreenSize() {
|
|
||||||
// print("screen width: $width");
|
|
||||||
// print("screen height: $height");
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
setState(() {
|
|
||||||
windowTitleSize = 25;
|
|
||||||
horizontralWindowPadding = width / 7;
|
|
||||||
vertticalWindowPadding = 10;
|
|
||||||
windowWidth = width;
|
|
||||||
windowHeight = height;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
windowTitleSize = 20;
|
|
||||||
horizontralWindowPadding = 10;
|
|
||||||
vertticalWindowPadding = 10;
|
|
||||||
windowWidth = width;
|
|
||||||
windowHeight = height;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget getHeader() {
|
|
||||||
return Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
// color: Colors.white,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(25), // Optional: rounds the corners
|
|
||||||
boxShadow: const [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromARGB(
|
|
||||||
60, 0, 0, 0), // 0.2 opacity = 51 in alpha (255 * 0.2)
|
|
||||||
spreadRadius: -2,
|
|
||||||
blurRadius: 10,
|
|
||||||
offset: Offset(0, 5),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
top: 2.0,
|
|
||||||
left: 5.0,
|
|
||||||
),
|
|
||||||
child: SizedBox(
|
|
||||||
width: 40,
|
|
||||||
child: IconButton.filled(
|
|
||||||
style: ButtonStyle(
|
|
||||||
backgroundColor: WidgetStateProperty.all<Color>(
|
|
||||||
MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark")),
|
|
||||||
),
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
iconSize: 20,
|
|
||||||
onPressed: () {
|
|
||||||
widget.onWindowTapClose();
|
|
||||||
},
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.close,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
|
||||||
child: Text(
|
|
||||||
widget.windowTitle,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: windowTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Visibility(
|
|
||||||
visible: (widget.menuOptions?.isNotEmpty ?? false),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
top: 2.0,
|
|
||||||
right: 5.0,
|
|
||||||
),
|
|
||||||
child: SizedBox(
|
|
||||||
width: 40,
|
|
||||||
child: MihFloatingMenu(
|
|
||||||
iconSize: 40,
|
|
||||||
animatedIcon: AnimatedIcons.menu_close,
|
|
||||||
direction: SpeedDialDirection.down,
|
|
||||||
children: widget.menuOptions != null ? widget.menuOptions! : [],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// If no menu, add a SizedBox to keep alignment
|
|
||||||
if (!(widget.menuOptions?.isNotEmpty ?? false))
|
|
||||||
const SizedBox(width: 40),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var size = MediaQuery.of(context).size;
|
|
||||||
setState(() {
|
|
||||||
width = size.width;
|
|
||||||
height = size.height;
|
|
||||||
});
|
|
||||||
checkScreenSize();
|
|
||||||
return Dialog(
|
|
||||||
insetPadding: EdgeInsets.symmetric(
|
|
||||||
horizontal: horizontralWindowPadding,
|
|
||||||
vertical: vertticalWindowPadding,
|
|
||||||
),
|
|
||||||
insetAnimationCurve: Easing.emphasizedDecelerate,
|
|
||||||
insetAnimationDuration: Durations.short1,
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: widget.fullscreen
|
|
||||||
? Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
getHeader(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Expanded(
|
|
||||||
child: SingleChildScrollView(child: widget.windowBody)),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
getHeader(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Flexible(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: 25,
|
|
||||||
right: 25,
|
|
||||||
bottom: vertticalWindowPadding,
|
|
||||||
),
|
|
||||||
child: ConstrainedBox(
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
maxHeight: windowHeight * 0.85,
|
|
||||||
maxWidth: windowWidth * 0.85,
|
|
||||||
),
|
|
||||||
child: MihSingleChildScroll(child: widget.windowBody),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,530 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
import '../../main.dart';
|
|
||||||
|
|
||||||
class MIHDeleteMessage extends StatefulWidget {
|
|
||||||
final String deleteType;
|
|
||||||
final void Function() onTap;
|
|
||||||
const MIHDeleteMessage({
|
|
||||||
super.key,
|
|
||||||
required this.deleteType,
|
|
||||||
required this.onTap,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHDeleteMessage> createState() => _MIHDeleteMessageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHDeleteMessageState extends State<MIHDeleteMessage> {
|
|
||||||
var messageTypes = <String, Widget>{};
|
|
||||||
late double popUpWidth;
|
|
||||||
late double? popUpheight;
|
|
||||||
late double popUpTitleSize;
|
|
||||||
late double popUpSubtitleSize;
|
|
||||||
late double popUpBodySize;
|
|
||||||
late double popUpIconSize;
|
|
||||||
late double popUpPaddingSize;
|
|
||||||
late double width;
|
|
||||||
late double height;
|
|
||||||
|
|
||||||
void checkScreenSize() {
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = (width / 4) * 2;
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 25.0;
|
|
||||||
popUpSubtitleSize = 20.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 25.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = width - (width * 0.1);
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 20.0;
|
|
||||||
popUpSubtitleSize = 18.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 15.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDeleteNote() {
|
|
||||||
messageTypes["Note"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Are you sure you want to delete this?",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This note will be deleted permanently. Are you certain you want to delete it?",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
MihButton(
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
buttonColor: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Delete",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setFileNote() {
|
|
||||||
messageTypes["File"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Are you sure you want to delete this?",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This file will be deleted permanently. Are you certain you want to delete it?",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
MihButton(
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
buttonColor: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Delete",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDeleteEmployee() {
|
|
||||||
messageTypes["Employee"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Are you sure you want to delete this?",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This team member will be deleted permanently from the business profile. Are you certain you want to delete it?",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
|
|
||||||
MihButton(
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
buttonColor: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Delete",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDeleteAppointment() {
|
|
||||||
messageTypes["Appointment"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Are you sure you want to delete this?",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This appointment will be deleted permanently from your calendar. Are you certain you want to delete it?",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
MihButton(
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
buttonColor: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Delete",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDeleteLoyaltyCard() {
|
|
||||||
messageTypes["Loyalty Card"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Are you sure you want to delete this?",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This Card will be deleted permanently from your Mzansi Wallet. Are you certain you want to delete it?",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
MihButton(
|
|
||||||
onPressed: widget.onTap,
|
|
||||||
buttonColor: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Delete",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget? getDeleteMessage(String type) {
|
|
||||||
return messageTypes[type];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var size = MediaQuery.of(context).size;
|
|
||||||
setState(() {
|
|
||||||
width = size.width;
|
|
||||||
height = size.height;
|
|
||||||
});
|
|
||||||
checkScreenSize();
|
|
||||||
setDeleteNote();
|
|
||||||
setFileNote();
|
|
||||||
setDeleteEmployee();
|
|
||||||
setDeleteAppointment();
|
|
||||||
setDeleteLoyaltyCard();
|
|
||||||
//print(size);
|
|
||||||
// setState(() {
|
|
||||||
// width = size.width;
|
|
||||||
// height = size.height;
|
|
||||||
// });
|
|
||||||
return Dialog(child: getDeleteMessage(widget.deleteType));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,909 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
import '../../main.dart';
|
|
||||||
|
|
||||||
class MIHErrorMessage extends StatefulWidget {
|
|
||||||
final String errorType;
|
|
||||||
const MIHErrorMessage({
|
|
||||||
super.key,
|
|
||||||
required this.errorType,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHErrorMessage> createState() => _MIHErrorMessageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHErrorMessageState extends State<MIHErrorMessage> {
|
|
||||||
var messageTypes = <String, Widget>{};
|
|
||||||
late double popUpWidth;
|
|
||||||
late double? popUpheight;
|
|
||||||
late double popUpTitleSize;
|
|
||||||
late double popUpSubtitleSize;
|
|
||||||
late double popUpBodySize;
|
|
||||||
late double popUpIconSize;
|
|
||||||
late double popUpPaddingSize;
|
|
||||||
Size? size;
|
|
||||||
|
|
||||||
void checkScreenSize() {
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = (size!.width / 4) * 2;
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 25.0;
|
|
||||||
popUpSubtitleSize = 20.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 25.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = size!.width - (size!.width * 0.1);
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 20.0;
|
|
||||||
popUpSubtitleSize = 18.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 15.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setInputError() {
|
|
||||||
messageTypes["Input Error"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 5),
|
|
||||||
Text(
|
|
||||||
"Oops! Looks like some fields are missing.",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"We noticed that some required fields are still empty. To ensure your request is processed smoothly, please fill out all the highlighted fields before submitting the form again.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: "Here's a quick tip: ",
|
|
||||||
style: TextStyle(
|
|
||||||
fontStyle: FontStyle.italic,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"))),
|
|
||||||
const TextSpan(
|
|
||||||
text: "Look for fields with an asterisk ("),
|
|
||||||
TextSpan(
|
|
||||||
text: "*",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"))),
|
|
||||||
const TextSpan(
|
|
||||||
text: ") next to them, as these are mandatory."),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPasswordRequirementsError() {
|
|
||||||
messageTypes["Password Requirements"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Password Doesn't Meet Requirements",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Oops! Your password doesn't quite meet our standards. To keep your account secure, please make sure your password meets the following requirements",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: "Requirements:\n",
|
|
||||||
style: TextStyle(
|
|
||||||
fontStyle: FontStyle.italic,
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode ==
|
|
||||||
"Dark"))),
|
|
||||||
const TextSpan(
|
|
||||||
text: "1) Contailes at least 8 characters\n",
|
|
||||||
),
|
|
||||||
const TextSpan(
|
|
||||||
text: "2) Contains at least 1 uppercase letter (A-Z)\n",
|
|
||||||
),
|
|
||||||
const TextSpan(
|
|
||||||
text: "3) Contains at least 1 lowercase letter (a-z)\n",
|
|
||||||
),
|
|
||||||
const TextSpan(
|
|
||||||
text: "4) Contains at least 1 number (0-9)\n",
|
|
||||||
),
|
|
||||||
const TextSpan(
|
|
||||||
text:
|
|
||||||
"5) Contains at least 1 special character (!@#\$%^&*)\n",
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setInvalidUsernameError() {
|
|
||||||
messageTypes["Invalid Username"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Let's Fix That Username",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Let's create a great username for you! Just a few quick tips:\n• Your username should start with a letter.\n• You can use letters, numbers, and/ or underscores.\n• Keep it between 6 and 20 characters.\n• Avoid special characters like @, #, or \$.\"",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setInvalidEmailError() {
|
|
||||||
messageTypes["Invalid Email"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Oops! Invalid Email",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Looks like there's a little hiccup with that email address. Please double-check that you've entered it correctly, including the \"@\" symbol and a domain (like example@email.com).",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setUserExistsError() {
|
|
||||||
messageTypes["User Exists"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Email Already Exists",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"An account is already registered with this email address. Please try logging in or use a different email.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"Here are some things to keep in mind:",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpSubtitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: 15.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPwdMatchError() {
|
|
||||||
messageTypes["Password Match"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Passwords Don't Match",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"The password and confirm password fields do not match. Please make sure they are identical.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"Here are some things to keep in mind:",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpSubtitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setinvalidCredError() {
|
|
||||||
messageTypes["Invalid Credentials"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Uh oh! Login attempt unsuccessful.",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"The email address or password you entered doesn't seem to match our records. Please double-check your information and try again.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"Here are some things to keep in mind:",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpSubtitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"1) Are you sure you're using the correct email address associated with your account?\n2) Is your caps lock key on? Passwords are case-sensitive.\n3) If you've forgotten your password, no worries! Click on \"Forgot Password?\" to reset it.",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setInternetError() {
|
|
||||||
messageTypes["Internet Connection"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Internet Connection Lost!",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"We seem to be having some trouble connecting you to the internet. This could be due to a temporary outage or an issue with your device's connection.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"Here are a few things you can try:",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpSubtitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Text(
|
|
||||||
"1) Check your Wi-Fi signal strength or try connecting to a different network.\n2) Restart your device (computer, phone, etc.) and your router/modem.\n3) If you're using cellular data, ensure you have a strong signal and haven't reached your data limit.",
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setLocationError() {
|
|
||||||
messageTypes["Location Denied"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Location Services Not Enabled",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"To get the most out of MIH, we need your location. Please go to the site settings of the app and enable location services. Once you do that, we can start showing you relevant information based on your location.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// const SizedBox(height: 15),
|
|
||||||
// Text(
|
|
||||||
// "Here are a few things you can try:",
|
|
||||||
// style: TextStyle(
|
|
||||||
// color: MihColors.getRedColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
// fontSize: popUpSubtitleSize,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// const SizedBox(height: 10),
|
|
||||||
// Text(
|
|
||||||
// "1) Check your Wi-Fi signal strength or try connecting to a different network.\n2) Restart your device (computer, phone, etc.) and your router/modem.\n3) If you're using cellular data, ensure you have a strong signal and haven't reached your data limit.",
|
|
||||||
// textAlign: TextAlign.left,
|
|
||||||
// style: TextStyle(
|
|
||||||
// color:
|
|
||||||
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
// fontSize: popUpBodySize,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget? getErrorMessage(String type) {
|
|
||||||
return messageTypes[type];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
size = MediaQuery.of(context).size;
|
|
||||||
checkScreenSize();
|
|
||||||
setInputError();
|
|
||||||
setinvalidCredError();
|
|
||||||
setInternetError();
|
|
||||||
setUserExistsError();
|
|
||||||
setPwdMatchError();
|
|
||||||
setPasswordRequirementsError();
|
|
||||||
setInvalidEmailError();
|
|
||||||
setInvalidUsernameError();
|
|
||||||
setLocationError();
|
|
||||||
//print(size);
|
|
||||||
// setState(() {
|
|
||||||
// width = size.width;
|
|
||||||
// height = size.height;
|
|
||||||
// });
|
|
||||||
return Dialog(child: getErrorMessage(widget.errorType));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
import '../../main.dart';
|
|
||||||
|
|
||||||
class MIHSuccessMessage extends StatefulWidget {
|
|
||||||
final String successType;
|
|
||||||
final String successMessage;
|
|
||||||
const MIHSuccessMessage({
|
|
||||||
super.key,
|
|
||||||
required this.successType,
|
|
||||||
required this.successMessage,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHSuccessMessage> createState() => _MIHSuccessMessageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHSuccessMessageState extends State<MIHSuccessMessage> {
|
|
||||||
var messageTypes = <String, Widget>{};
|
|
||||||
late String message;
|
|
||||||
late double popUpWidth;
|
|
||||||
late double? popUpheight;
|
|
||||||
late double popUpTitleSize;
|
|
||||||
late double popUpSubtitleSize;
|
|
||||||
late double popUpBodySize;
|
|
||||||
late double popUpIconSize;
|
|
||||||
late double popUpPaddingSize;
|
|
||||||
late Size? size;
|
|
||||||
|
|
||||||
void checkScreenSize() {
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = (size!.width / 4) * 2;
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 25.0;
|
|
||||||
popUpSubtitleSize = 20.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 25.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = size!.width - (size!.width * 0.1);
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 20.0;
|
|
||||||
popUpSubtitleSize = 18.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 15.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setSuccessmessage() {
|
|
||||||
messageTypes["Success"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getGreenColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.check_circle_outline_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getGreenColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Success!",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getGreenColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Center(
|
|
||||||
child: Text(
|
|
||||||
message,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
MihButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
buttonColor: MihColors.getGreenColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 300,
|
|
||||||
child: Text(
|
|
||||||
"Dismiss",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget? getSuccessMessage(String type) {
|
|
||||||
return messageTypes[type];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
size = MediaQuery.of(context).size;
|
|
||||||
checkScreenSize();
|
|
||||||
message = widget.successMessage;
|
|
||||||
setSuccessmessage();
|
|
||||||
return Dialog(child: getSuccessMessage(widget.successType));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,519 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
|
||||||
import '../../main.dart';
|
|
||||||
|
|
||||||
class MIHWarningMessage extends StatefulWidget {
|
|
||||||
final String warningType;
|
|
||||||
const MIHWarningMessage({
|
|
||||||
super.key,
|
|
||||||
required this.warningType,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<MIHWarningMessage> createState() => _MIHDeleteMessageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MIHDeleteMessageState extends State<MIHWarningMessage> {
|
|
||||||
var messageTypes = <String, Widget>{};
|
|
||||||
late double popUpWidth;
|
|
||||||
late double? popUpheight;
|
|
||||||
late double popUpTitleSize;
|
|
||||||
late double popUpSubtitleSize;
|
|
||||||
late double popUpBodySize;
|
|
||||||
late double popUpIconSize;
|
|
||||||
late double popUpPaddingSize;
|
|
||||||
late double width;
|
|
||||||
late double height;
|
|
||||||
|
|
||||||
void checkScreenSize() {
|
|
||||||
if (MzansiInnovationHub.of(context)!.theme.screenType == "desktop") {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = (width / 4) * 2;
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 25.0;
|
|
||||||
popUpSubtitleSize = 20.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 25.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
popUpWidth = width - (width * 0.1);
|
|
||||||
popUpheight = null;
|
|
||||||
popUpTitleSize = 20.0;
|
|
||||||
popUpSubtitleSize = 18.0;
|
|
||||||
popUpBodySize = 15;
|
|
||||||
popUpPaddingSize = 15.0;
|
|
||||||
popUpIconSize = 100;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setNoAccess() {
|
|
||||||
messageTypes["No Access"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Access Pending",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Your access request is currently being reviewed.\nOnce approved, you'll be able to view patient data.\nPlease follow up with the patient to approve your access request.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setNoPatientAccess() {
|
|
||||||
messageTypes["No Patient Access"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Patient Profile Access Needed",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"To proceed with booking an appointment, you must have access to the patient's profile. This will allow you to view their medical history and other relevant information. Please contact the appropriate administrator to request access.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAppointmentCanelled() {
|
|
||||||
messageTypes["Appointment Canelled"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Appointment Cancelled",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This appointment has been canceled. As a result, you no longer have access to the patient's profile. If you would like to view the patient's profile again, please book a new appointment.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAccessCanelled() {
|
|
||||||
messageTypes["Access Cancelled"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Access Cancelled",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"This appointment has been canceled. As a result, access has been cancelled and the doctor no longer have access to the patient's profile. If you would like them to view the patient's profile again, please book a new appointment through them.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAccessDeclined() {
|
|
||||||
messageTypes["Access Declined"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Access Declined",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Your request to access the patient's profile has been denied. Please contact the patient directly to inquire about the reason for this restriction.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setExpiredAccess() {
|
|
||||||
messageTypes["Expired Access"] = Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(popUpPaddingSize),
|
|
||||||
width: popUpWidth,
|
|
||||||
height: popUpheight,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
borderRadius: BorderRadius.circular(25.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 5.0),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.warning_amber_rounded,
|
|
||||||
size: popUpIconSize,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
//const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"Access Expired",
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpTitleSize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
Text(
|
|
||||||
"You no longer have access to this patient profile. The authorized access period has ended. Access to a patients profile is limited to 7 days from appointment date.",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: popUpBodySize,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 15),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
top: 5,
|
|
||||||
right: 5,
|
|
||||||
width: 50,
|
|
||||||
height: 50,
|
|
||||||
child: IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.close,
|
|
||||||
color: MihColors.getRedColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget? getDeleteMessage(String type) {
|
|
||||||
return messageTypes[type];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var size = MediaQuery.of(context).size;
|
|
||||||
setState(() {
|
|
||||||
width = size.width;
|
|
||||||
height = size.height;
|
|
||||||
});
|
|
||||||
checkScreenSize();
|
|
||||||
setNoAccess();
|
|
||||||
setExpiredAccess();
|
|
||||||
setAccessDeclined();
|
|
||||||
setAppointmentCanelled();
|
|
||||||
setAccessCanelled();
|
|
||||||
//print(size);
|
|
||||||
// setState(() {
|
|
||||||
// width = size.width;
|
|
||||||
// height = size.height;
|
|
||||||
// });
|
|
||||||
return Dialog(child: getDeleteMessage(widget.warningType));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +1,44 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MihColors {
|
class MihColors {
|
||||||
|
bool women4Change = true;
|
||||||
static Color getPrimaryColor(bool darkMode) {
|
static Color getPrimaryColor(bool darkMode) {
|
||||||
if (darkMode == true) {
|
if (darkMode == true) {
|
||||||
return const Color(0XFF3A4454);
|
// return const Color(0XFF3A4454); // Original
|
||||||
|
return const Color(0XFF6641b2); // Women4change
|
||||||
} else {
|
} else {
|
||||||
return const Color(0XFFbedcfe);
|
// return const Color(0XFFbedcfe); // Original
|
||||||
|
return const Color(0xFFE0D1FF); // Women4change
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Color getSecondaryColor(bool darkMode) {
|
static Color getSecondaryColor(bool darkMode) {
|
||||||
if (darkMode == true) {
|
if (darkMode == true) {
|
||||||
return const Color(0XFFbedcfe);
|
// return const Color(0XFFbedcfe); // Original
|
||||||
|
return const Color(0xFFE0D1FF); // Women4change
|
||||||
} else {
|
} else {
|
||||||
return const Color(0XFF3A4454);
|
// return const Color(0XFF3A4454); // Original
|
||||||
|
return const Color(0XFF6641b2); // Women4change
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Color getSecondaryInvertedColor(bool darkMode) {
|
||||||
|
if (darkMode == true) {
|
||||||
|
// return const Color(0XFF412301); // Original
|
||||||
|
return const Color(0XFF1f2e00); // Women4change
|
||||||
|
} else {
|
||||||
|
// return const Color(0XFFc5bbab); // Original
|
||||||
|
return const Color(0XFF99be4d); // Women4change
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Color getHighlightColor(bool darkMode) {
|
static Color getHighlightColor(bool darkMode) {
|
||||||
if (darkMode == true) {
|
if (darkMode == true) {
|
||||||
return const Color(0XFF9bc7fa);
|
// return const Color(0XFF9bc7fa);
|
||||||
|
return const Color(0xFFC8AFFB); // Women4change
|
||||||
} else {
|
} else {
|
||||||
return const Color(0XFF354866);
|
// return const Color(0XFF354866);
|
||||||
|
return const Color(0XFF6641b2); // Women4change
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,7 +54,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 +80,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 +98,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 +107,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
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_packages/mih_file_viewer/components/mih_print_prevew.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
|
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
import 'package:mzansi_innovation_hub/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_providers/mzansi_directory_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';
|
||||||
@@ -11,23 +11,24 @@ import 'package:mzansi_innovation_hub/mih_packages/calendar/mzansi_calendar.dart
|
|||||||
import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_auth_forgot_password.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_auth_forgot_password.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_auth_password_reset.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mih_authentication/mih_auth_password_reset.dart';
|
||||||
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_file_viewer/mih_fle_viewer.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/patient_profile.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_set_up.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/patient_edit.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/patient_profile/pat_profile/patient_profile.dart';
|
|
||||||
import 'package:supertokens_flutter/supertokens.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
|
|
||||||
class MihGoRouterPaths {
|
class MihGoRouterPaths {
|
||||||
@@ -50,7 +51,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 +63,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 +132,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(
|
return MihHome(
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
personalSelected: personalSelected,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return MihHome(
|
|
||||||
key: UniqueKey(),
|
|
||||||
personalSelected: true,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -150,14 +143,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 +152,7 @@ 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 =
|
return MzansiProfile();
|
||||||
state.extra as AppProfileUpdateArguments?;
|
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MzansiProfile(arguments: args);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
@@ -182,14 +160,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 +177,7 @@ 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?;
|
return BusinesProfile();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MzansiBusinessProfile(
|
|
||||||
key: UniqueKey(),
|
|
||||||
arguments: args,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
@@ -218,17 +187,16 @@ 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);
|
||||||
});
|
});
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
return MzansiBusinessProfileView(
|
return MzansiBusinessProfileView(
|
||||||
key: UniqueKey(),
|
|
||||||
arguments: args,
|
|
||||||
businessId: businessId,
|
businessId: businessId,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -238,8 +206,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 +215,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,17 +224,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?;
|
return MzansiCalendar();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MzansiCalendar(
|
|
||||||
key: UniqueKey(),
|
|
||||||
arguments: args,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== Mzansi AI ==================================
|
// ========================== Mzansi AI ==================================
|
||||||
@@ -281,14 +233,7 @@ 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?;
|
return MzansiAi();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MzansiAi(arguments: args);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== Mzansi Wallet ==================================
|
// ========================== Mzansi Wallet ==================================
|
||||||
@@ -297,17 +242,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?;
|
return MihWallet();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MihWallet(
|
|
||||||
key: UniqueKey(),
|
|
||||||
arguments: args,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
@@ -332,14 +267,7 @@ class MihGoRouter {
|
|||||||
path: MihGoRouterPaths.packageDevTest,
|
path: MihGoRouterPaths.packageDevTest,
|
||||||
builder: (BuildContext context, GoRouterState state) {
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
KenLogger.success("MihGoRouter: testPackage");
|
KenLogger.success("MihGoRouter: testPackage");
|
||||||
final TestArguments? args = state.extra as TestArguments?;
|
return PackageTest();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return PackageTest(arguments: args);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== MIH Access Controls ==================================
|
// ========================== MIH Access Controls ==================================
|
||||||
@@ -347,17 +275,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) {
|
return MihAccess();
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MihAccess(
|
|
||||||
key: UniqueKey(),
|
|
||||||
signedInUser: signedInUser,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== Patient Profile ==================================
|
// ========================== Patient Profile ==================================
|
||||||
@@ -365,68 +284,32 @@ 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?;
|
return PatientProfile();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return AddOrViewPatient(
|
|
||||||
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?;
|
return PatientSetUp();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return EditPatient(
|
|
||||||
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) {
|
return PatManager();
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return PatManager(
|
|
||||||
key: UniqueKey(),
|
|
||||||
arguments: args,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
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?;
|
return PatientProfile();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return PatientProfile(arguments: args);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== Mzansi Directory ==================================
|
// ========================== Mzansi Directory ==================================
|
||||||
@@ -434,15 +317,8 @@ 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?;
|
return MzansiDirectory();
|
||||||
if (args == null) {
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
context.go(MihGoRouterPaths.mihHome);
|
|
||||||
});
|
|
||||||
return const SizedBox.shrink();
|
|
||||||
}
|
|
||||||
return MzansiDirectory(arguments: args);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== End ==================================
|
// ========================== End ==================================
|
||||||
@@ -450,17 +326,33 @@ class MihGoRouter {
|
|||||||
name: "fileViewer",
|
name: "fileViewer",
|
||||||
path: MihGoRouterPaths.fileViewer,
|
path: MihGoRouterPaths.fileViewer,
|
||||||
builder: (BuildContext context, GoRouterState state) {
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
final FileViewArguments? args = state.extra as FileViewArguments?;
|
KenLogger.success("MihGoRouter: fileViewer");
|
||||||
return FullScreenFileViewer(arguments: args!);
|
return MihFleViewer();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
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!);
|
if (args == null) {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
context.go(MihGoRouterPaths.mihHome);
|
||||||
|
});
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
return MIHPrintPreview(arguments: args);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// ========================== MIH Minesweeper ==================================
|
||||||
|
GoRoute(
|
||||||
|
name: "mihMinesweeper",
|
||||||
|
path: MihGoRouterPaths.mihMineSweeper,
|
||||||
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
|
KenLogger.success("MihGoRouter: mihMineSweeper");
|
||||||
|
return MihMineSweeper();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== End ==================================
|
// ========================== End ==================================
|
||||||
|
|||||||
@@ -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.1";
|
String latestVersion = "1.2.4";
|
||||||
// Options:-
|
// Options:-
|
||||||
// f3f9d2 = Cream
|
// f3f9d2 = Cream
|
||||||
// f0f0c9 = cream2
|
// f0f0c9 = cream2
|
||||||
@@ -76,7 +76,75 @@ class MihTheme {
|
|||||||
),
|
),
|
||||||
drawerTheme: DrawerThemeData(
|
drawerTheme: DrawerThemeData(
|
||||||
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||||
));
|
),
|
||||||
|
// Text selection / cursor color
|
||||||
|
textSelectionTheme: TextSelectionThemeData(
|
||||||
|
cursorColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||||
|
selectionColor:
|
||||||
|
MihColors.getPrimaryColor(mode == "Dark").withOpacity(0.25),
|
||||||
|
selectionHandleColor: MihColors.getPrimaryColor(mode == "Dark"),
|
||||||
|
),
|
||||||
|
tooltipTheme: TooltipThemeData(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: MihColors.getSecondaryColor(mode == "Dark"),
|
||||||
|
borderRadius: BorderRadius.circular(6),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.0,
|
||||||
|
color: MihColors.getPrimaryColor(mode == "Dark"),
|
||||||
|
),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color:
|
||||||
|
MihColors.getPrimaryColor(mode == "Dark").withOpacity(0.18),
|
||||||
|
blurRadius: 6,
|
||||||
|
offset: const Offset(0, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
textStyle: TextStyle(
|
||||||
|
color: MihColors.getPrimaryColor(mode == "Dark"),
|
||||||
|
fontSize: 13,
|
||||||
|
height: 1.2,
|
||||||
|
),
|
||||||
|
waitDuration: const Duration(milliseconds: 500),
|
||||||
|
showDuration: const Duration(seconds: 3),
|
||||||
|
preferBelow: true,
|
||||||
|
verticalOffset: 24,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
|
triggerMode: TooltipTriggerMode.longPress,
|
||||||
|
),
|
||||||
|
// // Input decoration (text fields) theme
|
||||||
|
// inputDecorationTheme: InputDecorationTheme(
|
||||||
|
// filled: true,
|
||||||
|
// fillColor: mode == "Dark"
|
||||||
|
// ? MihColors.getPrimaryColor(true).withOpacity(0.06)
|
||||||
|
// : MihColors.getPrimaryColor(false).withOpacity(0.03),
|
||||||
|
// contentPadding:
|
||||||
|
// const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||||
|
// border: OutlineInputBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// borderSide:
|
||||||
|
// BorderSide(color: MihColors.getSecondaryColor(mode == "Dark")),
|
||||||
|
// ),
|
||||||
|
// enabledBorder: OutlineInputBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// borderSide: BorderSide(
|
||||||
|
// color:
|
||||||
|
// MihColors.getSecondaryColor(mode == "Dark").withOpacity(0.6)),
|
||||||
|
// ),
|
||||||
|
// focusedBorder: OutlineInputBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// borderSide: BorderSide(
|
||||||
|
// color: MihColors.getSecondaryColor(mode == "Dark"), width: 2),
|
||||||
|
// ),
|
||||||
|
// hintStyle: TextStyle(
|
||||||
|
// color:
|
||||||
|
// MihColors.getSecondaryColor(mode == "Dark").withOpacity(0.7)),
|
||||||
|
// labelStyle:
|
||||||
|
// TextStyle(color: MihColors.getSecondaryColor(mode == "Dark")),
|
||||||
|
// errorStyle: TextStyle(color: MihColors.getRedColor(mode == "Dark")),
|
||||||
|
// ),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String getPlatform() {
|
String getPlatform() {
|
||||||
@@ -165,65 +233,65 @@ class MihTheme {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
AssetImage loadingImage() {
|
// AssetImage loadingImage() {
|
||||||
if (mode == "Dark") {
|
// if (mode == "Dark") {
|
||||||
loading = const AssetImage(
|
// loading = const AssetImage(
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif',
|
// 'lib/mih_package_components/assets/images/loading_light.gif',
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
loading = const AssetImage(
|
// loading = const AssetImage(
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif',
|
// 'lib/mih_package_components/assets/images/loading_dark.gif',
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
return loading;
|
// return loading;
|
||||||
}
|
// }
|
||||||
|
|
||||||
AssetImage altLoadingImage() {
|
// AssetImage altLoadingImage() {
|
||||||
if (mode == "Dark") {
|
// if (mode == "Dark") {
|
||||||
loading = const AssetImage(
|
// loading = const AssetImage(
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif',
|
// 'lib/mih_package_components/assets/images/loading_dark.gif',
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
loading = const AssetImage(
|
// loading = const AssetImage(
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif',
|
// 'lib/mih_package_components/assets/images/loading_light.gif',
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
return loading;
|
// return loading;
|
||||||
}
|
// }
|
||||||
|
|
||||||
String loadingImageLocation() {
|
// String loadingImageLocation() {
|
||||||
if (mode == "Dark") {
|
// if (mode == "Dark") {
|
||||||
loadingAssetText =
|
// loadingAssetText =
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif';
|
// 'lib/mih_package_components/assets/images/loading_light.gif';
|
||||||
} else {
|
// } else {
|
||||||
loadingAssetText =
|
// loadingAssetText =
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif';
|
// 'lib/mih_package_components/assets/images/loading_dark.gif';
|
||||||
}
|
// }
|
||||||
return loadingAssetText;
|
// return loadingAssetText;
|
||||||
}
|
// }
|
||||||
|
|
||||||
String altLoadingImageLocation() {
|
// String altLoadingImageLocation() {
|
||||||
if (mode == "Dark") {
|
// if (mode == "Dark") {
|
||||||
loadingAssetText =
|
// loadingAssetText =
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif';
|
// 'lib/mih_package_components/assets/images/loading_dark.gif';
|
||||||
} else {
|
// } else {
|
||||||
loadingAssetText =
|
// loadingAssetText =
|
||||||
'lib/mih_components/mih_package_components/assets/images/loading_light.gif';
|
// 'lib/mih_package_components/assets/images/loading_light.gif';
|
||||||
}
|
// }
|
||||||
return loadingAssetText;
|
// return loadingAssetText;
|
||||||
}
|
// }
|
||||||
|
|
||||||
AssetImage aiLogoImage() {
|
// AssetImage aiLogoImage() {
|
||||||
if (mode == "Dark") {
|
// if (mode == "Dark") {
|
||||||
return const AssetImage(
|
// return const AssetImage(
|
||||||
'lib/mih_components/mih_package_components/assets/images/mzansi_ai-dark.png',
|
// 'lib/mih_package_components/assets/images/mzansi_ai-dark.png',
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
return const AssetImage(
|
// return const AssetImage(
|
||||||
'lib/mih_components/mih_package_components/assets/images/mzansi_ai-light.png',
|
// 'lib/mih_package_components/assets/images/mzansi_ai-light.png',
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
void setScreenType(double width) {
|
void setScreenType(double width) {
|
||||||
if (width <= 800) {
|
if (width <= 800) {
|
||||||
|
|||||||