getDataAsTypedMap<T, R> method

Map<T, R> getDataAsTypedMap<T, R>({
  1. T toTypedKey(
    1. String
    )?,
  2. R toTypedValue(
    1. dynamic
    )?,
})

Return raw (unwrapped) object data as Map where R is not of type JsonNode but a dart StandardType (String, bool, etc).

Implementation

Map<T, R> getDataAsTypedMap<T, R>({
  T Function(String)? toTypedKey,
  R Function(dynamic)? toTypedValue,
}) =>
    data.map((key, value) => MapEntry(toTypedKey?.call(key) ?? key as T,
        toTypedValue?.call(_unwrapValue(value)) ?? _unwrapValue(value)));