ShapedInputBorder constructor
- BorderSide borderSide = const BorderSide(),
- required ShapeBorder shape,
- double gapPadding = 4.0,
Creates a shaped outline border for an InputDecorator.
The shape parameter defines the custom border shape. It can be any
ShapeBorder such as RoundedSuperellipseBorder, StadiumBorder,
BeveledRectangleBorder, or a custom shape.
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.
See also:
- InputDecoration.floatingLabelBehavior, which should be set to
FloatingLabelBehavior.never when the
borderSideis BorderSide.none. If left as FloatingLabelBehavior.auto, the label will extend beyond the container as if the border were still being drawn.
Implementation
const ShapedInputBorder({
super.borderSide = const BorderSide(),
required this.shape,
this.gapPadding = 4.0,
}) : assert(gapPadding >= 0.0);