Skip to content

Commit

Permalink
Merge pull request #26 from MalteMagnussen/patch-1
Browse files Browse the repository at this point in the history
It is an error to call setState unless mounted is true.
  • Loading branch information
knopp authored Oct 8, 2020
2 parents 07b6e9e + 7b36016 commit 2a13fd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/flutter_reorderable_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,9 @@ class _ReorderableItemState extends State<ReorderableItem> {
}

void update() {
setState(() {});
if (mounted) {
setState(() {});
}
}

@override
Expand Down

0 comments on commit 2a13fd6

Please sign in to comment.