getDefaultStyle method

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

Implementation

@override
AntdSelectorOptionStyle getDefaultStyle(
    BuildContext context, AntdTheme theme, AntdMapToken token) {
  var text = token.font.md;
  var base = AntdBoxStyle(
      alignment: Alignment.center,
      padding: token.size.seed.vertical.marge(token.size.xl.horizontal),
      textStyle: text,
      color: token.colorFill.tertiary);
  return AntdSelectorOptionStyle(
    itemStyle: base,
    activeItemStyle: AntdBoxStyle(
        color: token.colorPrimary.bg,
        textStyle: text.copyWith(color: token.colorPrimary)),
    bodyStyle: AntdBoxStyle(
        radius: token.radius.all,
        options: const AntdTapOptions(alwaysReceiveTap: true)),
    labelStyle: const AntdBoxStyle(),
    descriptionStyle: AntdBoxStyle(
        textStyle: token.font.sm.copyWith(color: token.colorText.tertiary)),
    badge: AntdSelectorBadgeStyle(
        size: const Size(20, 16), color: token.colorPrimary),
    checkIcon: AntdSelectorBadgeStyle(
        size: const Size(8, 6), color: token.colorWhite),
  );
}