addItem method
Adds a dropdown item to the list of dropdown items.
The index parameter is optional, and if provided, the item will be inserted at the specified index.
Implementation
void addItem(DropdownItem<T> option, {int index = -1}) {
if (index == -1) {
_items.add(option);
} else {
_items.insert(index, option);
}
notifyListeners();
_onSelectionChanged?.call(_selectedValues);
}