buildItem method

  1. @override
Widget buildItem(
  1. BuildContext context,
  2. int index
)
override

Implementation

@override
Widget buildItem(BuildContext context, int index) {
  final txt = cur!.getValueText(index);
  final isSel = index == picker!.selecteds[_col];
  if (picker!.onBuilderItem != null) {
    final v = picker!.onBuilderItem!(context, txt, null, isSel, _col, index);
    if (v != null) return makeText(v, null, isSel);
  }
  if (cur!.postfix == null && cur!.suffix == null) {
    return makeText(null, txt, isSel);
  } else {
    return makeTextEx(null, txt, cur!.postfix, cur!.suffix, isSel);
  }
}