onSelectedEntry method

void onSelectedEntry({
  1. required FDropdownEntry<T> entry,
})

Implementation

void onSelectedEntry({required FDropdownEntry<T> entry}) {
  _tooltipController.toggle();
  setState(() {
    selectedValue = entry;
    isOpen = !isOpen;
    _controller.text = selectedValue!.label;
  });

  if (widget.onSelected != null && selectedValue != null) {
    widget.onSelected!(selectedValue!.value);
  }
}