JsonObjectMap typedef
A typedef representing a JSON-encoded map with string keys and Object?
values.
The JsonObjectMap
type is used to represent a map-like structure commonly
found in JSON-encoded data. It has string keys and Object?
values, where
Object?
represents a nullable value of any type. This typedef is typically
used to improve code readability and provide a more expressive type
annotation.
Example usage:
JsonObjectMap user = {
'name': 'John Doe',
'age': 30,
'email': null,
};
Note: JSON-encoded maps can contain values of different types, including
null. The Object?
type allows for flexibility in handling different value
types.
See also:
Implementation
typedef JsonObjectMap = Map<String, Object?>;