showErrorToast method

void showErrorToast(
  1. ErrorEntity? errorEntity,
  2. bool show
)

Implementation

void showErrorToast(ErrorEntity? errorEntity, bool show) {
  if (show && null != errorEntity) {
    String error = errorEntity.message.isNotEmpty ? errorEntity.message : Strings.httpRequestError.tr;
    ToastUtils.showToast(error);
  }
}