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