values<T> static method

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

Returns a list of values associated with the given key from the source, cast to the specified type.

Implementation

static List<T>? values<T>(
  String key,
  dynamic source, [
  EntityBuilder<T>? builder,
]) {
  final data = source is Map ? source[key] : null;
  final iterable = _vs(data, builder);
  if (iterable == null) return null;
  return List.from(iterable);
}