transparentIfWidthIsZero method

void transparentIfWidthIsZero()

Hides the paint's color, if strokeWidth is zero

Implementation

void transparentIfWidthIsZero() {
  if (strokeWidth == 0) {
    shader = null;
    color = color.withOpacity(0);
  }
}