$debugBorder method

Widget $debugBorder({
  1. double paddingAll = 6,
})

Implementation

Widget $debugBorder({double paddingAll = 6}) {
  if (!_isDebug) {
    return this;
  }
  return DecoratedBox(
    decoration: const BoxDecoration(
      border: Border(
        // 上下左右四个边框
        top: BorderSide(color: Colors.black, width: 1.0),
        right: BorderSide(color: Colors.black, width: 1.0),
        bottom: BorderSide(color: Colors.black, width: 1.0),
        left: BorderSide(color: Colors.black, width: 1.0),
        // 如果需要圆角边框
        // borderRadius: BorderRadius.circular(8.0),
      ),
    ),
    child: this,
  ).$paddingAll(paddingAll);
}