evaluatePredicate function

bool evaluatePredicate(
  1. dynamic predicate,
  2. dynamic item
)

Implementation

bool evaluatePredicate(dynamic predicate, dynamic item) {
  return (predicate is Function && predicate(item)) ||
      ((item is Map && predicate is String && isTruthy(item[predicate])) ||
          isEqual(item, predicate));
}