play method

void play(
  1. String name, {
  2. double mix = 1.0,
  3. double mixSeconds = 0.2,
})

Add the FlareAnimationLayer of the animation named name, to the end of the list of currently playing animation layers.

Implementation

void play(String name, {double mix = 1.0, double mixSeconds = 0.2}) {
  _animationName = name;
  if (_artboard != null) {
    var animation = _artboard!.getAnimation(_animationName);
    if (animation != null) {
      _animationLayers.add(FlareAnimationLayer(_animationName, animation)
        ..mix = mix
        ..mixSeconds = mixSeconds);
      isActive.value = true;
    }
  }
}