toMap<T1, T2> static method
Converts a dynamic value to a non-nullable map.
d
- The dynamic value to be converted.
def
- The default map value if conversion fails.
Returns a map.
Implementation
static Map<T1, T2> toMap<T1, T2>(dynamic d, Map<T1, T2> def) {
return toMapN(d) ?? def;
}