markAsUninitialized method

  1. @protected
  2. @visibleForTesting
void markAsUninitialized()

Marks that the object is again not initialized. After this, you can call initializedSuccessfully again.

Throws:

Implementation

@protected
@visibleForTesting
void markAsUninitialized() {
  if (!isInitialized) {
    throw EnsureInitializedException(wasNotInitializedYetMessage);
  }

  _completer = Completer<T>();
  _whenUninitializedStreamController.add(null);
}