collect<R> method

List<R> collect<R>(
  1. R convert(
    1. K key,
    2. V value
    )
)

Implementation

List<R> collect<R>(R Function(K key, V value) convert) {
  final result = <R>[];
  forEach((key, value) => result.add(convert(key, value)));
  return result;
}