onData method

void onData(
  1. MessageWithID<R> data
)

Implementation

void onData(MessageWithID<R> data) {
  final (id, result) = data;

  final completer = _tasks.remove(id);
  if (completer == null) return;
  completer.complete(result);
}