AnnotationWidget constructor

const AnnotationWidget({
  1. Key? key,
  2. required Annotation annotation,
  3. required NodeFlowController controller,
  4. bool isSelected = false,
  5. bool isHighlighted = false,
  6. VoidCallback? onTap,
  7. VoidCallback? onDoubleTap,
  8. void onContextMenu(
    1. Offset globalPosition
    )?,
  9. VoidCallback? onMouseEnter,
  10. VoidCallback? onMouseLeave,
})

Creates an annotation widget.

Parameters

  • annotation: The annotation to render
  • isSelected: Whether this annotation is currently selected
  • isHighlighted: Whether this annotation is being highlighted (e.g., during drag-over)
  • controller: Controller for direct drag handling (required)

Implementation

const AnnotationWidget({
  super.key,
  required this.annotation,
  required this.controller,
  this.isSelected = false,
  this.isHighlighted = false,
  this.onTap,
  this.onDoubleTap,
  this.onContextMenu,
  this.onMouseEnter,
  this.onMouseLeave,
});