BluetoothState.fromMap constructor
Implementation
factory BluetoothState.fromMap(Map<String, dynamic> map) {
final devices =
(map['connectedDevices'] as List<dynamic>? ?? [])
.map((e) => BluetoothDevice.fromMap(Map<String, dynamic>.from(e)))
.toList();
return BluetoothState(
isBluetoothEnabled: map['isBluetoothEnabled'] ?? false,
connectedDevices: devices,
);
}