Flutter loop Rive animation

65 Views Asked by At

I simply want to loop my RiveAnimation. I thought I can simply pass a "loop" or sth, but I couldn't find anything. Here is how I create the animation:

  SizedBox(
    height: 200,
    child: context.rive.phoneInternetBubblesBlingWormRIV.copyWith(
      onInit: (artboard) {
        _riveController = StateMachineController.fromArtboard(
          artboard,
          'State Machine 1',
        );

        if (_riveController != null) {
          artboard.addController(_riveController!);
        }
        setState(() => ());
      },
    ),
  ),

With this the animation is playing on init until finish.

0

There are 0 best solutions below