Cupertino风格的通用选择器CupertinoPicker

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