negate property

bool Function(P) negate

Negate the return value of this function.

bool isEven(int n) => n % 2 == 0;
final isOdd = isEven.negate;

Implementation

bool Function(P) get negate => (p) => !this(p);