withBorder method

Widget withBorder({
  1. Color color = Colors.black,
  2. double width = 1.0,
})

Adds a border around the widget

Implementation

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