tryGetMap<K2, V2> method
Tries to convert the element at index (or fallback indices) to a Map of K2 to V2.
Implementation
Map<K2, V2>? tryGetMap<K2, V2>(
int index, {
List<int>? alternativeIndices,
dynamic innerMapKey,
int? innerIndex,
Map<K2, V2>? defaultValue,
ElementConverter<K2>? keyConverter,
ElementConverter<V2>? valueConverter,
}) => ConvertObjectImpl.tryToMap<K2, V2>(
_firstForIndices(index, alternativeIndices: alternativeIndices),
mapKey: innerMapKey,
listIndex: innerIndex,
defaultValue: defaultValue,
keyConverter: keyConverter,
valueConverter: valueConverter,
debugInfo: {
'index': index,
if (alternativeIndices != null && alternativeIndices.isNotEmpty)
'altIndexes': alternativeIndices,
},
);