mapToList<E> method

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

Converts each element in the list to another type using the convert function. Returns a new list containing the converted elements.

Implementation

List<E> mapToList<E>(E Function(T) convert) {
  return map(convert).toList();
}