CircularSlider class
CircularSlider widget
References: https://www.youtube.com/watch?v=IP0Nn9f2yJs https://github.com/JideGuru/youtube_videos/blob/master/rainbow_circular_slider/lib/views/circular_slider.dart
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CircularSlider
Constructors
-
CircularSlider.new({Key? key, required double value, double min = 0.0, double max = 1.0, required KnobBuilder knobBuilder, required void onChanged(double radian), int steps = 0, required double radius, double startAngle = 0.0, double endAngle = math.pi * 2.0, double offsetRadian = 0.0, CircularSliderTrack track = const CircularSliderTrack(color: defaultTrackColor, width: defaultStrokeWidth, strokeCap: StrokeCap.round, gradientMode: GradientMode.arc), List<
CircularSliderSegment> ? segments, List<CircularSliderMarker> ? markers, List<CircularSliderNotchGroup> ? notchGroups, double notchRingOffset = 0.0, Size knobSize = const Size.square(defaultKnobSize), double knobAlignment = 1.0, bool lockKnobRotation = false, bool showArrow = true, InteractionMode interactionMode = InteractionMode.both}) -
const
Properties
- endAngle → double
-
in radians less than or equal to (pi * 2)
startAngle must be less than endAngle
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interactionMode → InteractionMode
-
Control the value of the slider using track or knob or both
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- knobAlignment → double
-
Alignment of the knob
0 = Center of slider
1 = On the slider's track
final
- knobBuilder → KnobBuilder
-
Builder for the control knob
Provides the angle in radians
final
- knobSize → Size
-
Size of the control knob
final
- lockKnobRotation → bool
-
Tangentially locks the knob's rotation
final
-
markers
→ List<
CircularSliderMarker> ? -
List of markers
final
- max → double
-
The maximum value of the slider
final
- min → double
-
The minimum value of the slider
final
-
notchGroups
→ List<
CircularSliderNotchGroup> ? -
This requires steps to be greater than 0
final
- notchRingOffset → double
-
Increase this to move the notches away from the center
Decreasing brings them closer
final
- offsetRadian → double
-
Adjust the rotation of the slider
final
- onChanged → void Function(double radian)
-
Called when the slider's value changes
final
- radius → double
-
The radius of the slider
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
→ List<
CircularSliderSegment> ? -
List of segments
final
- showArrow → bool
-
Show the directional arrow at the end of the track
final
- startAngle → double
-
in radians less than or equal to (pi * 2)
startAngle must be less than endAngle
final
- steps → int
-
The number of discrete steps within the range
final
- track → CircularSliderTrack
-
Slider track parameters
final
- value → double
-
Value between min and max
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CircularSlider> -
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, 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