CardFormField class

Customizable form that collects card information.

Notice implementation differs for iOS and Android platforms: ![Sripe Card Form] (https://github.com/flutter-stripe/flutter_stripe/tree/main/docs/assets/card_form.png)

Inheritance

Constructors

CardFormField({CardChangedCallback? onCardChanged, Key? key, CardFocusCallback? onFocus, bool enablePostalCode = true, String? countryCode, CardFormStyle? style, bool autofocus = false, bool dangerouslyGetFullCardDetails = false, bool dangerouslyUpdateFullCardDetails = false, bool disabled = false, CardFormEditController? controller, List<CardBrand>? preferredNetworks})
const

Properties

autofocus bool
Defines whether or not to automatically focus on the cardfield/ Default is false.
final
controller CardFormEditController?
Controller that can be use to execute several operations on the cardfield e.g (clear).
final
countryCode String?
Android only: Controls the postal code entry shown (when enablePostalCode is set to true).
final
dangerouslyGetFullCardDetails bool
When true the Full card details will be returned.
final
dangerouslyUpdateFullCardDetails bool
When true, card data can be edited programatically.
final
disabled bool
When true it applies a state that does not allow the user to interact with the card form field. Default is false.
final
enablePostalCode bool
Whether or not to show the postalcode field in the form. Defaults is true. If your configuration in Stripe requires a postalcode check as defined in https://stripe.com/docs/radar/rules#traditional-bank-checks make sure this one is set to true.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onCardChanged CardChangedCallback?
Callback that will be executed when the card information changes.
final
onFocus CardFocusCallback?
Callback that will be executed when a specific field gets focus.
final
preferredNetworks List<CardBrand>?
The list of preferred networks that should be used to process payments made with a co-branded card. This value will only be used if your user hasn't selected a network themselves.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style CardFormStyle?
Styling parameters of the card form field
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CardFormFieldState
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