getDefaultStyle method

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

Implementation

@override
AntdActionStyle getDefaultStyle(
    BuildContext context, AntdTheme theme, AntdMapToken token) {
  var textColor = danger == true
      ? token.colorError
      : (primary == true ? token.colorWhite : token.colorPrimary);
  return AntdActionStyle(
    bodyStyle: AntdBoxStyle(
        feedbackStyle: primary == true
            ? AntdBoxStyle(color: token.colorPrimary.bgActive)
            : null,
        color: primary == true ? token.colorPrimary : token.colorTransparent,
        width: double.infinity,
        radius: token.radius.all,
        margin: primary == true
            ? token.size.ms.vertical.marge(token.size.lg.horizontal)
            : null,
        padding: token.size.lg.all),
    titleStyle: AntdBoxStyle(
        alignment: Alignment.center,
        textStyle: token.font.xxl.copyWith(
            color: textColor,
            fontWeight: bold == true ? FontWeight.w600 : null),
        feedbackStyle: primary == true
            ? null
            : AntdKitStyle(
                textStyle:
                    TextStyle(color: textColor.withValues(alpha: 0.3)))),
    descriptionStyle: AntdBoxStyle(
      textStyle: token.font.md.copyWith(color: token.colorText.tertiary),
      margin: token.size.xs.top,
    ),
  );
}