labelPlacement property
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 SfSlider.
DateTime _value = DateTime(2002, 01, 01);
SfSlider(
min: DateTime(2000, 01, 01, 00),
max: DateTime(2005, 12, 31, 24),
value: _value,
interval: 1,
dateFormat: DateFormat.y(),
dateIntervalType: DateIntervalType.years,
labelPlacement: LabelPlacement.betweenTicks,
onChanged: (dynamic newValue) {
setState(() {
_value = newValue;
});
},
)
Implementation
final LabelPlacement labelPlacement;