PEGooglePayButton constructor

const PEGooglePayButton({
  1. Key? key,
  2. required PEPaymentRequest paymentRequest,
  3. double width = double.infinity,
  4. double height = 50,
  5. dynamic onPaymentFailed(
    1. Exception
    )?,
  6. VoidCallback? onPaymentSheetDismissed,
  7. dynamic onTokenDidReturn(
    1. String,
    2. dynamic,
    3. PEGooglePayAddress?,
    4. PEGooglePayAddress?,
    )?,
})

Creates an instance of PEGooglePayButton.

  • paymentRequest: The payment details.
  • width: The button width.
  • height: The button height.
  • onPaymentFailed: Callback for handling payment failures.
  • onPaymentSheetDismissed: Callback when the sheet is dismissed.
  • onTokenDidReturn: Callback for handling the returned payment token.

Implementation

const PEGooglePayButton({
  Key? key,
  required this.paymentRequest,
  this.width = double.infinity,
  this.height = 50,
  this.onPaymentFailed,
  this.onPaymentSheetDismissed,
  this.onTokenDidReturn,
}) : super(key: key);