ChicoTextField class

Single-line or multiline field with auto writing direction.

Direction follows the keyboard script (first strong character / IME marks). Tapping outside unfocuses via ChicoApp.

Pass leading / trailing for glyphs, units, or a custom clear control. When obscureText is true, an eye toggle is shown unless showObscureToggle is false.

ChicoTextField(
  hint: 'Email',
  keyboardType: TextInputType.emailAddress,
  onChanged: (value) {},
)
Inheritance

Constructors

ChicoTextField({Key? key, TextEditingController? controller, FocusNode? focusNode, String? hint, String? label, String? error, bool enabled = true, bool obscureText = false, bool? showObscureToggle, bool autocorrect = true, bool autofocus = false, bool readOnly = false, int maxLines = 1, int? maxLength, TextInputType? keyboardType, TextInputAction? textInputAction, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, VoidCallback? onEditingComplete, Iterable<String>? autofillHints, List<TextInputFormatter>? inputFormatters, TextCapitalization textCapitalization = TextCapitalization.none, bool enableSuggestions = true, Widget? leading, Widget? trailing})
Creates a text field.
const

Properties

autocorrect → bool
OS autocorrect.
final
autofillHints → Iterable<String>?
Autofill hints (email, password, …).
final
autofocus → bool
Request focus when first built.
final
controller → TextEditingController?
External controller. Created internally when omitted.
final
enabled → bool
When false, ignores input and dims.
final
enableSuggestions → bool
OS text suggestions. Defaults to true.
final
error → String?
Destructive caption below the well.
final
focusNode → FocusNode?
External focus node. Created internally when omitted.
final
hashCode → int
The hash code for this object.
no setterinherited
hint → String?
Placeholder shown when the field is empty.
final
inputFormatters → List<TextInputFormatter>?
Input filters (length, digits, …).
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
Keyboard flavor.
final
label → String?
Caption above the well.
final
leading → Widget?
Widget before the text (glyph, prefix, …).
final
maxLength → int?
Caps input and shows a current/max caption.
final
maxLines → int
Line cap. Ignored when obscureText is true.
final
obscureText → bool
Hides glyphs. Forces a single line.
final
onChanged → ValueChanged<String>?
Called on every change.
final
onEditingComplete → VoidCallback?
Called when editing is complete (IME action), before onSubmitted.
final
onSubmitted → ValueChanged<String>?
Called when the user submits (IME action / enter).
final
readOnly → bool
When true, shows the caret but does not accept edits.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showObscureToggle → bool?
Show an eye control when obscureText is true. Defaults to true whenever obscureText is true.
final
textCapitalization → TextCapitalization
Character casing policy. Defaults to TextCapitalization.none.
final
textInputAction → TextInputAction?
IME action button.
final
trailing → Widget?
Widget after the text. Painted before the password eye when both exist.
final

Methods

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