toggleBasedOnIndex method
Implementation
void toggleBasedOnIndex(int index) {
state.elementAt(index).isExpanded = !state.elementAt(index).isExpanded;
emit(state);
}
void toggleBasedOnIndex(int index) {
state.elementAt(index).isExpanded = !state.elementAt(index).isExpanded;
emit(state);
}