labelPlacement property

LabelPlacement labelPlacement
final

Option to place the labels either between the major ticks or on the major ticks.

Defaults to LabelPlacement.onTicks.

This snippet shows how to set label placement in SfRangeSlider.

SfRangeValues _values = SfRangeValues(
        DateTime(2002, 01, 01), DateTime(2003, 01, 01));

SfRangeSlider(
  min: DateTime(2000, 01, 01, 00),
  max: DateTime(2005, 12, 31, 24),
  values: _values,
  interval: 1,
  dateFormat: DateFormat.y(),
  dateIntervalType: DateIntervalType.years,
  labelPlacement: LabelPlacement.betweenTicks,
  onChanged: (SfRangeValues newValues) {
    setState(() {
      _values = newValues;
    });
  },
)

Implementation

final LabelPlacement labelPlacement;