AdaptiveTextFormField class

An adaptive text form field that renders platform-specific styles

On iOS: Uses CupertinoTextFormFieldRow On Android: Uses Material TextFormField

Inheritance

Constructors

AdaptiveTextFormField({Key? key, TextEditingController? controller, FocusNode? focusNode, String? placeholder, String? initialValue, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = TextCapitalization.none, TextStyle? style, TextAlign textAlign = TextAlign.start, int? maxLines = 1, int? minLines, int? maxLength, bool obscureText = false, bool autocorrect = true, bool autofocus = false, bool enabled = true, bool readOnly = false, Widget? prefix, Widget? suffix, Widget? prefixIcon, Widget? suffixIcon, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, VoidCallback? onTap, FormFieldSetter<String>? onSaved, FormFieldValidator<String>? validator, List<TextInputFormatter>? inputFormatters, EdgeInsetsGeometry? padding, InputDecoration? decoration, BoxDecoration? cupertinoDecoration, AutovalidateMode? autovalidateMode, TapRegionCallback? onTapOutside, List<String>? autofillHints})
Creates an adaptive text form field
const

Properties

autocorrect bool
Whether to enable autocorrection.
final
autofillHints List<String>?
Optional autofill hints for the text field.
final
autofocus bool
Whether this text field should focus itself if nothing else is already focused.
final
autovalidateMode AutovalidateMode?
Used to enable/disable this form field auto validation and update its error text.
final
controller TextEditingController?
Controls the text being edited.
final
cupertinoDecoration BoxDecoration?
The box decoration for the iOS text field.
final
decoration InputDecoration?
The decoration to show around the text field (Material only).
final
enabled bool
Whether the text field is enabled.
final
focusNode FocusNode?
Defines the keyboard focus for this widget.
final
hashCode int
The hash code for this object.
no setterinherited
initialValue String?
An optional value to initialize the form field to, or null otherwise.
final
inputFormatters List<TextInputFormatter>?
Optional input validation and formatting overrides.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
The type of keyboard to use for editing the text.
final
maxLength int?
The maximum number of characters to allow in the text field.
final
maxLines int?
The maximum number of lines to show at one time.
final
minLines int?
The minimum number of lines to occupy when the content spans fewer lines.
final
obscureText bool
Whether to hide the text being edited.
final
onChanged ValueChanged<String>?
Called when the user initiates a change to the TextField's value.
final
onSaved FormFieldSetter<String>?
Called when the form is saved.
final
onSubmitted ValueChanged<String>?
Called when the user indicates that they are done editing the text.
final
onTap VoidCallback?
Called when the text field is tapped.
final
onTapOutside TapRegionCallback?
Called when a tap is detected outside the text field.
final
padding EdgeInsetsGeometry?
Padding around the text entry area.
final
placeholder String?
A lighter colored placeholder hint that appears on the first line when the text entry field is empty.
final
prefix Widget?
A widget that appears before the editable part of the text field.
final
prefixIcon Widget?
An icon that appears before the editable part of the text field.
final
readOnly bool
Whether the text field is read-only.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style TextStyle?
The style to use for the text being edited.
final
suffix Widget?
A widget that appears after the editable part of the text field.
final
suffixIcon Widget?
An icon that appears after the editable part of the text field.
final
textAlign TextAlign
How the text should be aligned horizontally.
final
textCapitalization TextCapitalization
Configures how the platform keyboard will select an uppercase or lowercase keyboard.
final
textInputAction TextInputAction?
The type of action button to use for the keyboard.
final
validator FormFieldValidator<String>?
An optional method to validate the input.
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, 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