initialize method

void initialize()

Implementation

void initialize() {
  if (isInitialized) return;
  final stackTrace = kDebugMode ? StackTrace.current : null;
  final creator = mockableCreator;
  removeFromReactiveModel = addToActiveReactiveModels(this);
  if (isInitialized) return;
  final cachedObs = ReactiveStatelessWidget.addToObs;
  ReactiveStatelessWidget.addToObs = null;
  isInitialized = true;
  setStateNullable(
    (_) => creator(),
    middleSetState: middleSetCreator,
    stackTrace: stackTrace,
  );
  onStateInitialized();
  ReactiveStatelessWidget.addToObs = cachedObs;
}