map<R> method

R? map<R>(
  1. R f(
    1. T
    )
)

map value using function f if value is not null.

Implementation

R? map<R>(R Function(T) f) {
  if (this == null) {
    return null;
  } else {
    return f(this!);
  }
}