labelOffset property

Offset? labelOffset
final

Adjust the space around labels in the SfSlider, SfRangeSlider, and SfRangeSelector.

The default value of labelOffset property is Offset(0.0, 13.0) if the showTicks property is false.

The default value of labelOffset property is Offset(0.0, 5.0) if the showTicks property is true.

This snippet shows how to set label offset in SfRangeSliderThemeData.

SfRangeValues _values = SfRangeValues(4.0, 8.0);

Scaffold(
    body: Center(
        child: SfRangeSliderTheme(
            data: SfRangeSliderThemeData(
                labelOffset: Offset(0.0, 10.0),
            ),
            child:  SfRangeSlider(
                min: 2.0,
                max: 10.0,
                values: _values,
                interval: 2,
                showTicks: true,
                showLabels: true,
                onChanged: (SfRangeValues newValues){
                    setState(() {
                        _values = newValues;
                    });
                },
           )
       ),
   )
)

Implementation

final Offset? labelOffset;