toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'id': id,
  'text': text,
  if (tooltip != null) 'tooltip': tooltip,
  if (command != null) 'command': command,
  if (priority != null) 'priority': priority,
  'alignment': alignment.value,
  if (color != null) 'color': color,
  if (backgroundColor != null) 'backgroundColor': backgroundColor,
};