toJson method
Implementation
@override
Map<String, dynamic> toJson() {
final json = super.toJson();
double? width = this.width;
if (width == double.infinity) width = MATCH_PARENT;
double? height = this.height;
if (height == double.infinity) height = MATCH_PARENT;
json.addAll({
// screen bounds
'width': width,
'height': height,
});
return json;
}