toMapWithDefault static method
Converts value into map object or returns default when conversion is not possible
value
the value to convert.- defaultValue the default value. Returns map object or emptu map when conversion is not supported.
See toNullableMap
Implementation
static dynamic toMapWithDefault(value, Map<String, dynamic> defaultValue) {
var result = RecursiveMapConverter.toNullableMap(value);
return result ?? defaultValue;
}