getPeersStream method

  1. @override
Stream<List<NearbyDevice>> getPeersStream()
override

Implementation

@override
Stream<List<NearbyDevice>> getPeersStream() {
  const peersChannel = EventChannel("nearby_service_peers");
  return peersChannel.receiveBroadcastStream().map((e) {
    final updatedResult = ResultHandler.instance.handle(e);
    return NearbyDeviceMapper.instance.mapToDeviceList(updatedResult);
  });
}