extractMap<T, C> static method
Implementation
static extractMap<T, C>(Map dataMap, String reference) {
Map? defaultValue = _getDefaultValue(reference, Map);
dynamic value = dataMap[reference];
if (value == null || value is! Map) return defaultValue;
try {
Map<T, C> castedValue = Map<T, C>.from(value);
return castedValue.isEmpty ? defaultValue : castedValue;
} catch (e) {
return defaultValue;
}
}