toJson method
Implementation
@visibleForTesting
Map<String, dynamic> toJson() => {
"type": type.value,
"size": size?.toJson(),
"padColor": _intFromColor(padColor),
"returnOriginalRect": returnOriginalRect,
}.clearNulls();