takeOrNull method

  1. @override
T? takeOrNull()
override

Takes the value out of this OnceCell, moving it back to an uninitialized state. Returns null if the cell is empty.

Implementation

@override
T? takeOrNull() {
  return take().toNullable();
}