strokeAlign property

double strokeAlign
final

The relative position of the stroke on a BorderSide in an OutlinedBorder or Border.

Values typically range from -1.0 (strokeAlignInside, inside border, default) to 1.0 (strokeAlignOutside, outside border), without any bound constraints (e.g., a value of -2.0 is not typical, but allowed). A value of 0 (strokeAlignCenter) will center the border on the edge of the widget.

When set to strokeAlignInside, the stroke is drawn completely inside the widget. For strokeAlignCenter and strokeAlignOutside, a property such as Container.clipBehavior can be used in an outside widget to clip it. If Container.decoration has a border, the container may incorporate width as additional padding:

Implementation

final double strokeAlign;