Fluent2FieldEditor class
The editing core every Fluent 2 text control writes through (the input, the search box, the textarea, the combobox, the tag picker, the spin button, the composer): Material's text field for its editing, selection and IME, with no decoration of its own, its words and its hint in style on a line box of the style's line height, the leading split evenly about the face's ascent and descent as CSS leads a line; one line (maxLines 1) stands in the middle of the height its field hands it, more stand from the top.
Its decoration is bare: every field that can size a decorator is set, so no theme's density or InputDecorationTheme moves
the words.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- Fluent2FieldEditor
Constructors
-
Fluent2FieldEditor({required TextEditingController controller, required FocusNode focusNode, required TextStyle style, required bool enabled, String? hint, TextStyle? hintStyle, int? hintMaxLines, Object? groupId, bool readOnly = false, bool obscureText = false, bool autofocus = false, VoidCallback? onTap, ValueChanged<
String> ? onChanged, ValueChanged<String> ? onSubmitted, VoidCallback? onEditingComplete, TextInputType? keyboardType, TextInputAction? textInputAction, List<TextInputFormatter> ? inputFormatters, int? minLines, int? maxLines = 1, Key? key}) -
An editor of
controller's words instyle.const
Properties
- autofocus → bool
-
Whether it takes focus when it first appears.
final
- controller → TextEditingController
-
The controller that holds the words.
final
- enabled → bool
-
False puts it out of use: no focus, no editing.
final
- focusNode → FocusNode
-
The focus node the editor takes focus with.
final
- groupId → Object?
-
The tap region the field shares with its popover; null is the text
field's own.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hint → String?
-
What the empty field says, in hintStyle (the type in the
placeholder's ink).
final
- hintMaxLines → int?
-
The most lines hint runs to before it ends in an ellipsis; null lets
it wrap as the words do. The hint is laid out even under words, so a
field whose height decides a layout gives it the lines it starts with.
final
- hintStyle → TextStyle?
-
The type and ink of hint.
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
Formatters that check and shape the words as they are typed.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardType → TextInputType?
-
The keyboard the platform shows for it; null is the text keyboard.
final
- maxLines → int?
-
One line by default; null grows with the text.
final
- minLines → int?
-
The fewest lines it stands; null is one.
final
- obscureText → bool
-
Whether the words are hidden, as a password's are.
final
-
onChanged
→ ValueChanged<
String> ? -
Called with the words each time the user changes them.
final
- onEditingComplete → VoidCallback?
-
Called in place of the platform's own end of editing when the user
submits (the keyboard's done or Enter): the editor keeps the focus.
final
-
onSubmitted
→ ValueChanged<
String> ? -
Called with the words when the user submits them (the keyboard's done or
Enter).
final
- onTap → VoidCallback?
-
Called when the editor is tapped.
final
- readOnly → bool
-
Whether the words can be selected but not changed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → TextStyle
-
The words' type in their ink.
final
- textInputAction → TextInputAction?
-
The keyboard's action button; null is the platform's choice.
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.
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