floatBarCount static method

Badge floatBarCount({
  1. required int count,
  2. Color? backgroundColor,
  3. Color? textColor,
  4. double? smallSize,
  5. double? largeSize,
  6. TextStyle? textStyle,
  7. EdgeInsetsGeometry? padding,
  8. AlignmentGeometry? alignment,
  9. Offset? offset,
  10. bool isLabelVisible = true,
  11. Widget? child,
})

徽标计数

Implementation

static Badge floatBarCount({
  required int count,
  Color? backgroundColor,
  Color? textColor,
  double? smallSize,
  double? largeSize,
  TextStyle? textStyle,
  EdgeInsetsGeometry? padding,
  AlignmentGeometry? alignment,
  Offset? offset,
  bool isLabelVisible = true,
  Widget? child,
}) {
  return Badge.count(
    count: count,
    backgroundColor: backgroundColor ?? AppTheme.primaryColor,
    alignment: alignment,
    isLabelVisible: isLabelVisible && count > 0,
    largeSize: largeSize,
    offset: offset ?? const Offset(16, -6),
    padding: padding,
    smallSize: smallSize,
    textColor: textColor,
    textStyle: textStyle,
    child: child,
  );
}