2022-02-03 18:06:44 +02:00
|
|
|
import 'package:auto_route/auto_route.dart';
|
2022-04-24 04:08:45 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-05-06 14:22:23 +02:00
|
|
|
import 'package:immich_mobile/modules/backup/views/album_preview_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/backup/views/backup_album_selection_page.dart';
|
2022-06-27 22:13:07 +02:00
|
|
|
import 'package:immich_mobile/modules/login/views/change_password_page.dart';
|
2022-02-03 18:06:44 +02:00
|
|
|
import 'package:immich_mobile/modules/login/views/login_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/home/views/home_page.dart';
|
2022-02-27 20:43:29 +02:00
|
|
|
import 'package:immich_mobile/modules/search/views/search_page.dart';
|
2022-03-03 00:44:24 +02:00
|
|
|
import 'package:immich_mobile/modules/search/views/search_result_page.dart';
|
2022-04-24 04:08:45 +02:00
|
|
|
import 'package:immich_mobile/modules/sharing/models/asset_selection_page_result.model.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/models/shared_album.model.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/views/album_viewer_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/views/asset_selection_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/views/create_shared_album_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/views/select_additional_user_for_sharing_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/views/select_user_for_sharing_page.dart';
|
|
|
|
import 'package:immich_mobile/modules/sharing/views/sharing_page.dart';
|
2022-02-03 18:06:44 +02:00
|
|
|
import 'package:immich_mobile/routing/auth_guard.dart';
|
2022-02-11 04:40:11 +02:00
|
|
|
import 'package:immich_mobile/shared/models/immich_asset.model.dart';
|
2022-05-06 14:22:23 +02:00
|
|
|
import 'package:immich_mobile/modules/backup/views/backup_controller_page.dart';
|
2022-02-11 04:40:11 +02:00
|
|
|
import 'package:immich_mobile/modules/asset_viewer/views/image_viewer_page.dart';
|
2022-06-21 01:10:23 +02:00
|
|
|
import 'package:immich_mobile/shared/views/splash_screen.dart';
|
2022-02-27 20:43:29 +02:00
|
|
|
import 'package:immich_mobile/shared/views/tab_controller_page.dart';
|
2022-04-02 19:31:53 +02:00
|
|
|
import 'package:immich_mobile/modules/asset_viewer/views/video_viewer_page.dart';
|
2022-05-06 14:22:23 +02:00
|
|
|
import 'package:photo_manager/photo_manager.dart';
|
2022-02-03 18:06:44 +02:00
|
|
|
|
|
|
|
part 'router.gr.dart';
|
|
|
|
|
|
|
|
@MaterialAutoRouter(
|
|
|
|
replaceInRouteName: 'Page,Route',
|
|
|
|
routes: <AutoRoute>[
|
2022-06-21 01:10:23 +02:00
|
|
|
AutoRoute(page: SplashScreenPage, initial: true),
|
|
|
|
AutoRoute(page: LoginPage),
|
2022-06-27 22:13:07 +02:00
|
|
|
AutoRoute(page: ChangePasswordPage),
|
2022-06-21 01:10:23 +02:00
|
|
|
CustomRoute(
|
2022-02-27 20:43:29 +02:00
|
|
|
page: TabControllerPage,
|
|
|
|
guards: [AuthGuard],
|
|
|
|
children: [
|
|
|
|
AutoRoute(page: HomePage, guards: [AuthGuard]),
|
2022-04-24 04:08:45 +02:00
|
|
|
AutoRoute(page: SearchPage, guards: [AuthGuard]),
|
|
|
|
AutoRoute(page: SharingPage, guards: [AuthGuard])
|
2022-02-27 20:43:29 +02:00
|
|
|
],
|
2022-06-21 01:10:23 +02:00
|
|
|
transitionsBuilder: TransitionsBuilders.fadeIn,
|
2022-02-27 20:43:29 +02:00
|
|
|
),
|
2022-02-03 18:06:44 +02:00
|
|
|
AutoRoute(page: ImageViewerPage, guards: [AuthGuard]),
|
2022-02-06 08:07:56 +02:00
|
|
|
AutoRoute(page: VideoViewerPage, guards: [AuthGuard]),
|
2022-02-27 20:43:29 +02:00
|
|
|
AutoRoute(page: BackupControllerPage, guards: [AuthGuard]),
|
2022-03-03 00:44:24 +02:00
|
|
|
AutoRoute(page: SearchResultPage, guards: [AuthGuard]),
|
2022-04-24 04:08:45 +02:00
|
|
|
AutoRoute(page: CreateSharedAlbumPage, guards: [AuthGuard]),
|
|
|
|
CustomRoute<AssetSelectionPageResult?>(
|
|
|
|
page: AssetSelectionPage,
|
|
|
|
guards: [AuthGuard],
|
|
|
|
transitionsBuilder: TransitionsBuilders.slideBottom,
|
|
|
|
),
|
|
|
|
CustomRoute<List<String>>(
|
|
|
|
page: SelectUserForSharingPage,
|
|
|
|
guards: [AuthGuard],
|
|
|
|
transitionsBuilder: TransitionsBuilders.slideBottom,
|
|
|
|
),
|
|
|
|
AutoRoute(page: AlbumViewerPage, guards: [AuthGuard]),
|
|
|
|
CustomRoute<List<String>?>(
|
|
|
|
page: SelectAdditionalUserForSharingPage,
|
|
|
|
guards: [AuthGuard],
|
|
|
|
transitionsBuilder: TransitionsBuilders.slideBottom,
|
|
|
|
),
|
2022-05-06 14:22:23 +02:00
|
|
|
AutoRoute(page: BackupAlbumSelectionPage, guards: [AuthGuard]),
|
|
|
|
AutoRoute(page: AlbumPreviewPage, guards: [AuthGuard]),
|
2022-02-03 18:06:44 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
class AppRouter extends _$AppRouter {
|
|
|
|
AppRouter() : super(authGuard: AuthGuard());
|
|
|
|
}
|