Slider.adaptive constructor

const Slider.adaptive(
  1. {Key key,
  2. @required double value,
  3. @required ValueChanged<double> onChanged,
  4. ValueChanged<double> onChangeStart,
  5. ValueChanged<double> onChangeEnd,
  6. double min: 0.0,
  7. double max: 1.0,
  8. int divisions,
  9. String label,
  10. MouseCursor mouseCursor,
  11. Color activeColor,
  12. Color inactiveColor,
  13. SemanticFormatterCallback semanticFormatterCallback,
  14. FocusNode focusNode,
  15. bool autofocus: false}
)

Creates a CupertinoSlider if the target platform is iOS, creates a Material Design slider otherwise.

If a CupertinoSlider is created, the following parameters are ignored: label, inactiveColor, semanticFormatterCallback.

The target platform is based on the current Theme: ThemeData.platform.

Implementation

const Slider.adaptive({
  Key key,
  @required this.value,
  @required this.onChanged,
  this.onChangeStart,
  this.onChangeEnd,
  this.min = 0.0,
  this.max = 1.0,
  this.divisions,
  this.label,
  this.mouseCursor,
  this.activeColor,
  this.inactiveColor,
  this.semanticFormatterCallback,
  this.focusNode,
  this.autofocus = false,
}) : _sliderType = _SliderType.adaptive,
     assert(value != null),
     assert(min != null),
     assert(max != null),
     assert(min <= max),
     assert(value >= min && value <= max),
     assert(divisions == null || divisions > 0),
     super(key: key);