TSlider class

A Tailwind inspired slider widget.

Inheritance

Constructors

TSlider.new({Color? activeTrackColor, TSliderInteraction? allowedInteraction, bool autofocus = false, AutovalidateMode? autovalidateMode, TSliderController? controller, Color? disabledActiveTrackColor, Color? disabledInactiveTrackColor, Color? disabledThumbColor, SliderTrackShape? trackShape, int? divisions, bool editable = false, bool enabled = true, FocusNode? focusNode, String formatter(double)?, Object? id, Color? inactiveTrackColor, double? initialValue, Key? key, Widget? label, double max = 1.0, double min = 0.0, ValueChanged<double>? onChanged, String? restorationId, bool showDefaultMarks = false, TextStyle? textStyle, Color? thumbColor, SliderComponentShape? thumbShape, SliderComponentShape? valueIndicatorShape, Color? tooltipBorderColor, Color? tooltipColor, String tooltipFormatter(double)?, TextStyle? tooltipTextStyle, FormFieldValidator<double>? validator, List<TIndicator> indicators = const []})
Construct a TSlider widget.

Properties

activeTrackColor Color?
The color of the active track.
final
allowedInteraction TSliderInteraction?
The allowed interactions for the slider.
final
autofocus bool
Whether the slider is focused automatically.
final
autovalidateMode AutovalidateMode?
The autovalidate mode to use for the select widget
final
child FormField<double>
The field to element to manage.
finalinherited
controller TSliderController?
The controller for the slider.
final
disabledActiveTrackColor Color?
The color of the disabled active track.
final
disabledInactiveTrackColor Color?
The color of the disabled inactive track.
final
disabledThumbColor Color?
The color of the disabled thumb.
final
divisions int?
The number of discrete divisions.
final
editable bool
Whether the slider should display an input field to edit the value.
final
enabled bool
Whether the select widget is enabled
final
focusNode FocusNode?
The focus node of the slider.
final
formatter String Function(double)?
The formatter callback for all slider value labels (e.g min/max).
final
hashCode int
The hash code for this object.
no setterinherited
id Object
The unique identifier for the form field.
finalinherited
inactiveTrackColor Color?
The color of the inactive track.
final
indicators List<TIndicator>
The list of indicators to display on the slider.
final
initialValue double?
The initial value of the select widget
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label Widget?
The label text to display above the input field.
final
max double
The maximum value of the slider.
final
min double
The minimum value of the slider.
final
onChanged ValueChanged<double>?
Called when the user starts selecting a new value for the slider.
final
restorationId String?
The restoration ID to save and restore the state of the select widget
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDefaultMarks bool
Whether the slider should display the default marks (e.g min/max).
final
textStyle TextStyle?
The text style to apply to any slider marks.
final
thumbColor Color?
The color of the thumb.
final
thumbShape SliderComponentShape?
The shape of the slider thumb.
final
tooltipBorderColor Color?
The color of the value tooltip border
final
tooltipColor Color?
The color of the value tooltip.
final
tooltipFormatter String Function(double)?
The formatter callback for the slider to set the value tooltip label.
final
tooltipTextStyle TextStyle?
The text style of the value tooltip label.
final
trackShape SliderTrackShape?
The shape of the slider track.
final
validator FormFieldValidator<double>?
The validator to use for the select widget
final
valueIndicatorShape SliderComponentShape?
The shape of the value indicator.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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