String? getSelectedValue(int id) { final selectedItem = listItems?.firstWhereOrNull((item) => item.value == id); return selectedItem?.text; // Returns the matching text or null }