PayButton constructor
PayButton(
- Key? key,
- PayProvider buttonProvider,
- @Deprecated('Prefer to use [paymentConfiguration]. Take a look at the readme to see examples') String? paymentConfigurationAsset,
- PaymentConfiguration? paymentConfiguration,
- void onPaymentResult( ),
- double width,
- double height,
- EdgeInsets margin,
- void onError(
- Object? error
- Widget? childOnError,
- Widget? loadingIndicator
Initializes the button and the payment client that handles the requests.
Implementation
PayButton(
Key? key,
this.buttonProvider,
@Deprecated('Prefer to use [paymentConfiguration]. Take a look at the readme to see examples')
final String? paymentConfigurationAsset,
final PaymentConfiguration? paymentConfiguration,
this.onPaymentResult,
this.width,
this.height,
this.margin,
this.onError,
this.childOnError,
this.loadingIndicator,
) : _payClient = paymentConfigurationAsset != null
? Pay.withAssets([paymentConfigurationAsset])
: Pay({buttonProvider: paymentConfiguration!}),
super(key: key);