ElevarmTextInputField class

Elevarm UI's text input field.

This component was made as closely as possible to TextFormField.

Inheritance
Available Extensions

Constructors

ElevarmTextInputField({Key? key, String? label, String? errorText, String? hintText, bool enabled = true, String? helperText, ElevarmTextInputFieldSize size = ElevarmTextInputFieldSize.md, IconData? prefixIconAssetName, String? prefixText, String? prefixAddOnText, bool prefixUseMastercard = false, String? suffixAddOnText, IconData? suffixIconAssetName, TextEditingController? controller, String? initialValue, TextInputType? keyboardType, TextInputAction? textInputAction, bool? showCursor, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, MaxLengthEnforcement? maxLengthEnforcement, int? minLines, int? maxLength, void onChanged(String)?, void onTap()?, void onEditingComplete()?, void onFieldSubmitted(String)?, void onSaved(String?)?, String? validator(String?)?, List<TextInputFormatter>? inputFormatters, double? cursorHeight, Radius? cursorRadius, Brightness? keyboardAppearance, bool? enableInteractiveSelection, TextSelectionControls? selectionControls, Widget? buildCounter(BuildContext, {required int currentLength, required bool isFocused, required int? maxLength})?, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints, AutovalidateMode? autovalidateMode, ScrollController? scrollController, String? restorationId, MouseCursor? mouseCursor, bool enableIMEPersonalizedLearning = true, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), double cursorWidth = 2.0, int? maxLines = 1, String obscuringCharacter = '•', bool enableSuggestions = true, bool expands = false, bool obscureText = false, bool autocorrect = true, bool autofocus = false, bool readOnly = false, TextCapitalization textCapitalization = TextCapitalization.none, IconData? suffixErrorIconAssetName = ElevarmIconsOutline.alert_circle, VoidCallback? onTapSuffix, FocusNode? focusNode, bool isRequired = false})
const

Properties

autocorrect bool
Whether to enable autocorrection.
final
autofillHints Iterable<String>?
A list of strings that helps the autofill service identify the type of this text input.
final
autofocus bool
Whether this text field should focus itself if nothing else is already focused.
final
autovalidateMode AutovalidateMode?
final
buildCounter → (Widget? Function(BuildContext, {required int currentLength, required bool isFocused, required int? maxLength})?)
Callback that generates a custom InputDecoration.counter widget.
final
controller TextEditingController?
Controls the text being edited.
final
cursorHeight double?
How tall the cursor will be.
final
cursorRadius Radius?
How rounded the corners of the cursor should be.
final
cursorWidth double
How thick the cursor will be.
final
enabled bool
If false the text field is "disabled": it ignores taps and its decoration is rendered in grey.
final
enableIMEPersonalizedLearning bool
Whether to enable that the IME update personalized data such as typing history and user dictionary data.
final
enableInteractiveSelection bool?
Whether to enable user interface affordances for changing the text selection.
final
enableSuggestions bool
Whether to show input suggestions as the user types.
final
errorText String?
The error text if any.
final
expands bool
Whether this widget's height will be sized to fill its parent.
final
focusNode FocusNode?
Defines the keyboard focus for this widget.
final
hashCode int
The hash code for this object.
no setterinherited
helperText String?
The helper text.
final
hintText String?
The hint text.
final
initialValue String?
final
inputFormatters List<TextInputFormatter>?
Optional input validation and formatting overrides.
final
isRequired bool
Whether the field is required or not.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance Brightness?
The appearance of the keyboard.
final
keyboardType TextInputType?
The type of keyboard to use for editing the text.
final
label String?
The label above the input field.
final
maxLength int?
The maximum number of characters (Unicode scalar values) to allow in the text field.
final
maxLengthEnforcement MaxLengthEnforcement?
Determines how the maxLength limit should be enforced.
final
maxLines int?
The maximum number of lines to show at one time, wrapping if necessary.
final
minLines int?
The minimum number of lines to occupy when the content spans fewer lines.
final
mouseCursor MouseCursor?
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
obscureText bool
Whether to hide the text being edited (e.g., for passwords).
final
obscuringCharacter String
Character used for obscuring text if obscureText is true.
final
onChanged → (void Function(String)?)
Called when the user initiates a change to the TextField's value: when they have inserted or deleted text.
final
onEditingComplete → (void Function()?)
Called when the user submits editable content (e.g., user presses the "done" button on the keyboard).
final
onFieldSubmitted → (void Function(String)?)
final
onSaved → (void Function(String?)?)
final
onTap → (void Function()?)
Called for the first tap in a series of taps.
final
onTapSuffix VoidCallback?
The callback when suffix icon is tapped.
final
prefixAddOnText String?
The prefix add-on text.
final
prefixIconAssetName IconData?
The prefix icon asset name.
final
prefixText String?
The prefix text.
final
prefixUseMastercard bool
Whether to use mastercard icon as prefix.
final
readOnly bool
Whether the text can be changed.
final
restorationId String?
Restoration ID to save and restore the state of the text field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
The ScrollController to use when vertically scrolling the input.
final
scrollPadding EdgeInsets
Configures padding to edges surrounding a Scrollable when the Textfield scrolls into view.
final
scrollPhysics ScrollPhysics?
The ScrollPhysics to use when vertically scrolling the input.
final
selectionControls TextSelectionControls?
Optional delegate for building the text selection handles.
final
showCursor bool?
Whether to show cursor.
final
size ElevarmTextInputFieldSize
The text field size.
final
smartDashesType SmartDashesType?
Whether to allow the platform to automatically format dashes.
final
smartQuotesType SmartQuotesType?
Whether to allow the platform to automatically format quotes.
final
suffixAddOnText String?
The suffix add-on text.
final
suffixErrorIconAssetName IconData?
The suffix icon asset name displayed when errorText is not null.
final
suffixIconAssetName IconData?
The suffix icon asset name.
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 → (String? Function(String?)?)
final

Methods

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