stroke method

DecoratedBox stroke(
  1. double width,
  2. Color color, {
  3. bool isCircle = false,
})

Extension for giving a stroke with DecoratedBox

Implementation

DecoratedBox stroke(double width, Color color, {bool isCircle = false}) {
  return DecoratedBox(
    decoration: BoxDecoration(
      border: Border.all(color: color, width: width),
      shape: isCircle ? BoxShape.circle : BoxShape.rectangle,
    ),
    child: this,
  );
}