typedObjectOrNull<T, R> method

Map<T, R>? typedObjectOrNull<T, R>({
  1. required String key,
  2. required T toTypedKey(
    1. String
    ),
  3. R toTypedValue(
    1. dynamic
    )?,
})

Get Map<T,R> by String key.

Throws SquintException if key is not found or values are not all of type R.

Implementation

Map<T, R>? typedObjectOrNull<T, R>({
  required String key,
  required T Function(String) toTypedKey,
  R Function(dynamic)? toTypedValue,
}) =>
    objectNodeOrNull(key)?.getDataAsTypedMap(
        toTypedKey: toTypedKey, toTypedValue: toTypedValue);