GitHub

    Table of contents

  1. 示例
  2. 相关链接

RangeSlider

Edit this page

A Material Design range slider.

示例

double _starValue = 10;
double _endValue = 80;


Widget build(BuildContext context) {
  return RangeSlider(
    values: RangeValues(_starValue, _endValue),
    min: 0.0,
    max: 100.0,
    onChanged: (values){
      setState(() {
        _starValue = values.start.roundToDouble();
        _endValue = values.end.roundToDouble();
      });
    },
  );
}

相关链接