FlutterOKnob class
A customizable rotary knob widget, similar to analog audio knobs.
FlutterOKnob allows users to rotate a knob to select a value within a
given range. It supports styling via gradients, markers, labels, and
rotation sensitivity.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FlutterOKnob
Constructors
-
FlutterOKnob({Key? key, required double knobvalue, required ValueChanged<
double> onChanged, double size = 150.0, double? minValue, double? maxValue, Color? markerColor, Gradient? outerRingGradient, Gradient? innerKnobGradient, double sensitivity = 0.5, Widget? knobLabel, double maxRotationAngle = 360, bool showKnobLabels = true, double angleOffset = 90}) -
Creates a FlutterOKnob widget.
const
Properties
- angleOffset → double
-
The starting angle offset in degrees. Default is 90° (pointing up).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerKnobGradient → Gradient?
-
Gradient used for the inner knob.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- knobLabel → Widget?
-
Optional widget to be displayed below the knob as a label.
final
- knobvalue → double
-
The current value of the knob.
final
- markerColor → Color?
-
Color of the value marker on the knob.
final
- maxRotationAngle → double
-
The maximum rotation angle (in degrees) allowed for the knob. Defaults to 360°.
final
- maxValue → double?
-
The maximum allowed value for the knob. Defaults to maxRotationAngle.
final
- minValue → double?
-
The minimum allowed value for the knob. Defaults to 0.
final
-
onChanged
→ ValueChanged<
double> -
Callback invoked when the knob value changes.
final
- outerRingGradient → Gradient?
-
Gradient used for the outer ring of the knob.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sensitivity → double
-
Sensitivity factor for knob rotation. Not currently used in this version.
final
- showKnobLabels → bool
-
If true, shows numerical value markers on the knob.
final
- size → double
-
The overall diameter of the knob widget.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FlutterOKnob> -
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