toggle method

void toggle(
  1. int index, {
  2. Offset? offset,
  3. DropDownHeaderStatus? status,
})

Used to toggle DropDownView.

Implementation

void toggle(int index, {Offset? offset, DropDownHeaderStatus? status}) {
  if (isExpand && headerIndex == index) {
    hide(index: index, status: status);
  } else {
    show(index, offset: offset);
  }
}