BluetoothDescriptorValue.fromMap constructor

BluetoothDescriptorValue.fromMap(
  1. Map<String, dynamic> map
)

从原生 Map 创建描述符值事件。

参数:

  • map:原生事件数据,无默认值。

Implementation

factory BluetoothDescriptorValue.fromMap(Map<String, dynamic> map) {
  return BluetoothDescriptorValue(
    deviceId: map['deviceId']?.toString() ?? '',
    serviceUuid: map['serviceUuid']?.toString() ?? '',
    characteristicUuid: map['characteristicUuid']?.toString() ?? '',
    descriptorUuid: map['descriptorUuid']?.toString() ?? '',
    value: _asByteList(map['value']),
  );
}