broadcast method

Future<bool> broadcast(
  1. Object data
)

Broadcasts a message to all directly connected nodes.

The message payload is set to data.

Returns true upon successful broadcast, otherwise false.

Throws a DeviceFailureException if the Wi-Fi/Bluetooth adapter is not enabled.

Implementation

Future<bool> broadcast(Object data) async {
  if (_datalinkManager.checkState() == 0) {
    throw DeviceFailureException('No wifi and bluetooth connectivity');
  }

  return await _presentationManager.broadcast(data, false);
}