showStroke method

void showStroke(
  1. Color color,
  2. double width, {
  3. Vector2? offset,
})

Implementation

void showStroke(Color color, double width, {Vector2? offset}) {
  if (_strockePaint != null &&
      _strokeWidth == width &&
      _strockePaint?.color == color) {
    return;
  }
  _strokeWidth = width;
  _strokePosition = Vector2.all(-_strokeWidth);
  if (offset != null) {
    _strokePosition += offset;
  }
  _strokeSize = Vector2.zero();
  _strockePaint = Paint()
    ..color = color
    ..colorFilter = ColorFilter.mode(
      color,
      BlendMode.srcATop,
    );
}