CheckoutPage constructor

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

The CheckoutPage 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 CheckoutPage(
    {Key? key,
    required this.priceItems,
    required this.payToName,
    this.displayNativePay = false,
    this.isApple = false,
    this.onNativePay,
    this.displayCashPay = false,
    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.displayTestData = false,
    this.footer})
    : assert(priceItems.length <= 10),
      super(key: key);