BrnDefaultMultiDataPickerDelegate constructor

BrnDefaultMultiDataPickerDelegate({
  1. required List<BrnMultiDataPickerEntity> data,
  2. int firstSelectedIndex = 0,
  3. int secondSelectedIndex = 0,
  4. int thirdSelectedIndex = 0,
})

Implementation

BrnDefaultMultiDataPickerDelegate(
    {required this.data,
    this.firstSelectedIndex = 0,
    this.secondSelectedIndex = 0,
    this.thirdSelectedIndex = 0}) {
  if (data.isNotEmpty) {
    _numberOfComponent = 1;
    for (BrnMultiDataPickerEntity brnPickerItem in data) {
      if (brnPickerItem.children.isNotEmpty) {
        _numberOfComponent = 2;

        for (BrnMultiDataPickerEntity brnPickerItem1
            in brnPickerItem.children) {
          if (brnPickerItem1.children.isNotEmpty) {
            _numberOfComponent = 3;
          }
        }
      }
    }
  }
}