toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  Map<String, dynamic> jsonObject = {};
  if (url != null) {
    jsonObject['url'] = url;
  }
  if (altText != null) {
    jsonObject['alt_text'] = altText;
  }
  return jsonObject;
}