AnnotationLayer<T> constructor

const AnnotationLayer<T>({
  1. Key? key,
  2. required NodeFlowController<T> controller,
  3. bool filter(
    1. Annotation
    )?,
  4. void onAnnotationTap(
    1. Annotation annotation
    )?,
  5. void onAnnotationDoubleTap(
    1. Annotation annotation
    )?,
  6. void onAnnotationContextMenu(
    1. Annotation annotation,
    2. Offset globalPosition
    )?,
  7. void onAnnotationMouseEnter(
    1. Annotation annotation
    )?,
  8. void onAnnotationMouseLeave(
    1. Annotation annotation
    )?,
})

Creates an annotation layer.

Parameters

  • controller: The node flow controller managing the annotations
  • filter: Optional predicate to filter which annotations to render

Implementation

const AnnotationLayer({
  super.key,
  required this.controller,
  this.filter,
  this.onAnnotationTap,
  this.onAnnotationDoubleTap,
  this.onAnnotationContextMenu,
  this.onAnnotationMouseEnter,
  this.onAnnotationMouseLeave,
});