getDefaultStyle method
AntdSliderStyle
getDefaultStyle(
- BuildContext context,
- AntdTheme theme,
- AntdMapToken token
override
Implementation
@override
AntdSliderStyle getDefaultStyle(
BuildContext context, AntdTheme theme, AntdMapToken token) {
var markStyle = AntdBoxStyle(
margin: 8.vertical,
size: token.size.ms.roundToDouble(),
radius: BorderRadius.circular(token.size.ms.roundToDouble()),
color: token.colorFill.tertiary);
var trackStyle = AntdBoxStyle(color: token.colorFill.tertiary, height: 3);
var activeTrackStyle = trackStyle.copyWith(color: token.colorPrimary);
return AntdSliderStyle(
bodyStyle: AntdBoxStyle(
margin: renderTicks != null ? token.size.xxl.bottom : null),
markStyle: ticks ? markStyle : trackStyle,
activeMarkStyle: ticks
? markStyle.copyWith(color: token.colorPrimary)
: activeTrackStyle,
trackStyle: trackStyle,
activeTrackStyle: activeTrackStyle,
slider: const AntdIcon(
icon: AntdIcons.sliderThumb,
),
sliderIconStyle: AntdIconStyle(
color: token.colorPrimary,
size: 18,
bodyStyle: AntdBoxStyle(
alignment: Alignment.center,
color: token.colorBgContainer,
size: 32,
radius: BorderRadius.circular(32),
shadows: token.shadow.primary)),
markTextStyle:
AntdBoxStyle(margin: token.size.md.top, textStyle: token.font.sm));
}