add toot titles to missing packages
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -20,6 +20,7 @@ class _MihAuthForgotPasswordState extends State<MihAuthForgotPassword> {
|
||||
return MihPackage(
|
||||
appActionButton: getAction(),
|
||||
appTools: getTools(),
|
||||
appToolTitles: ["Forgot Password"],
|
||||
appBody: getToolBody(),
|
||||
selectedbodyIndex: _selcetedIndex,
|
||||
onIndexChange: (newValue) {
|
||||
|
||||
@@ -26,6 +26,7 @@ class _MihAuthPasswordResetState extends State<MihAuthPasswordReset> {
|
||||
appActionButton: getAction(),
|
||||
appTools: getTools(),
|
||||
appBody: getToolBody(),
|
||||
appToolTitles: ["Reset Password"],
|
||||
selectedbodyIndex: _selcetedIndex,
|
||||
onIndexChange: (newValue) {
|
||||
setState(() {
|
||||
|
||||
@@ -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)] = () {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -26,6 +26,7 @@ class _MihRouteErrorState extends State<MihRouteError> {
|
||||
return MihPackage(
|
||||
appActionButton: getErrorAction(),
|
||||
appTools: getErrorTools(),
|
||||
appToolTitles: ["Invalid Path"],
|
||||
appBody: getErrorToolBody(),
|
||||
selectedbodyIndex: _selcetedIndex,
|
||||
onIndexChange: (newValue) {
|
||||
|
||||
@@ -62,6 +62,7 @@ class _BusinesProfileState extends State<BusinesProfile> {
|
||||
return MihPackage(
|
||||
appActionButton: getAction(),
|
||||
appTools: getTools(),
|
||||
appToolTitles: getToolTitle(),
|
||||
appBody: getToolBody(),
|
||||
selectedbodyIndex: mzansiProfileProvider.businessIndex,
|
||||
onIndexChange: (newIndex) {
|
||||
|
||||
Reference in New Issue
Block a user