mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
chore: fix routes not working when initially signing in
This commit is contained in:
parent
1c56617955
commit
4ea0523692
@ -15,7 +15,17 @@ class AppRouter extends RootStackRouter {
|
||||
AppRouter(this.ref) : super(navigatorKey: rootNavigatorKey);
|
||||
|
||||
@override
|
||||
List<AutoRouteGuard> get guards => [
|
||||
List<AutoRoute> get routes => [
|
||||
AutoRoute(
|
||||
page: RootAppRoute.page,
|
||||
path: "/",
|
||||
initial: true,
|
||||
children: [
|
||||
AutoRoute(
|
||||
path: "home",
|
||||
page: HomeRoute.page,
|
||||
initial: true,
|
||||
guards: [
|
||||
AutoRouteGuardCallback(
|
||||
(resolver, router) async {
|
||||
final auth = await ref.read(authenticationProvider.future);
|
||||
@ -27,19 +37,7 @@ class AppRouter extends RootStackRouter {
|
||||
}
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
List<AutoRoute> get routes => [
|
||||
AutoRoute(
|
||||
page: RootAppRoute.page,
|
||||
path: "/",
|
||||
initial: true,
|
||||
children: [
|
||||
AutoRoute(
|
||||
path: "home",
|
||||
page: HomeRoute.page,
|
||||
initial: true,
|
||||
],
|
||||
),
|
||||
AutoRoute(
|
||||
path: "home/genres",
|
||||
|
Loading…
Reference in New Issue
Block a user