labelPlacement property Null safety

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 SfRangeSelector.

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

SfRangeSelector(
  min: DateTime(2000, 01, 01, 00),
  max: DateTime(2005, 12, 31, 24),
  initialValues: _initialValues,
  interval: 1,
  dateFormat: DateFormat.y(),
  dateIntervalType: DateIntervalType.years,
  labelPlacement: LabelPlacement.betweenTicks,
  child: Container(
      height: 200,
      color: Colors.green[100],
   ),
)

Implementation

final LabelPlacement labelPlacement;