This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/flutter/events-and-notifications/annotation.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Flutter PDF annotation events and notifications | Nutrient SDK

Nutrient Flutter SDK emits events when users interact with annotations in a document. Subscribe to the typed controller.events streams from the NutrientDocumentView onControllerReady callback.

The SDK supports the following annotation events:

StreamEventDescription
controller.events.annotationCreatedAnnotationCreatedEventThe SDK emits this when users create annotations.
controller.events.annotationUpdatedAnnotationUpdatedEventThe SDK emits this when users update annotations.
controller.events.annotationDeletedAnnotationDeletedEventThe SDK emits this when users delete annotations.
controller.events.annotationSelectedAnnotationSelectedEventThe SDK emits this when users select annotations.
controller.events.annotationDeselectedAnnotationDeselectedEventThe SDK emits this when users deselect annotations.

Each event exposes the following data:

  • event.annotations — The affected annotations as typed Annotation models.
  • event.types — The AnnotationType values for the affected annotations. Use this to filter events by annotation type.
  • event.annotationsJson — The raw Instant JSON.

The following example listens for created ink annotations:

NutrientDocumentView(
documentPath: documentPath,
onControllerReady: (controller) {
controller.events.annotationCreated.listen((event) {
if (event.types.contains(AnnotationType.ink)) {
for (final annotation in event.annotations) {
print('Created: ${annotation.type.name} on page ${annotation.pageIndex}');
}
}
});
},
)

For advanced customization, use the Nutrient native and web SDKs. Refer to the Nutrient Flutter SDK customization guide and the following guides for more information: