mapToList<R> method

List<R> mapToList<R>(
  1. R toElement(
    1. T e
    ), {
  2. bool growable = false,
})

Creates a List with all elements of this Iterable modified by toElement.

The List is fixed-length if growable is false.

Implementation

List<R> mapToList<R>(R Function(T e) toElement, {bool growable = false}) =>
    map<R>(toElement).toList(growable: growable);