diff --git a/lib/flutter_bluetooth_serial.dart b/lib/flutter_bluetooth_serial.dart index 4e0e6816..27f084d7 100644 --- a/lib/flutter_bluetooth_serial.dart +++ b/lib/flutter_bluetooth_serial.dart @@ -84,13 +84,14 @@ class FlutterBluetoothSerial { class BluetoothDevice { final String name; final String address; - final int type; + final int type = 0; bool connected = false; + + BluetoothDevice(this.name, this.address); BluetoothDevice.fromMap(Map map) : name = map['name'], - address = map['address'], - type = map['type']; + address = map['address']; Map toMap() => { 'name': this.name,