onBeforeUnmount function

void onBeforeUnmount(
  1. void hook()
)

Called right before the component is unmounted from the DOM

Implementation

void onBeforeUnmount(void Function() hook) {
  _registerHook(Lifecycle.beforeUnmount, hook);
}