From 4a293c0aa49843a70eea40a02df0f4eddef5c1f3 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Tue, 25 Nov 2025 10:45:39 +0200 Subject: [PATCH] add toot titles to missing packages --- Frontend/lib/mih_package_components/mih_package.dart | 9 +++------ .../mih_authentication/mih_auth_forgot_password.dart | 1 + .../mih_authentication/mih_auth_password_reset.dart | 1 + .../mih_authentication/mih_authentication.dart | 9 +++++++++ Frontend/lib/mih_packages/mih_home/mih_home_error.dart | 1 + Frontend/lib/mih_packages/mih_home/mih_route_error.dart | 1 + .../mzansi_profile/business_profile/busines_profile.dart | 1 + 7 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Frontend/lib/mih_package_components/mih_package.dart b/Frontend/lib/mih_package_components/mih_package.dart index 7665556d..41d710ed 100644 --- a/Frontend/lib/mih_package_components/mih_package.dart +++ b/Frontend/lib/mih_package_components/mih_package.dart @@ -12,7 +12,7 @@ class MihPackage extends StatefulWidget { final Widget appActionButton; final MihPackageTools appTools; final List appBody; - final List? appToolTitles; + final List 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 // 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, diff --git a/Frontend/lib/mih_packages/mih_authentication/mih_auth_forgot_password.dart b/Frontend/lib/mih_packages/mih_authentication/mih_auth_forgot_password.dart index 1f8ae2df..1e9e0397 100644 --- a/Frontend/lib/mih_packages/mih_authentication/mih_auth_forgot_password.dart +++ b/Frontend/lib/mih_packages/mih_authentication/mih_auth_forgot_password.dart @@ -20,6 +20,7 @@ class _MihAuthForgotPasswordState extends State { return MihPackage( appActionButton: getAction(), appTools: getTools(), + appToolTitles: ["Forgot Password"], appBody: getToolBody(), selectedbodyIndex: _selcetedIndex, onIndexChange: (newValue) { diff --git a/Frontend/lib/mih_packages/mih_authentication/mih_auth_password_reset.dart b/Frontend/lib/mih_packages/mih_authentication/mih_auth_password_reset.dart index 67fbcd50..1e22987d 100644 --- a/Frontend/lib/mih_packages/mih_authentication/mih_auth_password_reset.dart +++ b/Frontend/lib/mih_packages/mih_authentication/mih_auth_password_reset.dart @@ -26,6 +26,7 @@ class _MihAuthPasswordResetState extends State { appActionButton: getAction(), appTools: getTools(), appBody: getToolBody(), + appToolTitles: ["Reset Password"], selectedbodyIndex: _selcetedIndex, onIndexChange: (newValue) { setState(() { diff --git a/Frontend/lib/mih_packages/mih_authentication/mih_authentication.dart b/Frontend/lib/mih_packages/mih_authentication/mih_authentication.dart index 0e6c09a8..2a3407a7 100644 --- a/Frontend/lib/mih_packages/mih_authentication/mih_authentication.dart +++ b/Frontend/lib/mih_packages/mih_authentication/mih_authentication.dart @@ -23,6 +23,7 @@ class _MihAuthenticationState extends State { appActionButton: getAction(), appTools: getTools(), appBody: getToolBody(), + appToolTitles: getToolTitle(), selectedbodyIndex: context.watch().toolIndex, onIndexChange: (newIndex) { context.read().setToolIndex(newIndex); @@ -35,6 +36,14 @@ class _MihAuthenticationState extends State { return toolBodies; } + List getToolTitle() { + List toolTitles = [ + "Sign In", + "Create an Account", + ]; + return toolTitles; + } + MihPackageTools getTools() { Map temp = {}; temp[const Icon(Icons.perm_identity)] = () { diff --git a/Frontend/lib/mih_packages/mih_home/mih_home_error.dart b/Frontend/lib/mih_packages/mih_home/mih_home_error.dart index f956a808..05f05368 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_home_error.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_home_error.dart @@ -27,6 +27,7 @@ class _MihHomeErrorState extends State { return MihPackage( appActionButton: getErrorAction(), appTools: getErrorTools(), + appToolTitles: ["Connection Error"], appBody: getErrorToolBody(widget.errorMessage), selectedbodyIndex: _selcetedIndex, onIndexChange: (newValue) { diff --git a/Frontend/lib/mih_packages/mih_home/mih_route_error.dart b/Frontend/lib/mih_packages/mih_home/mih_route_error.dart index 728bc740..51a541c6 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_route_error.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_route_error.dart @@ -26,6 +26,7 @@ class _MihRouteErrorState extends State { return MihPackage( appActionButton: getErrorAction(), appTools: getErrorTools(), + appToolTitles: ["Invalid Path"], appBody: getErrorToolBody(), selectedbodyIndex: _selcetedIndex, onIndexChange: (newValue) { diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/busines_profile.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/busines_profile.dart index a047ba30..f03544de 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/busines_profile.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/busines_profile.dart @@ -62,6 +62,7 @@ class _BusinesProfileState extends State { return MihPackage( appActionButton: getAction(), appTools: getTools(), + appToolTitles: getToolTitle(), appBody: getToolBody(), selectedbodyIndex: mzansiProfileProvider.businessIndex, onIndexChange: (newIndex) {