Skip to content

Commit

Permalink
Call setState if mounted.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Nov 6, 2019
1 parent c66ac64 commit 9ec074b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions flare_flutter/lib/flare_cache_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ class _FlareCacheBuilderState extends State<FlareCacheBuilder> {
if (value == _isWarm) {
return;
}
setState(() {
_isWarm = value;
});
if (mounted) {
setState(() {
_isWarm = value;
});
}
}

final Set<FlareCacheAsset> _assets = {};
Expand Down

0 comments on commit 9ec074b

Please sign in to comment.