NEW: MIH Shortcuts pt2
This commit is contained in:
@@ -53,6 +53,10 @@
|
|||||||
android:name="flutter-deeplink"
|
android:name="flutter-deeplink"
|
||||||
android:value="true"
|
android:value="true"
|
||||||
/>
|
/>
|
||||||
|
<!-- Shortcut Icons -->
|
||||||
|
<meta-data
|
||||||
|
android:name="mih_shortcut_icons"
|
||||||
|
android:resource="@array/mih_shortcut_icons" />
|
||||||
<!-- New Deep Linking -->
|
<!-- New Deep Linking -->
|
||||||
<intent-filter android:autoVerify="true">
|
<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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>
|
||||||
@@ -1,31 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
|
|
||||||
<solid android:color="@color/mih_icon_background" />
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
<padding
|
|
||||||
android:left="0dp"
|
|
||||||
android:top="0dp"
|
|
||||||
android:right="0dp"
|
|
||||||
android:bottom="0dp"/>
|
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:gravity="center"
|
android:drawable="@drawable/mih_logo"
|
||||||
|
android:width="48dp"
|
||||||
android:drawable="@drawable/mih_logo"
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
android:width="45dp"
|
|
||||||
android:height="45dp"
|
|
||||||
|
|
||||||
android:left="9dp"
|
|
||||||
android:top="9dp"
|
|
||||||
android:right="9dp"
|
|
||||||
android:bottom="9dp">
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</layer-list>
|
</layer-list>
|
||||||
File diff suppressed because one or more lines are too long
9
Frontend/android/app/src/main/res/drawable/mzansi_ai.xml
Normal file
9
Frontend/android/app/src/main/res/drawable/mzansi_ai.xml
Normal file
File diff suppressed because one or more lines are too long
14
Frontend/android/app/src/main/res/drawable/mzansi_ai_sc.xml
Normal file
14
Frontend/android/app/src/main/res/drawable/mzansi_ai_sc.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/mzansi_ai"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
|
</layer-list>
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,31 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
|
|
||||||
<solid android:color="@color/mih_icon_background" />
|
<solid android:color="@color/mih_icon_background" />
|
||||||
|
<!-- <size android:width="48dp" android:height="48dp"/> -->
|
||||||
<padding
|
|
||||||
android:left="0dp"
|
|
||||||
android:top="0dp"
|
|
||||||
android:right="0dp"
|
|
||||||
android:bottom="0dp"/>
|
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:gravity="center"
|
android:drawable="@drawable/mzansi_wallet"
|
||||||
|
android:width="48dp"
|
||||||
android:drawable="@drawable/mzansi_wallet"
|
android:height="48dp"
|
||||||
|
android:gravity="center" />
|
||||||
android:width="45dp"
|
|
||||||
android:height="45dp"
|
|
||||||
|
|
||||||
android:left="9dp"
|
|
||||||
android:top="9dp"
|
|
||||||
android:right="9dp"
|
|
||||||
android:bottom="9dp">
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</layer-list>
|
</layer-list>
|
||||||
9
Frontend/android/app/src/main/res/values/arrays.xml
Normal file
9
Frontend/android/app/src/main/res/values/arrays.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<array name="mih_shortcut_icons">
|
||||||
|
<item>@drawable/mih_home_sc</item>
|
||||||
|
<item>@drawable/mzansi_wallet_sc</item>
|
||||||
|
<item>@drawable/mzansi_ai_sc</item>
|
||||||
|
<item>@drawable/mih_calculator_sc</item>
|
||||||
|
</array>
|
||||||
|
</resources>
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#3A4454</color>
|
<color name="ic_launcher_background">#3A4454</color>
|
||||||
<color name="mih_icon_background">#3A4454</color>
|
<!-- Women For Change -->
|
||||||
|
<color name="mih_icon_background">#6641b2</color>
|
||||||
|
<color name="mih_icon_foreground">#E0D1FF</color>
|
||||||
|
<!-- Original -->
|
||||||
|
<!-- <color name="mih_icon_background">#3A4454</color>
|
||||||
|
<color name="mih_icon_foreground">#bedcfe</color> -->
|
||||||
</resources>
|
</resources>
|
||||||
663
Frontend/android/build/reports/problems/problems-report.html
Normal file
663
Frontend/android/build/reports/problems/problems-report.html
Normal file
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
import 'package:ken_logger/ken_logger.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/about_mih_provider.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_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_authentication_provider.dart';
|
||||||
@@ -13,6 +14,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_profil
|
|||||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_wallet_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_components/mih_providers/patient_manager_provider.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:quick_actions/quick_actions.dart';
|
||||||
import 'package:upgrader/upgrader.dart';
|
import 'package:upgrader/upgrader.dart';
|
||||||
import 'mih_config/mih_env.dart';
|
import 'mih_config/mih_env.dart';
|
||||||
import 'mih_config/mih_theme.dart';
|
import 'mih_config/mih_theme.dart';
|
||||||
@@ -34,10 +36,61 @@ class MzansiInnovationHub extends StatefulWidget {
|
|||||||
|
|
||||||
class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
||||||
late MihTheme theme;
|
late MihTheme theme;
|
||||||
|
final QuickActions quickActions = QuickActions();
|
||||||
|
String shortcut = 'no action set';
|
||||||
|
|
||||||
|
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
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
_initializeQuickActions();
|
||||||
theme = MihTheme();
|
theme = MihTheme();
|
||||||
theme.mode = "Dark";
|
theme.mode = "Dark";
|
||||||
theme.platform = Theme.of(context).platform;
|
theme.platform = Theme.of(context).platform;
|
||||||
@@ -47,7 +100,6 @@ class _MzansiInnovationHubState extends State<MzansiInnovationHub> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double width = MediaQuery.sizeOf(context).width;
|
double width = MediaQuery.sizeOf(context).width;
|
||||||
theme.setScreenType(width);
|
theme.setScreenType(width);
|
||||||
precacheImage(theme.loadingImage(), context);
|
|
||||||
return MultiProvider(
|
return MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
ChangeNotifierProvider(
|
ChangeNotifierProvider(
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import 'package:mzansi_innovation_hub/mih_services/mih_my_business_user_services
|
|||||||
import 'package:mzansi_innovation_hub/mih_services/mih_user_consent_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_user_consent_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:quick_actions/quick_actions.dart';
|
|
||||||
|
|
||||||
class MihHome extends StatefulWidget {
|
class MihHome extends StatefulWidget {
|
||||||
const MihHome({
|
const MihHome({
|
||||||
@@ -43,35 +42,6 @@ class _MihHomeState extends State<MihHome> {
|
|||||||
DateTime latestPrivacyPolicyDate = DateTime.parse("2024-12-01");
|
DateTime latestPrivacyPolicyDate = DateTime.parse("2024-12-01");
|
||||||
DateTime latestTermOfServiceDate = DateTime.parse("2024-12-01");
|
DateTime latestTermOfServiceDate = DateTime.parse("2024-12-01");
|
||||||
bool _isLoadingInitialData = true;
|
bool _isLoadingInitialData = true;
|
||||||
final QuickActions quickActions = QuickActions();
|
|
||||||
String shortcut = 'no action set';
|
|
||||||
|
|
||||||
void _initializeQuickActions() {
|
|
||||||
quickActions.initialize((String shortcutType) {
|
|
||||||
setState(() {
|
|
||||||
shortcut = shortcutType;
|
|
||||||
});
|
|
||||||
if (shortcutType == 'mihHome') {
|
|
||||||
context.goNamed("mihHome");
|
|
||||||
}
|
|
||||||
if (shortcutType == 'mzansiWallet') {
|
|
||||||
context.goNamed("mzansiWallet");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// Set the quick actions
|
|
||||||
quickActions.setShortcutItems(<ShortcutItem>[
|
|
||||||
const ShortcutItem(
|
|
||||||
type: 'mzansiWallet',
|
|
||||||
localizedTitle: 'Mzansi Wallet',
|
|
||||||
icon: 'mzansi_wallet_sc'),
|
|
||||||
]).then((void _) {
|
|
||||||
setState(() {
|
|
||||||
if (shortcut == 'no action set') {
|
|
||||||
shortcut = 'mihHome';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _loadInitialData() async {
|
Future<void> _loadInitialData() async {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
@@ -235,7 +205,6 @@ class _MihHomeState extends State<MihHome> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_loadInitialData();
|
_loadInitialData();
|
||||||
_initializeQuickActions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> getToolTitle() {
|
List<String> getToolTitle() {
|
||||||
|
|||||||
@@ -848,14 +848,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.5"
|
version: "0.2.5"
|
||||||
gif_view:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: gif_view
|
|
||||||
sha256: "4c7e17c134719531dabab54af121e4600d63283f56f3aff57c16db54766b67bc"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.3"
|
|
||||||
glob:
|
glob:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: mzansi_innovation_hub
|
name: mzansi_innovation_hub
|
||||||
description: ""
|
description: ""
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
version: 1.2.3+105
|
version: 1.2.3+110
|
||||||
# version: 1.1.1+97 #--- Updated version for upgrader package testing
|
# version: 1.1.1+97 #--- Updated version for upgrader package testing
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
@@ -22,7 +22,6 @@ dependencies:
|
|||||||
supertokens_flutter: ^0.6.3
|
supertokens_flutter: ^0.6.3
|
||||||
http: ^1.2.1
|
http: ^1.2.1
|
||||||
args: ^2.7.0
|
args: ^2.7.0
|
||||||
gif_view: ^1.0.3
|
|
||||||
intl: ^0.20.2
|
intl: ^0.20.2
|
||||||
flutter_native_splash: ^2.4.6
|
flutter_native_splash: ^2.4.6
|
||||||
printing: ^5.13.3
|
printing: ^5.13.3
|
||||||
|
|||||||
Reference in New Issue
Block a user