ensureInitialized method

FutureOr<InitializationResult> ensureInitialized({
  1. Initializable? parent,
})

Ensures that this instance is initialized.

Returns the InitializationResult: synchronously if the initialization is (or was) synchronous. The returned Future never fails: an error is a result with InitializationResult.ok false.

  • parent: the instance that needs this one (when not called from its hooks, where it's resolved automatically).

Implementation

FutureOr<InitializationResult> ensureInitialized({Initializable? parent}) =>
    _ensure(_resolveWaiters(parent));