withBorderSides method
Adds a border only on specific sides
Implementation
Widget withBorderSides({
Color color = Colors.black,
double width = 1.0,
bool top = false,
bool right = false,
bool bottom = false,
bool left = false,
double radius = 0.0,
BorderStyle style = BorderStyle.solid,
}) => Container(
decoration: BoxDecoration(
border: Border(
top:
top
? BorderSide(color: color, width: width, style: style)
: BorderSide.none,
right:
right
? BorderSide(color: color, width: width, style: style)
: BorderSide.none,
bottom:
bottom
? BorderSide(color: color, width: width, style: style)
: BorderSide.none,
left:
left
? BorderSide(color: color, width: width, style: style)
: BorderSide.none,
),
borderRadius: BorderRadius.circular(radius),
),
child: this,
);