CommentNode<T> constructor

CommentNode<T>({
  1. required String id,
  2. required Offset position,
  3. required String text,
  4. required T data,
  5. double width = 200.0,
  6. double height = 100.0,
  7. Color color = Colors.yellow,
  8. int zIndex = 0,
  9. bool isVisible = true,
  10. bool locked = false,
})

Implementation

CommentNode({
  required super.id,
  required super.position,
  required String text,
  required super.data,
  double width = 200.0,
  double height = 100.0,
  this.color = Colors.yellow,
  int zIndex = 0,
  bool isVisible = true,
  super.locked,
}) : _text = Observable(text),
     super(
       type: 'comment',
       size: Size(width, height),
       layer: NodeRenderLayer.foreground,
       initialZIndex: zIndex,
       visible: isVisible,
       selectable: false, // Comments don't participate in marquee selection
       inputPorts: const [],
       outputPorts: const [],
     );