Displays the visual elements of a material design text field around an arbitrary child widget.

Use InputContainer to create widgets that look and behave like the Input widget.

Requires one of its ancestors to be a Material widget.

See also:

Inheritance

Constructors

InputContainer({Key key, bool focused: false, bool isEmpty: false, Widget icon, String labelText, String hintText, String errorText, TextStyle style, bool isDense: false, bool hideDivider: false, Widget child })

Properties

child Widget

read-only
errorText String

Text that appears below the child. If errorText is non-null the divider that appears below the child is red.

read-only
focused bool

True if the hint and label should be displayed as if the child had the focus.

read-only
hideDivider bool

Hide the divider that appears below the child and above the error text.

read-only
hintText String

Text that appears over the child if isEmpty is true and labelText is null.

read-only
icon Widget

An icon to show adjacent to the input field.

read-only
isDense bool

Whether the input container is part of a dense form (i.e., uses less vertical space).

read-only
isEmpty bool

Should the hint and label be displayed as if no value had been input to the child.

read-only
labelText String

Text that appears above the child or over it, if isEmpty is true.

read-only
style TextStyle

The style to use for the hint. It's also used for the label when the label appears over the child.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

createState() → _InputContainerState

Creates the mutable state for this widget at a given location in the tree.

createElement() StatefulElement

Creates a StatefulElement to manage this widget's location in the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited