list method

List list(
  1. Map<String, Presence> presences, [
  2. dynamic chooser(
    1. String,
    2. Presence
    )?
])

Returns the array of presences, with selected metadata formatted according to the chooser function. See Example for better understanding and implementation details.

Implementation

List<dynamic> list(
  Map<String, Presence> presences, [
  dynamic Function(String, Presence)? chooser,
]) {
  chooser = chooser ?? (k, v) => v;
  return _map(presences, (k, v) => chooser!(k, v));
}