AsyncNotifier<S> constructor

AsyncNotifier<S>()

Creates an AsyncNotifier that starts in the loading state.

Use this constructor when you want the notifier to start in a loading state and then transition to data or error state based on async operations.

Example:

// Start with loading state
AsyncNotifier<String>()

Implementation

AsyncNotifier() : super(const AsyncState.loading()) {
  _initialize(setState);
}