getDefaultStyle method

  1. @override
AntdBadgeStyle getDefaultStyle(
  1. BuildContext context,
  2. AntdTheme theme,
  3. AntdMapToken token
)
override

Implementation

@override
AntdBadgeStyle getDefaultStyle(
    BuildContext context, AntdTheme theme, AntdMapToken token) {
  var setColor = color?.getColor(token);
  var fontSize = (token.size.seed + 1).roundToDouble();
  var textStyle =
      TextStyle(fontSize: fontSize, color: token.colorWhite, height: 1.4);
  var badgeStyle = AntdBoxStyle(
      color: setColor,
      border: bordered == true
          ? Border.all(color: textStyle.color!, width: 1)
          : null,
      radius: fontSize.radius.all,
      textStyle: textStyle,
      padding: EdgeInsets.symmetric(
          vertical: 0, horizontal: token.size.xs.roundToDouble()));
  return AntdBadgeStyle(
      dotStyle: AntdBoxStyle(
        size: 10,
        radius: 10.radius.all,
        color: setColor,
      ),
      badgeStyle: badgeStyle);
}