getList<T> method

List<T> getList<T>(
  1. K key, {
  2. List<K>? alternativeKeys,
  3. dynamic innerKey,
  4. int? innerListIndex,
  5. List<T>? defaultValue,
})

Converts the value at key (or alternativeKeys) to a List of T.

Implementation

List<T> getList<T>(
  K key, {
  List<K>? alternativeKeys,
  dynamic innerKey,
  int? innerListIndex,
  List<T>? defaultValue,
}) => ConvertObjectImpl.toList<T>(
  _firstValueForKeys(key, alternativeKeys: alternativeKeys),
  mapKey: innerKey,
  listIndex: innerListIndex,
  defaultValue: defaultValue,
  debugInfo: {
    'key': key,
    if (alternativeKeys != null && alternativeKeys.isNotEmpty)
      'altKeys': alternativeKeys,
  },
);