BluetoothService constructor

BluetoothService({
  1. String? uuid,
  2. String? remoteId,
  3. bool? isPrimary,
  4. Iterable<BluetoothCharacteristic>? characteristics,
  5. Iterable<BluetoothService>? includedServices,
})

Implementation

factory BluetoothService({
  $core.String? uuid,
  $core.String? remoteId,
  $core.bool? isPrimary,
  $core.Iterable<BluetoothCharacteristic>? characteristics,
  $core.Iterable<BluetoothService>? includedServices,
}) {
  final result = create();
  if (uuid != null) result.uuid = uuid;
  if (remoteId != null) result.remoteId = remoteId;
  if (isPrimary != null) result.isPrimary = isPrimary;
  if (characteristics != null) result.characteristics.addAll(characteristics);
  if (includedServices != null)
    result.includedServices.addAll(includedServices);
  return result;
}