listenToOutput method

  1. @override
void listenToOutput({
  1. NotificationProcessor? notificationProcessor,
})

Start listening to output from the server, and deliver notifications to notificationProcessor.

Implementation

@override
void listenToOutput({NotificationProcessor? notificationProcessor}) {
  _stdoutSubscription = _process!.stdout
      .transform(utf8.decoder)
      .transform(LineSplitter())
      .listen((line) => outputProcessor(line, notificationProcessor));
  _stderrSubscription = _process!.stderr
      .transform(utf8.decoder)
      .transform(LineSplitter())
      .listen((line) => errorProcessor(line, notificationProcessor));
}