getFieldsKeysInMap method

Map<String, String?> getFieldsKeysInMap(
  1. List<String> fields,
  2. Map<String, Object?> map, {
  3. @Deprecated("Ignored: computed per field") String? fieldLC,
  4. @Deprecated("Ignored: computed per field") String? fieldSimple,
  5. Map<String, String>? mapLC,
  6. Map<String, String>? mapSimple,
})
inherited

Returns a Map of fields keys from map.

  • The fields are case insensitive.
  • mapLC and mapSimple (indexes of map, see getFieldKeyInMap) are shared by all the fields.
  • fieldLC and fieldSimple are ignored: they are the normalized forms of ONE field, computed per field (passing them used the same normalized key for every field).

Implementation

Map<String, String?> getFieldsKeysInMap(
  List<String> fields,
  Map<String, Object?> map, {
  @Deprecated("Ignored: computed per field") String? fieldLC,
  @Deprecated("Ignored: computed per field") String? fieldSimple,
  Map<String, String>? mapLC,
  Map<String, String>? mapSimple,
}) {
  var fieldsMap = fields
      .map(
        (f) => MapEntry(
          f,
          getFieldKeyInMap(f, map, mapLC: mapLC, mapSimple: mapSimple),
        ),
      )
      .toMapFromEntries();

  return fieldsMap;
}