updateProgress method

void updateProgress(
  1. double newProgress
)

Internal method to update progress.

For use by the StreamingText widget only. Reaching 1.0 routes through _completeOnce so onCompleted fires at most once per cycle (W25).

Implementation

void updateProgress(double newProgress) {
  final clamped = newProgress.clamp(0.0, 1.0);
  if (clamped >= 1.0) {
    _completeOnce();
    return;
  }
  _progress = clamped;
  _notifyProgress();
}