NutrientEvent class sealed

Base class for all cross-platform Nutrient SDK events.

Events are emitted on NutrientControllerInterface.events and cover the common event surface shared by Android, iOS, and Web. Platform-specific events are exposed on the respective adapter:

  • Android-only: AndroidAdapter.androidEventsAndroidNutrientEvent
  • iOS-only: IOSAdapter.iosEventsIOSNutrientEvent
  • Web-only: NutrientWebAdapter.webEventsNutrientWebEventData

Subscribing

// All events
controller.events.listen((event) {
  switch (event) {
    case DocumentLoadedEvent(:final document):
      print('Loaded: $document');
    case PageChangedEvent(:final pageIndex):
      print('Page changed to $pageIndex');
    case AnnotationCreatedEvent(:final annotations):
      print('Created: ${annotations.map((a) => a.type.name)}');
    default:
      break;
  }
});

// Filtered via typed extension getters
controller.events.documentLoaded.listen((e) => print(e.document));
controller.events.pageChanged.listen((e) => print(e.pageIndex));
controller.events.annotationCreated.listen((e) => print(e.annotations));

See the package guide documentation/events-api-guide.md for the full event catalogue, buffering semantics, and the platform-support matrix.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited