encodeOffset static method
Encodes the given value
to a JSON representation.
{
"dx": <double>,
"dy": <double>
}
Implementation
static Map<String, dynamic>? encodeOffset(Offset? value) {
Map<String, dynamic>? result;
if (value != null) {
result = <String, dynamic>{
'dx': value.dx,
'dy': value.dy,
};
}
return _stripNull(result);
}