lastConnectedDevice property
Future<BluetoothDevice?>
get
lastConnectedDevice
get last connected bluetooth device
Implementation
Future<BluetoothDevice?> get lastConnectedDevice async {
String? lastDevice = (await _prefs).getString(_keyLastConnectedDevice);
return lastDevice != null
? BluetoothDevice.fromJson(json.decode(lastDevice))
: null;
}