128 Commits

Author SHA1 Message Date
08bfe1d417 Update build to 118 2025-11-25 16:51:03 +02:00
3593011d6d minio storage uploud fix pt9 2025-11-25 16:47:42 +02:00
5ae11f6625 minio storage uploud fix pt8 2025-11-25 16:40:48 +02:00
a61bca7d81 minio storage uploud fix pt7 2025-11-25 16:31:13 +02:00
fb3b033f45 minio storage uploud fix pt6 2025-11-25 16:11:28 +02:00
91a2d0dd1e minio storage uploud fix pt5 2025-11-25 16:08:20 +02:00
04c643561b minio storage uploud fix pt4 2025-11-25 16:05:53 +02:00
526bd40255 minio storage uploud fix pt3 2025-11-25 15:53:09 +02:00
1889f6cada minio storage uploud fix pt2 2025-11-25 15:39:23 +02:00
c1dd9a60f2 minio storage uploud fix pt1 2025-11-25 15:31:53 +02:00
ec869c54c3 minio storage fix pt14 2025-11-25 15:29:07 +02:00
b440c0a42b minio storage fix pt13 2025-11-25 15:24:02 +02:00
baa826c52c minio storage fix pt12 2025-11-25 15:22:27 +02:00
6b530529e3 minio storage fix pt11 2025-11-25 15:20:58 +02:00
a633b52949 minio storage fix pt10 2025-11-25 15:16:41 +02:00
c103d1979c minio storage fix pt9 2025-11-25 15:12:38 +02:00
82c01cb7bf minio storage fix pt8 2025-11-25 15:05:16 +02:00
43bc552698 minio storage fix pt7 2025-11-25 15:00:20 +02:00
bb6a8e3090 minio storage fix pt6 2025-11-25 14:49:56 +02:00
565e9199d4 minio storage fix pt5 2025-11-25 14:38:59 +02:00
c5de46040d minio storage fix pt4 2025-11-25 14:31:37 +02:00
934b1b2301 minio storage fix pt3 2025-11-25 13:51:42 +02:00
302152449f minio storage fix pt2 2025-11-25 13:42:46 +02:00
0f591bd111 minio storage fix 2025-11-25 13:37:20 +02:00
yaso-meth
ea04c000cf Merge pull request #263 from yaso-meth/V.1.2.3
V.1.2.3
2025-11-25 12:27:36 +02:00
a59d2bf336 update build to 117 2025-11-25 11:40:22 +02:00
d5fcad8fa5 BUG: Image display when error 2025-11-25 11:38:19 +02:00
609828a26c update build to 116 2025-11-25 11:18:46 +02:00
d0a5c6c858 QOL: Mzansi AI trigger from home 2025-11-25 11:16:18 +02:00
4a293c0aa4 add toot titles to missing packages 2025-11-25 10:45:39 +02:00
d51d13a685 update build to 115 2025-11-21 12:15:34 +02:00
bf6bda04a6 get business data when opening mxzansi profile as standalone 2025-11-21 12:14:03 +02:00
b749dc62d9 fix alert padding for desktop 2025-11-21 12:11:51 +02:00
b82a5a72c7 NEW: Hide sensitive data on my business user 2025-11-21 11:59:34 +02:00
56ab6bb950 QOL: use advanced varding when adding & removing card to fav 2025-11-21 10:27:22 +02:00
bb54605ddb QOL: Create advanced warning alert 2025-11-21 10:26:57 +02:00
c4b3a12213 BUG: add jpeg icons 2025-11-21 10:17:24 +02:00
43d715f4f8 QOL: Reorder Minesweeper alert buttons 2025-11-21 10:16:19 +02:00
a9d6ca1baa QOL: Get loaction in bg 2025-11-21 10:12:51 +02:00
dfcfced28f BUG: Remove hint when keyboard is open 2025-11-21 09:57:12 +02:00
d0474fed21 BUG: Social Links colour fix 2025-11-21 09:44:06 +02:00
f228307859 Update Business QR code share text 2025-11-21 09:34:40 +02:00
ab9cbce41c BUG: remove token text in reset password 2025-11-21 09:34:16 +02:00
70413cc294 QOL: About MIH button placement 2025-11-21 09:33:45 +02:00
a4d510f023 v.1.2.4 Build Number Updated to 114 2025-11-20 11:22:24 +02:00
e99388711d v.1.2.3 pt 2 Build Number Updated to 113 2025-11-20 11:05:29 +02:00
00cd5488e3 NEW: MIh Alerts 2025-11-20 10:56:15 +02:00
b69a52a5a8 Mih File Structure enhancement 2025-11-18 12:42:22 +02:00
f5c05d7431 remove prints 2025-11-17 12:59:19 +02:00
0403d8c4b5 fix naming convention 2025-11-17 12:58:24 +02:00
fb7bf4ad65 QOL: Remove legacy layout widgets 2025-11-17 12:56:18 +02:00
3417299989 NEW: create new file viewer with MIH package 2025-11-17 12:55:34 +02:00
66887d23f8 QOL: MIH Go Router get data on package open pt2 2025-11-17 11:32:39 +02:00
f064730dcf QOL: Patient Manager get data on package open pt2 2025-11-17 11:32:23 +02:00
a49505c153 QOL: MIH Test Package get data on package open 2025-11-17 11:25:51 +02:00
9d898d8dff QOL: Mzansi profile Business get data on package open 2025-11-17 11:25:37 +02:00
c517075197 QOL: MIH Acces Controls get data on package open 2025-11-17 11:17:16 +02:00
2dc3396fcc QOL: MIH Minesweeper get data on package open 2025-11-17 11:09:38 +02:00
d318b17b18 QOL: Mzansi AI get data on package open 2025-11-17 11:05:59 +02:00
4221ae73b9 QOL: MIH Calendar get data on package open 2025-11-17 10:59:47 +02:00
b49e93825e QOL: Mzansi Directory get data on package open 2025-11-17 10:53:52 +02:00
790bf0e4f8 QOL: Patient Manager get data on package open 2025-11-17 10:46:24 +02:00
a0bd74b703 QOL: Mzansi Wallet get data on package open 2025-11-17 10:46:09 +02:00
96daf77b45 QOL: Mzansi profile Personal get data on package open 2025-11-17 10:45:57 +02:00
77ffd95fb6 QOL: MIH Home get data on package open 2025-11-17 10:45:31 +02:00
24cc7f64b5 QOL: Update file service 2025-11-17 09:24:32 +02:00
d76512c11f BUG: dont initialise shortcuts on web 2025-11-14 14:25:32 +02:00
e1e7542a6d optimisation web pt 3 2025-11-14 14:22:30 +02:00
121cde211f optimisation web pt 2 2025-11-14 14:22:30 +02:00
b79decf04f cancel timeout on load 2025-11-14 14:22:30 +02:00
a26b826729 increase timeut time 2025-11-14 14:22:30 +02:00
cc3d1ae430 web load v2 2025-11-14 14:22:30 +02:00
329e450f5b revert 2025-11-14 14:22:30 +02:00
0a03b1c60c web loadtime 2025-11-14 14:22:30 +02:00
652d4bb2fd increase load 2025-11-14 14:22:30 +02:00
5903fcd31a reduce load speed 2025-11-14 14:22:30 +02:00
b0825fe7cb optimisation web pt 3 2025-11-14 14:02:55 +02:00
8a2debcaa8 optimisation web pt 2 2025-11-14 13:53:20 +02:00
609c8d46db cancel timeout on load 2025-11-14 13:04:04 +02:00
1387fb1af5 increase timeut time 2025-11-14 12:52:11 +02:00
1f73aa3b87 web load v2 2025-11-14 12:47:15 +02:00
47ca6d7311 revert 2025-11-14 12:33:35 +02:00
64443a5076 web loadtime 2025-11-14 12:22:21 +02:00
20d5bc4004 increase load 2025-11-14 12:07:36 +02:00
9257786191 reduce load speed 2025-11-14 11:28:52 +02:00
66db154b02 user service update 2025-11-14 11:27:02 +02:00
5770f6c353 QOL: Patient Manager overhaul pt3 2025-11-14 11:27:02 +02:00
c5713cf6e0 QOL: Patient Manager overhaul pt2 2025-11-14 11:27:02 +02:00
4fe544b35f QOL: Patient Manager overhaul pt1 2025-11-14 11:27:02 +02:00
6542f1c399 QOL: MIh WIndows ehnacement 2025-11-14 11:27:02 +02:00
yaso-meth
963a708ab8 Merge pull request #262 from yaso-meth/V.1.2.3
V.1.2.3
2025-11-10 17:03:44 +02:00
yaso-meth
2f0b11e5ba Merge branch 'main' into V.1.2.3 2025-11-10 17:03:31 +02:00
d9b2598bca update web icoon 2025-11-10 16:59:14 +02:00
0c15bd3e90 iod svg assets 2025-11-10 16:57:49 +02:00
0daffb5041 QOL: Mzansi AI Chat Look and Feel & Startup question pt6 2025-11-10 15:36:38 +02:00
9485213d6e NEW: MIH Shortcuts pt3 2025-11-10 15:36:22 +02:00
9a8f157451 QOL: Mzansi AI Chat Look and Feel & Startup question pt5 2025-11-10 14:48:15 +02:00
a6f6cdaace NEW: MIH Stands with Women For Change SA 2025-11-10 14:19:40 +02:00
effbac2c91 NEW: MIH Colors W4C 2025-11-10 13:59:21 +02:00
f8de726959 QOL: Mzansi AI Chat Look and Feel & Startup question pt4 2025-11-10 13:35:04 +02:00
01220144c3 NEW: MIH Loading revamp 2025-11-10 13:34:41 +02:00
3f93cc9a7a NEW: MIH Shortcuts pt2 2025-11-10 13:34:15 +02:00
83a16bad79 NEW: MIH Shortcuts pt1 2025-11-08 03:02:47 +02:00
d2f93db580 include busines home 2025-11-07 15:04:52 +02:00
a3c1963d30 QOL: Mzansi AI Chat Look and Feel & Startup question pt3 2025-11-07 15:03:36 +02:00
8e6ef25954 QOL: Mzansi AI Chat Look and Feel pt2 & Startup question 2025-11-07 14:44:42 +02:00
580fa027f2 QOL: Build number update to 103 2025-11-07 14:44:42 +02:00
9346cccd20 BUG: Get patient data from tile 2025-11-07 14:44:42 +02:00
51f2435c33 QOL: Update Mzansi AI System PRompt 2025-11-07 14:44:42 +02:00
ba5772f3ac NFC deep linking 2025-11-07 14:44:42 +02:00
662d20617d QOL: Update build to 101 2025-11-07 14:44:42 +02:00
e6d1cf0268 favourite business fix 2025-11-07 14:44:42 +02:00
ed7c5a2269 IOS encryption compliance 2025-11-07 14:44:42 +02:00
98beb20827 deeplinking fix 2025-11-07 14:44:07 +02:00
76a54ce969 QOL: Update build to 100 2025-11-07 14:44:07 +02:00
c53f30035d BUG: Update Appointment & Clear Coltrollers 2025-11-07 14:44:07 +02:00
ec01e2212b BUG: Bookmarked businesses data load 2025-11-07 14:44:07 +02:00
f840418caf BUG: back Nav from favourite business selection 2025-11-07 14:44:07 +02:00
76d24a8e2b BUG: Business Profile Tool Transitions 2025-11-07 14:44:07 +02:00
821cbc0a0d BUG: Set up patient flow 2025-11-07 14:44:07 +02:00
ea25598144 QOL: update guide 2025-11-07 14:44:07 +02:00
70fc306789 QOL: Change reset game to start new game 2025-11-07 14:44:07 +02:00
ba46f38497 BUG: MIH Ad Display Strategy 2025-11-07 14:44:07 +02:00
67692967c3 BUG: Add card refresh list 2025-11-07 14:44:07 +02:00
cc51afadb3 BUG: Menue showing in claims in personal mode 2025-11-07 14:44:07 +02:00
d9fb9dd758 QOL: Mzansi AI Chat Look and Feel pt2 & Startup question 2025-11-07 14:29:05 +02:00
d75da5389a QOL: Mzansi AI Chat Look and Feel pt1 2025-11-07 12:03:44 +02:00
yaso-meth
efaf9b3574 Merge pull request #261 from yaso-meth/V.1.2.2
V.1.2.2
2025-11-06 08:35:35 +02:00
393 changed files with 10000 additions and 11458 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -11,10 +11,17 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<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"
android:maxSdkVersion="32"
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
android:label="MIH"
@@ -46,6 +53,10 @@
android:name="flutter-deeplink"
android:value="true"
/>
<!-- Shortcut Icons -->
<meta-data
android:name="mih_shortcut_icons"
android:resource="@array/mih_shortcut_icons" />
<!-- New Deep Linking -->
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
@@ -99,5 +110,8 @@
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
<intent>
<action android:name="android.speech.RecognitionService" />
</intent>
</queries>
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

View 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/calculator"
android:width="48dp"
android:height="48dp"
android:gravity="center" />
</layer-list>

View 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>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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>

File diff suppressed because one or more lines are too long

View 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>

View 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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View 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>

View File

@@ -1,4 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<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>

File diff suppressed because one or more lines are too long

View File

@@ -1,32 +1,46 @@
# flutter pub run 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"
# image_path_android: "assets/icon/icon.png"
min_sdk_android: 21 # android min sdk min:16, default 21
adaptive_icon_background: "#3A4454"
adaptive_icon_foreground: "lib/mih_components/mih_package_components/assets/images/app_icon/mih_app_icon.png"
# adaptive_icon_monochrome: "assets/icon/monochrome.png"
# Original
# adaptive_icon_background: "#3A4454"
# 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
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
# 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:
generate: true
image_path: "lib/mih_components/mih_package_components/assets/images/app_icon/circle_logo.png"
background_color: "#3A4454"
theme_color: "#3A4454"
# Original
# image_path: "lib/mih_package_components/assets/images/app_icon/mih_logo_web.png"
# 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:
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
macos:
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"

View File

@@ -1,6 +1,15 @@
PODS:
- app_settings (5.1.1):
- 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):
- Flutter
- DKImagePickerController/Core (4.3.9):
@@ -40,6 +49,50 @@ PODS:
- Flutter
- file_saver (0.0.1):
- 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):
- Flutter
- Flutter (1.0.0)
@@ -63,6 +116,33 @@ PODS:
- FBAudienceNetwork (= 6.20.1)
- Google-Mobile-Ads-SDK (~> 12.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):
- Flutter
- FlutterMacOS
@@ -76,6 +156,12 @@ PODS:
- FlutterMacOS
- printing (1.0.0):
- 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):
- Flutter
- SDWebImage (5.20.0):
@@ -86,6 +172,10 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- speech_to_text (7.2.0):
- CwlCatchException
- Flutter
- FlutterMacOS
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
@@ -100,9 +190,14 @@ PODS:
DEPENDENCIES:
- 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`)
- file_picker (from `.symlinks/plugins/file_picker/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`)
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
@@ -110,14 +205,18 @@ DEPENDENCIES:
- 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`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- 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`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- 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`)
- syncfusion_flutter_pdfviewer (from `.symlinks/plugins/syncfusion_flutter_pdfviewer/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -125,24 +224,49 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- AppCheckCore
- CwlCatchException
- CwlCatchExceptionSupport
- DKImagePickerController
- DKPhotoGallery
- FBAudienceNetwork
- Firebase
- FirebaseAppCheck
- FirebaseAppCheckInterop
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseCoreExtension
- FirebaseCoreInternal
- Google-Mobile-Ads-SDK
- GoogleMobileAdsMediationFacebook
- GoogleUserMessagingPlatform
- GoogleUtilities
- GTMSessionFetcher
- PromisesObjC
- RecaptchaInterop
- SDWebImage
- SwiftyGif
EXTERNAL SOURCES:
app_settings:
:path: ".symlinks/plugins/app_settings/ios"
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
file_saver:
: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:
:path: ".symlinks/plugins/fl_downloader/ios"
Flutter:
@@ -157,6 +281,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/gma_mediation_meta/ios"
google_mobile_ads:
:path: ".symlinks/plugins/google_mobile_ads/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin"
mobile_scanner:
@@ -167,12 +293,18 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
printing:
: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:
:path: ".symlinks/plugins/screen_brightness_ios/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
speech_to_text:
:path: ".symlinks/plugins/speech_to_text/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
syncfusion_flutter_pdfviewer:
@@ -184,12 +316,28 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
camera_avfoundation: be3be85408cd4126f250386828e9b1dfa40ab436
CwlCatchException: 7acc161b299a6de7f0a46a6ed741eae2c8b4d75a
CwlCatchExceptionSupport: 54ccab8d8c78907b57f99717fb19d4cc3bce02dc
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
FBAudienceNetwork: 08e86d63a05b3a5a59414af12e4af8d756943c80
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
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
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
@@ -200,15 +348,23 @@ SPEC CHECKSUMS:
google_mobile_ads: 535223588a6791b7a3cc3513a1bc7b89d12f3e62
GoogleMobileAdsMediationFacebook: b11a92ae3bfdae19853b882252b7e62791c18162
GoogleUserMessagingPlatform: f8d0cdad3ca835406755d0a69aa634f00e76d576
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
GTMSessionFetcher: 02d6e866e90bc236f48a703a041dfe43e6221a29
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
printing: 54ff03f28fe9ba3aa93358afb80a8595a071dd07
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
quick_actions_ios: 4b07fb49d8d8f3518d7565fbb7a91014067a7d82
RecaptchaInterop: 11e0b637842dfb48308d242afc3f448062325aba
record_ios: f75fa1d57f840012775c0e93a38a7f3ceea1a374
screen_brightness_ios: 9953fd7da5bd480f1a93990daeec2eb42d4f3b52
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
speech_to_text: 3b313d98516d3d0406cea424782ec25470c59d19
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
syncfusion_flutter_pdfviewer: 90dc48305d2e33d4aa20681d1e98ddeda891bc14

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View 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"
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

View 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"
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

View 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"
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

View 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"
}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -2,6 +2,16 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<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>

View File

@@ -1,19 +1,22 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/about_mih_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_access_controlls_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_authentication_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_banner_ad_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_calculator_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_calendar_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mih_mine_sweeper_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_ai_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_directory_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_wallet_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/patient_manager_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package: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 'mih_config/mih_env.dart';
import 'mih_config/mih_theme.dart';
@@ -35,41 +38,64 @@ class MzansiInnovationHub extends StatefulWidget {
class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
late MihTheme theme;
final QuickActions quickActions = QuickActions();
String shortcut = 'no action set';
Color getPrimany() {
return MihColors.getPrimaryColor(theme.mode == "Dark");
}
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(() {
if (themeMode == ThemeMode.light) {
setState(() {
theme.mode = "Light";
});
} else if (themeMode == ThemeMode.dark) {
setState(() {
theme.mode = "Dark";
});
} else {
setState(() {
theme.mode = "Dark";
});
void _initializeQuickActions() {
quickActions.initialize((String shortcutType) {
setState(() {
shortcut = shortcutType;
});
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
void initState() {
theme = MihTheme();
super.initState();
if (!kIsWeb) {
_initializeQuickActions();
}
theme = MihTheme();
theme.mode = "Dark";
theme.platform = Theme.of(context).platform;
}
@@ -78,7 +104,6 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
Widget build(BuildContext context) {
double width = MediaQuery.sizeOf(context).width;
theme.setScreenType(width);
precacheImage(theme.loadingImage(), context);
return MultiProvider(
providers: [
ChangeNotifierProvider(
@@ -117,9 +142,14 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
ChangeNotifierProvider(
create: (context) => PatientManagerProvider(),
),
ChangeNotifierProvider(
create: (context) => MihFileViewerProvider(),
),
],
child: MaterialApp.router(
title: getTitle(),
title: AppEnviroment.getEnv() == "Dev"
? "Dev | MIH App: Mzansi Innovation Hub"
: "MIH App: Mzansi Innovation Hub",
themeMode: ThemeMode.dark,
theme: theme.getThemeData(),
darkTheme: theme.getThemeData(),

View File

@@ -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,
);
}
}

View File

@@ -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,
),
),
),
),
);
}
}

View File

@@ -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,
),
);
}
}

View File

@@ -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,
);
}
}

View File

@@ -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,
),
),
)
],
),
);
}
}

View File

@@ -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");
},
);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -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 = 30.0;
popUpSubtitleSize = 20.0;
popUpBodySize = 15;
popUpPaddingSize = 25.0;
popUpIconSize = 100;
});
} else {
setState(() {
popUpWidth = size!.width - (size!.width * 0.1);
popUpheight = null;
popUpTitleSize = 25.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,
),
),
),
],
),
);
}
}

View File

@@ -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),
),
),
),
],
),
),
);
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

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

View File

@@ -1,27 +1,44 @@
import 'package:flutter/material.dart';
class MihColors {
bool women4Change = true;
static Color getPrimaryColor(bool darkMode) {
if (darkMode == true) {
return const Color(0XFF3A4454);
// return const Color(0XFF3A4454); // Original
return const Color(0XFF6641b2); // Women4change
} else {
return const Color(0XFFbedcfe);
// return const Color(0XFFbedcfe); // Original
return const Color(0xFFE0D1FF); // Women4change
}
}
static Color getSecondaryColor(bool darkMode) {
if (darkMode == true) {
return const Color(0XFFbedcfe);
// return const Color(0XFFbedcfe); // Original
return const Color(0xFFE0D1FF); // Women4change
} 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) {
if (darkMode == true) {
return const Color(0XFF9bc7fa);
// return const Color(0XFF9bc7fa);
return const Color(0xFFC8AFFB); // Women4change
} else {
return const Color(0XFF354866);
// return const Color(0XFF354866);
return const Color(0XFF6641b2); // Women4change
}
}

View File

@@ -1,10 +1,9 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_layout/mih_print_prevew.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_test.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_directory_provider.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profile_provider.dart';
import 'package:mzansi_innovation_hub/mih_packages/mih_file_viewer/components/mih_print_prevew.dart';
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/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/access_review/mih_access.dart';
import 'package:mzansi_innovation_hub/mih_packages/calculator/mih_calculator.dart';
@@ -12,6 +11,7 @@ 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_password_reset.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_route_error.dart';
import 'package:mzansi_innovation_hub/mih_packages/mine_sweeper/mih_mine_sweeper.dart';
@@ -26,7 +26,6 @@ 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/mih_wallet.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_manager/pat_manager.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_profile/components/full_screen_file.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_profile/patient_profile.dart';
import 'package:mzansi_innovation_hub/mih_packages/patient_manager/pat_profile/patient_set_up.dart';
import 'package:provider/provider.dart';
@@ -153,12 +152,6 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiProfileManage,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiProfileManage");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MzansiProfile();
},
),
@@ -184,16 +177,7 @@ class MihGoRouter {
path: MihGoRouterPaths.businessProfileManage,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: businessProfileManage");
if (context.watch<MzansiProfileProvider>().business == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return BusinesProfile();
// return MzansiBusinessProfile(
// key: UniqueKey(),
// );
},
),
GoRoute(
@@ -213,7 +197,6 @@ class MihGoRouter {
return const SizedBox.shrink();
}
return MzansiBusinessProfileView(
key: UniqueKey(),
businessId: businessId,
);
},
@@ -241,15 +224,7 @@ class MihGoRouter {
path: MihGoRouterPaths.calendar,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihCalendar");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MzansiCalendar(
key: UniqueKey(),
);
return MzansiCalendar();
},
),
// ========================== Mzansi AI ==================================
@@ -258,12 +233,6 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiAi,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiAi");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MzansiAi();
},
),
@@ -273,15 +242,7 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiWallet,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiWallet");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MihWallet(
key: UniqueKey(),
);
return MihWallet();
},
),
GoRoute(
@@ -306,14 +267,7 @@ class MihGoRouter {
path: MihGoRouterPaths.packageDevTest,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: testPackage");
final TestArguments? args = state.extra as TestArguments?;
if (args == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return PackageTest(arguments: args);
return PackageTest();
},
),
// ========================== MIH Access Controls ==================================
@@ -322,15 +276,7 @@ class MihGoRouter {
path: MihGoRouterPaths.mihAccess,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihAccess");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MihAccess(
key: UniqueKey(),
);
return MihAccess();
},
),
// ========================== Patient Profile ==================================
@@ -339,12 +285,6 @@ class MihGoRouter {
path: MihGoRouterPaths.patientProfile,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: patientProfile");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return PatientProfile();
},
),
@@ -353,12 +293,6 @@ class MihGoRouter {
path: MihGoRouterPaths.patientProfileSetup,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: patientProfileSetup");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return PatientSetUp();
},
),
@@ -367,15 +301,7 @@ class MihGoRouter {
path: MihGoRouterPaths.patientManager,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: patientManager");
if (context.watch<MzansiProfileProvider>().business == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return PatManager(
key: UniqueKey(),
);
return PatManager();
},
),
GoRoute(
@@ -383,12 +309,6 @@ class MihGoRouter {
path: MihGoRouterPaths.patientManagerPatient,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: patientManagerPatient");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return PatientProfile();
},
),
@@ -398,12 +318,6 @@ class MihGoRouter {
path: MihGoRouterPaths.mzansiDirectory,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mzansiDirectory");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MzansiDirectory();
},
),
@@ -413,8 +327,7 @@ class MihGoRouter {
path: MihGoRouterPaths.fileViewer,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: fileViewer");
final FileViewArguments? args = state.extra as FileViewArguments?;
return FullScreenFileViewer(arguments: args!);
return MihFleViewer();
},
),
GoRoute(
@@ -424,7 +337,13 @@ class MihGoRouter {
KenLogger.success("MihGoRouter: printPreview");
final PrintPreviewArguments? args =
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 ==================================
@@ -433,12 +352,6 @@ class MihGoRouter {
path: MihGoRouterPaths.mihMineSweeper,
builder: (BuildContext context, GoRouterState state) {
KenLogger.success("MihGoRouter: mihMineSweeper");
if (context.watch<MzansiProfileProvider>().user == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
return const SizedBox.shrink();
}
return MihMineSweeper();
},
),

View File

@@ -14,7 +14,7 @@ class MihTheme {
late String loadingAssetText;
late TargetPlatform platform;
bool kIsWeb = const bool.fromEnvironment('dart.library.js_util');
String latestVersion = "1.2.2";
String latestVersion = "1.2.4";
// Options:-
// f3f9d2 = Cream
// f0f0c9 = cream2
@@ -35,48 +35,116 @@ class MihTheme {
ThemeData getData(bool bool) {
return ThemeData(
fontFamily: 'Segoe UI',
scaffoldBackgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
// pageTransitionsTheme: PageTransitionsTheme(
// builders: Map<TargetPlatform, PageTransitionsBuilder>.fromIterable(
// TargetPlatform.values,
// value: (dynamic _) => const FadeUpwardsPageTransitionsBuilder(),
// ),
// ),
colorScheme: ColorScheme(
brightness: getBritness(),
primary: MihColors.getSecondaryColor(mode == "Dark"),
onPrimary: MihColors.getPrimaryColor(mode == "Dark"),
secondary: MihColors.getPrimaryColor(mode == "Dark"),
onSecondary: MihColors.getSecondaryColor(mode == "Dark"),
error: MihColors.getRedColor(mode == "Dark"),
onError: MihColors.getPrimaryColor(mode == "Dark"),
surface: MihColors.getPrimaryColor(mode == "Dark"),
onSurface: MihColors.getSecondaryColor(mode == "Dark"),
fontFamily: 'Segoe UI',
scaffoldBackgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
// pageTransitionsTheme: PageTransitionsTheme(
// builders: Map<TargetPlatform, PageTransitionsBuilder>.fromIterable(
// TargetPlatform.values,
// value: (dynamic _) => const FadeUpwardsPageTransitionsBuilder(),
// ),
// ),
colorScheme: ColorScheme(
brightness: getBritness(),
primary: MihColors.getSecondaryColor(mode == "Dark"),
onPrimary: MihColors.getPrimaryColor(mode == "Dark"),
secondary: MihColors.getPrimaryColor(mode == "Dark"),
onSecondary: MihColors.getSecondaryColor(mode == "Dark"),
error: MihColors.getRedColor(mode == "Dark"),
onError: MihColors.getPrimaryColor(mode == "Dark"),
surface: MihColors.getPrimaryColor(mode == "Dark"),
onSurface: MihColors.getSecondaryColor(mode == "Dark"),
),
datePickerTheme: DatePickerThemeData(
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
headerBackgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
headerForegroundColor: MihColors.getPrimaryColor(mode == "Dark"),
),
appBarTheme: AppBarTheme(
color: MihColors.getSecondaryColor(mode == "Dark"),
foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
titleTextStyle: TextStyle(
color: MihColors.getPrimaryColor(mode == "Dark"),
fontSize: 25,
fontWeight: FontWeight.bold,
),
datePickerTheme: DatePickerThemeData(
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
headerBackgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
headerForegroundColor: MihColors.getPrimaryColor(mode == "Dark"),
),
appBarTheme: AppBarTheme(
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
extendedTextStyle:
TextStyle(color: MihColors.getPrimaryColor(mode == "Dark")),
),
drawerTheme: DrawerThemeData(
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"),
foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
titleTextStyle: TextStyle(
borderRadius: BorderRadius.circular(6),
border: Border.all(
width: 1.0,
color: MihColors.getPrimaryColor(mode == "Dark"),
fontSize: 25,
fontWeight: FontWeight.bold,
),
boxShadow: [
BoxShadow(
color:
MihColors.getPrimaryColor(mode == "Dark").withOpacity(0.18),
blurRadius: 6,
offset: const Offset(0, 2),
),
],
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: MihColors.getSecondaryColor(mode == "Dark"),
foregroundColor: MihColors.getPrimaryColor(mode == "Dark"),
extendedTextStyle:
TextStyle(color: MihColors.getPrimaryColor(mode == "Dark")),
textStyle: TextStyle(
color: MihColors.getPrimaryColor(mode == "Dark"),
fontSize: 13,
height: 1.2,
),
drawerTheme: DrawerThemeData(
backgroundColor: MihColors.getPrimaryColor(mode == "Dark"),
));
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() {
@@ -165,65 +233,65 @@ class MihTheme {
// }
// }
AssetImage loadingImage() {
if (mode == "Dark") {
loading = const AssetImage(
'lib/mih_components/mih_package_components/assets/images/loading_light.gif',
);
} else {
loading = const AssetImage(
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif',
);
}
return loading;
}
// AssetImage loadingImage() {
// if (mode == "Dark") {
// loading = const AssetImage(
// 'lib/mih_package_components/assets/images/loading_light.gif',
// );
// } else {
// loading = const AssetImage(
// 'lib/mih_package_components/assets/images/loading_dark.gif',
// );
// }
// return loading;
// }
AssetImage altLoadingImage() {
if (mode == "Dark") {
loading = const AssetImage(
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif',
);
} else {
loading = const AssetImage(
'lib/mih_components/mih_package_components/assets/images/loading_light.gif',
);
}
return loading;
}
// AssetImage altLoadingImage() {
// if (mode == "Dark") {
// loading = const AssetImage(
// 'lib/mih_package_components/assets/images/loading_dark.gif',
// );
// } else {
// loading = const AssetImage(
// 'lib/mih_package_components/assets/images/loading_light.gif',
// );
// }
// return loading;
// }
String loadingImageLocation() {
if (mode == "Dark") {
loadingAssetText =
'lib/mih_components/mih_package_components/assets/images/loading_light.gif';
} else {
loadingAssetText =
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif';
}
return loadingAssetText;
}
// String loadingImageLocation() {
// if (mode == "Dark") {
// loadingAssetText =
// 'lib/mih_package_components/assets/images/loading_light.gif';
// } else {
// loadingAssetText =
// 'lib/mih_package_components/assets/images/loading_dark.gif';
// }
// return loadingAssetText;
// }
String altLoadingImageLocation() {
if (mode == "Dark") {
loadingAssetText =
'lib/mih_components/mih_package_components/assets/images/loading_dark.gif';
} else {
loadingAssetText =
'lib/mih_components/mih_package_components/assets/images/loading_light.gif';
}
return loadingAssetText;
}
// String altLoadingImageLocation() {
// if (mode == "Dark") {
// loadingAssetText =
// 'lib/mih_package_components/assets/images/loading_dark.gif';
// } else {
// loadingAssetText =
// 'lib/mih_package_components/assets/images/loading_light.gif';
// }
// return loadingAssetText;
// }
AssetImage aiLogoImage() {
if (mode == "Dark") {
return const AssetImage(
'lib/mih_components/mih_package_components/assets/images/mzansi_ai-dark.png',
);
} else {
return const AssetImage(
'lib/mih_components/mih_package_components/assets/images/mzansi_ai-light.png',
);
}
}
// AssetImage aiLogoImage() {
// if (mode == "Dark") {
// return const AssetImage(
// 'lib/mih_package_components/assets/images/mzansi_ai-dark.png',
// );
// } else {
// return const AssetImage(
// 'lib/mih_package_components/assets/images/mzansi_ai-light.png',
// );
// }
// }
void setScreenType(double width) {
if (width <= 800) {

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