CreditCardForm class

Inheritance

Constructors

CreditCardForm({Key? key, List<String> countries = const ['United States'], String initEmail = '', String initBuyerName = '', String initPhone = '', bool displayEmail = true, bool lockEmail = false, required dynamic onCardPay(CardFormResults), GlobalKey<CardPayButtonState>? payBtnKey, GlobalKey<FormState>? formKey, bool displayTestData = false})
The CreditCardForm is a stateful widget containing a form and fields necessary to complete a typical credit card transaction
const

Properties

countries List<String>
If you have a List of Countries that you would like to use to override the currently provide list of 1, being 'United States', add the list here. Warning: The credit card form does not currently adjust based on selected country's needs to verify a card. This form may not work for all countries
final
displayEmail bool
Should the email box be displayed?
final
displayTestData bool
If you would like to display test data during your development, a dataset based on Stripe test data is provided. To use this date, simply mark this true. WARNING: Make sure to mark false for any release
final
formKey GlobalKey<FormState>?
You will need to provide a general FormState key to control, validate and save the form data based on your needs.
final
hashCode int
The hash code for this object.
no setterinherited
initBuyerName String
Provide a name if you have it, to prefill the name field on the Credit Card form
final
initEmail String
Provide an email if you have it, to prefill the email field on the Credit Card form
final
initPhone String
Provide a phone number if you have it, to prefill the name field on the Credit Card form
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lockEmail bool
Should the email form field be locked? This should only be done if an initEmail is provided
final
onCardPay → dynamic Function(CardFormResults)
Provide a function that recieves CardFormResults as a parameter that is to be trigger once the user completes the credit card form and presses pay
final
payBtnKey GlobalKey<CardPayButtonState>?
If you would like to control the pay button state to display text or icons based on the current stage of the payment process, you will need to provide a CardPayButtonState key to update it.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CreditCardFormState
Creates the mutable state for this widget at a given location in the tree.
override
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