logConditionCheck function

void logConditionCheck(
  1. String component,
  2. String condition, {
  3. required bool result,
  4. Map<String, dynamic>? data,
  5. String? entityId,
  6. String? gesturePhase,
})

Helper for logging condition checks

Implementation

void logConditionCheck(
  String component,
  String condition, {
  required bool result,
  Map<String, dynamic>? data,
  String? entityId,
  String? gesturePhase,
}) {
  final resultStr = result ? 'PASS' : 'FAIL';
  logGestureDebug(
    GestureDebugEventType.conditionCheck,
    component,
    'Condition "$condition": $resultStr',
    data: data,
    entityId: entityId,
    gesturePhase: gesturePhase,
    severity: result ? GestureDebugSeverity.debug : GestureDebugSeverity.warn,
  );
}