BmCharacteristicData.fromMap constructor

BmCharacteristicData.fromMap(
  1. Map json
)

Implementation

factory BmCharacteristicData.fromMap(Map<dynamic, dynamic> json) {
  return BmCharacteristicData(
    remoteId: DeviceIdentifier(json['remote_id']),
    serviceUuid: Guid(json['service_uuid']),
    secondaryServiceUuid: json['secondary_service_uuid'] != null ? Guid(json['secondary_service_uuid']) : null,
    characteristicUuid: Guid(json['characteristic_uuid']),
    value: _hexDecode(json['value']),
    success: json['success'] != 0,
    errorCode: json['error_code'],
    errorString: json['error_string'],
  );
}