titleForRowInComponent method
定义某列某行所显示的内容,component 代表列的索引,index 代表 第component列中的第 index 个元素
Implementation
@override
String titleForRowInComponent(int component, int index) {
if (0 == component) {
return data[index].text;
} else if (1 == component) {
BrnMultiDataPickerEntity brnPickerItem = data[firstSelectedIndex];
List<BrnMultiDataPickerEntity> secondList = brnPickerItem.children;
return secondList[index].text;
} else {
BrnMultiDataPickerEntity brnPickerItem = data[firstSelectedIndex];
List<BrnMultiDataPickerEntity> secondList = brnPickerItem.children;
List<BrnMultiDataPickerEntity> threeList =
secondList[secondSelectedIndex].children;
return threeList[index].text;
}
}