NEW: MIH Access Controlls Provider Setup

This commit is contained in:
2025-10-21 15:42:38 +02:00
parent 926b749fa8
commit b0d38b4b11
11 changed files with 167 additions and 264 deletions

View File

@@ -321,8 +321,7 @@ class MihGoRouter {
name: "mihAccess",
path: MihGoRouterPaths.mihAccess,
builder: (BuildContext context, GoRouterState state) {
final AppUser? signedInUser = state.extra as AppUser?;
if (signedInUser == null) {
if (context.watch<MzansiProfileProvider>().business == null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.go(MihGoRouterPaths.mihHome);
});
@@ -330,7 +329,6 @@ class MihGoRouter {
}
return MihAccess(
key: UniqueKey(),
signedInUser: signedInUser,
);
},
),