map<S> method

List<S> map<S>(
  1. S func(
    1. T
    )
)

Call the given function on each item in the collection and collect the results in a new List.

Unlike Iterator#map, this returns a List, not an Iterator. @expose @param {function(T):*} func This function must not modify the collection. @return {List.}

Implementation

_i3.List<S> map<S>(S Function(T) func) => _i4.callMethod(
      this,
      'map',
      [_i4.allowInterop(func)],
    );