onCleanup method
Registers a cleanup function to be called when the watcher is disposed.
Implementation
void onCleanup(VoidCallback callback) {
_cleanups.add(callback);
}
Registers a cleanup function to be called when the watcher is disposed.
void onCleanup(VoidCallback callback) {
_cleanups.add(callback);
}