setHighlightedOption method
Implementation
void setHighlightedOption(String? option) {
_highlightedOption.value = option;
// 同步更新索引,确保键盘导航从正确位置继续
if (option != null) {
final index = _currentOptions.indexOf(option);
if (index != -1) {
_highlightedIndex.value = index;
}
} else {
_highlightedIndex.value = -1;
}
}