add separate history download screen
This commit is contained in:
@@ -19,7 +19,16 @@
|
||||
*/
|
||||
part of 'routes.dart';
|
||||
|
||||
@TypedGoRoute<HistoryRoute>(name: 'HistoryRoute', path: '/history')
|
||||
@TypedGoRoute<HistoryRoute>(
|
||||
name: 'HistoryRoute',
|
||||
path: '/history',
|
||||
routes: [
|
||||
TypedGoRoute<HistoryDownloadsRoute>(
|
||||
name: 'HistoryDownloadsRoute',
|
||||
path: 'downloads',
|
||||
),
|
||||
],
|
||||
)
|
||||
class HistoryRoute extends GoRouteData with $HistoryRoute {
|
||||
const HistoryRoute();
|
||||
|
||||
@@ -28,3 +37,12 @@ class HistoryRoute extends GoRouteData with $HistoryRoute {
|
||||
return const HistoryScreen();
|
||||
}
|
||||
}
|
||||
|
||||
class HistoryDownloadsRoute extends GoRouteData with $HistoryDownloadsRoute {
|
||||
const HistoryDownloadsRoute();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const HistoryScreen(mode: HistoryScreenMode.downloads);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user