settleAllDetached method
void
settleAllDetached()
Settles every live presentation the way core does when the owning plugin
is unregistered (G6): one that never displayed drops, one on screen
dismisses. Call this before plugin.detach(), which is the order core
guarantees.
Implementation
void settleAllDetached() {
for (final controller in _controllers) {
if (controller.isSettled) continue;
controller.settle(
controller.state == PresentationState.displaying
? const PresentationDismissed(
reason: DismissReason.pluginDetached,
)
: const PresentationDropped(reason: DropReason.pluginDetached),
);
}
}