getCharacteristic method

GATTCharacteristic? getCharacteristic(
  1. UUID serviceId,
  2. UUID characteristicId
)

Implementation

GATTCharacteristic? getCharacteristic(UUID serviceId, UUID characteristicId) {
  if (_status != BleConnectorStatus.connected) return null;
  final service = _services!.firstWhere((d) => d.uuid == serviceId);
  return service.characteristics
      .firstWhere((d) => d.uuid == characteristicId);
}