withBorder method

Widget withBorder({
  1. Color color = Colors.black,
  2. double width = 1.0,
  3. double radius = 0.0,
  4. BorderStyle style = BorderStyle.solid,
})

Adds a border with the specified color, width, and radius to the widget

Implementation

Widget withBorder({
  Color color = Colors.black,
  double width = 1.0,
  double radius = 0.0,
  BorderStyle style = BorderStyle.solid,
}) => Container(
  decoration: BoxDecoration(
    border: Border.all(color: color, width: width, style: style),
    borderRadius: BorderRadius.circular(radius),
  ),
  child: this,
);