toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> json = {};
  if (title != null) json['title'] = title;
  if (description != null) json['description'] = description;
  if (buttonText != null) json['buttonText'] = buttonText;
  if (image != null) json['image'] = image;
  return json;
}