mapIfOnType<E, R> method
R?
mapIfOnType<E, R>(
- R f(
- E
Implementation
R? mapIfOnType<E, R>(R Function(E) f) {
final self = this;
if (self is E) {
return f(self);
} else {
return null;
}
}