detach method
Detaches a Cancellable from this token.
If this token has no remaining attached cancellables after detaching, it will also detach itself from the merged tokens.
Implementation
@override
void detach(Cancellable cancellable) {
if (!isCancelled) _attachedCancellables.remove(cancellable);
if (_attachedCancellables.isEmpty) {
for (final CancellationToken token in _tokens) {
token.detach(this);
}
}
}