toJson method
Produces a Map that can be serialized to JSON.
Implementation
Map<String, dynamic> toJson() {
return {
...?unknown,
'formatted': formatted,
if (template != null) 'message': template,
if (params?.isNotEmpty ?? false) 'params': params,
};
}