add separate history download screen

This commit is contained in:
Fabian Freund
2026-02-21 10:59:56 +01:00
parent 7c14e7b3a3
commit f8d497f991
6 changed files with 372 additions and 115 deletions
+28
View File
@@ -1143,6 +1143,13 @@ RouteBase get $historyRoute => GoRouteData.$route(
path: '/history',
name: 'HistoryRoute',
factory: $HistoryRoute._fromState,
routes: [
GoRouteData.$route(
path: 'downloads',
name: 'HistoryDownloadsRoute',
factory: $HistoryDownloadsRoute._fromState,
),
],
);
mixin $HistoryRoute on GoRouteData {
@@ -1165,6 +1172,27 @@ mixin $HistoryRoute on GoRouteData {
void replace(BuildContext context) => context.replace(location);
}
mixin $HistoryDownloadsRoute on GoRouteData {
static HistoryDownloadsRoute _fromState(GoRouterState state) =>
const HistoryDownloadsRoute();
@override
String get location => GoRouteData.$location('/history/downloads');
@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);
}
RouteBase get $profileListRoute => GoRouteData.$route(
path: '/profiles',
name: 'ProfileListRoute',