release method Null safety
Implementation
void release() {
if (!isHeld) {
throw StateError('No lock to release');
}
_lock!.complete();
_lock = null;
_stack = null;
}
void release() {
if (!isHeld) {
throw StateError('No lock to release');
}
_lock!.complete();
_lock = null;
_stack = null;
}