tryUnlock method

  1. @override
bool tryUnlock(
  1. T code
)
override

Tries to unlock the current padlock with the specified code.

Implementation

@override
bool tryUnlock(T code) {
  if (isObjectValid(code)) {
    unlock();
    return true;
  }
  return false;
}