toJson method
Convert to JSON.
Implementation
@override
Map<String, dynamic> toJson() => {
...baseToJson(),
'target': target,
'mode': mode,
'format': format,
'fallback': fallback,
if (viewport != null) 'viewport': viewport,
if (maxWidth != null) 'maxWidth': maxWidth,
if (aspectRatio != null) 'aspectRatio': aspectRatio,
if (caption != null) 'caption': caption,
if (alt != null) 'alt': alt,
};