border method

void border({
  1. double? all,
  2. double? left,
  3. double? right,
  4. double? top,
  5. double? bottom,
  6. Color color = const Color(0xFF000000),
  7. BorderStyle style = BorderStyle.solid,
})

Implementation

void border({
  double? all,
  double? left,
  double? right,
  double? top,
  double? bottom,
  Color color = const Color(0xFF000000),
  BorderStyle style = BorderStyle.solid,
}) {
  _border = Border(
    left: (left ?? all) == null ? BorderSide.none : BorderSide(color: color, width: left ?? all!, style: style),
    right: (right ?? all) == null ? BorderSide.none : BorderSide(color: color, width: right ?? all!, style: style),
    top: (top ?? all) == null ? BorderSide.none : BorderSide(color: color, width: top ?? all!, style: style),
    bottom: (bottom ?? all) == null ? BorderSide.none : BorderSide(color: color, width: bottom ?? all!, style: style),
  );
}