handleError method

void handleError(
  1. dynamic error
)

Implementation

void handleError(dynamic error) {
  error = _formartError(error);

  if (_isPurchasePending) {
    addEvent(FastStoreBlocEvent.purchaseProductFailed(
      error,
      _pendingPurchaseProductId!,
    ));
  } else if (_isRestoringPurchases) {
    addEvent(FastStoreBlocEvent.restorePurchasesFailed(error));
  } else if (_isLoadingProducts) {
    addEvent(FastStoreBlocEvent.loadProductsFailed(error));
  }
}