mapToList<E> method

List<E> mapToList<E>(
  1. E convert(
    1. T
    )
)

Converts the iterable to a list using a convert function for each element.

Example:

var list = [1, 2];
var result = list.mapToList((i) => i.toString()); // ['1', '2']

Implementation

List<E> mapToList<E>(E Function(T) convert) => map(convert).toList();