objectsToList<T extends Object> method

  1. @override
List<T> objectsToList<T extends Object>(
  1. T map(
    1. Obj object
    ), {
  2. int? limit,
})
override

Returns a list of T mapped from child data objects using map function.

An optional limit when provided limits the number of returned objects.

The returned list is immutable.

Other child objects (that cannot be represented as a data objects) are omitted from an iterable.

Implementation

@override
List<T> objectsToList<T extends Object>(
  T Function(Obj object) map, {
  int? limit,
}) {
  var objs = objects;
  if (limit != null) {
    objs = objs.take(limit);
  }
  return objs.map<T>(map).toList(growable: false);
}