byList<T> method

List<T>? byList<T>(
  1. String key,
  2. T onModel(
    1. Map value
    )
)

Implementation

List<T>? byList<T>(String key, T Function(Map<dynamic, dynamic> value) onModel) {
  if (this[key] == null) return null;
  if (this[key] is! List) return null;
  return (this[key] as List).map((e) => onModel.call(e)).toList();
}