Another implementation used in an app
Hey!
First of all, thank you for the examples they are really neat, nice job!
But I have a question... How would you use this as an animation between pages?
I have a hard time to implement this, because whenever I change the page, I get an error:
════════ Exception caught by gesture ══════════════
The method ‘open’ was called on null.
Receiver: null
Tried calling: open()
pointing to this line:
CustomDrawer.of(context).open()
So..., how would you use the animation in between page changes?
I was having the same issue and i figured out that you have to wrap the widget that call open() method with a builder exactly like he did. Wrong : IconButton( icon: Icon(Icons.menu), onPressed: () { CustomDrawer.of(context).open(); }, Correct: Builder( builder: (context) { return IconButton( icon: Icon(Icons.menu), onPressed: () => CustomDrawer.of(context).open(), ); }, ),
@Yassineelkasmy could you pls show an example of how you implemented navigation?
@ilyen85 hi mate, were you able to implement the transition? If so, would you care to share an example? Thanks!