frameDidDraw method
Called immediately after calling SchedulerBinding.handleDrawFrame.
Implementation
@override
@mustCallSuper
void frameDidDraw() {
// Only record frames that show the widget.
if (showWidget) {
endMeasureFrame();
profile.addDataPoint(
BenchmarkMetric.drawFrame.label,
_drawFrameStopwatch.elapsed,
reported: true,
);
}
if (shouldContinue()) {
showWidget = !showWidget;
_hostState._setStateTrampoline();
} else {
for (final VoidCallback fn in _didStopCallbacks) {
fn();
}
_runCompleter!.complete();
}
}