FSliderStyle.inherit constructor

FSliderStyle.inherit({
  1. required FColors colors,
  2. required FTypography typography,
  3. required FStyle style,
  4. required FHapticFeedback hapticFeedback,
  5. required AlignmentGeometry labelAnchor,
  6. required double labelOffset,
  7. required EdgeInsetsGeometry descriptionPadding,
  8. required EdgeInsetsGeometry childPadding,
  9. AlignmentGeometry tooltipTipAnchor = .bottomCenter,
  10. AlignmentGeometry tooltipThumbAnchor = .topCenter,
})

Creates a FSliderStyle that inherits its properties.

Implementation

FSliderStyle.inherit({
  required FColors colors,
  required FTypography typography,
  required FStyle style,
  required FHapticFeedback hapticFeedback,
  required AlignmentGeometry labelAnchor,
  required double labelOffset,
  required EdgeInsetsGeometry descriptionPadding,
  required EdgeInsetsGeometry childPadding,
  AlignmentGeometry tooltipTipAnchor = .bottomCenter,
  AlignmentGeometry tooltipThumbAnchor = .topCenter,
}) : this(
       activeColor: FVariants(
         colors.primary,
         variants: {
           [.disabled]: colors.disable(colors.primary, colors.secondary),
         },
       ),
       inactiveColor: .all(colors.secondary),
       thumbStyle: FSliderThumbStyle(
         color: .all(colors.primaryForeground),
         borderColor: FVariants(
           colors.primary,
           variants: {
             [.disabled]: colors.disable(colors.primary),
           },
         ),
         focusedOutlineStyle: style.focusedOutlineStyle,
       ),
       markStyle: FSliderMarkStyle(
         tickColor: .all(colors.mutedForeground),
         labelTextStyle: .all(typography.xs.copyWith(color: colors.mutedForeground)),
         labelAnchor: labelAnchor,
         labelOffset: labelOffset,
       ),
       tooltipStyle: .inherit(colors: colors, typography: typography, style: style, hapticFeedback: hapticFeedback),
       collisionHapticFeedback: hapticFeedback.lightImpact,
       tickHapticFeedback: hapticFeedback.selectionClick,
       tooltipTipAnchor: tooltipTipAnchor,
       tooltipThumbAnchor: tooltipThumbAnchor,
       labelTextStyle: style.formFieldStyle.labelTextStyle,
       descriptionTextStyle: style.formFieldStyle.descriptionTextStyle,
       errorTextStyle: style.formFieldStyle.errorTextStyle,
       descriptionPadding: descriptionPadding,
       childPadding: childPadding,
     );