toJson method
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;
}