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,
})
inherited

Border for the widget

..border(all: 3.0, color: hex('#55ffff'), style: BorderStyle.solid)

Choose between all, left, right, top and bottom. all works together with the other properties.

Implementation

void border(
    {double? all,
    double? left,
    double? right,
    double? top,
    double? bottom,
    Color color = const Color(0xFF000000),
    BorderStyle style = BorderStyle.solid}) {
  _styleModel.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),
  );
}