toJson method
Convert the object to a Json format.
Implementation
@override
Object toJson() => <Object>[
type,
<String, Object?>{
'assetName': assetName,
'bitmapScaling': bitmapScaling.name,
'imagePixelRatio': imagePixelRatio,
if (width != null) 'width': width,
if (height != null) 'height': height,
}
];