OutlineInputBorder constructor
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 borderRadius
parameter
must not be null and the corner radii must be circular, i.e. their
Radius.x and Radius.y values must be the same.
See also:
- InputDecoration.hasFloatingPlaceholder, which should be set to false
when the
borderSide
is BorderSide.none. If let as true, the label will extend beyond the container as if the border were still being drawn.
Implementation
const OutlineInputBorder({
BorderSide borderSide = const BorderSide(),
this.borderRadius = const BorderRadius.all(Radius.circular(4.0)),
this.gapPadding = 4.0,
}) : assert(borderRadius != null),
assert(gapPadding != null && gapPadding >= 0.0),
super(borderSide: borderSide);