let<R> method

R? let<R>(
  1. R action(
    1. T
    )
)

Executes the given action if the value is not null.

Returns the result of the action or null if the value is null.

Implementation

R? let<R>(R Function(T) action) => this != null ? action(this as T) : null;