map<T> static method

List<T?> map<T>(
  1. List list,
  2. Function handler
)

Implementation

static List<T?> map<T>(List list, Function handler) {
  List<T?> result = [];
  for (var i = 0; i < list.length; i++) {
    result.add(handler(i, list[i]));
  }

  return result;
}