toMap method
Implementation
Map<String, dynamic> toMap() {
final map = <String, dynamic>{
"x": anchor.value.$1,
"y": anchor.value.$2,
"anchor": anchor.name,
};
if (offset != null) {
map["offset"] = {
"x": offset!.x,
"y": offset!.y,
};
}
return map;
}