encodeEdgeInsets static method
Encodes the given value
to a JSON compatible Map. The returned result
will always have one of the following formats:
{
"bottom": "<double>",
"left": "<double>",
"right": "<double>",
"top": "<double>"
}
Implementation
static Map<String, dynamic>? encodeEdgeInsets(EdgeInsets? value) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'bottom': value.bottom,
'left': value.left,
'right': value.right,
'top': value.top,
};
}
return _stripDynamicNull(result);
}