close method

Future<void> close()

Closes Chromium and all of its pages (if any were opened). The Browser object itself is considered to be disposed and cannot be used anymore.

Implementation

Future<void> close() async {
  // Try to give a chance to other message to arrive before we complete the future
  // with an error
  await Future.delayed(Duration.zero);
  await _closeCallback();

  await connection.dispose('Browser.close');
  _dispose();
}