FSlider class

An input where the user selects a value from within a given range.

A slider is a form field and therefore can be used within a Form widget.

See:

Inheritance
Mixed-in types

Constructors

FSlider({FSliderControl control = const .managedContinuous(), FSliderStyleDelta style = const .context(), FLayout? layout, Widget? label, Widget? description, Widget errorBuilder(BuildContext context, String message) = FFormFieldProperties.defaultErrorBuilder, List<FSliderMark> marks = const [], double? trackMainAxisExtent, double? trackHitRegionCrossExtent, FSliderTooltipControls tooltipControls = const .new(), Widget tooltipBuilder(FTooltipController controller, double value) = defaultTooltipBuilder, String semanticValueFormatterCallback(double) = defaultSemanticValueFormatter, String semanticFormatterCallback(FSliderValue)?, ValueChanged<FSliderValue>? onEnd, FormFieldSetter<FSliderValue>? onSaved, VoidCallback? onReset, FormFieldValidator<FSliderValue>? validator, String? forceErrorText, bool enabled = true, AutovalidateMode autovalidateMode = .disabled, Key? formFieldKey, Key? key})
Creates a FSlider.

Properties

autovalidateMode → AutovalidateMode
Used to enable/disable this form field's auto validation and update its error text.
final
control → FSliderControl
The control for the slider.
final
description → Widget?
The description.
final
enabled → bool
Whether the form is able to receive user input.
final
errorBuilder → Widget Function(BuildContext context, String message)
The builder for errors displayed below the description. Defaults to displaying the error message.
final
forceErrorText → String?
An optional property that forces the FormFieldState into an error state by directly setting the FormFieldState.errorText property without running the validator function.
final
formFieldKey → Key?
The key to use for the internal FormField.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → Widget?
The label.
final
layout → FLayout?
The layout. Defaults to the current TextDirection.
final
marks → List<FSliderMark>
The marks.
final
onEnd → ValueChanged<FSliderValue>?
Called when the user finishes interacting with the slider.
final
onReset → VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
final
onSaved → FormFieldSetter<FSliderValue>?
An optional method to call with the final value when the form is saved via FormState.save.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticFormatterCallback → String Function(FSliderValue)?
A callback that formats the semantic label for the slider. Defaults to announcing the percentages the active track occupies.
final
semanticValueFormatterCallback → String Function(double)
A callback that formats the semantic label for the slider's thumb. Defaults to announcing the percentage.
final
style → FSliderStyleDelta
The style.
final
tooltipBuilder → Widget Function(FTooltipController controller, double value)
A builder that creates the tooltip. Defaults to printing the current percentage.
final
tooltipControls → FSliderTooltipControls
The control for the slider's tooltips.
final
trackHitRegionCrossExtent → double?
The extent of the track's hit region in the cross-axis direction.
final
trackMainAxisExtent → double?
The extent of the track along the main axis. Defaults to occupying the maximum amount of space possible along the main axis.
final
validator → FormFieldValidator<FSliderValue>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
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.
override
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

Static Methods

defaultSemanticValueFormatter(double value) → String
The default semantic value formatter that formats the value as a percentage.
defaultTooltipBuilder(FTooltipController _, double value) → Widget
The default tooltip builder that displays the value as a percentage.