clearTimeline method

  1. @override
Future<void> clearTimeline (
  1. {Duration timeout: kUnusuallyLongTimeout}

Clears all timeline events recorded up until now.

The timeout argument causes a warning to be displayed to the user if the operation exceeds the specified timeout; it does not actually cancel the operation.

For WebFlutterDriver, this is only supported for Chrome.


Future<void> clearTimeline({
  Duration timeout = kUnusuallyLongTimeout,
}) async {
  assert(timeout != null);
  try {
    await _warnIfSlow<void>(
      future: _peer.sendRequest(_clearVMTimelineMethodName, <String, String>{}),
      timeout: timeout,
      message: 'VM is taking an unusually long time to respond to being told to clear its timeline buffer...',
  } catch (error, stackTrace) {
    throw DriverError(
      'Failed to clear event timeline due to remote error',