debugBorder method

Widget debugBorder({
  1. Key? key,
  2. Color color = Colors.red,
  3. double thickness = 1,
})

Wraps the widget in a Container with a debug border.

The key parameter is optional and can be used to provide a Key for the Container.

The color parameter specifies the color of the border, defaulting to red.

The thickness parameter specifies the width of the border, defaulting to 1.

Example usage:

Text('Debug Border').debugBorder();

Implementation

Widget debugBorder({
  Key? key,
  Color color = Colors.red,
  double thickness = 1,
}) => Container(
  key: key,
  decoration: BoxDecoration(
    border: Border.all(color: color, width: thickness),
  ),
  child: this,
);