ABACheckoutContainer constructor

const ABACheckoutContainer({
  1. Key? key,
  2. required double amount,
  3. required double shipping,
  4. required String lastname,
  5. required String firstname,
  6. required String email,
  7. required String phone,
  8. List<ABATransactionItem> items = const [],
  9. required String checkoutApiUrl,
  10. required ABAMerchant merchant,
  11. bool enabled = false,
  12. Widget? checkoutLabel,
  13. dynamic onBeginCheckout(
    1. ABATransaction? transaction
    )?,
  14. dynamic onFinishCheckout(
    1. ABATransaction? transaction
    )?,
  15. dynamic onBeginCheckTransaction(
    1. ABATransaction? transaction
    )?,
  16. dynamic onFinishCheckTransaction(
    1. ABATransaction? transaction
    )?,
  17. dynamic onCreatedTransaction(
    1. int? value,
    2. String? msg
    )?,
  18. dynamic onPaymentSuccess(
    1. ABATransaction? transaction
    )?,
  19. dynamic onPaymentFail(
    1. ABATransaction? transaction
    )?,
})

Implementation

const ABACheckoutContainer({
  Key? key,
  required this.amount,
  required this.shipping,
  required this.lastname,
  required this.firstname,
  required this.email,
  required this.phone,
  this.items = const [],
  required this.checkoutApiUrl,
  required this.merchant,
  this.enabled: false,
  this.checkoutLabel,
  this.onBeginCheckout,
  this.onFinishCheckout,
  this.onBeginCheckTransaction,
  this.onFinishCheckTransaction,
  this.onCreatedTransaction,
  this.onPaymentSuccess,
  this.onPaymentFail,
})  : assert(amount > 0),
      // assert(lastname != null),
      // assert(firstname != null),
      // assert(email != null),
      // assert(phone != null),
      // assert(checkoutApiUrl != null),
      // assert(merchant != null),
      super(key: key);