NEW: fix home nav
This commit is contained in:
@@ -43,6 +43,11 @@ class MzansiProfileProvider extends ChangeNotifier {
|
|||||||
userConsent = null;
|
userConsent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setPersonalHome(bool isPersonalHome) {
|
||||||
|
personalHome = isPersonalHome;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
void setPersonalIndex(int index) {
|
void setPersonalIndex(int index) {
|
||||||
personalIndex = index;
|
personalIndex = index;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|||||||
@@ -146,12 +146,7 @@ class MihGoRouter {
|
|||||||
path: MihGoRouterPaths.aboutMih,
|
path: MihGoRouterPaths.aboutMih,
|
||||||
builder: (BuildContext context, GoRouterState state) {
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
KenLogger.success("MihGoRouter: aboutMih");
|
KenLogger.success("MihGoRouter: aboutMih");
|
||||||
final bool? args = state.extra as bool?;
|
return AboutMih();
|
||||||
bool personalSelected = true;
|
|
||||||
if (args != null) {
|
|
||||||
personalSelected = args;
|
|
||||||
}
|
|
||||||
return AboutMih(personalSelected: personalSelected);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== Mzansi Profile Personal ==================================
|
// ========================== Mzansi Profile Personal ==================================
|
||||||
@@ -237,12 +232,7 @@ class MihGoRouter {
|
|||||||
path: MihGoRouterPaths.calculator,
|
path: MihGoRouterPaths.calculator,
|
||||||
builder: (BuildContext context, GoRouterState state) {
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
KenLogger.success("MihGoRouter: mihCalculator");
|
KenLogger.success("MihGoRouter: mihCalculator");
|
||||||
final bool? personalSelected = state.extra as bool?;
|
return MIHCalculator();
|
||||||
bool personal = true;
|
|
||||||
if (personalSelected != null) {
|
|
||||||
personal = personalSelected;
|
|
||||||
}
|
|
||||||
return MIHCalculator(personalSelected: personal);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ========================== MIH Calculator ==================================
|
// ========================== MIH Calculator ==================================
|
||||||
|
|||||||
@@ -11,12 +11,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class AboutMih extends StatefulWidget {
|
class AboutMih extends StatefulWidget {
|
||||||
final bool? personalSelected;
|
|
||||||
// final AboutArguments? arguments;
|
|
||||||
const AboutMih({
|
const AboutMih({
|
||||||
super.key,
|
super.key,
|
||||||
// this.arguments,
|
|
||||||
this.personalSelected,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -24,18 +20,9 @@ class AboutMih extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AboutMihState extends State<AboutMih> {
|
class _AboutMihState extends State<AboutMih> {
|
||||||
late bool _personalSelected;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
setState(() {
|
|
||||||
if (widget.personalSelected == null) {
|
|
||||||
_personalSelected = true;
|
|
||||||
} else {
|
|
||||||
_personalSelected = widget.personalSelected!;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -59,7 +46,6 @@ class _AboutMihState extends State<AboutMih> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: _personalSelected,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ class _MihAccessState extends State<MihAccess> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: true,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ import 'package:mzansi_innovation_hub/mih_services/mih_currency_exchange_rate_se
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class MIHCalculator extends StatefulWidget {
|
class MIHCalculator extends StatefulWidget {
|
||||||
final bool personalSelected;
|
|
||||||
const MIHCalculator({
|
const MIHCalculator({
|
||||||
super.key,
|
super.key,
|
||||||
required this.personalSelected,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -57,7 +55,6 @@ class _MIHCalculatorState extends State<MIHCalculator> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: widget.personalSelected,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
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:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
@@ -12,13 +11,8 @@ import '../../../main.dart';
|
|||||||
import 'package:supertokens_flutter/supertokens.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
|
|
||||||
class MIHAppDrawer extends StatefulWidget {
|
class MIHAppDrawer extends StatefulWidget {
|
||||||
final AppUser signedInUser;
|
|
||||||
final ImageProvider<Object>? propicFile;
|
|
||||||
|
|
||||||
const MIHAppDrawer({
|
const MIHAppDrawer({
|
||||||
super.key,
|
super.key,
|
||||||
required this.signedInUser,
|
|
||||||
required this.propicFile,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -35,19 +29,23 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget displayProPic() {
|
Widget displayProPic(MzansiProfileProvider mzansiProfileProvider) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
if (mzansiProfileProvider.personalHome) {
|
||||||
'mzansiProfileManage',
|
context.goNamed(
|
||||||
extra: AppProfileUpdateArguments(
|
'mzansiProfileManage',
|
||||||
widget.signedInUser,
|
);
|
||||||
widget.propicFile,
|
} else {
|
||||||
),
|
context.goNamed(
|
||||||
);
|
"businessProfileManage",
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: MihCircleAvatar(
|
child: MihCircleAvatar(
|
||||||
imageFile: widget.propicFile,
|
imageFile: mzansiProfileProvider.personalHome
|
||||||
|
? mzansiProfileProvider.userProfilePicture
|
||||||
|
: mzansiProfileProvider.businessProfilePicture,
|
||||||
width: 60,
|
width: 60,
|
||||||
editable: false,
|
editable: false,
|
||||||
fileNameController: proPicController,
|
fileNameController: proPicController,
|
||||||
@@ -69,9 +67,6 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
setState(() {
|
|
||||||
profilePictureLoaded = displayProPic();
|
|
||||||
});
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,38 +97,74 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
"Dark"),
|
"Dark"),
|
||||||
),
|
),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 400,
|
// height: 300,
|
||||||
width: constraints.maxWidth,
|
width: constraints.maxWidth,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
profilePictureLoaded,
|
displayProPic(mzansiProfileProvider),
|
||||||
Text(
|
Visibility(
|
||||||
"${widget.signedInUser.fname} ${widget.signedInUser.lname}",
|
visible: !mzansiProfileProvider.personalHome,
|
||||||
style: TextStyle(
|
child: Text(
|
||||||
fontWeight: FontWeight.bold,
|
mzansiProfileProvider.business!.Name,
|
||||||
color: MihColors.getPrimaryColor(
|
style: TextStyle(
|
||||||
MzansiInnovationHub.of(context)!
|
fontWeight: FontWeight.bold,
|
||||||
.theme
|
color: MihColors.getPrimaryColor(
|
||||||
.mode ==
|
MzansiInnovationHub.of(context)!
|
||||||
"Dark"),
|
.theme
|
||||||
|
.mode ==
|
||||||
|
"Dark"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: mzansiProfileProvider.personalHome,
|
||||||
|
child: Text(
|
||||||
|
"${mzansiProfileProvider.user!.fname} ${mzansiProfileProvider.user!.lname}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
|
"Dark"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: !mzansiProfileProvider.personalHome,
|
||||||
|
child: Text(
|
||||||
|
mzansiProfileProvider.business!.type,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
|
"Dark"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: mzansiProfileProvider.personalHome,
|
||||||
|
child: Text(
|
||||||
|
"@${mzansiProfileProvider.user!.username}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.mode ==
|
||||||
|
"Dark"),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"@${widget.signedInUser.username}",
|
mzansiProfileProvider.user!.type
|
||||||
style: TextStyle(
|
.toUpperCase(),
|
||||||
fontSize: 12,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.mode ==
|
|
||||||
"Dark"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
widget.signedInUser.type.toUpperCase(),
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
@@ -39,8 +39,6 @@ class MihHome extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MihHomeState extends State<MihHome> {
|
class _MihHomeState extends State<MihHome> {
|
||||||
late int _selcetedIndex;
|
|
||||||
late bool _personalHome;
|
|
||||||
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;
|
||||||
@@ -206,13 +204,6 @@ class _MihHomeState extends State<MihHome> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (context.read<MzansiProfileProvider>().personalHome == true) {
|
|
||||||
_selcetedIndex = 0;
|
|
||||||
_personalHome = true;
|
|
||||||
} else {
|
|
||||||
_selcetedIndex = 1;
|
|
||||||
_personalHome = false;
|
|
||||||
}
|
|
||||||
_loadInitialData();
|
_loadInitialData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,26 +240,16 @@ class _MihHomeState extends State<MihHome> {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
child: MihPackage(
|
child: MihPackage(
|
||||||
appActionButton: getAction(
|
appActionButton: getAction(),
|
||||||
mzansiProfileProvider.userProfilePicUrl as String),
|
appTools: getTools(mzansiProfileProvider,
|
||||||
appTools: getTools(
|
|
||||||
mzansiProfileProvider.user!.type != "personal"),
|
mzansiProfileProvider.user!.type != "personal"),
|
||||||
appBody: getToolBody(),
|
appBody: getToolBody(mzansiProfileProvider),
|
||||||
appToolTitles: getToolTitle(),
|
appToolTitles: getToolTitle(),
|
||||||
actionDrawer: getActionDrawer(),
|
actionDrawer: getActionDrawer(),
|
||||||
selectedbodyIndex: _selcetedIndex,
|
selectedbodyIndex:
|
||||||
|
mzansiProfileProvider.personalHome ? 0 : 1,
|
||||||
onIndexChange: (newValue) {
|
onIndexChange: (newValue) {
|
||||||
if (_selcetedIndex == 0) {
|
mzansiProfileProvider.setPersonalHome(newValue == 0);
|
||||||
setState(() {
|
|
||||||
_selcetedIndex = newValue;
|
|
||||||
_personalHome = true;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setState(() {
|
|
||||||
_selcetedIndex = newValue;
|
|
||||||
_personalHome = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -474,81 +455,88 @@ class _MihHomeState extends State<MihHome> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getAction(String proPicUrl) {
|
Widget getAction() {
|
||||||
return Builder(builder: (context) {
|
return Builder(builder: (context) {
|
||||||
return MihPackageAction(
|
return Consumer<MzansiProfileProvider>(
|
||||||
icon: Padding(
|
builder: (BuildContext context,
|
||||||
padding: const EdgeInsets.only(left: 5.0),
|
MzansiProfileProvider mzansiProfileProvider, Widget? child) {
|
||||||
child: MihCircleAvatar(
|
ImageProvider<Object>? currentImage;
|
||||||
imageFile: proPicUrl != "" ? NetworkImage(proPicUrl) : null,
|
String imageKey;
|
||||||
width: 50,
|
if (mzansiProfileProvider.personalHome) {
|
||||||
editable: false,
|
currentImage = mzansiProfileProvider.userProfilePicture;
|
||||||
fileNameController: null,
|
imageKey = 'user_${mzansiProfileProvider.userProfilePicUrl}';
|
||||||
userSelectedfile: null,
|
} else {
|
||||||
// frameColor: frameColor,
|
currentImage = mzansiProfileProvider.businessProfilePicture;
|
||||||
frameColor: MihColors.getSecondaryColor(
|
imageKey =
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
'business_${mzansiProfileProvider.businessProfilePicUrl}';
|
||||||
backgroundColor: MihColors.getPrimaryColor(
|
}
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
return MihPackageAction(
|
||||||
onChange: (_) {},
|
icon: Padding(
|
||||||
),
|
padding: const EdgeInsets.only(left: 5.0),
|
||||||
),
|
child: MihCircleAvatar(
|
||||||
iconSize: 45,
|
key: Key(imageKey),
|
||||||
onTap: () {
|
imageFile: currentImage,
|
||||||
Scaffold.of(context).openDrawer();
|
width: 50,
|
||||||
FocusScope.of(context)
|
editable: false,
|
||||||
.requestFocus(FocusNode()); // Fully unfocus all fields
|
fileNameController: null,
|
||||||
// FocusScope.of(context).unfocus(); // Unfocus any text fields
|
userSelectedfile: null,
|
||||||
|
// frameColor: frameColor,
|
||||||
|
frameColor: MihColors.getSecondaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
backgroundColor: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
onChange: (_) {},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
iconSize: 45,
|
||||||
|
onTap: () {
|
||||||
|
Scaffold.of(context).openDrawer();
|
||||||
|
FocusScope.of(context)
|
||||||
|
.requestFocus(FocusNode()); // Fully unfocus all fields
|
||||||
|
// FocusScope.of(context).unfocus(); // Unfocus any text fields
|
||||||
|
},
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
MIHAppDrawer getActionDrawer() {
|
MIHAppDrawer getActionDrawer() {
|
||||||
AppUser signedInUser =
|
return MIHAppDrawer();
|
||||||
context.watch<MzansiProfileProvider>().user as AppUser;
|
|
||||||
String proPicUrl =
|
|
||||||
context.watch<MzansiProfileProvider>().userProfilePicUrl ?? "";
|
|
||||||
return MIHAppDrawer(
|
|
||||||
signedInUser: signedInUser,
|
|
||||||
propicFile: proPicUrl != "" ? NetworkImage(proPicUrl) : null,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MihPackageTools getTools(bool isBusinessUser) {
|
MihPackageTools getTools(
|
||||||
|
MzansiProfileProvider mzansiProfileProvider, bool isBusinessUser) {
|
||||||
Map<Widget, void Function()?> temp = {};
|
Map<Widget, void Function()?> temp = {};
|
||||||
temp[const Icon(Icons.person)] = () {
|
temp[const Icon(Icons.person)] = () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selcetedIndex = 0;
|
mzansiProfileProvider.setPersonalHome(true);
|
||||||
_personalHome = true;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
if (isBusinessUser) {
|
if (isBusinessUser) {
|
||||||
temp[const Icon(Icons.business_center)] = () {
|
temp[const Icon(Icons.business_center)] = () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selcetedIndex = 1;
|
mzansiProfileProvider.setPersonalHome(false);
|
||||||
_personalHome = false;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return MihPackageTools(
|
return MihPackageTools(
|
||||||
tools: temp,
|
tools: temp,
|
||||||
selcetedIndex: _selcetedIndex,
|
selcetedIndex: mzansiProfileProvider.personalHome ? 0 : 1,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> getToolBody() {
|
List<Widget> getToolBody(MzansiProfileProvider mzansiProfileProvider) {
|
||||||
List<Widget> toolBodies = [];
|
List<Widget> toolBodies = [];
|
||||||
AppUser? user = context.watch<MzansiProfileProvider>().user;
|
AppUser? user = mzansiProfileProvider.user;
|
||||||
Business? business = context.watch<MzansiProfileProvider>().business;
|
Business? business = mzansiProfileProvider.business;
|
||||||
BusinessUser? businessUser =
|
BusinessUser? businessUser = mzansiProfileProvider.businessUser;
|
||||||
context.watch<MzansiProfileProvider>().businessUser;
|
|
||||||
String userProfilePictureUrl =
|
String userProfilePictureUrl =
|
||||||
context.watch<MzansiProfileProvider>().userProfilePicUrl ?? "";
|
mzansiProfileProvider.userProfilePicUrl ?? "";
|
||||||
toolBodies.add(
|
toolBodies.add(
|
||||||
MihPersonalHome(
|
MihPersonalHome(
|
||||||
signedInUser: user!,
|
signedInUser: user!,
|
||||||
personalSelected: _personalHome,
|
personalSelected: mzansiProfileProvider.personalHome,
|
||||||
business: business,
|
business: business,
|
||||||
businessUser: businessUser,
|
businessUser: businessUser,
|
||||||
propicFile: userProfilePictureUrl != ""
|
propicFile: userProfilePictureUrl != ""
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ class _MzansiAiState extends State<MzansiAi> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: widget.arguments.personalSelected,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ class _MzansiDirectoryState extends State<MzansiDirectory> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: widget.arguments.personalSearch,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ class _MzansiBusinessProfileState extends State<MzansiBusinessProfile> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: false,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
context.read<MzansiProfileProvider>().setBusinessIndex(0);
|
context.read<MzansiProfileProvider>().setBusinessIndex(0);
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ class _MzansiProfileState extends State<MzansiProfile> {
|
|||||||
// Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: true,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ class _MihWalletState extends State<MihWallet> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: true,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ class _PatManagerState extends State<PatManager> {
|
|||||||
// Navigator.of(context).pop();
|
// Navigator.of(context).pop();
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: false,
|
|
||||||
);
|
);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ class _PatientProfileState extends State<PatientProfile> {
|
|||||||
} else {
|
} else {
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
extra: true,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
|
|||||||
Reference in New Issue
Block a user