add feature container drafting
This commit is contained in:
@@ -33,6 +33,10 @@ part of 'routes.dart';
|
||||
name: 'ContextMenuRoute',
|
||||
path: 'context_menu',
|
||||
),
|
||||
TypedGoRoute<ContainerDraftRoute>(
|
||||
name: 'ContainerDraftRoute',
|
||||
path: 'container_draft',
|
||||
),
|
||||
TypedGoRoute<ContainerListRoute>(
|
||||
name: 'ContainerListRoute',
|
||||
path: 'containers',
|
||||
@@ -107,6 +111,13 @@ class TorProxyRoute extends GoRouteData with $TorProxyRoute {
|
||||
}
|
||||
}
|
||||
|
||||
class ContainerDraftRoute extends GoRouteData with $ContainerDraftRoute {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const ContainerDraftSuggestionsScreen();
|
||||
}
|
||||
}
|
||||
|
||||
class ContainerListRoute extends GoRouteData with $ContainerListRoute {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
|
||||
@@ -34,6 +34,7 @@ import 'package:weblibre/features/geckoview/features/contextmenu/presentation/co
|
||||
import 'package:weblibre/features/geckoview/features/history/presentation/screens/history.dart';
|
||||
import 'package:weblibre/features/geckoview/features/search/presentation/screens/search.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/data/models/container_data.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/container_draft_suggestions.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/container_edit.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/container_list.dart';
|
||||
import 'package:weblibre/features/geckoview/features/tabs/presentation/screens/container_selection.dart';
|
||||
|
||||
@@ -322,6 +322,11 @@ RouteBase get $browserRoute => GoRouteData.$route(
|
||||
name: 'ContextMenuRoute',
|
||||
factory: $ContextMenuRoute._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'container_draft',
|
||||
name: 'ContainerDraftRoute',
|
||||
factory: $ContainerDraftRoute._fromState,
|
||||
),
|
||||
GoRouteData.$route(
|
||||
path: 'containers',
|
||||
name: 'ContainerListRoute',
|
||||
@@ -487,6 +492,27 @@ mixin $ContextMenuRoute on GoRouteData {
|
||||
context.replace(location, extra: _self.$extra);
|
||||
}
|
||||
|
||||
mixin $ContainerDraftRoute on GoRouteData {
|
||||
static ContainerDraftRoute _fromState(GoRouterState state) =>
|
||||
ContainerDraftRoute();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/container_draft');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
mixin $ContainerListRoute on GoRouteData {
|
||||
static ContainerListRoute _fromState(GoRouterState state) =>
|
||||
ContainerListRoute();
|
||||
|
||||
Reference in New Issue
Block a user