toMap method Null safety
Convert this object to a JSON string.
Implementation
@override
Map<String, dynamic> toMap() {
return {
if (type != null) 'type': type,
if (id != null) 'id': id,
if (attributes != null) 'attributes': attributes?.toMap(),
};
}