add toot titles to missing packages

This commit is contained in:
2025-11-25 10:45:39 +02:00
parent d51d13a685
commit 4a293c0aa4
7 changed files with 17 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ class MihPackage extends StatefulWidget {
final Widget appActionButton;
final MihPackageTools appTools;
final List<Widget> appBody;
final List<String>? appToolTitles;
final List<String> appToolTitles;
final MIHAppDrawer? actionDrawer;
int selectedbodyIndex;
final Function(int) onIndexChange;
@@ -21,7 +21,7 @@ class MihPackage extends StatefulWidget {
required this.appActionButton,
required this.appTools,
required this.appBody,
this.appToolTitles,
required this.appToolTitles,
this.actionDrawer,
required this.selectedbodyIndex,
required this.onIndexChange,
@@ -173,10 +173,7 @@ class _MihPackageState extends State<MihPackage>
// color: Colors.black,
child: FittedBox(
child: Text(
widget.appToolTitles != null
? widget
.appToolTitles![widget.selectedbodyIndex]
: "",
widget.appToolTitles[widget.selectedbodyIndex],
style: const TextStyle(
fontSize: 23,
fontWeight: FontWeight.w600,

View File

@@ -20,6 +20,7 @@ class _MihAuthForgotPasswordState extends State<MihAuthForgotPassword> {
return MihPackage(
appActionButton: getAction(),
appTools: getTools(),
appToolTitles: ["Forgot Password"],
appBody: getToolBody(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {

View File

@@ -26,6 +26,7 @@ class _MihAuthPasswordResetState extends State<MihAuthPasswordReset> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: ["Reset Password"],
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {
setState(() {

View File

@@ -23,6 +23,7 @@ class _MihAuthenticationState extends State<MihAuthentication> {
appActionButton: getAction(),
appTools: getTools(),
appBody: getToolBody(),
appToolTitles: getToolTitle(),
selectedbodyIndex: context.watch<MihAuthenticationProvider>().toolIndex,
onIndexChange: (newIndex) {
context.read<MihAuthenticationProvider>().setToolIndex(newIndex);
@@ -35,6 +36,14 @@ class _MihAuthenticationState extends State<MihAuthentication> {
return toolBodies;
}
List<String> getToolTitle() {
List<String> toolTitles = [
"Sign In",
"Create an Account",
];
return toolTitles;
}
MihPackageTools getTools() {
Map<Widget, void Function()?> temp = {};
temp[const Icon(Icons.perm_identity)] = () {

View File

@@ -27,6 +27,7 @@ class _MihHomeErrorState extends State<MihHomeError> {
return MihPackage(
appActionButton: getErrorAction(),
appTools: getErrorTools(),
appToolTitles: ["Connection Error"],
appBody: getErrorToolBody(widget.errorMessage),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {

View File

@@ -26,6 +26,7 @@ class _MihRouteErrorState extends State<MihRouteError> {
return MihPackage(
appActionButton: getErrorAction(),
appTools: getErrorTools(),
appToolTitles: ["Invalid Path"],
appBody: getErrorToolBody(),
selectedbodyIndex: _selcetedIndex,
onIndexChange: (newValue) {

View File

@@ -62,6 +62,7 @@ class _BusinesProfileState extends State<BusinesProfile> {
return MihPackage(
appActionButton: getAction(),
appTools: getTools(),
appToolTitles: getToolTitle(),
appBody: getToolBody(),
selectedbodyIndex: mzansiProfileProvider.businessIndex,
onIndexChange: (newIndex) {