withRoundedBorder method

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

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

Implementation

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