AntdListStyle.defaultStyle constructor

AntdListStyle.defaultStyle(
  1. AntdMapToken token,
  2. bool card,
  3. bool feedback
)

获取默认列表样式 token设计令牌 card是否卡片模式

Implementation

factory AntdListStyle.defaultStyle(
    AntdMapToken token, bool card, bool feedback) {
  var headerStyle = AntdBoxStyle(
      alignment: Alignment.centerLeft,
      padding: token.size.seed.vertical.marge(token.size.lg.horizontal));
  return AntdListStyle(
      bodyStyle: AntdBoxStyle(
          color: token.colorBgContainer,
          border: card ? null : token.border.vertical,
          textStyle: token.font.md.copyWith(color: token.colorText.tertiary),
          radius: card ? token.radius.all : null),
      headerStyle: headerStyle,
      footerStyle: headerStyle,
      itemStyle: feedback
          ? AntdBoxStyle(
              feedbackStyle: AntdBoxStyle(color: token.colorFill.tertiary),
            )
          : null,
      childStyle: AntdBoxStyle(
        padding: 12.vertical.marge(12.right),
        margin: 12.left,
        border: token.border.bottom,
      ));
}