frameCallback method

  1. @override
  2. @mustCallSuper
void frameCallback(
  1. Duration duration
)
override

The frame callback for the ticker.

Implementations of this method should start with a call to super.frameCallback(duration) to ensure the ticker is properly managed.

Implementation

@override
@mustCallSuper
void frameCallback(Duration duration) {
  super.frameCallback(duration);

  _shouldAdvance = rivePainter?.advance(elapsedSeconds) ?? false;

  if (!_shouldAdvance) {
    stopTicker();
  }

  markNeedsPaint();
}