From c9571132273353795f0b2138ad2699de5e447dff Mon Sep 17 00:00:00 2001 From: Giulio Gola Date: Thu, 4 Feb 2021 11:23:58 +0100 Subject: [PATCH] Add Constructor in BluetoothDevice class Needed a constructor to instantiate BluetoothDevice with persisted properties (id, name, type) --- lib/src/bluetooth_device.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/bluetooth_device.dart b/lib/src/bluetooth_device.dart index e6be12e7..d182767d 100644 --- a/lib/src/bluetooth_device.dart +++ b/lib/src/bluetooth_device.dart @@ -8,6 +8,8 @@ class BluetoothDevice { final DeviceIdentifier id; final String name; final BluetoothDeviceType type; + + BluetoothDevice({this.id, this.name, this.type}); BluetoothDevice.fromProto(protos.BluetoothDevice p) : id = new DeviceIdentifier(p.remoteId),