mirror of
https://github.com/immich-app/immich.git
synced 2024-12-30 11:28:22 +02:00
37 lines
1.5 KiB
Dart
37 lines
1.5 KiB
Dart
import 'package:auto_route/auto_route.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:immich_mobile/modules/login/views/login_page.dart';
|
|
import 'package:immich_mobile/modules/home/views/home_page.dart';
|
|
import 'package:immich_mobile/modules/search/views/search_page.dart';
|
|
import 'package:immich_mobile/modules/search/views/search_result_page.dart';
|
|
import 'package:immich_mobile/routing/auth_guard.dart';
|
|
import 'package:immich_mobile/shared/models/immich_asset.model.dart';
|
|
import 'package:immich_mobile/shared/views/backup_controller_page.dart';
|
|
import 'package:immich_mobile/modules/asset_viewer/views/image_viewer_page.dart';
|
|
import 'package:immich_mobile/shared/views/tab_controller_page.dart';
|
|
import 'package:immich_mobile/shared/views/video_viewer_page.dart';
|
|
|
|
part 'router.gr.dart';
|
|
|
|
@MaterialAutoRouter(
|
|
replaceInRouteName: 'Page,Route',
|
|
routes: <AutoRoute>[
|
|
AutoRoute(page: LoginPage, initial: true),
|
|
AutoRoute(
|
|
page: TabControllerPage,
|
|
guards: [AuthGuard],
|
|
children: [
|
|
AutoRoute(page: HomePage, guards: [AuthGuard]),
|
|
AutoRoute(page: SearchPage, guards: [AuthGuard])
|
|
],
|
|
),
|
|
AutoRoute(page: ImageViewerPage, guards: [AuthGuard]),
|
|
AutoRoute(page: VideoViewerPage, guards: [AuthGuard]),
|
|
AutoRoute(page: BackupControllerPage, guards: [AuthGuard]),
|
|
AutoRoute(page: SearchResultPage, guards: [AuthGuard]),
|
|
],
|
|
)
|
|
class AppRouter extends _$AppRouter {
|
|
AppRouter() : super(authGuard: AuthGuard());
|
|
}
|