onDispose method

void onDispose(
  1. void callback()
)

Implementation

void onDispose(void Function() callback) => _onDisposeCallback = callback;