getDefaultStyle method

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

Implementation

@override
AntdModalStyle getDefaultStyle(
    BuildContext context, AntdTheme theme, AntdMapToken token) {
  return AntdModalStyle(
      bodyStyle: AntdBoxStyle(
        padding: header != null || title != null ? token.size.xl.top : null,
        color: token.colorBgContainer,
        radius: token.radius.all,
        width: 0.7,
        layoutModes: [AntdBoxLayoutMode.factorWidth],
      ),
      headerStyle: AntdBoxStyle(
        padding: token.size.md.horizontal.marge(token.size.xl.bottom),
        textStyle: token.font.lg.copyWith(fontWeight: FontWeight.w600),
      ),
      maskColor: token.colorBlack,
      closeIconStyle: AntdIconStyle(
          size: 18,
          color: token.colorText.tertiary,
          bodyStyle: AntdBoxStyle(padding: token.size.seed.all)),
      titleStyle: AntdBoxStyle(
          padding: token.size.md.horizontal,
          textStyle: token.font.xxl.copyWith(fontWeight: FontWeight.w600)),
      contentStyle: AntdBoxStyle(
          alignment: Alignment.center,
          padding: token.size.xl.all,
          border: actions?.isNotEmpty == true
              ? token.borderSecondary.bottom
              : null,
          textStyle: token.font.md),
      animation:
          const AntdModalAnimation(duration: Duration(milliseconds: 400)));
}