mapOf<V> function
Implementation
Map<String, V> mapOf<V>(dynamic json, V Function(dynamic json) valueMappingOp) {
final map = <String, V>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = valueMappingOp(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}