createMarkerAnnotation method

MarkerAnnotation createMarkerAnnotation({
  1. required String id,
  2. required Offset position,
  3. MarkerType markerType = MarkerType.info,
  4. double size = 24.0,
  5. Color color = Colors.red,
  6. String? tooltip,
  7. Offset offset = Offset.zero,
})

Implementation

MarkerAnnotation createMarkerAnnotation({
  required String id,
  required Offset position,
  MarkerType markerType = MarkerType.info,
  double size = 24.0,
  Color color = Colors.red,
  String? tooltip,
  Offset offset = Offset.zero,
}) {
  // Create annotation with actual position (same as nodes)
  final annotation = MarkerAnnotation(
    id: id,
    position: position,
    markerType: markerType,
    markerSize: size,
    color: color,
    tooltip: tooltip,
    offset: offset,
  );

  return annotation;
}