unmount method

  1. @override
void unmount()
override

Cleans up the reactive pipeline when the element is removed from the tree.

Ensures:

Implementation

@override
void unmount() {
  try {
    _trackedDependencies.clear();
    _terminal.deactivate();
    _coupler.decouple();
    _intent._contextController.empty();
  } catch (error, stackTrace) {
    Zone.current.handleUncaughtError(error, stackTrace);
  }

  super.unmount();
}