advertise method

Future<void> advertise(
})

Service to start advertising using NearbyCross plugin

Implementation

Future<void> advertise(String serviceId,
    {bool manualAcceptConnections = false,
    NearbyStrategies strategy = NearbyStrategies.star}) async {
  if (deviceInfo.length > NearbyConstraints.deviceInfoMaxBytes) {
    throw const DeviceInfoTooLarge(NearbyConstraints.deviceInfoMaxBytes);
  }
  await nearbyCross.advertise(
      serviceId, deviceInfo, manualAcceptConnections, strategy);
  isAdvertising = true;
}