CupertinoPicker(
  backgroundColor: Colors.white, //选择器背景色
  itemExtent: 30, //item的高度
  onSelectedItemChanged: (index) { //选中item的位置索引
    print("index = $index}");
  },
  children: <Widget>[ //所有的选择项
    Text('Apple'),
    Text('Banana'),
    Text('Orange'),
  ],
)

 

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-06-14
猜你喜欢
  • 2022-12-23
  • 2021-05-28
  • 2022-01-07
  • 2021-08-06
  • 2022-12-23
  • 2021-06-15
  • 2021-10-23
相关资源
相似解决方案