start method

Future<void> start({
  1. bool paused = false,
})

Starts the server and announcement system for IDE integration

You can have the driver start in paused mode. In this mode, the driver will start up but it will wait until it receives the resume command from the inspection tool/API. This allows you to pre-set (or un-set) some data that modifies your app's startup behaviour. Defaults to false

Implementation

Future<void> start({bool paused = false}) async {
  if (!kDebugMode) return;

  _stopped = false;
  await _server.start(paused: paused);

  _announcementManager.removeExtension(_PauseExtension(false));
  if (paused) {
    _announcementManager.addExtension(_PauseExtension(true));
  }

  await _announcementManager.start();

  final webServiceUrl = await _getWebServiceUri();

  // ignore: avoid_print
  print(
      'Storage Inspector server running on $port [$tag][paused=$paused][service=$webServiceUrl]');

  if (paused) {
    await _server.waitForResume();
    if (!_stopped) {
      _announcementManager.removeExtension(_PauseExtension(false));
      await _announcementManager.stop();
      await _announcementManager.start();
    }
  }
}