Skip to content

Don't call setDimensions when widget has been disposed and BuildContext is null#31

Merged
rayliverified merged 1 commit intoCodelessly:masterfrom
SpencerLindemuth:master
Nov 25, 2020
Merged

Don't call setDimensions when widget has been disposed and BuildContext is null#31
rayliverified merged 1 commit intoCodelessly:masterfrom
SpencerLindemuth:master

Conversation

@SpencerLindemuth
Copy link
Contributor

@SpencerLindemuth SpencerLindemuth commented Nov 25, 2020

When resuming the app from an external link on iOS only, didChangeMetrics is called which registers a postFrameCallback. Between the didChangeMetrics call and the frame completing the state is disposed causing an error to be thrown about the buildcontext being null. This allows setDimensions and setState to only be called if there is still a valid context meaning the widget is still in the tree. This fixes issue #29

@rayliverified rayliverified merged commit 594a2b1 into Codelessly:master Nov 25, 2020
@rayliverified
Copy link
Contributor

Thank you for your help.

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

Successfully merging this pull request may close these issues.

2 participants