mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-16 13:12:43 -04:00
clean up context locators
This commit is contained in:
parent
751022e743
commit
2ccad50f9a
31 changed files with 603 additions and 542 deletions
|
@ -21,7 +21,6 @@ part 'router_cubit.g.dart';
|
|||
|
||||
final _rootNavKey = GlobalKey<NavigatorState>(debugLabel: 'rootNavKey');
|
||||
final _homeNavKey = GlobalKey<NavigatorState>(debugLabel: 'homeNavKey');
|
||||
final _activeNavKey = GlobalKey<NavigatorState>(debugLabel: 'activeNavKey');
|
||||
|
||||
@freezed
|
||||
class RouterState with _$RouterState {
|
||||
|
@ -69,20 +68,14 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
navigatorKey: _homeNavKey,
|
||||
builder: (context, state, child) => HomeShell(child: child),
|
||||
routes: [
|
||||
ShellRoute(
|
||||
navigatorKey: _activeNavKey,
|
||||
builder: (context, state, child) =>
|
||||
HomeAccountReadyShell(context: context, child: child),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => const HomeAccountReadyMain(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/chat',
|
||||
builder: (context, state) => const HomeAccountReadyChat(),
|
||||
),
|
||||
]),
|
||||
GoRoute(
|
||||
path: '/',
|
||||
builder: (context, state) => const HomeAccountReadyMain(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/chat',
|
||||
builder: (context, state) => const HomeAccountReadyChat(),
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue