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

Exception Thrown #2

Open
jkears opened this issue Jun 10, 2019 · 0 comments
Open

Exception Thrown #2

jkears opened this issue Jun 10, 2019 · 0 comments

Comments

@jkears
Copy link

jkears commented Jun 10, 2019

This line of code throws an exception in emulator...

Navigator.pushReplacementNamed(context, '/topics');

Looking up a deactivated widget's ancestor is unsafe.
At this point the state of the widget's element tree is no longer stable. To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling inheritFromWidgetOfExactType() in the widget's didChangeDependencies() method

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

1 participant