InputSlider class

An input widget that combines a Slider synchronized with a TextField

Inheritance

Constructors

InputSlider({required dynamic onChange(double), required double min, required double max, required double defaultValue, dynamic onChangeEnd(double)?, dynamic onChangeStart(double)?, Widget? leading, int decimalPlaces = 2, int? division, Color? activeSliderColor, Color? inactiveSliderColor, TextStyle? textFieldStyle, bool? filled, Color? fillColor, Color? borderColor, Color? focusBorderColor, BorderRadius? borderRadius, InputDecoration? inputDecoration, int? leadingWeight, int? sliderWeight, Size? textFieldSize, bool vertical = false})
const

Properties

activeSliderColor Color?
The color of the active (left) part of the slider.
final
borderColor Color?
The border color of the TextField if not focused. Ignored if inputDecoration is non-null.
final
borderRadius BorderRadius?
The border radius of the TextField. Ignored if inputDecoration is non-null.
final
decimalPlaces int
The amount of decimal places shown in the TextField.
final
defaultValue double
The default value of this InputSlider.
final
division int?
The number of discrete divisions.
final
fillColor Color?
The color with which the TextField is filled, if filled is true. Ignored if inputDecoration is non-null.
final
filled bool?
Whether the TextField is filled. Ignored if inputDecoration is non-null.
final
focusBorderColor Color?
The border color of the TextField if focused. Ignored if inputDecoration is non-null.
final
hashCode int
The hash code for this object.
no setterinherited
inactiveSliderColor Color?
The color of the inactive (right) part of the slider.
final
inputDecoration InputDecoration?
The InputDecoration used by the TextField. If null, use a default decoration.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading Widget?
A leading Widget. This could be a Text or an Icon as a label.
final
leadingWeight int?
Determines the proportional weight (flex) of the leading widget.
final
max double
The maximum value. Every value greater than this will be clamped.
final
min double
The minimum value. Every value smaller than this will be clamped.
final
onChange → dynamic Function(double)
Called whenever the value changes by moving the slider or entering a value into the TextField
final
onChangeEnd → (dynamic Function(double)?)
Called whenever the user is done moving the slider.
final
onChangeStart → (dynamic Function(double)?)
Called whenever the user starts moving the slider.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sliderWeight int?
Determines the proportional weight (flex) of the slider.
final
textFieldSize Size?
The size of the input TextField.
final
textFieldStyle TextStyle?
The TextStyle used in the TextField.
final
vertical bool
If true, rotates the Slider by 90 degrees. Keeps the orientation of the TextField and the leading widget. Default is false.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _InputSliderState
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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