getAsObject method
Gets the value stored in map element without any conversions. When element key is not defined it returns the entire map value.
- key (optional) a key of the element to get Returns the element value or value of the map when index is not defined.
Implementation
dynamic getAsObject([String? key]) {
if (key == null) {
var result = <String, dynamic>{};
for (var key in _values.keys) {
var value = _values[key];
result[key] = value;
}
return result;
} else {
return _values[key];
}
}