Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another implementation used in an app #5

Open
ilyen85 opened this issue Sep 16, 2020 · 3 comments
Open

Another implementation used in an app #5

ilyen85 opened this issue Sep 16, 2020 · 3 comments

Comments

@ilyen85
Copy link

ilyen85 commented Sep 16, 2020

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?

@Yassineelkasmy
Copy link

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(),
);
},
),

@premy
Copy link

premy commented Jan 14, 2021

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

@premy
Copy link

premy commented Jan 15, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants