drawBadgeShape static method

CustomPainter? drawBadgeShape({
  1. required TBadgeShape shape,
  2. Color? color,
  3. TBadgeGradient? badgeGradient,
  4. TBadgeGradient? borderGradient,
  5. BorderSide? borderSide,
})

Implementation

static CustomPainter? drawBadgeShape({
  required TBadgeShape shape,
  Color? color,
  TBadgeGradient? badgeGradient,
  TBadgeGradient? borderGradient,
  BorderSide? borderSide,
}) {
  switch (shape) {
    case TBadgeShape.twitter:
      return TwitterBadgeShapePainter(
        color: color,
        badgeGradient: badgeGradient,
        borderSide: borderSide,
        borderGradient: borderGradient,
      );
    case TBadgeShape.instagram:
      return InstagramBadgeShapePainter(
        color: color,
        badgeGradient: badgeGradient,
        borderSide: borderSide,
        borderGradient: borderGradient,
      );
    case TBadgeShape.square:
    case TBadgeShape.circle:
      break;
  }
  return null;
}