draggable_route 0.7.0 copy "draggable_route: ^0.7.0" to clipboard
draggable_route: ^0.7.0 copied to clipboard

Draggable Hero route. Inspired by Instagram route transitions. Open route from source widget and closes to source widget. Can be closed by drag

Draggable Route #

pub package

This package provides easy to use draggable route. Inspired by Instagram route transitions.

Showcase #

With Source Without Source Scroll View with Source Scroll View without Source
gif gif gif gif

Features #

Draggable route can:

  • open from source widget with expanding
  • close to source widget with pretty animation
  • drag to close
  • vanish if source widget not available

Getting started #

Add draggable_route to dependencies

dart pub add draggable_route

Usage #

Without widget source #

Open route without widget source. Page will be pushed as Adaptive page. On pop page will vanish with animation. Drag to pop is also working in this scenario

Navigator.of(context).push(
  DraggableRoute(
    builder: (context) => const Page(),
  ),
)

With widget source #

Open route with widget source. Page will be expanded from widget source and retracted to widget source on pop.

Warning

context provided to source should not have GlobalKeys in children.

Source widget from context will be recreated for shuttle animation.

Navigator.of(context).push(
  DraggableRoute(
    source: context,
    builder: (context) => const Page(),
  ),
)

Additional information #

Feel free to contribute :-)

16
likes
160
points
74
downloads

Publisher

verified publishermelv.space

Weekly Downloads

Draggable Hero route. Inspired by Instagram route transitions. Open route from source widget and closes to source widget. Can be closed by drag

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, provider, vector_math

More

Packages that depend on draggable_route