createStickyAnnotation method

StickyAnnotation createStickyAnnotation({
  1. required String id,
  2. required Offset position,
  3. required String text,
  4. double width = 200.0,
  5. double height = 100.0,
  6. Color color = Colors.yellow,
  7. Offset offset = Offset.zero,
})

Implementation

StickyAnnotation createStickyAnnotation({
  required String id,
  required Offset position,
  required String text,
  double width = 200.0,
  double height = 100.0,
  Color color = Colors.yellow,
  Offset offset = Offset.zero,
}) {
  // Create annotation with actual position (same as nodes)
  final annotation = StickyAnnotation(
    id: id,
    position: position,
    text: text,
    width: width,
    height: height,
    color: color,
    offset: offset,
  );

  return annotation;
}