VmService constructor Null safety
- Stream inStream,
- void writeMessage(
- String message
- {Log? log,
- DisposeHandler? disposeHandler,
- Future? streamClosed}
Implementation
VmService(
Stream<dynamic> /*String|List<int>*/ inStream,
void writeMessage(String message), {
Log? log,
DisposeHandler? disposeHandler,
Future? streamClosed,
}) {
_streamSub = inStream.listen(_processMessage,
onDone: () => _onDoneCompleter.complete());
_writeMessage = writeMessage;
_log = log == null ? _NullLog() : log;
_disposeHandler = disposeHandler;
streamClosed?.then((_) {
if (!_onDoneCompleter.isCompleted) {
_onDoneCompleter.complete();
}
});
}