NearbyServiceSocketListener<T> constructor

const NearbyServiceSocketListener<T>({
  1. required ValueChanged<T> onData,
  2. VoidCallback? onCreated,
  3. VoidCallback? onDone,
  4. void onError(
    1. Object, [
    2. StackTrace
    ])?,
  5. bool? cancelOnError,
})

It is required to pass the onData parameter to process the data that came through the stream.

Implementation

const NearbyServiceSocketListener({
  required this.onData,
  this.onCreated,
  this.onDone,
  this.onError,
  this.cancelOnError,
});