Border.all constructor Null safety

Border.all(
  1. {Color color = const Color(0xFF000000),
  2. double width = 1.0,
  3. BorderStyle style = BorderStyle.solid,
  4. StrokeAlign strokeAlign = StrokeAlign.inside}
)

A uniform border with all sides the same color and width.

The sides default to black solid borders, one logical pixel wide.

Implementation

factory Border.all({
  Color color = const Color(0xFF000000),
  double width = 1.0,
  BorderStyle style = BorderStyle.solid,
  StrokeAlign strokeAlign = StrokeAlign.inside,
}) {
  final BorderSide side = BorderSide(color: color, width: width, style: style, strokeAlign: strokeAlign);
  return Border.fromBorderSide(side);
}