Navigator 2.0 et NavigationRail

Hello @Behache, j’espère que tu vas bien !

Il semblerait que les dernières version de Flutter ai mis un coup dans l’aile de la méthode qui marchait bien jusqu’à présent …


Quand je mets une NavigationBar dans le bottomnavigationbar du Scafold voilà ce que j’obtiens comme erreur. Dans le body je laisse le Navigator comme proposait.

En faisant quelques recherches je suis tombé sur cet article mais j’ai du mal à voir quelle est la démarche à suivre pour corriger ca :

« This is working as intended because you’re not including an Overlay widget in the tree and the close button of the snackbar (showCloseIcon: true) requires an Overlay to be present so it can show itself if necessary.
By default, MaterialApp introduces a Navigator, which includes an Overlay. However, MaterialApp.builder is a hook to wrap the Navigator (provided as child to MaterialApp.builder) with other widgets and therefore the context passed to MaterialApp.builder does not include an Overlay. If you want to use this context for anything that needs an Overlay (like showing a snackbar with a close button that has a tooltip) you’ll have to introduce the Overlay yourself (or use a context that is a descendant of the Navigator introduced by MaterialApp).
This didn’t crash in 3.19.5 because the tooltip for the close button of the snack bar was only introduced in #143934 as an accessibility fix. Not having the tooltip was a bug that made the snackbar less accessible. »

Pas exactement le même problème mais j’ai l’impression que ca s’en rapproche. As tu rencontré ce problème quand tu as fait une maj de ton app qui utilisais la méthode que tu proposais ?