PresentationController constructor

PresentationController({
  1. required String id,
  2. required CEPTriggerPayload trigger,
  3. void onCancel(
    1. PresentationController controller
    )?,
})

Creates a controller for one delivered trigger.

onCancel lets the owner of this presentation run its ordered teardown (dismiss the overlay, emit final signals, then settle) when the plugin cancels. When it is omitted — or when it throws — cancelling falls back to settling with a cancelled reason, so the release path can never itself be the thing that wedges a CEP slot.

Implementation

PresentationController({
  required this.id,
  required this.trigger,
  void Function(PresentationController controller)? onCancel,
}) : _onCancel = onCancel {
  _presentation = _Presentation(this);
}