SliderRenderBase class abstract

Shared structural base for themed slider renderers.

Sliders share a sizable, error-prone tree: the root wrapper with its sliderAttrs interaction wiring, the label/value row, the track container, the track with its single fill node, optional step markers, one-to-two thumbs (with identical role/aria-* wiring), and the fallback min/max row. This base factors that structure plus the shared value/percentage math and the thumb attribute/aria-label logic, leaving the genuinely theme-specific values (class prefix, extra data attributes, size metrics and every leaf style map) to abstract members the subclass supplies.

The fill percentage is computed via percentFor; the default guards a zero-width range (Neon/Neubrutalism behaviour) while ShadCN overrides it to omit the guard, so each theme's exact output is preserved.

This base lives in core and depends only on core props and interaction helpers; it must never depend on a theme package.

Inheritance

Constructors

SliderRenderBase(SliderProps props, {Key? key})
const

Properties

classPrefix String
Prefix used for every CSS class (e.g. 'arcane-slider'), driving the root, value span, track container, track, fill and thumb classes.
no setter
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one component replaces another component in the tree.
finalinherited
labelRowMarginBottom String
margin-bottom of the label/value row container.
no setter
maxStepMarkers int
Maximum number of step markers to render before bailing out.
no setter
minMaxRowMarginTop String
margin-top of the fallback min/max row container.
no setter
props SliderProps
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Component
Describes the part of the user interface represented by this component.
override
createElement() Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
decorationStyles(ArcaneDecoration? decoration) Map<String, String>
Per-instance decoration overrides. Default: none. A theme overrides this to translate an ArcaneDecoration (elevation intent, theme-specific fields) into its own CSS. Fields a theme does not implement are ignored.
extraRootAttrs() Map<String, String>
Extra attributes merged after sliderAttrs on the root (empty for none).
labelTextStyles() Map<String, String>
Inline styles for the label text span.
minMaxLabelStyles() Map<String, String>
Inline styles for a fallback min/max label span.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
percentFor(double current) double
Clamped fill percentage for current. Defaults to the guarded form used by Neon/Neubrutalism; ShadCN overrides to omit the zero-span guard.
shouldRebuild(covariant Component newComponent) bool
Implement this method to determine whether a rebuild can be skipped.
inherited
sizeMetrics(ComponentSize size) → (String, String, String)
Resolves (trackHeight, thumbSize, hitAreaHeight) for the given size.
stepMarkerStyles() Map<String, String>
Inline styles for an individual step marker dot.
thumbStateAttrs() Map<String, String>
Extra attributes merged right after data-arcane-slider-thumb on each thumb (empty for none).
thumbStyles({required double leftPct, required String thumbSize, required int thumbSizeNum}) Map<String, String>
Inline styles for a thumb at the given left percentage.
toString() String
A string representation of this object.
inherited
trackFillStyles({required bool isRange, required double percentage, required double loPct, required double hiPct}) Map<String, String>
Inline styles for the single fill node; handles both the single-value and range branches internally.
trackStyles(String trackHeight) Map<String, String>
Inline styles for the track element.
valueTextStyles() Map<String, String>
Inline styles for the value text span.

Operators

operator ==(Object other) bool
The equality operator.
inherited