AnnotationWidget constructor

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

Creates an annotation widget.

Selection and highlight states are read directly from the annotation and controller - they do not need to be passed in.

Parameters

  • annotation: The annotation to render
  • controller: Controller for drag handling and state queries

Implementation

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