Equal constructor
Validates the equality between two values.
to
the value to be compared to.
diff
the error message in case of different values; the default value is
'does not match'.
Implementation
const Equal(Object? Function() to, {String? diff})
: _to = to,
_diff = diff ?? 'does not match';