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

It is an error to call setState unless mounted is true. #26

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

MalteMagnussen
Copy link
Contributor

@MalteMagnussen MalteMagnussen commented Oct 8, 2020

https://api.flutter.dev/flutter/widgets/State/mounted.html

Got this error in my App, and checking "mounted" fixed it:

NoSuchMethodError: NoSuchMethodError: The method 'markNeedsBuild' was called on null.
Receiver: null
Tried calling: markNeedsBuild()
  File "framework.dart", line 1253, in State.setState
  File "flutter_reorderable_list.dart", line 604, in _ReorderableItemState.update
  File "flutter_reorderable_list.dart", line 402, in _ReorderableListState.end
  File "<asynchronous suspension>"
  File "unparsed"

https://api.flutter.dev/flutter/widgets/State/mounted.html

Got this error in my App, and checking "mounted" fixed it: 

NoSuchMethodError: NoSuchMethodError: The method 'markNeedsBuild' was called on null.
Receiver: null
Tried calling: markNeedsBuild()
  File "framework.dart", line 1253, in State.setState
  File "flutter_reorderable_list.dart", line 604, in _ReorderableItemState.update
  File "flutter_reorderable_list.dart", line 402, in _ReorderableListState.end
  File "<asynchronous suspension>"
  File "unparsed"
@knopp knopp merged commit 2a13fd6 into knopp:master Oct 8, 2020
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