Migration to mih_package_toolkit

This commit is contained in:
2026-03-18 16:42:12 +02:00
parent 84cb6b2e83
commit c67529dbac
180 changed files with 2112 additions and 8147 deletions

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:mih_package_toolkit/mih_package_toolkit.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_circle_avatar.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.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';
@@ -14,9 +14,7 @@ import 'package:mzansi_innovation_hub/mih_providers/mzansi_directory_provider.da
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:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:provider/provider.dart';
import '../../../main.dart';
import 'package:supertokens_flutter/supertokens.dart';
class MIHAppDrawer extends StatefulWidget {
@@ -83,10 +81,8 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
fileNameController: proPicController,
onChange: (_) {},
userSelectedfile: null,
frameColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
frameColor: MihColors.primary(),
backgroundColor: MihColors.secondary(),
),
);
}
@@ -111,7 +107,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
MzansiProfileProvider mzansiProfileProvider, Widget? child) {
return SafeArea(
child: Drawer(
//backgroundColor: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
//backgroundColor: MihColors.primary(),
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Stack(
@@ -124,9 +120,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [
DrawerHeader(
decoration: BoxDecoration(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.secondary(),
),
child: SizedBox(
// height: 300,
@@ -143,11 +137,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
"Setup Business",
style: TextStyle(
fontWeight: FontWeight.bold,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.primary(),
),
),
),
@@ -157,11 +147,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
"${mzansiProfileProvider.user!.fname} ${mzansiProfileProvider.user!.lname}",
style: TextStyle(
fontWeight: FontWeight.bold,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.primary(),
),
),
),
@@ -172,11 +158,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.primary(),
),
),
),
@@ -187,11 +169,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.primary(),
),
),
),
@@ -201,11 +179,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.primary(),
),
),
],
@@ -219,7 +193,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
// Icon(
// Icons.home_outlined,
// color:
// MihColors.getSecondaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// MihColors.secondary(),
// ),
// const SizedBox(width: 25.0),
// Text(
@@ -249,22 +223,14 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [
Icon(
Icons.policy,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.secondary(),
),
const SizedBox(width: 25.0),
Text(
"Privacy Policy",
style: TextStyle(
//fontWeight: FontWeight.bold,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.secondary(),
),
),
],
@@ -288,22 +254,14 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [
Icon(
Icons.design_services_rounded,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.secondary(),
),
const SizedBox(width: 25.0),
Text(
"Terms of Service",
style: TextStyle(
//fontWeight: FontWeight.bold,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.secondary(),
),
),
],
@@ -327,22 +285,14 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
children: [
Icon(
Icons.logout,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.secondary(),
),
const SizedBox(width: 25.0),
Text(
"Sign Out",
style: TextStyle(
//fontWeight: FontWeight.bold,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!
.theme
.mode ==
"Dark"),
color: MihColors.secondary(),
),
),
],
@@ -395,9 +345,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
},
child: Icon(
MihIcons.mihLogo,
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.primary(),
),
),
// IconButton(
@@ -417,7 +365,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
// },
// icon: Icon(
// Icons.light_mode,
// color: MihColors.getPrimaryColor(MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
// color: MihColors.primary(),
// size: 35,
// ),
// ),

View File

@@ -143,8 +143,8 @@ class _MihHomeState extends State<MihHome> {
Icon(
Icons.policy,
size: 150,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
color: MihColors.secondary(
,
),
),
const SizedBox(height: 10),
@@ -152,8 +152,8 @@ class _MihHomeState extends State<MihHome> {
"Welcome to the MIH App",
textAlign: TextAlign.center,
style: TextStyle(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
color: MihColors.secondary(
,
),
fontSize: 30,
fontWeight: FontWeight.bold,
@@ -164,8 +164,8 @@ class _MihHomeState extends State<MihHome> {
"To keep using the MIH app, please take a moment to review and accept our Policies. Our agreements helps us keep things running smoothly and securely.",
textAlign: TextAlign.center,
style: TextStyle(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark",
color: MihColors.secondary(
,
),
fontSize: 18,
fontWeight: FontWeight.normal,
@@ -189,17 +189,15 @@ class _MihHomeState extends State<MihHome> {
context.goNamed("aboutMih",
extra: mzansiProfileProvider.personalHome);
},
buttonColor: MihColors.getOrangeColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
buttonColor: MihColors.orange(
),
elevation: 10,
width: 300,
child: Text(
"Privacy Policy",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.primary(
),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -214,17 +212,15 @@ class _MihHomeState extends State<MihHome> {
context.goNamed("aboutMih",
extra: mzansiProfileProvider.personalHome);
},
buttonColor: MihColors.getYellowColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
buttonColor: MihColors.yellow(
),
elevation: 10,
width: 300,
child: Text(
"Terms of Service",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.primary(
),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -236,17 +232,15 @@ class _MihHomeState extends State<MihHome> {
KenLogger.success("Date Time Now: $now");
createOrUpdateAccpetance(mzansiProfileProvider);
},
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
buttonColor: MihColors.green(
),
elevation: 10,
width: 300,
child: Text(
"Accept",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.primary(
),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -308,13 +302,13 @@ class _MihHomeState extends State<MihHome> {
child: SizedBox(
height: MediaQuery.of(context).size.height,
child: MihPackage(
appActionButton: getAction(),
appTools: getTools(mzansiProfileProvider,
packageActionButton: getAction(),
packageTools: getTools(mzansiProfileProvider,
mzansiProfileProvider.user!.type != "personal"),
appBody: getToolBody(mzansiProfileProvider),
appToolTitles: getToolTitle(),
packageToolBodies: getToolBody(mzansiProfileProvider),
packageToolTitles: getToolTitle(),
actionDrawer: getActionDrawer(),
selectedbodyIndex:
selectedBodyIndex:
mzansiProfileProvider.personalHome ? 0 : 1,
onIndexChange: (newValue) {
mzansiProfileProvider.setPersonalHome(newValue == 0);
@@ -358,10 +352,10 @@ class _MihHomeState extends State<MihHome> {
fileNameController: null,
userSelectedfile: null,
// frameColor: frameColor,
frameColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
backgroundColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
frameColor: MihColors.secondary(
),
backgroundColor: MihColors.primary(
),
onChange: (_) {},
),
),
@@ -395,7 +389,7 @@ class _MihHomeState extends State<MihHome> {
}
return MihPackageTools(
tools: temp,
selcetedIndex: mzansiProfileProvider.personalHome ? 0 : 1,
selectedIndex: mzansiProfileProvider.personalHome ? 0 : 1,
);
}

View File

@@ -1,12 +1,7 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:mih_package_toolkit/mih_package_toolkit.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_action.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tools.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
class MihHomeError extends StatefulWidget {
final String errorMessage;
@@ -20,21 +15,21 @@ class MihHomeError extends StatefulWidget {
}
class _MihHomeErrorState extends State<MihHomeError> {
int _selcetedIndex = 0;
int _selectedIndex = 0;
@override
Widget build(BuildContext context) {
return MihPackage(
appActionButton: getErrorAction(),
appTools: getErrorTools(),
appToolTitles: ["Connection Error"],
appBody: getErrorToolBody(widget.errorMessage),
selectedbodyIndex: _selcetedIndex,
packageActionButton: getErrorAction(),
packageTools: getErrorTools(),
packageToolTitles: ["Connection Error"],
packageToolBodies: getErrorToolBody(widget.errorMessage),
selectedBodyIndex: _selectedIndex,
onIndexChange: (newValue) {
setState(() {
_selcetedIndex = newValue;
_selectedIndex = newValue;
});
//print("Index: $_selcetedIndex");
//print("Index: $_selectedIndex");
},
);
}
@@ -56,18 +51,19 @@ class _MihHomeErrorState extends State<MihHomeError> {
Map<Widget, void Function()?> temp = {};
temp[const Icon(Icons.power_off_outlined)] = () {
setState(() {
_selcetedIndex = 0;
_selectedIndex = 0;
});
};
return MihPackageTools(
tools: temp,
selcetedIndex: _selcetedIndex,
selectedIndex: _selectedIndex,
);
}
List<Widget> getErrorToolBody(String error) {
List<Widget> toolBodies = [
MihPackageToolBody(
backgroundColor: MihColors.primary(),
borderOn: true,
bodyItem: Column(
mainAxisAlignment: MainAxisAlignment.start,
@@ -76,8 +72,7 @@ class _MihHomeErrorState extends State<MihHomeError> {
"Connection Error",
textAlign: TextAlign.center,
style: TextStyle(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.secondary(),
fontSize: 35,
fontWeight: FontWeight.bold,
),
@@ -85,8 +80,7 @@ class _MihHomeErrorState extends State<MihHomeError> {
Icon(
Icons.power_off_outlined,
size: 150,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.secondary(),
),
SizedBox(
width: 500,
@@ -94,8 +88,7 @@ class _MihHomeErrorState extends State<MihHomeError> {
"Looks like we ran into an issue getting your data.\nPlease check you internet connection and try again.",
textAlign: TextAlign.center,
style: TextStyle(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.secondary(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -109,14 +102,12 @@ class _MihHomeErrorState extends State<MihHomeError> {
extra: true,
);
},
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
buttonColor: MihColors.green(),
width: 300,
child: Text(
"Refresh",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.primary(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -132,9 +123,7 @@ class _MihHomeErrorState extends State<MihHomeError> {
"Error: $error",
textAlign: TextAlign.left,
style: TextStyle(
color: MihColors.getRedColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.red(),
fontSize: 15,
fontWeight: FontWeight.bold,
),

View File

@@ -1,13 +1,6 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_action.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tools.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mih_package_toolkit/mih_package_toolkit.dart';
class MihRouteError extends StatefulWidget {
const MihRouteError({
@@ -19,21 +12,21 @@ class MihRouteError extends StatefulWidget {
}
class _MihRouteErrorState extends State<MihRouteError> {
int _selcetedIndex = 0;
int _selectedIndex = 0;
@override
Widget build(BuildContext context) {
return MihPackage(
appActionButton: getErrorAction(),
appTools: getErrorTools(),
appToolTitles: ["Invalid Path"],
appBody: getErrorToolBody(),
selectedbodyIndex: _selcetedIndex,
packageActionButton: getErrorAction(),
packageTools: getErrorTools(),
packageToolTitles: ["Invalid Path"],
packageToolBodies: getErrorToolBody(),
selectedBodyIndex: _selectedIndex,
onIndexChange: (newValue) {
setState(() {
_selcetedIndex = newValue;
_selectedIndex = newValue;
});
//print("Index: $_selcetedIndex");
//print("Index: $_selectedIndex");
},
);
}
@@ -55,18 +48,19 @@ class _MihRouteErrorState extends State<MihRouteError> {
Map<Widget, void Function()?> temp = {};
temp[const Icon(Icons.link_off_rounded)] = () {
setState(() {
_selcetedIndex = 0;
_selectedIndex = 0;
});
};
return MihPackageTools(
tools: temp,
selcetedIndex: _selcetedIndex,
selectedIndex: _selectedIndex,
);
}
List<Widget> getErrorToolBody() {
List<Widget> toolBodies = [
MihPackageToolBody(
backgroundColor: MihColors.primary(),
borderOn: true,
bodyItem: Column(
mainAxisAlignment: MainAxisAlignment.start,
@@ -75,8 +69,7 @@ class _MihRouteErrorState extends State<MihRouteError> {
"Oops! Wrong Turn.",
textAlign: TextAlign.center,
style: TextStyle(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.secondary(),
fontSize: 35,
fontWeight: FontWeight.bold,
),
@@ -84,8 +77,7 @@ class _MihRouteErrorState extends State<MihRouteError> {
Icon(
Icons.link_off_rounded,
size: 150,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.secondary(),
),
SizedBox(
width: 700,
@@ -93,8 +85,7 @@ class _MihRouteErrorState extends State<MihRouteError> {
"It looks like you've taken a wrong turn and ended up on a package that doesn't exist within the MIH App.\n\nDon't worry, getting back is easy. Just click the button below or the MIH Logo to return to the correct path.",
textAlign: TextAlign.center,
style: TextStyle(
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.secondary(),
fontSize: 20,
fontWeight: FontWeight.w500,
),
@@ -108,14 +99,12 @@ class _MihRouteErrorState extends State<MihRouteError> {
extra: true,
);
},
buttonColor: MihColors.getGreenColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
buttonColor: MihColors.green(),
width: 300,
child: Text(
"Back to MIH",
style: TextStyle(
color: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
color: MihColors.primary(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
@@ -131,7 +120,7 @@ class _MihRouteErrorState extends State<MihRouteError> {
// "Error: $error",
// textAlign: TextAlign.left,
// style: TextStyle(
// color: MihColors.getRedColor(
// color: MihColors.red(
// MzansiInnovationHub.of(context)!.theme.mode ==
// "Dark"),
// fontSize: 15,

View File

@@ -1,12 +1,9 @@
import 'package:go_router/go_router.dart';
import 'package:mih_package_toolkit/mih_package_toolkit.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_search_bar.dart';
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
import 'package:mzansi_innovation_hub/mih_providers/mzansi_ai_provider.dart';
import 'package:mzansi_innovation_hub/mih_providers/mzansi_profile_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tile/about_mih_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/calculator/package_tiles/mih_calculator_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/calendar/package_tiles/mzansi_calendar_tile.dart';
@@ -191,6 +188,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
final double width = size.width;
final double height = size.height;
return MihPackageToolBody(
backgroundColor: MihColors.primary(),
borderOn: false,
bodyItem: getBody(width, height),
);
@@ -213,10 +211,8 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
hintText: "Ask Mzansi",
prefixIcon: Icons.search,
prefixAltIcon: MihIcons.mzansiAi,
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fillColor: MihColors.secondary(),
hintColor: MihColors.primary(),
onPrefixIconTap: () {
mzansiAiProvider.ollamaProvider.resetChat();
if (searchController.text.isNotEmpty) {
@@ -262,9 +258,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
Icon(
MihIcons.mzansiAi,
size: 165,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.secondary(),
),
const SizedBox(height: 10),
Text(
@@ -274,9 +268,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.secondary(),
),
),
],

View File

@@ -1,12 +1,9 @@
import 'package:go_router/go_router.dart';
import 'package:mih_package_toolkit/mih_package_toolkit.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_env.dart';
import 'package:mzansi_innovation_hub/mih_package_components/Example/package_tiles/test_package_tile.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
import 'package:mzansi_innovation_hub/mih_package_components/mih_search_bar.dart';
import 'package:mzansi_innovation_hub/mih_providers/mzansi_ai_provider.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/about_mih/package_tile/about_mih_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/access_review/package_tile/mih_access_tile.dart';
import 'package:mzansi_innovation_hub/mih_packages/calculator/package_tiles/mih_calculator_tile.dart';
@@ -213,6 +210,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
final double height = size.height;
return MihPackageToolBody(
backgroundColor: MihColors.primary(),
borderOn: false,
bodyItem: getBody(width, height),
);
@@ -233,10 +231,8 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
hintText: "Ask Mzansi",
prefixIcon: Icons.search,
prefixAltIcon: MihIcons.mzansiAi,
fillColor: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
hintColor: MihColors.getPrimaryColor(
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
fillColor: MihColors.secondary(),
hintColor: MihColors.primary(),
onPrefixIconTap: () {
mzansiAiProvider.ollamaProvider.resetChat();
if (searchController.text.isNotEmpty) {
@@ -282,9 +278,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
Icon(
MihIcons.mzansiAi,
size: 165,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.secondary(),
),
const SizedBox(height: 10),
Text(
@@ -294,9 +288,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,
color: MihColors.getSecondaryColor(
MzansiInnovationHub.of(context)!.theme.mode ==
"Dark"),
color: MihColors.secondary(),
),
),
],