refactor tab menu

This commit is contained in:
Fabian Freund
2025-08-01 20:51:53 +02:00
parent f6c68b8431
commit 37f11f1bd5
15 changed files with 660 additions and 700 deletions
-15
View File
@@ -23,7 +23,6 @@ part of 'routes.dart';
name: BrowserRoute.name,
path: '/',
routes: [
TypedGoRoute<WebPageRoute>(name: 'WebPageRoute', path: 'page/:url'),
TypedGoRoute<SearchRoute>(
name: 'SearchRoute',
path: 'search/:tabType/:searchText',
@@ -66,20 +65,6 @@ class BrowserRoute extends GoRouteData with _$BrowserRoute {
}
}
class WebPageRoute extends GoRouteData with _$WebPageRoute {
final String url;
final WebPageInfo? $extra;
const WebPageRoute({required this.url, required this.$extra});
@override
Page<void> buildPage(BuildContext context, GoRouterState state) {
return DialogPage(
builder: (_) => WebPageDialog(url: Uri.parse(url), precachedInfo: $extra),
);
}
}
enum TabType { regular, private, child }
class SearchRoute extends GoRouteData with _$SearchRoute {