encodeSize static method
Encodes the given value
to a JSON compatible Map.
This returns the JSON representation to follow the structure:
{
"height": "<double>",
"width": "<double>"
}
Implementation
static Map<String, dynamic>? encodeSize(Size? value) {
Map<String, dynamic>? result;
if (value != null) {
result = {
'height': value.height,
'width': value.width,
};
}
return _stripDynamicNull(result);
}