addController method

bool addController(
  1. RiveAnimationController controller
)

Implementation

bool addController(RiveAnimationController controller) {
  assert(controller != null);
  if (_animationControllers.contains(controller) ||
      !controller.init(context)) {
    return false;
  }
  controller.isActiveChanged.addListener(_onControllerPlayingChanged);
  _animationControllers.add(controller);
  if (controller.isActive) {
    context?.markNeedsAdvance();
  }
  return true;
}