lukepighetti / fluro

Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.
https://pub.dev/packages/fluro
MIT License
3.67k stars 417 forks source link

animation/secondaryAnimation transition delegates #210

Closed lukepighetti closed 3 years ago

lukepighetti commented 3 years ago

Any page should be able to have a transition for when it is presented/dismissed, or when it is covered/revealed (a page is presented on top of it).

Flutter semantics for this is animation and secondaryAnimation.

Ref: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/routes.dart#L947-L952

lukepighetti commented 3 years ago

Tracking this for Nav 2.0 rewrite

lukepighetti commented 3 years ago

Page A secondaryAnimation should be visually paired with Page B animation. This is what makes iOS routing so dynamic and compelling.

In other words, a Page's true secondaryAnimation should be pulled from the page that is being pushed over it, as that will match the motion of the push animation.

  1. Page A push animation: left
  2. Page B push animation: up, Page A secondaryAnimation: left

  1. Page A push animation: left
  2. Page B push animation: up, Page A secondaryAnimation: up