BluetoothClassicConnectionEvent.fromMap constructor
从原生 Map 创建 Classic 连接状态事件。
参数:
map:原生事件数据,无默认值。
Implementation
factory BluetoothClassicConnectionEvent.fromMap(Map<String, dynamic> map) {
return BluetoothClassicConnectionEvent(
deviceId: map['deviceId']?.toString() ?? '',
state: bluetoothConnectionStateFromString(map['state']?.toString()),
error: map['error']?.toString(),
);
}