markAsUninitialized method

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

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

Throws:

  • EnsureInitializedException if object was not initialized yet.

Implementation

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

  _completer = Completer();
  _whenUninitializedStreamController.add(null);
}