getConnectedDeviceStreamById method
Implementation
@override
Stream<NearbyDevice?> getConnectedDeviceStreamById(String deviceId) {
const connectedDeviceChannel = EventChannel(
"nearby_service_connected_device",
);
return connectedDeviceChannel.receiveBroadcastStream(deviceId).map((e) {
final updatedResult = ResultHandler.instance.handle(e);
return NearbyDeviceMapper.instance.mapToDevice(updatedResult);
});
}