BleCharacteristicWriteEvent.fromMap constructor

BleCharacteristicWriteEvent.fromMap(
  1. Map map
)

Implementation

factory BleCharacteristicWriteEvent.fromMap(
  Map<dynamic, dynamic> map,
) => BleCharacteristicWriteEvent(
  remoteId: BleRemoteId(map[BleChannelKey.remoteId] as String? ?? ''),
  primaryServiceUuid: map[BleChannelKey.primaryServiceUuid] as String?,
  serviceUuid: map[BleChannelKey.serviceUuid] as String? ?? '',
  characteristicUuid: map[BleChannelKey.characteristicUuid] as String? ?? '',
  instanceId: map[BleChannelKey.instanceId] as int? ?? 0,
  success:
      map[BleChannelKey.success] == 1 || map[BleChannelKey.success] == true,
  errorCode: map[BleChannelKey.errorCode] as int? ?? 0,
  errorString: map[BleChannelKey.errorString] as String? ?? '',
);