border property

InputBorder? border
final

The shape of the border to draw around the decoration's container.

If border is a MaterialStateUnderlineInputBorder or MaterialStateOutlineInputBorder, then the effective border can depend on the MaterialState.focused state, i.e. if the TextField is focused or not.

If border derives from InputBorder the border's InputBorder.borderSide, i.e. the border's color and width, will be overridden to reflect the input decorator's state. Only the border's shape is used. If custom BorderSide values are desired for a given state, all four borders – errorBorder, focusedBorder, enabledBorder, disabledBorder – must be set.

The decoration's container is the area which is filled if filled is true and bordered per the border. It's the area adjacent to InputDecoration.icon and above the widgets that contain InputDecoration.helperText, InputDecoration.errorText, and InputDecoration.counterText.

The border's bounds, i.e. the value of border.getOuterPath(), define the area to be filled.

This property is only used when the appropriate one of errorBorder, focusedBorder, focusedErrorBorder, disabledBorder, or enabledBorder is not specified. This border's InputBorder.borderSide property is configured by the InputDecorator, depending on the values of InputDecoration.errorText, InputDecoration.enabled, InputDecorator.isFocused and the current Theme.

Typically one of UnderlineInputBorder or OutlineInputBorder. If null, InputDecorator's default is const UnderlineInputBorder().

See also:

Implementation

final InputBorder? border;