Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Class to slide a route horizontal from right to left.
class HorizontalSlidingPageRoute<T> extends MaterialPageRoute<T> {
WidgetBuilder builder,
RouteSettings settings: const RouteSettings(),
maintainState: true,
: super(builder: builder, settings: settings, maintainState: maintainState);
Widget buildTransitions(BuildContext context, Animation<double> animation,
Animation<double> forwardAnimation, Widget child) {
return new SlideTransition(
position: new FractionalOffsetTween(
begin: FractionalOffset.topRight,
end: FractionalOffset.topLeft
child: child,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.