OutlineInputBorder constructor
- BorderSide borderSide = const BorderSide(),
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(4.0)),
- double gapPadding = 4.0,
Creates a rounded rectangle outline border for an InputDecorator.
If the borderSide
parameter is BorderSide.none, it will not draw a
border. However, it will still define a shape (which you can see if
InputDecoration.filled is true).
If an application does not specify a borderSide
parameter of
value BorderSide.none, the input decorator substitutes its own, using
copyWith, based on the current theme and InputDecorator.isFocused.
The borderRadius
parameter defaults to a value where all four corners
have a circular radius of 4.0. The corner radii must be circular, i.e.
their Radius.x and Radius.y values must be the same.
See also:
- InputDecoration.floatingLabelBehavior, which should be set to
FloatingLabelBehavior.never when the
borderSide
is BorderSide.none. If let as FloatingLabelBehavior.auto, the label will extend beyond the container as if the border were still being drawn.
Implementation
const OutlineInputBorder({
super.borderSide = const BorderSide(),
this.borderRadius = const BorderRadius.all(Radius.circular(4.0)),
this.gapPadding = 4.0,
}) : assert(gapPadding >= 0.0);