RawGooglePayButton constructor

RawGooglePayButton(
  1. {Key? key,
  2. required PaymentConfiguration paymentConfiguration,
  3. VoidCallback? onPressed,
  4. int cornerRadius = defaultButtonHeight ~/ 2,
  5. GooglePayButtonTheme theme = GooglePayButtonTheme.dark,
  6. GooglePayButtonType type = GooglePayButtonType.buy,
  7. Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{}}
)

Creates a Google Pay button widget with the parameters specified.

Implementation

RawGooglePayButton({
  super.key,
  required final PaymentConfiguration paymentConfiguration,
  this.onPressed,
  this.cornerRadius = defaultButtonHeight ~/ 2,
  this.theme = GooglePayButtonTheme.dark,
  this.type = GooglePayButtonType.buy,
  this.gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
})  : _paymentConfiguration = paymentConfiguration,
      constraints = const BoxConstraints.tightFor(
        width: minimumButtonWidth,
        height: defaultButtonHeight,
      ) {
  assert(constraints.debugAssertIsValid());
}