fix route paths
This commit is contained in:
@@ -2,7 +2,7 @@ part of 'routes.dart';
|
|||||||
|
|
||||||
@TypedGoRoute<BangCategoriesRoute>(
|
@TypedGoRoute<BangCategoriesRoute>(
|
||||||
name: 'BangRoute',
|
name: 'BangRoute',
|
||||||
path: 'bangs',
|
path: '/bangs',
|
||||||
routes: [
|
routes: [
|
||||||
TypedGoRoute<BangSearchRoute>(
|
TypedGoRoute<BangSearchRoute>(
|
||||||
name: 'BangSearchRoute',
|
name: 'BangSearchRoute',
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ part 'routes.settings.dart';
|
|||||||
part 'routes.browser.dart';
|
part 'routes.browser.dart';
|
||||||
part 'routes.bangs.dart';
|
part 'routes.bangs.dart';
|
||||||
|
|
||||||
@TypedGoRoute<AboutRoute>(name: 'AboutRoute', path: 'about')
|
@TypedGoRoute<AboutRoute>(name: 'AboutRoute', path: '/about')
|
||||||
class AboutRoute extends GoRouteData {
|
class AboutRoute extends GoRouteData {
|
||||||
@override
|
@override
|
||||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||||
@@ -34,7 +34,7 @@ class AboutRoute extends GoRouteData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TypedGoRoute<UserAuthRoute>(name: 'UserAuthRoute', path: 'userAuth')
|
@TypedGoRoute<UserAuthRoute>(name: 'UserAuthRoute', path: '/userAuth')
|
||||||
class UserAuthRoute extends GoRouteData {
|
class UserAuthRoute extends GoRouteData {
|
||||||
@override
|
@override
|
||||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ List<RouteBase> get $appRoutes => [
|
|||||||
];
|
];
|
||||||
|
|
||||||
RouteBase get $aboutRoute => GoRouteData.$route(
|
RouteBase get $aboutRoute => GoRouteData.$route(
|
||||||
path: 'about',
|
path: '/about',
|
||||||
name: 'AboutRoute',
|
name: 'AboutRoute',
|
||||||
factory: $AboutRouteExtension._fromState,
|
factory: $AboutRouteExtension._fromState,
|
||||||
);
|
);
|
||||||
@@ -24,7 +24,7 @@ extension $AboutRouteExtension on AboutRoute {
|
|||||||
static AboutRoute _fromState(GoRouterState state) => AboutRoute();
|
static AboutRoute _fromState(GoRouterState state) => AboutRoute();
|
||||||
|
|
||||||
String get location => GoRouteData.$location(
|
String get location => GoRouteData.$location(
|
||||||
'about',
|
'/about',
|
||||||
);
|
);
|
||||||
|
|
||||||
void go(BuildContext context) => context.go(location);
|
void go(BuildContext context) => context.go(location);
|
||||||
@@ -38,7 +38,7 @@ extension $AboutRouteExtension on AboutRoute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RouteBase get $userAuthRoute => GoRouteData.$route(
|
RouteBase get $userAuthRoute => GoRouteData.$route(
|
||||||
path: 'userAuth',
|
path: '/userAuth',
|
||||||
name: 'UserAuthRoute',
|
name: 'UserAuthRoute',
|
||||||
factory: $UserAuthRouteExtension._fromState,
|
factory: $UserAuthRouteExtension._fromState,
|
||||||
);
|
);
|
||||||
@@ -47,7 +47,7 @@ extension $UserAuthRouteExtension on UserAuthRoute {
|
|||||||
static UserAuthRoute _fromState(GoRouterState state) => UserAuthRoute();
|
static UserAuthRoute _fromState(GoRouterState state) => UserAuthRoute();
|
||||||
|
|
||||||
String get location => GoRouteData.$location(
|
String get location => GoRouteData.$location(
|
||||||
'userAuth',
|
'/userAuth',
|
||||||
);
|
);
|
||||||
|
|
||||||
void go(BuildContext context) => context.go(location);
|
void go(BuildContext context) => context.go(location);
|
||||||
@@ -375,7 +375,7 @@ extension $ContainerEditRouteExtension on ContainerEditRoute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RouteBase get $bangCategoriesRoute => GoRouteData.$route(
|
RouteBase get $bangCategoriesRoute => GoRouteData.$route(
|
||||||
path: 'bangs',
|
path: '/bangs',
|
||||||
name: 'BangRoute',
|
name: 'BangRoute',
|
||||||
factory: $BangCategoriesRouteExtension._fromState,
|
factory: $BangCategoriesRouteExtension._fromState,
|
||||||
routes: [
|
routes: [
|
||||||
@@ -404,7 +404,7 @@ extension $BangCategoriesRouteExtension on BangCategoriesRoute {
|
|||||||
BangCategoriesRoute();
|
BangCategoriesRoute();
|
||||||
|
|
||||||
String get location => GoRouteData.$location(
|
String get location => GoRouteData.$location(
|
||||||
'bangs',
|
'/bangs',
|
||||||
);
|
);
|
||||||
|
|
||||||
void go(BuildContext context) => context.go(location);
|
void go(BuildContext context) => context.go(location);
|
||||||
@@ -424,7 +424,7 @@ extension $BangSearchRouteExtension on BangSearchRoute {
|
|||||||
);
|
);
|
||||||
|
|
||||||
String get location => GoRouteData.$location(
|
String get location => GoRouteData.$location(
|
||||||
'bangs/search/${Uri.encodeComponent(searchText)}',
|
'/bangs/search/${Uri.encodeComponent(searchText)}',
|
||||||
);
|
);
|
||||||
|
|
||||||
void go(BuildContext context) => context.go(location);
|
void go(BuildContext context) => context.go(location);
|
||||||
@@ -443,7 +443,7 @@ extension $BangCategoryRouteExtension on BangCategoryRoute {
|
|||||||
);
|
);
|
||||||
|
|
||||||
String get location => GoRouteData.$location(
|
String get location => GoRouteData.$location(
|
||||||
'bangs/category/${Uri.encodeComponent(category)}',
|
'/bangs/category/${Uri.encodeComponent(category)}',
|
||||||
);
|
);
|
||||||
|
|
||||||
void go(BuildContext context) => context.go(location);
|
void go(BuildContext context) => context.go(location);
|
||||||
@@ -464,7 +464,7 @@ extension $BangSubCategoryRouteExtension on BangSubCategoryRoute {
|
|||||||
);
|
);
|
||||||
|
|
||||||
String get location => GoRouteData.$location(
|
String get location => GoRouteData.$location(
|
||||||
'bangs/category/${Uri.encodeComponent(category)}/${Uri.encodeComponent(subCategory)}',
|
'/bangs/category/${Uri.encodeComponent(category)}/${Uri.encodeComponent(subCategory)}',
|
||||||
);
|
);
|
||||||
|
|
||||||
void go(BuildContext context) => context.go(location);
|
void go(BuildContext context) => context.go(location);
|
||||||
|
|||||||
Reference in New Issue
Block a user