takeIf method
Implementation
T? takeIf(bool Function(T self) predicate) {
if (predicate(this)) {
return this;
} else {
return null;
}
}
T? takeIf(bool Function(T self) predicate) {
if (predicate(this)) {
return this;
} else {
return null;
}
}