frameDidDraw method

  1. @override
  2. @mustCallSuper
void frameDidDraw()
override

Called immediately after calling SchedulerBinding.handleDrawFrame.

Implementation

@override
@mustCallSuper
void frameDidDraw() {
  endMeasureFrame();
  profile.addDataPoint(
    BenchmarkMetric.drawFrame.label,
    _drawFrameStopwatch.elapsed,
    reported: true,
  );

  if (shouldContinue()) {
    PlatformDispatcher.instance.scheduleFrame();
  } else {
    for (final VoidCallback fn in _didStopCallbacks) {
      fn();
    }
    _runCompleter.complete();
  }
}