majro update
This commit is contained in:
@@ -14,9 +14,10 @@ String _$lightSeedColorFallbackHash() =>
|
||||
final lightSeedColorFallbackProvider = Provider<Color>.internal(
|
||||
lightSeedColorFallback,
|
||||
name: r'lightSeedColorFallbackProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$lightSeedColorFallbackHash,
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$lightSeedColorFallbackHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@@ -32,9 +33,10 @@ String _$darkSeedColorFallbackHash() =>
|
||||
final darkSeedColorFallbackProvider = Provider<Color>.internal(
|
||||
darkSeedColorFallback,
|
||||
name: r'darkSeedColorFallbackProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$darkSeedColorFallbackHash,
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$darkSeedColorFallbackHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'format.g.dart';
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
class Format extends _$Format {
|
||||
String fullDateTimeWithTimezone(DateTime date) {
|
||||
final pattern = DateFormat('yMMMMd').addPattern('Hm');
|
||||
|
||||
return pattern.format(date);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> build() async {
|
||||
await initializeDateFormatting();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'format.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$formatHash() => r'fe7fcdd19b512784a36f3838c57701030475e429';
|
||||
|
||||
/// See also [Format].
|
||||
@ProviderFor(Format)
|
||||
final formatProvider = AsyncNotifierProvider<Format, void>.internal(
|
||||
Format.new,
|
||||
name: r'formatProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$formatHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$Format = AsyncNotifier<void>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
@@ -12,14 +12,15 @@ String _$willAcceptDropHash() => r'97b47784ef9101757602b4408d1f545ef2308830';
|
||||
@ProviderFor(WillAcceptDrop)
|
||||
final willAcceptDropProvider =
|
||||
AutoDisposeNotifierProvider<WillAcceptDrop, DropTargetData?>.internal(
|
||||
WillAcceptDrop.new,
|
||||
name: r'willAcceptDropProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$willAcceptDropHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
WillAcceptDrop.new,
|
||||
name: r'willAcceptDropProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$willAcceptDropHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$WillAcceptDrop = AutoDisposeNotifier<DropTargetData?>;
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
@@ -29,9 +29,10 @@ String _$embeddingModelHash() => r'40111a5f08b43afe6edd399ff0e6c022b3387265';
|
||||
final embeddingModelProvider = Provider<OpenAIEmbeddings>.internal(
|
||||
embeddingModel,
|
||||
name: r'embeddingModelProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$embeddingModelHash,
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$embeddingModelHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@@ -47,9 +48,10 @@ String _$embeddingDimensionsHash() =>
|
||||
final embeddingDimensionsProvider = Provider<int>.internal(
|
||||
embeddingDimensions,
|
||||
name: r'embeddingDimensionsProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$embeddingDimensionsHash,
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$embeddingDimensionsHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -22,11 +22,17 @@ import 'package:lensai/features/settings/presentation/screens/web_engine_hardeni
|
||||
import 'package:lensai/features/settings/presentation/screens/web_engine_settings.dart';
|
||||
import 'package:lensai/features/tor/presentation/screens/tor_proxy.dart';
|
||||
import 'package:lensai/features/user/presentation/screens/auth.dart';
|
||||
import 'package:lensai/features/web_feed/data/database/database.dart';
|
||||
import 'package:lensai/features/web_feed/presentation/screens/feed_article.dart';
|
||||
import 'package:lensai/features/web_feed/presentation/screens/feed_article_list.dart';
|
||||
import 'package:lensai/features/web_feed/presentation/screens/feed_edit.dart';
|
||||
import 'package:lensai/features/web_feed/presentation/screens/feed_list.dart';
|
||||
|
||||
part 'routes.g.dart';
|
||||
part 'routes.settings.dart';
|
||||
part 'routes.browser.dart';
|
||||
part 'routes.bangs.dart';
|
||||
part 'routes.feeds.dart';
|
||||
|
||||
@TypedGoRoute<AboutRoute>(name: 'AboutRoute', path: '/about')
|
||||
class AboutRoute extends GoRouteData {
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
part of 'routes.dart';
|
||||
|
||||
@TypedGoRoute<FeedListRoute>(
|
||||
name: 'FeedListRoute',
|
||||
path: '/feeds',
|
||||
routes: [
|
||||
TypedGoRoute<FeedArticleListRoute>(
|
||||
name: 'FeedArticleListRoute',
|
||||
path: 'articles/:feedId',
|
||||
),
|
||||
TypedGoRoute<FeedArticleRoute>(
|
||||
name: 'FeedArticleRoute',
|
||||
path: 'article/:articleId',
|
||||
),
|
||||
TypedGoRoute<FeedCreateRoute>(name: 'FeedCreateRoute', path: 'create'),
|
||||
],
|
||||
)
|
||||
class FeedListRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const FeedListScreen();
|
||||
}
|
||||
}
|
||||
|
||||
class FeedCreateRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return FeedEditScreen.create(initialFeed: state.extra! as FeedData);
|
||||
}
|
||||
}
|
||||
|
||||
class FeedArticleListRoute extends GoRouteData {
|
||||
final Uri feedId;
|
||||
|
||||
FeedArticleListRoute({required this.feedId});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return FeedArticleListScreen(feedId: feedId);
|
||||
}
|
||||
}
|
||||
|
||||
class FeedArticleRoute extends GoRouteData {
|
||||
final String articleId;
|
||||
|
||||
FeedArticleRoute({required this.articleId});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return FeedArticleScreen(articleId: articleId);
|
||||
}
|
||||
}
|
||||
+248
-170
@@ -7,25 +7,25 @@ part of 'routes.dart';
|
||||
// **************************************************************************
|
||||
|
||||
List<RouteBase> get $appRoutes => [
|
||||
$aboutRoute,
|
||||
$userAuthRoute,
|
||||
$settingsRoute,
|
||||
$browserRoute,
|
||||
$bangCategoriesRoute,
|
||||
];
|
||||
$aboutRoute,
|
||||
$userAuthRoute,
|
||||
$settingsRoute,
|
||||
$browserRoute,
|
||||
$bangCategoriesRoute,
|
||||
$feedListRoute,
|
||||
];
|
||||
|
||||
RouteBase get $aboutRoute => GoRouteData.$route(
|
||||
path: '/about',
|
||||
name: 'AboutRoute',
|
||||
factory: $AboutRouteExtension._fromState,
|
||||
);
|
||||
path: '/about',
|
||||
name: 'AboutRoute',
|
||||
|
||||
factory: $AboutRouteExtension._fromState,
|
||||
);
|
||||
|
||||
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);
|
||||
|
||||
@@ -38,17 +38,16 @@ extension $AboutRouteExtension on AboutRoute {
|
||||
}
|
||||
|
||||
RouteBase get $userAuthRoute => GoRouteData.$route(
|
||||
path: '/userAuth',
|
||||
name: 'UserAuthRoute',
|
||||
factory: $UserAuthRouteExtension._fromState,
|
||||
);
|
||||
path: '/userAuth',
|
||||
name: 'UserAuthRoute',
|
||||
|
||||
factory: $UserAuthRouteExtension._fromState,
|
||||
);
|
||||
|
||||
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);
|
||||
|
||||
@@ -61,48 +60,52 @@ extension $UserAuthRouteExtension on UserAuthRoute {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -118,9 +121,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);
|
||||
|
||||
@@ -136,9 +137,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);
|
||||
|
||||
@@ -154,9 +153,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);
|
||||
|
||||
@@ -172,9 +169,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);
|
||||
|
||||
@@ -189,13 +185,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);
|
||||
|
||||
@@ -208,56 +202,62 @@ extension $WebEngineHardeningGroupRouteExtension
|
||||
}
|
||||
|
||||
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: 'search/:searchText',
|
||||
name: 'SearchRoute',
|
||||
|
||||
factory: $SearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'tor_proxy',
|
||||
name: 'TorProxyRoute',
|
||||
|
||||
factory: $TorProxyRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'context_menu',
|
||||
name: 'ContextMenuRoute',
|
||||
|
||||
factory: $ContextMenuRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'containers',
|
||||
name: 'ContainerListRoute',
|
||||
|
||||
factory: $ContainerListRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'page/:url',
|
||||
name: 'WebPageRoute',
|
||||
factory: $WebPageRouteExtension._fromState,
|
||||
path: 'create',
|
||||
name: 'ContainerCreateRoute',
|
||||
|
||||
factory: $ContainerCreateRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'search/:searchText',
|
||||
name: 'SearchRoute',
|
||||
factory: $SearchRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'tor_proxy',
|
||||
name: 'TorProxyRoute',
|
||||
factory: $TorProxyRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'context_menu',
|
||||
name: 'ContextMenuRoute',
|
||||
factory: $ContextMenuRouteExtension._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: '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);
|
||||
|
||||
@@ -270,13 +270,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);
|
||||
|
||||
@@ -290,13 +288,12 @@ extension $WebPageRouteExtension on WebPageRoute {
|
||||
|
||||
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);
|
||||
|
||||
@@ -311,9 +308,7 @@ extension $SearchRouteExtension on SearchRoute {
|
||||
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);
|
||||
|
||||
@@ -329,9 +324,7 @@ extension $ContextMenuRouteExtension on ContextMenuRoute {
|
||||
static ContextMenuRoute _fromState(GoRouterState state) =>
|
||||
const ContextMenuRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/context_menu',
|
||||
);
|
||||
String get location => GoRouteData.$location('/context_menu');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@@ -347,9 +340,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);
|
||||
|
||||
@@ -365,9 +356,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);
|
||||
|
||||
@@ -383,9 +372,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);
|
||||
|
||||
@@ -398,37 +385,39 @@ extension $ContainerEditRouteExtension on ContainerEditRoute {
|
||||
}
|
||||
|
||||
RouteBase get $bangCategoriesRoute => GoRouteData.$route(
|
||||
path: '/bangs',
|
||||
name: 'BangRoute',
|
||||
factory: $BangCategoriesRouteExtension._fromState,
|
||||
path: '/bangs',
|
||||
name: 'BangRoute',
|
||||
|
||||
factory: $BangCategoriesRouteExtension._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: '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,
|
||||
),
|
||||
],
|
||||
path: ':subCategory',
|
||||
name: 'BangSubCategoryRoute',
|
||||
|
||||
factory: $BangSubCategoryRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
);
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
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);
|
||||
|
||||
@@ -442,13 +431,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);
|
||||
|
||||
@@ -461,13 +449,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);
|
||||
|
||||
@@ -487,8 +473,100 @@ 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);
|
||||
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $feedListRoute => GoRouteData.$route(
|
||||
path: '/feeds',
|
||||
name: 'FeedListRoute',
|
||||
|
||||
factory: $FeedListRouteExtension._fromState,
|
||||
routes: [
|
||||
GoRouteData.$route(
|
||||
path: 'articles/:feedId',
|
||||
name: 'FeedArticleListRoute',
|
||||
|
||||
factory: $FeedArticleListRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'article/:articleId',
|
||||
name: 'FeedArticleRoute',
|
||||
|
||||
factory: $FeedArticleRouteExtension._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'create',
|
||||
name: 'FeedCreateRoute',
|
||||
|
||||
factory: $FeedCreateRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
extension $FeedListRouteExtension on FeedListRoute {
|
||||
static FeedListRoute _fromState(GoRouterState state) => FeedListRoute();
|
||||
|
||||
String get location => GoRouteData.$location('/feeds');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
extension $FeedArticleListRouteExtension on FeedArticleListRoute {
|
||||
static FeedArticleListRoute _fromState(GoRouterState state) =>
|
||||
FeedArticleListRoute(feedId: Uri.parse(state.pathParameters['feedId']!)!);
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/feeds/articles/${Uri.encodeComponent(feedId.toString())}',
|
||||
);
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
extension $FeedArticleRouteExtension on FeedArticleRoute {
|
||||
static FeedArticleRoute _fromState(GoRouterState state) =>
|
||||
FeedArticleRoute(articleId: state.pathParameters['articleId']!);
|
||||
|
||||
String get location =>
|
||||
GoRouteData.$location('/feeds/article/${Uri.encodeComponent(articleId)}');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
extension $FeedCreateRouteExtension on FeedCreateRoute {
|
||||
static FeedCreateRoute _fromState(GoRouterState state) => FeedCreateRoute();
|
||||
|
||||
String get location => GoRouteData.$location('/feeds/create');
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user