toJson method
Produces a Map that can be serialized to JSON.
Implementation
Map<String, dynamic> toJson() {
return {
'type': type,
if (description != null) 'description': description,
if (helpLink != null) 'help_link': helpLink,
if (handled != null) 'handled': handled,
if (_meta?.isNotEmpty ?? false) 'meta': _meta,
if (_data?.isNotEmpty ?? false) 'data': _data,
if (synthetic != null) 'synthetic': synthetic,
};
}