mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 09:59:00 -07:00
d5f6584e1d
Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
32 lines
885 B
Dart
32 lines
885 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CustomTransitionsBuilders {
|
|
const CustomTransitionsBuilders._();
|
|
|
|
static const ZoomPageTransitionsBuilder zoomPageTransitionsBuilder =
|
|
ZoomPageTransitionsBuilder();
|
|
|
|
static const RouteTransitionsBuilder zoomedPage = _zoomedPage;
|
|
|
|
static Widget _zoomedPage(
|
|
BuildContext context,
|
|
Animation<double> animation,
|
|
Animation<double> secondaryAnimation,
|
|
Widget child,
|
|
) {
|
|
return zoomPageTransitionsBuilder.buildTransitions(
|
|
// Empty PageRoute<> object, only used to pass allowSnapshotting to ZoomPageTransitionsBuilder
|
|
PageRouteBuilder(
|
|
allowSnapshotting: true,
|
|
fullscreenDialog: false,
|
|
pageBuilder: (context, animation, secondaryAnimation) =>
|
|
const SizedBox.shrink(),
|
|
),
|
|
context,
|
|
animation,
|
|
secondaryAnimation,
|
|
child,
|
|
);
|
|
}
|
|
}
|