SliderSuperFormField class

Regular material Slider that extends SuperFormField

This widget's state automatically registers field for name so there is no need for manual registration.

Specify rules to add validation for this field. Errors will not be displayed automatically. Consider putting SuperFormErrorText below the slider.

Most fields are kept the same as in Slider so see there for documentation of specific properties.

SliderSuperFormField(
  name: "power",
  rules: [MaxValueRule(limit, "Cannot exceed the user limit")],
),

See also:

  • Slider, which is non-connected version of this widget
Inheritance

Constructors

SliderSuperFormField({Key? key, required String name, List<SuperFormFieldRule>? rules, FocusNode? focusNode, ValueChanged<double>? onChanged, ValueChanged<double>? onChangeStart, ValueChanged<double>? onChangeEnd, double min = 0.0, double max = 1.0, int? divisions, String? label, Color? activeColor, Color? inactiveColor, MouseCursor? mouseCursor, SemanticFormatterCallback? semanticFormatterCallback, bool autofocus = false, bool? enabled})

Properties

activeColor Color?
The color to use for the portion of the slider track that is active.
final
autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
final
builder SuperFormFieldBuilder
finalinherited
divisions int?
The number of discrete divisions.
final
enabled bool?
If false the slider will be displayed as disabled.
final
focusNode FocusNode?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
inactiveColor Color?
The color for the inactive portion of the slider track.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
A label to show above the slider when the slider is active.
final
max double
The maximum value the user can select.
final
min double
The minimum value the user can select.
final
mouseCursor MouseCursor?
The cursor for a mouse pointer when it enters or is hovering over the widget.
final
name String
Name of the field
finalinherited
noFormFallback Widget
Fallback widget for a case where SuperForm ancestor is unavailable
finalinherited
onChanged ValueChanged<double>?
final
onChangeEnd ValueChanged<double>?
final
onChangeStart ValueChanged<double>?
final
rules List<SuperFormFieldRule>
Field validation rules
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticFormatterCallback SemanticFormatterCallback?
The callback used to create a semantic value from a slider value.
final

Methods

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