CardField class
Customizable form that collects card information.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CardField
Constructors
-
CardField.new({CardChangedCallback? onCardChanged, Key? key, CardFocusCallback? onFocus, InputDecoration? decoration, bool enablePostalCode = false, String? countryCode, TextStyle? style, bool autofocus = false, bool disabled = false, bool dangerouslyGetFullCardDetails = false, bool dangerouslyUpdateFullCardDetails = false, Color? cursorColor, String? numberHintText, String? expirationHintText, String? cvcHintText, String? postalCodeHintText, CardEditController? controller, List<
CardBrand> ? preferredNetworks, String? onBehalfOf, AndroidPlatformViewRenderType androidPlatformViewRenderType = AndroidPlatformViewRenderType.expensiveAndroidView}) -
const
Properties
- androidPlatformViewRenderType → AndroidPlatformViewRenderType
-
Type of platformview used for rendering on Android.
final
- autofocus → bool
-
Defines whether or not to automatically focus on the cardfield/
Default is
false
.final - controller → CardEditController?
-
Controller that can be use to execute several operations on the cardfield
e.g (clear).
final
- countryCode → String?
-
Controls the postal code entry shown (when
enablePostalCode
is set to true).final - cursorColor → Color?
-
Color of the cursor when a field gets focus.
final
- cvcHintText → String?
-
Hint text for the cvc field.
final
- dangerouslyGetFullCardDetails → bool
-
When true the Full card details will be returned.
final
- dangerouslyUpdateFullCardDetails → bool
-
When true, card data can be edited programatically.
final
- decoration → InputDecoration?
-
Decoration related to the input fields.
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.
final
- expirationHintText → String?
-
Hint text for the expiration date field.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- numberHintText → String?
-
Hint text for the card number field.
final
- onBehalfOf → String?
-
The account (if any) for which the funds of the intent are intended.
final
- 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
- postalCodeHintText → String?
-
Hint text for the postal code field.
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 → TextStyle?
-
Textstyle of the card input fields.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _CardFieldState -
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, int wrapWidth = 65}) → 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