onCancel method
void
onCancel(
- dynamic callback()
Register a callback to be called when cancelled
Implementation
void onCancel(Function() callback) {
if (_isCancelled) {
// Already cancelled, call immediately
callback();
} else {
_callbacks.add(callback);
}
}