I have a CupertinoPicker, on some condition I have to disable the CupertinoPicker.
Checked the CupertinoPicker class and didn't find any disable attribute in that.
If disabling is not possible, Can I Stop scroll on it?
CupertinoPicker(
backgroundColor: null,
itemExtent: PICKER_EXTENT,
useMagnifier: true,
looping: true,
onSelectedItemChanged: (int index) {
print('selected index $index');
},
children: List<Widget>.generate(dataList.length, (int index) {
return Center(
child: Text(dataList[index]),
);
}),
scrollController:
FixedExtentScrollController(initialItem: selectedIndex)),