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;
}