High level layer to easily manage cross-platform integrations.
This class simplifies using the plugin and abstracts platform-specific directives. To use it, instantiate it with a list of configurations for the payment providers supported:
final payClient = Pay.withAssets(paymentConfigurationAssets) await payClient.showPaymentSelector(paymentItems: paymentItems);
PayProvider, PaymentConfiguration>? _configurations)
Creates an instance with a dictionary of
_configurationsand instantiates the
_payPlatformto communicate with the native platforms.
- Alternative constructor to create a Pay object with a list of configurations in String format.
Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
PayProvider provider, List< PaymentItem>paymentItems) → Future< Map< String, dynamic>>
- Shows the payment selector to initiate a payment process.
PayProvider provider) → Future
- Verifies that the selected provider has been previously configured or throws otherwise.
) → String
A string representation of this object.
PayProvider provider) → Future< bool>
Determines whether a user can pay with the selected