getAsList<E> method

List<E>? getAsList<E>(
  1. K key, {
  2. List<E>? def,
  3. TypeElementParser<E>? elementParser,
  4. List<E>? defaultValue,
  5. bool ignoreCase = false,
})

Gets a key value parsing as List.

  • def is the default value if the value is invalid.
  • elementParser is the parser to use for each element in the List.

Implementation

List<E>? getAsList<E>(K key,
        {List<E>? def,
        TypeElementParser<E>? elementParser,
        List<E>? defaultValue,
        bool ignoreCase = false}) =>
    getParsed(
        key,
        (l) => TypeParser.parseList<E>(l,
            def: def, elementParser: elementParser),
        defaultValue: defaultValue,
        ignoreCase: ignoreCase);