wheel static method
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< ? onHistoryChanged,Color> >
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.
currentColouris the starting colour.onColourChangedfires whenever the user selects a new colour.sizecontrols the overall dimension of the picker area.stylewraps the picker in custom padding, margin, and decoration.orientationforces 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,
);
}