BluetoothDevice constructor Null safety

BluetoothDevice(
  1. {PrinterDeviceType? type,
  2. BluetoothDeviceType? bluetoothType,
  3. int? rssi,
  4. int? bluetoothClass,
  5. String? id,
  6. String? name}
)

Implementation

factory BluetoothDevice({
  PrinterDeviceType? type,
  BluetoothDeviceType? bluetoothType,
  $core.int? rssi,
  $core.int? bluetoothClass,
  $core.String? id,
  $core.String? name,
}) {
  final _result = create();
  if (type != null) {
    _result.type = type;
  }
  if (bluetoothType != null) {
    _result.bluetoothType = bluetoothType;
  }
  if (rssi != null) {
    _result.rssi = rssi;
  }
  if (bluetoothClass != null) {
    _result.bluetoothClass = bluetoothClass;
  }
  if (id != null) {
    _result.id = id;
  }
  if (name != null) {
    _result.name = name;
  }
  return _result;
}