takeUnless method
T?
takeUnless(
- bool block(
- T it
Return the current value if the given block is not satisfied, will return
null
if it is.
Implementation
T? takeUnless(bool Function(T it) block) {
if (this != null && !block(this!)) {
return this;
}
return null;
}