v1.0.0drag_down_to_pop
Eine Seitenübergang, die den Drag-Down-to-Pop-Gesten unterstützt.
29Likes 10330-Tage-Downloads140Pub-Punkte
AndroidiOSWebmacOSWindowsLinux
Eine Seitenübergang, die den Drag-Down-to-Pop-Gesten unterstützt.
{"sdk":"flutter"}{"sdk":"flutter"}Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
A page transition which supports drag-down-to-pop gesture. The main source code is copied from the cupertino/route.dart in Flutter SDK with some modifications.
https://github.com/nekocode/drag-down-to-pop-flutter/blob/master/image/preview.gif?raw=true
Create a new PageRoute to use this page transiaction.
import 'package:drag_down_to_pop/drag_down_to_pop.dart';
class ImageViewerPageRoute extends MaterialPageRoute {
ImageViewerPageRoute({@required WidgetBuilder builder})
: super(builder: builder);
@override
Widget buildTransitions(BuildContext context, Animation<double> animation,
Animation<double> secondaryAnimation, Widget child) {
return const DragDownToPopPageTransitionsBuilder()
.buildTransitions(this, context, animation, secondaryAnimation, child);
}
}
// Push to a new page using ImageViewerPageRoute
Navigator.push(
context,
ImageViewerPageRoute(builder: (context) => ImageViewerPage()),
);