TDCapsuleRectSliderTrackShape class

Slider轨道绘制

Inheritance
Mixed-in types

Constructors

TDCapsuleRectSliderTrackShape({Color trackColorWhenShowScale = const Color(0xFFE7E7E7)})
Create a slider track that draws two rectangles with rounded outer edges.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isRounded bool
Whether the track shape is rounded. This is used to determine the correct position of the thumb in relation to the track. Defaults to false.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trackColorWhenShowScale Color
final

Methods

adjustThumbCenter(Offset thumbCenter, Rect trackRect) Offset
inherited
getPreferredRect({required RenderBox parentBox, Offset offset = Offset.zero, required SliderThemeData sliderTheme, bool isEnabled = false, bool isDiscrete = false}) Rect
Returns the preferred bounds of the shape.
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, Offset? secondaryOffset, bool isDiscrete = false, bool isEnabled = false, double additionalActiveTrackHeight = 3}) → 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