onDestroy abstract method

void onDestroy(
  1. void callback()
)

Registers a callback to invoke when this view is destroyed.

Implementation

void onDestroy(void Function() callback);