drawer_challenge icon indicating copy to clipboard operation
drawer_challenge copied to clipboard

Another implementation used in an app

Open ilyen85 opened this issue 5 years ago • 3 comments

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?

ilyen85 avatar Sep 16 '20 18:09 ilyen85

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 avatar Dec 25 '20 05:12 Yassineelkasmy

@Yassineelkasmy could you pls show an example of how you implemented navigation?

premy avatar Jan 14 '21 17:01 premy

@ilyen85 hi mate, were you able to implement the transition? If so, would you care to share an example? Thanks!

premy avatar Jan 15 '21 16:01 premy