encryptedBroadcast method

Future<bool> encryptedBroadcast(
  1. Object data
)

Broadcasts a message, whose payload is encrypted, to all directly connected nodes.

The message payload is set to data and is encrypted.

Returns true upon successful broadcast, otherwise false.

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

Implementation

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

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