xor method
Compose this Predicate with the given predicate
using XOR.
You can also use the ^
operator.
Implementation
Predicate<T> xor(Predicate<T> predicate) => Predicate((t) {
final boolThis = _predicate(t);
final boolOther = predicate(t);
return boolThis ? !boolOther : boolOther;
});