Skip to content

Commit

Permalink
Don’t dispose of controller when disposing Flare renderer as it may g…
Browse files Browse the repository at this point in the history
…et re-attached. Rendering won’t advance if unattached anyhow.
  • Loading branch information
luigi-rosso committed Apr 26, 2019
1 parent 4416a67 commit 63c1d05
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions flare_flutter/lib/flare_actor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,6 @@ class FlareActorRenderObject extends FlareRenderBox {
}
}

@override
void dispose() {
super.dispose();
_controller = null;
}

void updateBounds() {
if (_artboard != null) {
ActorNode node;
Expand All @@ -175,6 +169,7 @@ class FlareActorRenderObject extends FlareRenderBox {

/// We're playing if we're not paused and our controller is active (or
/// there's no controller) or there are animations running.
@override
bool get isPlaying =>
!_isPaused &&
((_controller?.isActive?.value ?? false) || _animationLayers.isNotEmpty);
Expand Down

0 comments on commit 63c1d05

Please sign in to comment.