drawBadgeShape static method
CustomPainter?
drawBadgeShape({
- required TBadgeShape shape,
- Color? color,
- TBadgeGradient? badgeGradient,
- TBadgeGradient? borderGradient,
- 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;
}