fromJson method
Deserializes JSON data into this annotation.
Implement this to update the annotation's properties from persisted data. This is called when loading saved workflows.
You typically update position, visibility, z-index, and any custom properties.
Implementation
@override
void fromJson(Map<String, dynamic> json) {
final newPosition = Offset(
(json['x'] as num).toDouble(),
(json['y'] as num).toDouble(),
);
position = newPosition;
zIndex = json['zIndex'] as int? ?? 0;
isVisible = json['isVisible'] as bool? ?? true;
}