map<U> method

  1. @useResult
U? map<U>(
  1. U f(
    1. T
    )
)

Applies a transformation f to the value if it is not null.

Implementation

@useResult
U? map<U>(U Function(T) f) => this != null ? f(this as T) : null;