increase min sdk and apply new formatter
This commit is contained in:
@@ -27,14 +27,14 @@ class DialogPage<T> extends Page<T> {
|
||||
|
||||
@override
|
||||
Route<T> createRoute(BuildContext context) => DialogRoute<T>(
|
||||
context: context,
|
||||
settings: this,
|
||||
builder: builder,
|
||||
anchorPoint: anchorPoint,
|
||||
barrierColor: barrierColor,
|
||||
barrierDismissible: barrierDismissible,
|
||||
barrierLabel: barrierLabel,
|
||||
useSafeArea: useSafeArea,
|
||||
themes: themes,
|
||||
);
|
||||
context: context,
|
||||
settings: this,
|
||||
builder: builder,
|
||||
anchorPoint: anchorPoint,
|
||||
barrierColor: barrierColor,
|
||||
barrierDismissible: barrierDismissible,
|
||||
barrierLabel: barrierLabel,
|
||||
useSafeArea: useSafeArea,
|
||||
themes: themes,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,22 +30,10 @@ part 'routes.g.dart';
|
||||
name: 'BrowserRoute',
|
||||
path: '/',
|
||||
routes: [
|
||||
TypedGoRoute<WebPageRoute>(
|
||||
name: 'WebPageRoute',
|
||||
path: 'page/:url',
|
||||
),
|
||||
TypedGoRoute<AboutRoute>(
|
||||
name: 'AboutRoute',
|
||||
path: 'about',
|
||||
),
|
||||
TypedGoRoute<UserAuthRoute>(
|
||||
name: 'UserAuthRoute',
|
||||
path: 'userAuth',
|
||||
),
|
||||
TypedGoRoute<SearchRoute>(
|
||||
name: 'SearchRoute',
|
||||
path: 'search/:searchText',
|
||||
),
|
||||
TypedGoRoute<WebPageRoute>(name: 'WebPageRoute', path: 'page/:url'),
|
||||
TypedGoRoute<AboutRoute>(name: 'AboutRoute', path: 'about'),
|
||||
TypedGoRoute<UserAuthRoute>(name: 'UserAuthRoute', path: 'userAuth'),
|
||||
TypedGoRoute<SearchRoute>(name: 'SearchRoute', path: 'search/:searchText'),
|
||||
TypedGoRoute<BangCategoriesRoute>(
|
||||
name: 'BangRoute',
|
||||
path: 'bangs',
|
||||
@@ -97,10 +85,11 @@ class WebPageRoute extends GoRouteData {
|
||||
@override
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
return DialogPage(
|
||||
builder: (_) => WebPageDialog(
|
||||
url: Uri.parse(url),
|
||||
precachedInfo: state.extra as WebPageInfo?,
|
||||
),
|
||||
builder:
|
||||
(_) => WebPageDialog(
|
||||
url: Uri.parse(url),
|
||||
precachedInfo: state.extra as WebPageInfo?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -130,9 +119,10 @@ class SearchRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return SearchScreen(
|
||||
initialSearchText: (searchText.isEmpty || searchText == emptySearchText)
|
||||
? null
|
||||
: searchText,
|
||||
initialSearchText:
|
||||
(searchText.isEmpty || searchText == emptySearchText)
|
||||
? null
|
||||
: searchText,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -181,9 +171,10 @@ class BangSearchRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return BangSearchScreen(
|
||||
initialSearchText: (searchText.isEmpty || searchText == emptySearchText)
|
||||
? null
|
||||
: searchText,
|
||||
initialSearchText:
|
||||
(searchText.isEmpty || searchText == emptySearchText)
|
||||
? null
|
||||
: searchText,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -221,10 +212,7 @@ class ContainerCreateRoute extends GoRouteData {
|
||||
name: 'GeneralSettingsRoute',
|
||||
path: 'general',
|
||||
),
|
||||
TypedGoRoute<BangSettingsRoute>(
|
||||
name: 'BangSettingsRoute',
|
||||
path: 'bang',
|
||||
),
|
||||
TypedGoRoute<BangSettingsRoute>(name: 'BangSettingsRoute', path: 'bang'),
|
||||
TypedGoRoute<WebEngineSettingsRoute>(
|
||||
name: 'WebEngineSettingsRoute',
|
||||
path: 'web_engine',
|
||||
@@ -328,10 +316,7 @@ class ChatArchiveDetailRoute extends GoRouteData {
|
||||
}
|
||||
}
|
||||
|
||||
@TypedGoRoute<TorProxyRoute>(
|
||||
name: 'TorProxyRoute',
|
||||
path: '/tor_proxy',
|
||||
)
|
||||
@TypedGoRoute<TorProxyRoute>(name: 'TorProxyRoute', path: '/tor_proxy')
|
||||
class TorProxyRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
|
||||
+150
-189
@@ -7,87 +7,85 @@ part of 'routes.dart';
|
||||
// **************************************************************************
|
||||
|
||||
List<RouteBase> get $appRoutes => [
|
||||
$browserRoute,
|
||||
$settingsRoute,
|
||||
$chatArchiveListRoute,
|
||||
$torProxyRoute,
|
||||
];
|
||||
$browserRoute,
|
||||
$settingsRoute,
|
||||
$chatArchiveListRoute,
|
||||
$torProxyRoute,
|
||||
];
|
||||
|
||||
RouteBase get $browserRoute => GoRouteData.$route(
|
||||
path: '/',
|
||||
name: 'BrowserRoute',
|
||||
factory: $BrowserRouteExtension._fromState,
|
||||
path: '/',
|
||||
name: 'BrowserRoute',
|
||||
factory: $BrowserRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'page/:url',
|
||||
name: 'WebPageRoute',
|
||||
factory: $WebPageRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'about',
|
||||
name: 'AboutRoute',
|
||||
factory: $AboutRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'userAuth',
|
||||
name: 'UserAuthRoute',
|
||||
factory: $UserAuthRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'search/:searchText',
|
||||
name: 'SearchRoute',
|
||||
factory: $SearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'bangs',
|
||||
name: 'BangRoute',
|
||||
factory: $BangCategoriesRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'page/:url',
|
||||
name: 'WebPageRoute',
|
||||
factory: $WebPageRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'about',
|
||||
name: 'AboutRoute',
|
||||
factory: $AboutRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'userAuth',
|
||||
name: 'UserAuthRoute',
|
||||
factory: $UserAuthRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'search/:searchText',
|
||||
name: 'SearchRoute',
|
||||
factory: $SearchRouteExtension._fromState,
|
||||
name: 'BangSearchRoute',
|
||||
factory: $BangSearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'bangs',
|
||||
name: 'BangRoute',
|
||||
factory: $BangCategoriesRouteExtension._fromState,
|
||||
path: 'category/:category',
|
||||
name: 'BangCategoryRoute',
|
||||
factory: $BangCategoryRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'search/:searchText',
|
||||
name: 'BangSearchRoute',
|
||||
factory: $BangSearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'category/:category',
|
||||
name: 'BangCategoryRoute',
|
||||
factory: $BangCategoryRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: ':subCategory',
|
||||
name: 'BangSubCategoryRoute',
|
||||
factory: $BangSubCategoryRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'containers',
|
||||
name: 'ContainerListRoute',
|
||||
factory: $ContainerListRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'create',
|
||||
name: 'ContainerCreateRoute',
|
||||
factory: $ContainerCreateRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'edit',
|
||||
name: 'ContainerEditRoute',
|
||||
factory: $ContainerEditRouteExtension._fromState,
|
||||
path: ':subCategory',
|
||||
name: 'BangSubCategoryRoute',
|
||||
factory: $BangSubCategoryRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'containers',
|
||||
name: 'ContainerListRoute',
|
||||
factory: $ContainerListRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'create',
|
||||
name: 'ContainerCreateRoute',
|
||||
factory: $ContainerCreateRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'edit',
|
||||
name: 'ContainerEditRoute',
|
||||
factory: $ContainerEditRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
extension $BrowserRouteExtension on BrowserRoute {
|
||||
static BrowserRoute _fromState(GoRouterState state) => BrowserRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/',
|
||||
);
|
||||
String get location => GoRouteData.$location('/');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -100,13 +98,11 @@ extension $BrowserRouteExtension on BrowserRoute {
|
||||
}
|
||||
|
||||
extension $WebPageRouteExtension on WebPageRoute {
|
||||
static WebPageRoute _fromState(GoRouterState state) => WebPageRoute(
|
||||
url: state.pathParameters['url']!,
|
||||
);
|
||||
static WebPageRoute _fromState(GoRouterState state) =>
|
||||
WebPageRoute(url: state.pathParameters['url']!);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/page/${Uri.encodeComponent(url)}',
|
||||
);
|
||||
String get location =>
|
||||
GoRouteData.$location('/page/${Uri.encodeComponent(url)}');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -121,9 +117,7 @@ extension $WebPageRouteExtension on WebPageRoute {
|
||||
extension $AboutRouteExtension on AboutRoute {
|
||||
static AboutRoute _fromState(GoRouterState state) => AboutRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/about',
|
||||
);
|
||||
String get location => GoRouteData.$location('/about');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -138,9 +132,7 @@ extension $AboutRouteExtension on AboutRoute {
|
||||
extension $UserAuthRouteExtension on UserAuthRoute {
|
||||
static UserAuthRoute _fromState(GoRouterState state) => UserAuthRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/userAuth',
|
||||
);
|
||||
String get location => GoRouteData.$location('/userAuth');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -154,13 +146,12 @@ extension $UserAuthRouteExtension on UserAuthRoute {
|
||||
|
||||
extension $SearchRouteExtension on SearchRoute {
|
||||
static SearchRoute _fromState(GoRouterState state) => SearchRoute(
|
||||
searchText:
|
||||
state.pathParameters['searchText']! ?? SearchRoute.emptySearchText,
|
||||
);
|
||||
searchText:
|
||||
state.pathParameters['searchText']! ?? SearchRoute.emptySearchText,
|
||||
);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/search/${Uri.encodeComponent(searchText)}',
|
||||
);
|
||||
String get location =>
|
||||
GoRouteData.$location('/search/${Uri.encodeComponent(searchText)}');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -176,9 +167,7 @@ extension $BangCategoriesRouteExtension on BangCategoriesRoute {
|
||||
static BangCategoriesRoute _fromState(GoRouterState state) =>
|
||||
BangCategoriesRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/bangs',
|
||||
);
|
||||
String get location => GoRouteData.$location('/bangs');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -192,13 +181,12 @@ extension $BangCategoriesRouteExtension on BangCategoriesRoute {
|
||||
|
||||
extension $BangSearchRouteExtension on BangSearchRoute {
|
||||
static BangSearchRoute _fromState(GoRouterState state) => BangSearchRoute(
|
||||
searchText: state.pathParameters['searchText']! ??
|
||||
BangSearchRoute.emptySearchText,
|
||||
);
|
||||
searchText:
|
||||
state.pathParameters['searchText']! ?? BangSearchRoute.emptySearchText,
|
||||
);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/bangs/search/${Uri.encodeComponent(searchText)}',
|
||||
);
|
||||
String get location =>
|
||||
GoRouteData.$location('/bangs/search/${Uri.encodeComponent(searchText)}');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -211,13 +199,11 @@ extension $BangSearchRouteExtension on BangSearchRoute {
|
||||
}
|
||||
|
||||
extension $BangCategoryRouteExtension on BangCategoryRoute {
|
||||
static BangCategoryRoute _fromState(GoRouterState state) => BangCategoryRoute(
|
||||
category: state.pathParameters['category']!,
|
||||
);
|
||||
static BangCategoryRoute _fromState(GoRouterState state) =>
|
||||
BangCategoryRoute(category: state.pathParameters['category']!);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/bangs/category/${Uri.encodeComponent(category)}',
|
||||
);
|
||||
String get location =>
|
||||
GoRouteData.$location('/bangs/category/${Uri.encodeComponent(category)}');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -237,8 +223,8 @@ extension $BangSubCategoryRouteExtension on BangSubCategoryRoute {
|
||||
);
|
||||
|
||||
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);
|
||||
|
||||
@@ -254,9 +240,7 @@ extension $ContainerListRouteExtension on ContainerListRoute {
|
||||
static ContainerListRoute _fromState(GoRouterState state) =>
|
||||
ContainerListRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/containers',
|
||||
);
|
||||
String get location => GoRouteData.$location('/containers');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -272,9 +256,7 @@ extension $ContainerCreateRouteExtension on ContainerCreateRoute {
|
||||
static ContainerCreateRoute _fromState(GoRouterState state) =>
|
||||
ContainerCreateRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/containers/create',
|
||||
);
|
||||
String get location => GoRouteData.$location('/containers/create');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -290,9 +272,7 @@ extension $ContainerEditRouteExtension on ContainerEditRoute {
|
||||
static ContainerEditRoute _fromState(GoRouterState state) =>
|
||||
ContainerEditRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/containers/edit',
|
||||
);
|
||||
String get location => GoRouteData.$location('/containers/edit');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -305,48 +285,46 @@ extension $ContainerEditRouteExtension on ContainerEditRoute {
|
||||
}
|
||||
|
||||
RouteBase get $settingsRoute => GoRouteData.$route(
|
||||
path: '/settings',
|
||||
name: 'SettingsRoute',
|
||||
factory: $SettingsRouteExtension._fromState,
|
||||
path: '/settings',
|
||||
name: 'SettingsRoute',
|
||||
factory: $SettingsRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'general',
|
||||
name: 'GeneralSettingsRoute',
|
||||
factory: $GeneralSettingsRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'bang',
|
||||
name: 'BangSettingsRoute',
|
||||
factory: $BangSettingsRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'web_engine',
|
||||
name: 'WebEngineSettingsRoute',
|
||||
factory: $WebEngineSettingsRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'general',
|
||||
name: 'GeneralSettingsRoute',
|
||||
factory: $GeneralSettingsRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'bang',
|
||||
name: 'BangSettingsRoute',
|
||||
factory: $BangSettingsRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'web_engine',
|
||||
name: 'WebEngineSettingsRoute',
|
||||
factory: $WebEngineSettingsRouteExtension._fromState,
|
||||
path: 'hardening',
|
||||
name: 'WebEngineHardeningRoute',
|
||||
factory: $WebEngineHardeningRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'hardening',
|
||||
name: 'WebEngineHardeningRoute',
|
||||
factory: $WebEngineHardeningRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'group/:group',
|
||||
name: 'WebEngineHardeningGroupRoute',
|
||||
factory: $WebEngineHardeningGroupRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
path: 'group/:group',
|
||||
name: 'WebEngineHardeningGroupRoute',
|
||||
factory: $WebEngineHardeningGroupRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
extension $SettingsRouteExtension on SettingsRoute {
|
||||
static SettingsRoute _fromState(GoRouterState state) => SettingsRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/settings',
|
||||
);
|
||||
String get location => GoRouteData.$location('/settings');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -362,9 +340,7 @@ extension $GeneralSettingsRouteExtension on GeneralSettingsRoute {
|
||||
static GeneralSettingsRoute _fromState(GoRouterState state) =>
|
||||
GeneralSettingsRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/settings/general',
|
||||
);
|
||||
String get location => GoRouteData.$location('/settings/general');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -380,9 +356,7 @@ extension $BangSettingsRouteExtension on BangSettingsRoute {
|
||||
static BangSettingsRoute _fromState(GoRouterState state) =>
|
||||
BangSettingsRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/settings/bang',
|
||||
);
|
||||
String get location => GoRouteData.$location('/settings/bang');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -398,9 +372,7 @@ extension $WebEngineSettingsRouteExtension on WebEngineSettingsRoute {
|
||||
static WebEngineSettingsRoute _fromState(GoRouterState state) =>
|
||||
WebEngineSettingsRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/settings/web_engine',
|
||||
);
|
||||
String get location => GoRouteData.$location('/settings/web_engine');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -416,9 +388,8 @@ extension $WebEngineHardeningRouteExtension on WebEngineHardeningRoute {
|
||||
static WebEngineHardeningRoute _fromState(GoRouterState state) =>
|
||||
WebEngineHardeningRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/settings/web_engine/hardening',
|
||||
);
|
||||
String get location =>
|
||||
GoRouteData.$location('/settings/web_engine/hardening');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -433,13 +404,11 @@ extension $WebEngineHardeningRouteExtension on WebEngineHardeningRoute {
|
||||
extension $WebEngineHardeningGroupRouteExtension
|
||||
on WebEngineHardeningGroupRoute {
|
||||
static WebEngineHardeningGroupRoute _fromState(GoRouterState state) =>
|
||||
WebEngineHardeningGroupRoute(
|
||||
group: state.pathParameters['group']!,
|
||||
);
|
||||
WebEngineHardeningGroupRoute(group: state.pathParameters['group']!);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/settings/web_engine/hardening/group/${Uri.encodeComponent(group)}',
|
||||
);
|
||||
'/settings/web_engine/hardening/group/${Uri.encodeComponent(group)}',
|
||||
);
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -452,30 +421,28 @@ extension $WebEngineHardeningGroupRouteExtension
|
||||
}
|
||||
|
||||
RouteBase get $chatArchiveListRoute => GoRouteData.$route(
|
||||
path: '/chat_archive',
|
||||
name: 'ChatArchiveListRoute',
|
||||
factory: $ChatArchiveListRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'search',
|
||||
name: 'ChatArchiveSearchRoute',
|
||||
factory: $ChatArchiveSearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'detail/:fileName',
|
||||
name: 'ChatArchiveDetailRoute',
|
||||
factory: $ChatArchiveDetailRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
);
|
||||
path: '/chat_archive',
|
||||
name: 'ChatArchiveListRoute',
|
||||
factory: $ChatArchiveListRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'search',
|
||||
name: 'ChatArchiveSearchRoute',
|
||||
factory: $ChatArchiveSearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'detail/:fileName',
|
||||
name: 'ChatArchiveDetailRoute',
|
||||
factory: $ChatArchiveDetailRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
extension $ChatArchiveListRouteExtension on ChatArchiveListRoute {
|
||||
static ChatArchiveListRoute _fromState(GoRouterState state) =>
|
||||
ChatArchiveListRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/chat_archive',
|
||||
);
|
||||
String get location => GoRouteData.$location('/chat_archive');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -491,9 +458,7 @@ extension $ChatArchiveSearchRouteExtension on ChatArchiveSearchRoute {
|
||||
static ChatArchiveSearchRoute _fromState(GoRouterState state) =>
|
||||
ChatArchiveSearchRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/chat_archive/search',
|
||||
);
|
||||
String get location => GoRouteData.$location('/chat_archive/search');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -507,13 +472,11 @@ extension $ChatArchiveSearchRouteExtension on ChatArchiveSearchRoute {
|
||||
|
||||
extension $ChatArchiveDetailRouteExtension on ChatArchiveDetailRoute {
|
||||
static ChatArchiveDetailRoute _fromState(GoRouterState state) =>
|
||||
ChatArchiveDetailRoute(
|
||||
fileName: state.pathParameters['fileName']!,
|
||||
);
|
||||
ChatArchiveDetailRoute(fileName: state.pathParameters['fileName']!);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/chat_archive/detail/${Uri.encodeComponent(fileName)}',
|
||||
);
|
||||
'/chat_archive/detail/${Uri.encodeComponent(fileName)}',
|
||||
);
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -526,17 +489,15 @@ extension $ChatArchiveDetailRouteExtension on ChatArchiveDetailRoute {
|
||||
}
|
||||
|
||||
RouteBase get $torProxyRoute => GoRouteData.$route(
|
||||
path: '/tor_proxy',
|
||||
name: 'TorProxyRoute',
|
||||
factory: $TorProxyRouteExtension._fromState,
|
||||
);
|
||||
path: '/tor_proxy',
|
||||
name: 'TorProxyRoute',
|
||||
factory: $TorProxyRouteExtension._fromState,
|
||||
);
|
||||
|
||||
extension $TorProxyRouteExtension on TorProxyRoute {
|
||||
static TorProxyRoute _fromState(GoRouterState state) => TorProxyRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/tor_proxy',
|
||||
);
|
||||
String get location => GoRouteData.$location('/tor_proxy');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user