Giter Site home page Giter Site logo

rodineijf / drag-down-to-pop-flutter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nekocode/drag-down-to-pop-flutter

0.0 1.0 0.0 277 KB

A page transition which supports drag-down-to-pop gesture.

License: BSD 3-Clause "New" or "Revised" License

Kotlin 2.21% Swift 2.08% Objective-C 0.19% Dart 95.52%

drag-down-to-pop-flutter's Introduction

drag_down_to_pop

build status pub package

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.

Simplest Usage

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()),
);

drag-down-to-pop-flutter's People

Contributors

mohammed7aafar avatar nekocode avatar rodineijf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.