ShapedInputBorder constructor

const ShapedInputBorder({
  1. BorderSide borderSide = const BorderSide(),
  2. required ShapeBorder shape,
  3. 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:

Implementation

const ShapedInputBorder({
  super.borderSide = const BorderSide(),
  required this.shape,
  this.gapPadding = 4.0,
}) : assert(gapPadding >= 0.0);