setProgress method

bool setProgress(
  1. double value, {
  2. FrameRate? frameRate,
})

Implementation

bool setProgress(double value, {FrameRate? frameRate}) {
  frameRate ??= FrameRate.composition;
  var roundedProgress =
      composition.roundProgress(value, frameRate: frameRate);
  if (roundedProgress != _progress) {
    _isDirty = false;
    _progress = roundedProgress;
    _compositionLayer.setProgress(roundedProgress);
    return _isDirty;
  } else {
    return false;
  }
}