Nikolas Rimikis
2 years ago
5 changed files with 62 additions and 1 deletions
@ -0,0 +1,18 @@ |
|||||||
|
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:go_router/go_router.dart'; |
||||||
|
import 'package:neon/utils.dart'; |
||||||
|
import 'package:neon_files/neon_files.dart'; |
||||||
|
|
||||||
|
part 'routes.g.dart'; |
||||||
|
|
||||||
|
@TypedGoRoute<FilesAppRoute>( |
||||||
|
path: '$appsRoutePrefix${FilesApp.appId}', |
||||||
|
name: FilesApp.appId, |
||||||
|
) |
||||||
|
@immutable |
||||||
|
class FilesAppRoute extends NeonAppRoute { |
||||||
|
const FilesAppRoute(); |
||||||
|
|
||||||
|
@override |
||||||
|
Widget build(final BuildContext context, final GoRouterState state) => const FilesMainPage(); |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND |
||||||
|
|
||||||
|
part of 'routes.dart'; |
||||||
|
|
||||||
|
// ************************************************************************** |
||||||
|
// GoRouterGenerator |
||||||
|
// ************************************************************************** |
||||||
|
|
||||||
|
List<RouteBase> get $appRoutes => [ |
||||||
|
$filesAppRoute, |
||||||
|
]; |
||||||
|
|
||||||
|
RouteBase get $filesAppRoute => GoRouteData.$route( |
||||||
|
path: '/apps/files', |
||||||
|
name: 'files', |
||||||
|
factory: $FilesAppRouteExtension._fromState, |
||||||
|
); |
||||||
|
|
||||||
|
extension $FilesAppRouteExtension on FilesAppRoute { |
||||||
|
static FilesAppRoute _fromState(GoRouterState state) => const FilesAppRoute(); |
||||||
|
|
||||||
|
String get location => GoRouteData.$location( |
||||||
|
'/apps/files', |
||||||
|
); |
||||||
|
|
||||||
|
void go(BuildContext context) => context.go(location); |
||||||
|
|
||||||
|
Future<T?> push<T>(BuildContext context) => context.push<T>(location); |
||||||
|
|
||||||
|
void pushReplacement(BuildContext context) => context.pushReplacement(location); |
||||||
|
|
||||||
|
void replace(BuildContext context) => context.replace(location); |
||||||
|
} |
Loading…
Reference in new issue