GroupAnnotation constructor

GroupAnnotation({
  1. required String id,
  2. required Offset position,
  3. required Size size,
  4. required String title,
  5. Color color = Colors.blue,
  6. GroupBehavior behavior = GroupBehavior.bounds,
  7. Set<String>? nodeIds,
  8. EdgeInsets padding = defaultPadding,
  9. int zIndex = -1,
  10. bool isVisible = true,
  11. bool selected = false,
  12. bool isInteractive = true,
  13. Map<String, dynamic> metadata = const {},
})

Implementation

GroupAnnotation({
  required super.id,
  required Offset position,
  required Size size,
  required String title,
  Color color = Colors.blue,
  GroupBehavior behavior = GroupBehavior.bounds,
  Set<String>? nodeIds,
  this.padding = defaultPadding,
  int zIndex = -1, // Usually behind nodes
  bool isVisible = true,
  super.selected = false,
  super.isInteractive = true,
  super.metadata,
}) : _nodeIds = ObservableSet.of(nodeIds ?? {}),
     _observableBehavior = Observable(behavior),
     super(
       type: 'group',
       initialPosition: position,
       initialZIndex: zIndex,
       initialIsVisible: isVisible,
     ) {
  _observableSize = Observable(size);
  _observableTitle = Observable(title);
  _observableColor = Observable(color);
}