PlatformPayButton class

Native button for Android (Google pay) and iOS (Apple pay), that complies to the guidelines of the respective platform

Inheritance

Constructors

PlatformPayButton({required VoidCallback onPressed, Key? key, PlatformButtonType type = PlatformButtonType.plain, PlatformButtonStyle appearance = PlatformButtonStyle.automatic, int borderRadius = 4, BoxConstraints? constraints, OnDidSetShippingContact? onShippingContactSelected, OnCouponCodeEntered? onCouponCodeEntered, OnDidSetShippingMethod? onShippingMethodSelected, OnOrderTracking? onOrderTracking, PlatformPayWebPaymentRequestCreateOptions paymentRequestCreateOptions = PlatformPayWebPaymentRequestCreateOptions.defaultOptions})
const

Properties

appearance PlatformButtonStyle
Defines the coloring of the button
final
borderRadius int
Sets the border radius of the corners.
final
constraints BoxConstraints?
iOS only, additional constraints for the Apple pay button widget.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onCouponCodeEntered OnCouponCodeEntered?
For iOS only, a callback that is executed when a shipping method is selected. If implemented this method requires to call 'Stripe.instance.updatePlatformSheet' with the updated price items
final
onOrderTracking OnOrderTracking?
For iOS only. If implemented, the callback is executed when an order is about to be completed and the developer needs to provide the tracking information. This method needs to call 'Stripe.instance.configurePlatformOrderTracking' with that info for setting the order details (retrieved from your server) to give users the ability to track and manage their purchases in Wallet
final
onPressed VoidCallback
ios only, execute a callback when shipping Function called when the button is pressed
final
onShippingContactSelected OnDidSetShippingContact?
For iOS only, a callback that is executed when a shipping contact is entered. If implemented this method requires to call 'Stripe.instance.updatePlatformSheet' with the updated shipping details
final
onShippingMethodSelected OnDidSetShippingMethod?
For iOS only, a callback that is executed when a shipping method is selected. If implemented this method requires to call 'Stripe.instance.updatePlatformSheet' with the updated price items
final
paymentRequestCreateOptions PlatformPayWebPaymentRequestCreateOptions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type PlatformButtonType
Defines the displayed text on the button.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited