lock method Null safety

void lock()

Implementation

void lock() {
  handle = true;
}