mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05: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);
|
AppRouter(this.ref) : super(navigatorKey: rootNavigatorKey);
|
||||||
|
|
||||||
@override
|
@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(
|
AutoRouteGuardCallback(
|
||||||
(resolver, router) async {
|
(resolver, router) async {
|
||||||
final auth = await ref.read(authenticationProvider.future);
|
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(
|
AutoRoute(
|
||||||
path: "home/genres",
|
path: "home/genres",
|
||||||
|
Loading…
Reference in New Issue
Block a user