refactor: enhance child route management in ClientPaths and StaffPaths; ensure proper handling of empty child paths

This commit is contained in:
Achintha Isuru
2026-02-04 17:58:37 -05:00
parent fa6fa90bb8
commit b5c3af580c
6 changed files with 53 additions and 20 deletions

View File

@@ -37,7 +37,7 @@ class ClientSignInPage extends StatelessWidget {
final TranslationsClientAuthenticationSignInPageEn i18n = t.client_authentication.sign_in_page;
final ClientAuthBloc authBloc = Modular.get<ClientAuthBloc>();
return BlocProvider.value(
return BlocProvider<ClientAuthBloc>.value(
value: authBloc,
child: BlocConsumer<ClientAuthBloc, ClientAuthState>(
listener: (BuildContext context, ClientAuthState state) {

View File

@@ -47,6 +47,9 @@ class ClientHomeModule extends Module {
@override
void routes(RouteManager r) {
r.child(ClientPaths.childRoute(ClientPaths.home, ClientPaths.home), child: (_) => const ClientHomePage());
r.child(
ClientPaths.childRoute(ClientPaths.home, ClientPaths.home),
child: (_) => const ClientHomePage(),
);
}
}