Skip to content

RKKnob

A premium rotary knob widget for RadioKit with configurable angle range, optional centre-spring and division snapping.

RKKnob({
required double value,
required ValueChanged<double> onChanged,
double min = 0.0,
double max = 1.0,
double size = 100.0,
String? label,
int? divisions,
ValueChanged<bool>? onInteractionChanged,
double minAngle = -135.0,
double maxAngle = 135.0,
bool autoCenter = false,
double center = 0.5,
Curve springCurve = Curves.easeOutCubic,
Duration springDuration = const Duration(milliseconds: 500),
RKKnobVariant variant = RKKnobVariant.standard,
RKAxis orientation = RKAxis.vertical,
double rotation = 0.0,
IconData? centerIcon,
})
ParameterDescription
valueNormalised knob position (between min and max).
onChangedCalled with the new value when the user drags.
sizeDiameter of the knob widget.
labelOptional text label displayed above the widget.
divisionsIf set, the knob snaps to the specified number of steps.
onInteractionChangedTriggered when the user starts or stops touching the widget.
minAngle / maxAngleAngular range in degrees (default -135 to +135).
autoCenterWhen true, the knob springs back to center after interaction.
centerNormalised centre position used for auto-centering.
springCurve / springDurationControls the spring-back animation.
variantThe visual style: standard or steeringWheel.
orientationOrientation of the knob layout: vertical (default) or horizontal.
rotationVisual rotation of the widget in radians.
centerIconOptional icon to display in the middle of the knob.
double _volume = 0.7;
RKKnob(
value: _volume,
onChanged: (v) => setState(() => _volume = v),
divisions: 10,
label: 'Vol',
);
  • Standard: A 3D industrial rotary encoder with an animated thumb.
  • Steering Wheel: A premium automotive-inspired wheel with dynamic rim glow and a central hub.