handlePurchaseProductCanceledEvent method

Stream<FastStoreBlocState> handlePurchaseProductCanceledEvent()

Handles the FastStoreBlocEventType.purchaseProductCanceled event when a product purchase has been canceled.

Implementation

Stream<FastStoreBlocState> handlePurchaseProductCanceledEvent() async* {
  if (_isPurchasePending) {
    _logger.warning('Product purchase canceled');
    _isPurchasePending = false;

    yield currentState.copyWith(isPurchasePending: false);
  }
}