resetAsPending method

void resetAsPending()

Calls reset and also removes the existing factory to switch the state of the ReplaceablePot to pending.

After a call to this method, a new factory must be set with ReplaceablePot.replace before the pot is used. Otherwise the PotNotReadyException is thrown.

Implementation

void resetAsPending() {
  if (!_isPending) {
    reset();
    _replace(() => throw PotNotReadyException(), asPending: true);
  }
}