FSliderStyle.inherit constructor
FSliderStyle.inherit({
- required FColors colors,
- required FTypography typography,
- required FStyle style,
- required AlignmentGeometry labelAnchor,
- required double labelOffset,
- required EdgeInsetsGeometry descriptionPadding,
- required EdgeInsetsGeometry childPadding,
- AlignmentGeometry tooltipTipAnchor = Alignment.bottomCenter,
- AlignmentGeometry tooltipThumbAnchor = Alignment.topCenter,
Creates a FSliderStyle that inherits its properties.
Implementation
FSliderStyle.inherit({
required FColors colors,
required FTypography typography,
required FStyle style,
required AlignmentGeometry labelAnchor,
required double labelOffset,
required EdgeInsetsGeometry descriptionPadding,
required EdgeInsetsGeometry childPadding,
AlignmentGeometry tooltipTipAnchor = Alignment.bottomCenter,
AlignmentGeometry tooltipThumbAnchor = Alignment.topCenter,
}) : this(
activeColor: FWidgetStateMap({
WidgetState.error: colors.error,
WidgetState.disabled: colors.disable(colors.primary, colors.secondary),
WidgetState.any: colors.primary,
}),
inactiveColor: FWidgetStateMap.all(colors.secondary),
thumbStyle: FSliderThumbStyle(
color: FWidgetStateMap({
WidgetState.error: colors.errorForeground,
WidgetState.any: colors.primaryForeground,
}),
borderColor: FWidgetStateMap({
WidgetState.error: colors.error,
WidgetState.disabled: colors.disable(colors.primary),
WidgetState.any: colors.primary,
}),
focusedOutlineStyle: style.focusedOutlineStyle,
),
markStyle: FSliderMarkStyle(
tickColor: FWidgetStateMap.all(colors.mutedForeground),
labelTextStyle: FWidgetStateMap({
WidgetState.error: typography.xs.copyWith(color: colors.error),
WidgetState.any: typography.xs.copyWith(color: colors.mutedForeground),
}),
labelAnchor: labelAnchor,
labelOffset: labelOffset,
),
tooltipStyle: FTooltipStyle.inherit(colors: colors, typography: typography, style: style),
tooltipTipAnchor: tooltipTipAnchor,
tooltipThumbAnchor: tooltipThumbAnchor,
labelTextStyle: style.formFieldStyle.labelTextStyle,
descriptionTextStyle: style.formFieldStyle.descriptionTextStyle,
errorTextStyle: style.formFieldStyle.errorTextStyle,
descriptionPadding: descriptionPadding,
childPadding: childPadding,
);