border method

Widget border({
  1. required BorderRadius borderRadius,
  2. Color color = Colors.black,
  3. double width = 1.0,
})

Add a rounded border around the widget.

Implementation

Widget border({
  required BorderRadius borderRadius,
  Color color = Colors.black,
  double width = 1.0,
}) {
  return DecoratedBox(
    decoration: BoxDecoration(
      borderRadius: borderRadius,
      border: Border.all(color: color, width: width),
    ),
    child: this,
  );
}