settle method
Implementation
Future<void> settle({Duration? timeout}) async {
return RunnerBenchmark.async('execution', 'settle', () async {
try {
await _settleFromEvents(timeout: timeout ?? config.settleTimeout);
} catch (error) {
if (!error.toString().contains('timed out') &&
!error.toString().contains('timeout')) {
rethrow;
}
// Background streams can keep the event loop active after the UI has
// reached a stable state. The bounded wait is therefore best effort.
}
await _drainFlutterDiagnostics();
await yieldToLiveApiWork();
});
}