CheckoutData constructor

const CheckoutData({
  1. required List<PriceItem> priceItems,
  2. required String payToName,
  3. bool displayNativePay = false,
  4. bool isApple = false,
  5. void onNativePay(
    1. CheckOutResult checkOutResult
    )?,
  6. void onCashPay(
    1. CheckOutResult checkOutResult
    )?,
  7. required dynamic onCardPay(
    1. CardFormResults results,
    2. CheckOutResult checkOutResult
    ),
  8. bool displayEmail = true,
  9. bool lockEmail = false,
  10. String initEmail = '',
  11. String initPhone = '',
  12. String initBuyerName = '',
  13. List<String>? countriesOverride,
  14. Function? onBack,
  15. GlobalKey<CardPayButtonState>? payBtnKey,
  16. GlobalKey<FormState>? formKey,
  17. double? cashPrice,
  18. double? taxRate,
  19. bool displayTestData = false,
})

The CheckoutData widget is a stateless widget resembling your typical checkout page and some typical option along with some helpful features such as built-in form validation and credit card icons that update based on the input provided. This is a UI widget only and holds no responsibility and makes no guarantee for transactions using this ui. Transaction security and integrity is the responsibility of the developer and what ever Third-party transaction api that developer is using. A great API to use is Stripe

Implementation

const CheckoutData(
    {required this.priceItems,
    required this.payToName,
    this.displayNativePay = false,
    this.isApple = false,
    this.onNativePay,
    this.onCashPay,
    required this.onCardPay,
    this.displayEmail = true,
    this.lockEmail = false,
    this.initEmail = '',
    this.initPhone = '',
    this.initBuyerName = '',
    this.countriesOverride,
    this.onBack,
    this.payBtnKey,
    this.formKey,
    this.cashPrice,
    this.taxRate,
    this.displayTestData = false});