forked from Cutlery/immich
deps: update dependency auto_route to v8
This commit is contained in:
parent
a9631dace0
commit
2a8e3e4925
@ -1,4 +1,3 @@
|
|||||||
import 'package:auto_route/auto_route.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
@ -11,8 +10,6 @@ import 'package:immich_mobile/shared/models/asset.dart';
|
|||||||
import 'package:immich_mobile/shared/ui/delayed_loading_indicator.dart';
|
import 'package:immich_mobile/shared/ui/delayed_loading_indicator.dart';
|
||||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||||
|
|
||||||
@RoutePage()
|
|
||||||
// ignore: must_be_immutable
|
|
||||||
class VideoViewerPage extends HookConsumerWidget {
|
class VideoViewerPage extends HookConsumerWidget {
|
||||||
final Asset asset;
|
final Asset asset;
|
||||||
final bool isMotionVideo;
|
final bool isMotionVideo;
|
||||||
|
@ -118,10 +118,6 @@ class AppRouter extends _$AppRouter {
|
|||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
transitionsBuilder: CustomTransitionsBuilders.zoomedPage,
|
transitionsBuilder: CustomTransitionsBuilders.zoomedPage,
|
||||||
),
|
),
|
||||||
AutoRoute(
|
|
||||||
page: VideoViewerRoute.page,
|
|
||||||
guards: [_authGuard, _duplicateGuard],
|
|
||||||
),
|
|
||||||
AutoRoute(
|
AutoRoute(
|
||||||
page: BackupControllerRoute.page,
|
page: BackupControllerRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard, _backupPermissionGuard],
|
guards: [_authGuard, _duplicateGuard, _backupPermissionGuard],
|
||||||
|
@ -351,21 +351,6 @@ abstract class _$AppRouter extends RootStackRouter {
|
|||||||
child: const TrashPage(),
|
child: const TrashPage(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
VideoViewerRoute.name: (routeData) {
|
|
||||||
final args = routeData.argsAs<VideoViewerRouteArgs>();
|
|
||||||
return AutoRoutePage<dynamic>(
|
|
||||||
routeData: routeData,
|
|
||||||
child: VideoViewerPage(
|
|
||||||
key: args.key,
|
|
||||||
asset: args.asset,
|
|
||||||
isMotionVideo: args.isMotionVideo,
|
|
||||||
placeholder: args.placeholder,
|
|
||||||
showControls: args.showControls,
|
|
||||||
hideControlsTimer: args.hideControlsTimer,
|
|
||||||
showDownloadingIndicator: args.showDownloadingIndicator,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1410,66 +1395,3 @@ class TrashRoute extends PageRouteInfo<void> {
|
|||||||
|
|
||||||
static const PageInfo<void> page = PageInfo<void>(name);
|
static const PageInfo<void> page = PageInfo<void>(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
|
||||||
/// [VideoViewerPage]
|
|
||||||
class VideoViewerRoute extends PageRouteInfo<VideoViewerRouteArgs> {
|
|
||||||
VideoViewerRoute({
|
|
||||||
Key? key,
|
|
||||||
required Asset asset,
|
|
||||||
bool isMotionVideo = false,
|
|
||||||
Widget? placeholder,
|
|
||||||
bool showControls = true,
|
|
||||||
Duration hideControlsTimer = const Duration(seconds: 5),
|
|
||||||
bool showDownloadingIndicator = true,
|
|
||||||
List<PageRouteInfo>? children,
|
|
||||||
}) : super(
|
|
||||||
VideoViewerRoute.name,
|
|
||||||
args: VideoViewerRouteArgs(
|
|
||||||
key: key,
|
|
||||||
asset: asset,
|
|
||||||
isMotionVideo: isMotionVideo,
|
|
||||||
placeholder: placeholder,
|
|
||||||
showControls: showControls,
|
|
||||||
hideControlsTimer: hideControlsTimer,
|
|
||||||
showDownloadingIndicator: showDownloadingIndicator,
|
|
||||||
),
|
|
||||||
initialChildren: children,
|
|
||||||
);
|
|
||||||
|
|
||||||
static const String name = 'VideoViewerRoute';
|
|
||||||
|
|
||||||
static const PageInfo<VideoViewerRouteArgs> page =
|
|
||||||
PageInfo<VideoViewerRouteArgs>(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
class VideoViewerRouteArgs {
|
|
||||||
const VideoViewerRouteArgs({
|
|
||||||
this.key,
|
|
||||||
required this.asset,
|
|
||||||
this.isMotionVideo = false,
|
|
||||||
this.placeholder,
|
|
||||||
this.showControls = true,
|
|
||||||
this.hideControlsTimer = const Duration(seconds: 5),
|
|
||||||
this.showDownloadingIndicator = true,
|
|
||||||
});
|
|
||||||
|
|
||||||
final Key? key;
|
|
||||||
|
|
||||||
final Asset asset;
|
|
||||||
|
|
||||||
final bool isMotionVideo;
|
|
||||||
|
|
||||||
final Widget? placeholder;
|
|
||||||
|
|
||||||
final bool showControls;
|
|
||||||
|
|
||||||
final Duration hideControlsTimer;
|
|
||||||
|
|
||||||
final bool showDownloadingIndicator;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'VideoViewerRouteArgs{key: $key, asset: $asset, isMotionVideo: $isMotionVideo, placeholder: $placeholder, showControls: $showControls, hideControlsTimer: $hideControlsTimer, showDownloadingIndicator: $showDownloadingIndicator}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -21,7 +21,7 @@ dependencies:
|
|||||||
cached_network_image: ^3.3.1
|
cached_network_image: ^3.3.1
|
||||||
flutter_cache_manager: ^3.3.1
|
flutter_cache_manager: ^3.3.1
|
||||||
intl: ^0.18.0
|
intl: ^0.18.0
|
||||||
auto_route: ^7.8.4
|
auto_route: ^8.0.2
|
||||||
fluttertoast: ^8.2.4
|
fluttertoast: ^8.2.4
|
||||||
video_player: ^2.8.2
|
video_player: ^2.8.2
|
||||||
chewie: ^1.7.4
|
chewie: ^1.7.4
|
||||||
@ -87,7 +87,7 @@ dev_dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^3.0.1
|
flutter_lints: ^3.0.1
|
||||||
build_runner: ^2.4.8
|
build_runner: ^2.4.8
|
||||||
auto_route_generator: ^7.3.2
|
auto_route_generator: ^8.0.0
|
||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
flutter_native_splash: ^2.3.9
|
flutter_native_splash: ^2.3.9
|
||||||
isar_generator: ^3.1.0+1
|
isar_generator: ^3.1.0+1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user