FSliderStyles.inherit constructor
FSliderStyles.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
- required FHapticFeedback hapticFeedback,
Creates a FSliderStyles that inherits its properties.
Implementation
factory FSliderStyles.inherit({
required FColors colors,
required FTypography typography,
required FStyle style,
required FHapticFeedback hapticFeedback,
}) {
final base = FSliderStyle.inherit(
colors: colors,
typography: typography,
style: style,
hapticFeedback: hapticFeedback,
labelAnchor: .topCenter,
labelOffset: 10,
descriptionPadding: const .only(top: 10),
childPadding: const .only(top: 10, bottom: 20, left: 10, right: 10),
);
return FSliderStyles(
.from(
base,
variants: {
[.horizontal]: base,
[.horizontal.and(.touch)]: const .delta(thumbSize: 25),
[.vertical]: const .delta(
markStyle: .delta(labelAnchor: .centerRight, labelOffset: -10),
tooltipTipAnchor: .centerLeft,
tooltipThumbAnchor: .centerRight,
descriptionPadding: .value(.only(top: 5)),
childPadding: .value(.all(10)),
),
[.vertical.and(.touch)]: const .delta(
markStyle: .delta(labelAnchor: .centerRight, labelOffset: -10),
tooltipTipAnchor: .bottomCenter,
tooltipThumbAnchor: .topCenter,
thumbSize: 25,
descriptionPadding: .value(.only(top: 5)),
childPadding: .value(.all(10)),
),
},
),
);
}