toJson method
Implementation
Json toJson() => {
'icon': icon,
if (size != null) 'size': writeDouble(size!),
if (color != null) 'color': color!.toJson(),
if (tooltip != null) 'tooltip': tooltip,
if (actions.isNotEmpty) 'actions': [for (final r in actions) r.toJson()],
};