handleInitializedEvent method

Stream<FastStoreBlocState> handleInitializedEvent()

Handles the FastStoreBlocEventType.initialized event when the store has been successfully initialized.

Implementation

Stream<FastStoreBlocState> handleInitializedEvent() async* {
  if (isInitializing) {
    isInitialized = true;

    yield currentState.copyWith(
      purchases: await _iapDataProvider.listAllPurchases(),
      isStoreAvailable: _isStoreAvailable,
      isInitializing: false,
      isInitialized: true,
    );
  }
}