Displays the visual elements of a Material Design text field around an arbitrary widget.

Use InputDecorator to create widgets that look and behave like a TextField but can be used to input information other than text.

The configuration of this widget is primarily provided in the form of an InputDecoration object.

Requires one of its ancestors to be a Material widget.

See also:

Inheritance

Constructors

InputDecorator({Key key, @required InputDecoration decoration, TextStyle baseStyle, TextAlign textAlign, bool isFocused: false, bool isEmpty: false, Widget child })
Creates a widget that displays labels and other visual elements similar to a TextField. [...]
const

Properties

baseStyle TextStyle
The style on which to base the label, hint, and error styles if the decoration does not provide explicit styles. [...]
final
child Widget
The widget below this widget in the tree.
final
decoration InputDecoration
The text and styles to use when decorating the child.
final
isEmpty bool
Whether the input field is empty. [...]
final
isFocused bool
Whether the input field has focus. [...]
final
textAlign TextAlign
How the text in the decoration should be aligned horizontally.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
debugFillProperties(DiagnosticPropertiesBuilder description) → void
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. [...]
@protected, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns 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 ==(other) bool
The equality operator. [...]
inherited