canLock property

  1. @override
bool get canLock
override

It returns true if the lock can be locked. For basic lock (reentrant or not), it is when the lock is not locked.

For multi lock, it is when any lock is locked.

Implementation

@override
bool get canLock => _locks.every((it) => it.canLock);