wheel static method

Widget wheel({
  1. required Colour currentColour,
  2. required ValueChanged<Colour> onColourChanged,
  3. double size = 700,
  4. PickerStyle style = const PickerStyle(padding: EdgeInsets.all(10), margin: EdgeInsets.all(10), decoration: BoxDecoration(color: AppTheme.lightBackground, borderRadius: BorderRadius.all(Radius.circular(20)))),
  5. bool enableAlpha = true,
  6. bool showLabel = true,
  7. bool displayThumbColor = true,
  8. Orientation orientation = Orientation.landscape,
  9. HSVColour? pickerHsvColour,
  10. ValueChanged<HSVColor>? onHsvColourChanged,
  11. List<Colour>? colourHistory,
  12. ValueChanged<List<Color>>? onHistoryChanged,
})

Creates a colour wheel picker.

The wheel maps hue around the circle and saturation from centre to edge. A separate value slider controls brightness. Supports both portrait and landscape orientations.

  • currentColour is the starting colour.
  • onColourChanged fires whenever the user selects a new colour.
  • size controls the overall dimension of the picker area.
  • style wraps the picker in custom padding, margin, and decoration.
  • orientation forces a portrait or landscape layout.

Implementation

static Widget wheel({
  required Colour currentColour,
  required ValueChanged<Colour> onColourChanged,
  double size = 700,
  PickerStyle style = const PickerStyle(
    padding: EdgeInsets.all(10),
    margin: EdgeInsets.all(10),
    decoration: BoxDecoration(
      color: AppTheme.lightBackground,
      borderRadius: BorderRadius.all(Radius.circular(20)),
    ),
  ),
  bool enableAlpha = true,
  bool showLabel = true,
  bool displayThumbColor = true,
  Orientation orientation = Orientation.landscape,

  HSVColour? pickerHsvColour,
  ValueChanged<HSVColor>? onHsvColourChanged,
  List<Colour>? colourHistory,
  ValueChanged<List<Color>>? onHistoryChanged,
}) {
  return WheelPicker(
    currentColour: currentColour,
    onColourChanged: onColourChanged,
    size: size,
    style: style,
    showLabel: showLabel,
    displayThumbColor: displayThumbColor,
    orientation: orientation,
    pickerHsvColour: pickerHsvColour,
    onHsvColourChanged: onHsvColourChanged,
    colourHistory: colourHistory,
    onHistoryChanged: onHistoryChanged,
  );
}