flutter numberpicker

引入以来后直接这样写代码就好了!当成一个widget使用:

Column(

mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
NumberPicker.integer(
initialValue: _currentValue,
minValue: 0,
maxValue: 100,
onChanged: (newValue) =>
setState(() => _currentValue = newValue)),
Text("Current number: $_currentValue"),
],
),
posted @ 2019-07-05 23:06  braveheart007  阅读(938)  评论(0编辑  收藏  举报