thumbIcon property

Widget? thumbIcon
final

Sets the widget inside the thumb.

Defaults to null.

It is possible to set any widget inside the thumb. If the widget exceeds the size of the thumb, increase the SfSliderThemeData.thumbRadius based on it.

This snippet shows how to show thumb icon in SfSlider.

double _value = 4.0;

SfSlider(
  min: 0.0,
  max: 10.0,
  value: _value,
  interval: 1,
  showTicks: true,
  showLabels: true,
  enableTooltip: true,
  onChanged: (dynamic newValue) {
    setState(() {
      _value = newValue;
    });
   },
  thumbIcon:  Icon(
      Icons.home,
      color: Colors.green,
      size: 20.0,
  ),
)

See also:

  • thumbShape, for customizing the thumb shape.
  • SfSliderThemeData, for customizing the individual active slider element’s visual.

Implementation

final Widget? thumbIcon;