customcast method
Implementation
core.Map<K, V?>? customcast(dynamic from, core.String context, dynamic key) {
core.Map<K, V?> result = {};
if (from == null) {
return null;
}
if (from is core.Map) {
for (K key in from.keys) {
if (_map.containsKey(key)) {
result[key] = _map[key]!._cast(from[key], "map entry", key);
} else {
result[key] = from[key];
}
}
return result;
}
return throw new FailedCast(context, key, "not a map");
}