felangel / flow_builder

Flutter Flows made easy! A Flutter package which simplifies navigation flows with a flexible, declarative API.
https://pub.dev/packages/flow_builder
MIT License
389 stars 63 forks source link

There is no way to add Hero animation #19

Closed marcinOz closed 3 years ago

marcinOz commented 3 years ago

Is your feature request related to a problem? Please describe. There is no way to add Hero animation. There are no observers that we can add to. Below is a link to Navigation 2.0 case: https://stackoverflow.com/questions/64589179/flutter-hero-widget-navigation-2-0-and-provider-are-not-working-properly-toget

Basically, Navigator has observers params that enable to add HeroController.

final heroC = HeroController();

 Navigator(
            pages: [
              MaterialPage(child: X(onTapped: null)),
              if (state.go) MaterialPage(child: Y()),
            ],
            onPopPage: (route, result) {
              if (!route.didPop(result)) return false;
              state.go = false;
              return true;
            },
            observers: [heroC],
          ),

Describe the solution you'd like Please make it possible to add observers.