nubank / nuvigator

A powerful routing abstraction over Flutter Navigator, with nested Navigator and Deeplinks
Apache License 2.0
277 stars 33 forks source link

Update Nuvigator default behavior to not reload when NuRouter changes #97

Closed leoiacovini closed 2 years ago

leoiacovini commented 2 years ago

This PR proposes changing the default behavior of Nuvigator to not rebuild/reload from scratch when the NuRouter instance changes, which is especially relevant for nested flow. This is motivated by the following points:

While we expect this to be a fix/improvement for most cases, it's feasible to this being used as a feature for current users. Due to that, this can be considered a breaking change, and in those cases, you can provide a shouldRebuild function to the Nuvigator specifying the desired conditions to meet your previous behavior.