SubZeroBadge.count constructor

SubZeroBadge.count({
  1. Key? key,
  2. required int count,
  3. int maxCount = 99,
  4. SubZeroBadgeStyle style = SubZeroBadgeStyle.filled,
  5. SubZeroBadgeSize size = SubZeroBadgeSize.medium,
  6. Widget? child,
  7. SubZeroBadgeAlignment alignment = const SubZeroBadgeAlignment(),
  8. bool showBadge = true,
  9. Color? backgroundColor,
  10. Color? foregroundColor,
  11. String? semanticLabel,
})

Factory constructor for a count badge

Implementation

factory SubZeroBadge.count({
  Key? key,
  required int count,
  int maxCount = 99,
  SubZeroBadgeStyle style = SubZeroBadgeStyle.filled,
  SubZeroBadgeSize size = SubZeroBadgeSize.medium,
  Widget? child,
  SubZeroBadgeAlignment alignment = const SubZeroBadgeAlignment(),
  bool showBadge = true,
  Color? backgroundColor,
  Color? foregroundColor,
  String? semanticLabel,
}) =>
    SubZeroBadge(
      key: key,
      variant: SubZeroBadgeVariant.count,
      count: count,
      maxCount: maxCount,
      style: style,
      size: size,
      child: child,
      alignment: alignment,
      showBadge: showBadge,
      backgroundColor: backgroundColor,
      foregroundColor: foregroundColor,
      semanticLabel: semanticLabel,
    );