badge method

Widget badge({
  1. VxBadgeType type = VxBadgeType.round,
  2. Color? color,
  3. TextStyle? textStyle,
  4. int? count,
  5. bool limit = false,
  6. double? size,
  7. Widget? optionalWidget,
  8. VxBadgePosition position = VxBadgePosition.rightTop,
})

Extension method to directly access VxBadge with any widget without wrapping or with dot operator.

show badge extension

Implementation

Widget badge({
  VxBadgeType type = VxBadgeType.round,
  Color? color,
  TextStyle? textStyle,
  int? count,
  bool limit = false,
  double? size,
  Widget? optionalWidget,
  VxBadgePosition position = VxBadgePosition.rightTop,
}) =>
    VxBadge(
      textStyle: textStyle,
      color: color,
      limit: limit,
      count: count,
      position: position,
      size: size,
      type: type,
      optionalWidget: optionalWidget,
      child: this,
    );