passes method

bool passes(
  1. String event,
  2. Map<String, dynamic> payload
)

Implementation

bool passes(String event, Map<String, dynamic> payload) {
  if (!isWaitedFor) return true;
  if (payload.containsKey(traitName) == false) return false;
  return (this.event == event || waitsForEvents.contains(event)) &&
      (traitCount[payload[traitName] as String] ?? 0) >= neededTraitCount;
}