objects<T> static method

List<T>? objects<T>(
  1. String key,
  2. dynamic source,
  3. EntityBuilder<T> builder
)

Returns a list of objects associated with the given key from the source, constructed using the provided builder.

Implementation

static List<T>? objects<T>(
  String key,
  dynamic source,
  EntityBuilder<T> builder,
) {
  final data = _v(key, source);
  if (data is List<Map<String, dynamic>>) {
    return data.map((e) => builder.call(e)).toList();
  } else {
    return null;
  }
}