drag-down-to-pop-flutter
drag-down-to-pop-flutter copied to clipboard
the background is moved when dragging
its been moved left to right when drag popup . how to make background stable ?
You can do this:
class ImageViewerPageRoute extends MaterialPageRoute {
ImageViewerPageRoute({required WidgetBuilder builder})
: super(builder: builder, maintainState: false);
@override
Widget buildTransitions(BuildContext context, Animation<double> animation,
Animation<double> secondaryAnimation, Widget child) {
return const DragDownToPopPageTransitionsBuilder()
.buildTransitions(this, context, animation, secondaryAnimation, child);
}
@override
bool canTransitionFrom(TransitionRoute previousRoute) {
return false;
}
@override
bool canTransitionTo(TransitionRoute nextRoute) {
return false;
}
}