BluetoothDevice.fromDynamic constructor
BluetoothDevice.fromDynamic(
- dynamic e
Implementation
factory BluetoothDevice.fromDynamic(dynamic e) {
if (e is Map?) {
return BluetoothDevice(
id: e?['id'] ?? '',
name: e?['name'] ?? '',
type: e?['type'] ?? '',
alias: e?['alias'] ?? '',
bondState: BondState.none
);
}
return BluetoothDevice(
id: null,
name: null,
alias: null,
type: null,
bondState: null,
);
}