onDestroy method

void onDestroy(
  1. void callback()
)

Register a callback that will be called when the component is destroyed.

Implementation

void onDestroy(void Function() callback) {
  hostView.onDestroy(callback);
}