TrackConfiguration class

Allows to customize the track color, shadows, size, shape and border.

Constructors

TrackConfiguration.new({double height = 8.0, double border = 1.0, Color borderColor = Colors.black, Gradient activeGradient = const LinearGradient(colors: [Colors.blue, Colors.red]), Gradient inactiveGradient = const LinearGradient(colors: [Colors.grey, Colors.grey]), double borderRadius = 30.0, bool displayOuterShadows = false, bool displayInnerShadows = false, bool constrainThumbInTrack = true, Shadow innerTopShadow = const Shadow(spread: 9, offset: Offset(-5, -5), inflate: 0, radius: 30), Shadow innerBottomShadow = const Shadow(spread: 4, offset: Offset(5, 5), inflate: 0, radius: 30), Shadow outerTopShadow = const Shadow(spread: 1, offset: Offset(-2, -2), inflate: 0, radius: 30), Shadow outerBottomShadow = const Shadow(spread: 1, offset: Offset(2, 2), inflate: 0, radius: 30)})
const

Properties

activeGradient Gradient
Active gradient is the left part of the slider. Default gradient is LinearGradient(colors: Colors.blue, Colors.red).
final
border double
Default border width is 1.0.
final
borderColor Color
Default border color is black.
final
borderRadius double
Default border radius is 30.
final
constrainThumbInTrack bool
Whether the thumb is allowed to move outside of the track so its center is at an edge of the track. Default is true so the thumb will not overflow the track width.
final
displayInnerShadows bool
Whether the inside of the track should have shadows. Default is false. If set to true, the shadows are customizable via innerTopShadow and innerBottomShadow.
final
displayOuterShadows bool
Whether the outside of the track should have shadows. Default is false. If set to true, the shadows are customizable via outerTopShadow and outerBottomShadow.
final
hashCode int
The hash code for this object.
no setterinherited
height double
Default track height is 8.0.
final
inactiveGradient Gradient
Inactive gradient is the right part of the slider. Default gradient is LinearGradient(colors: Colors.grey, Colors.grey).
final
innerBottomShadow Shadow
Default shadow is Shadow(spread: 4, offset: Offset(5, 5), inflate: 0, radius: 30).
final
innerTopShadow Shadow
Default shadow is Shadow(spread: 9, offset: Offset(-5, -5), inflate: 0, radius: 30).
final
outerBottomShadow Shadow
Default shadow is Shadow(spread: 1, offset: Offset(2, 2), inflate: 0, radius: 30).
final
outerTopShadow Shadow
Default shadow is Shadow(spread: 1, offset: Offset(-2, -2), inflate: 0, radius: 30).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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