Spec<T>.predicate constructor
const
Spec<T>.predicate (
- bool predicate(
- T candidate
Creates a spec from predicate.
The predicate is called with each candidate passed to isSatisfiedBy or call. The predicate is evaluated each time the spec is evaluated; its result is not cached.
Implementation
const factory Spec.predicate(bool Function(T candidate) predicate) =
_Predicate<T>;