drag-down-to-pop-flutter icon indicating copy to clipboard operation
drag-down-to-pop-flutter copied to clipboard

the background is moved when dragging

Open a22349 opened this issue 3 years ago • 1 comments

its been moved left to right when drag popup . how to make background stable ?

a22349 avatar Mar 06 '21 12:03 a22349

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;
  }
}

rodineijf avatar Oct 01 '21 13:10 rodineijf