StudioTextField class

A text field: a recessed window of glass in the metal, its words on the glass. Focused, the window's rim lights and the caret glows; with an error, the rim lights red and the error stands under it beside a lamp.

It takes Flutter's TextField words: controller (yours to dispose; it makes and disposes its own when none is given), onChanged, onSubmitted, obscureText, keyboardType. label stands above it, hint in it while it is empty (a format, never the label), helper or error under it. enabled false dims it.

Reads style's fill, foreground, edge (the lit rim), minimumSize and textStyle, then StudioThemeData.textFieldStyle.

StudioTextField(label: 'Episode title', hint: 'Season 2, episode 4', onChanged: (v) => title = v)
Inheritance

Constructors

StudioTextField({Key? key, TextEditingController? controller, FocusNode? focusNode, String? label, String? hint, String? helper, String? error, Widget? prefixIcon, Widget? suffix, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, VoidCallback? onEditingComplete, bool enabled = true, bool readOnly = false, bool autofocus = false, bool obscureText = false, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = TextCapitalization.sentences, List<TextInputFormatter>? inputFormatters, Iterable<String>? autofillHints, int? maxLines = 1, int? minLines, String? semanticLabel, StudioStyle? style})
A field.
const

Properties

autofillHints → Iterable<String>?
What autofill may put in it.
final
autofocus → bool
Whether it takes focus when it first appears, as Focus.autofocus does: one part on a route asks for it.
final
controller → TextEditingController?
The words; yours to dispose.
final
enabled → bool
Whether it takes words.
final
error → String?
What is wrong, under it in place of the helper.
final
focusNode → FocusNode?
A focus node given is the caller's, who disposes it: the part never does. Given none, the part makes its own and disposes it.
final
hashCode → int
The hash code for this object.
no setterinherited
helper → String?
A note under it.
final
hint → String?
What shows in it while it is empty: a format or an example.
final
inputFormatters → List<TextInputFormatter>?
What it lets through.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType → TextInputType?
The keyboard it asks for.
final
label → String?
The label above it.
final
maxLines → int?
Its most lines; null grows with its words.
final
minLines → int?
Its fewest lines.
final
obscureText → bool
Whether its words are hidden (a password).
final
onChanged → ValueChanged<String>?
Called as the words change.
final
onEditingComplete → VoidCallback?
Called when editing completes.
final
onSubmitted → ValueChanged<String>?
Called when the words are submitted.
final
prefixIcon → Widget?
A glyph at its start (a search field's lens).
final
readOnly → bool
Whether its words can be read and selected but not changed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String?
What a screen reader calls it, when not its label.
final
style → StudioStyle?
Its style, over StudioThemeData.textFieldStyle.
final
suffix → Widget?
Something at its end: a unit, a key that clears it.
final
textCapitalization → TextCapitalization
How the keyboard capitalises.
final
textInputAction → TextInputAction?
The keyboard's action key.
final

Methods

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