copyWith method

BluetoothConnectionStateLocal copyWith({
  1. List<BluetoothDevice>? pairedDevices,
  2. BluetoothDevice? connectedDevice,
  3. List<BluetoothData>? receivedData,
  4. bool? isScanning,
  5. bool? isConnecting,
  6. String? error,
})

Implementation

BluetoothConnectionStateLocal copyWith({
  List<BluetoothDevice>? pairedDevices,
  BluetoothDevice? connectedDevice,
  List<BluetoothData>? receivedData,
  bool? isScanning,
  bool? isConnecting,
  String? error,
}) {
  return BluetoothConnectionStateLocal(
    pairedDevices: pairedDevices ?? this.pairedDevices,
    connectedDevice: connectedDevice ?? this.connectedDevice,
    receivedData: receivedData ?? this.receivedData,
    isScanning: isScanning ?? this.isScanning,
    isConnecting: isConnecting ?? this.isConnecting,
    error: error ?? this.error,
  );
}