toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'x': position.dx,
'y': position.dy,
'x1': endPosition?.dx,
'y1': endPosition?.dy,
'type': type,
'isFocus': isFocus,
'imagePaths': imagePaths,
'imageLinks': imageLinks,
'isNew': isNew,
};
}