2023-12-05 15:45:04 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class CustomTransitionsBuilders {
|
|
|
|
|
const CustomTransitionsBuilders._();
|
|
|
|
|
|
2025-07-25 08:07:22 +05:30
|
|
|
static const ZoomPageTransitionsBuilder zoomPageTransitionsBuilder = ZoomPageTransitionsBuilder();
|
2023-12-05 15:45:04 +00:00
|
|
|
|
|
|
|
|
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,
|
2025-07-25 08:07:22 +05:30
|
|
|
pageBuilder: (context, animation, secondaryAnimation) => const SizedBox.shrink(),
|
2023-12-05 15:45:04 +00:00
|
|
|
),
|
|
|
|
|
context,
|
|
|
|
|
animation,
|
|
|
|
|
secondaryAnimation,
|
|
|
|
|
child,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|