PaystackWebView constructor

const PaystackWebView({
  1. Key? key,
  2. required String publicKey,
  3. required int amountSmallestUnit,
  4. required String currency,
  5. required String email,
  6. required String reference,
  7. String title = 'Paystack',
})

Creates a new Paystack checkout view.

  • publicKey should be your Paystack public key (pk_test_... or pk_live_...).
  • amountSmallestUnit is the amount in the smallest unit of the currency (for NGN, kobo; so ₦1,500 = 150000).
  • currency is the three-letter ISO code (e.g. "NGN", "USD").
  • email is the payer’s email.
  • reference is your unique transaction reference.
  • title sets the text in the custom app bar.

Implementation

const PaystackWebView({
  super.key,
  required this.publicKey,
  required this.amountSmallestUnit,
  required this.currency,
  required this.email,
  required this.reference,
  this.title = 'Paystack',
});