mount method

  1. @protected
  2. @mustCallSuper
void mount()

Called the first time a provider is obtained.

Implementation

@protected
@mustCallSuper
void mount() {
  _mounted = true;
  state._element = this;
  assert(() {
    RiverpodBinding.debugInstance
        .providerListChangedFor(containerId: container._debugId);

    _debugIsFlushing = true;
    return true;
  }(), '');
  try {
    _runStateCreate();
  } finally {
    assert(() {
      _debugIsFlushing = false;
      return true;
    }(), '');
  }
  _didMount = true;
  _dirty = false;
  _dependencyMayHaveChanged = false;
}