getAsMap method

Map<K, V>? getAsMap(
  1. K key, {
  2. Map<K, V>? def,
  3. TypeElementParser<K>? keyParser,
  4. TypeElementParser<V>? valueParser,
  5. Map<K, V>? defaultValue,
  6. bool ignoreCase = false,
})

Gets a key value parsing as Map.

  • def is the default value if the value is invalid.
  • keyParser is the parser to use for each key in the Map.
  • valueParser is the parser to use for each value in the Map.

Implementation

Map<K, V>? getAsMap(K key,
        {Map<K, V>? def,
        TypeElementParser<K>? keyParser,
        TypeElementParser<V>? valueParser,
        Map<K, V>? defaultValue,
        bool ignoreCase = false}) =>
    getParsed(
        key,
        (m) => TypeParser.parseMap<K, V>(m,
            def: def, keyParser: keyParser, valueParser: valueParser),
        defaultValue: defaultValue,
        ignoreCase: ignoreCase);