SquigglySliderTrackShape class

A squiggly Variant of the default Slider track. Similar to that in the Android 13 Media Control. Track for the SquigglySlider introduced with this package.

It paints a moving sinus-curve with rounded edges, vertically centered in the parentBox. The amplitude and wavelength of the curve can be adjusted by squiggleAmplitude and squiggleWavelength respectively, while the current phase shift (as a factor of the wavelength) can be adjusted with squigglePhaseFactor, this will be animated by the SquigglySlider. The thickness is defined by the SliderThemeData.trackHeight. The color is determined by the Slider's enabled state and the track segment's active state which are defined by: SliderThemeData.activeTrackColor, SliderThemeData.inactiveTrackColor, SliderThemeData.disabledActiveTrackColor, SliderThemeData.disabledInactiveTrackColor.

A squiggly slider widget, squiggly slider track shape.

See also:

Inheritance
Mixed-in types

Constructors

SquigglySliderTrackShape({double squiggleAmplitude = 0.0, double squiggleWavelength = 0.0, double squigglePhaseFactor = 1.0})
Create a slider track that draws two rectangles with rounded outer edges.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
squiggleAmplitude double
final
squigglePhaseFactor double
final
squiggleWavelength double
final

Methods

getPreferredRect({required RenderBox parentBox, Offset offset = Offset.zero, required SliderThemeData sliderTheme, bool isEnabled = false, bool isDiscrete = false}) Rect
Returns a rect that represents the track bounds that fits within the Slider.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(PaintingContext context, Offset offset, {required RenderBox parentBox, required SliderThemeData sliderTheme, required Animation<double> enableAnimation, required TextDirection textDirection, required Offset thumbCenter, Offset? secondaryOffset, bool isDiscrete = false, bool isEnabled = false, double additionalActiveTrackHeight = 2}) → void
Paints the track shape based on the state passed to it.
override
toString() String
A string representation of this object.
inherited

Operators

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