one step closer
This commit is contained in:
@@ -9,7 +9,7 @@ import 'package:lensai/features/chat_archive/presentation/screens/detail.dart';
|
||||
import 'package:lensai/features/chat_archive/presentation/screens/list.dart';
|
||||
import 'package:lensai/features/chat_archive/presentation/screens/search.dart';
|
||||
import 'package:lensai/features/geckoview/features/browser/screens/browser.dart';
|
||||
import 'package:lensai/features/geckoview/features/topics/presentation/screens/topic_list.dart';
|
||||
import 'package:lensai/features/geckoview/features/tabs/presentation/screens/container_list.dart';
|
||||
import 'package:lensai/features/settings/presentation/screens/settings.dart';
|
||||
|
||||
part 'routes.g.dart';
|
||||
@@ -42,9 +42,9 @@ part 'routes.g.dart';
|
||||
),
|
||||
],
|
||||
),
|
||||
TypedGoRoute<TopicListRoute>(
|
||||
name: 'TopicsRoute',
|
||||
path: 'topics',
|
||||
TypedGoRoute<ContainerListRoute>(
|
||||
name: 'ContainerListRoute',
|
||||
path: 'containers',
|
||||
),
|
||||
],
|
||||
)
|
||||
@@ -102,10 +102,10 @@ class BangSearchRoute extends GoRouteData {
|
||||
}
|
||||
}
|
||||
|
||||
class TopicListRoute extends GoRouteData {
|
||||
class ContainerListRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const TopicListScreen();
|
||||
return const ContainerListScreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ RouteBase get $browserRoute => GoRouteData.$route(
|
||||
],
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'topics',
|
||||
name: 'TopicsRoute',
|
||||
factory: $TopicListRouteExtension._fromState,
|
||||
path: 'containers',
|
||||
name: 'ContainerListRoute',
|
||||
factory: $ContainerListRouteExtension._fromState,
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -163,11 +163,12 @@ extension $BangSubCategoryRouteExtension on BangSubCategoryRoute {
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
extension $TopicListRouteExtension on TopicListRoute {
|
||||
static TopicListRoute _fromState(GoRouterState state) => TopicListRoute();
|
||||
extension $ContainerListRouteExtension on ContainerListRoute {
|
||||
static ContainerListRoute _fromState(GoRouterState state) =>
|
||||
ContainerListRoute();
|
||||
|
||||
String get location => GoRouteData.$location(
|
||||
'/topics',
|
||||
'/containers',
|
||||
);
|
||||
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
Reference in New Issue
Block a user