LightnessSliderTrack class
A custom slider track for the opacity slider.
Has rounded edges and a background image that repeats to show the common image pattern used as background on images that has transparency. It results in a nice effect where we can better judge visually how transparent the current opacity value is directly on the slider.
- Inheritance
-
- Object
- SliderTrackShape
- LightnessSliderTrack
Constructors
- LightnessSliderTrack({required Color color, required TextDirection textDirection, double thumbRadius = lightnessThumbRadius})
- Constructor for the opacity slider track.
Properties
- color → Color
-
Currently selected color.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textDirection → TextDirection
-
final
- thumbRadius → double
-
The radius of the adjustment thumb on the opacity slider track.
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.
override
-
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, 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