setAsHistoryItems method

void setAsHistoryItems(
  1. Object key,
  2. List<DropdownItem<T>> items, {
  3. bool rebuild = false,
})

Set the given items to the dropdown menu as history items, it would be set as the top history. if rebuild, the menu will be rebuilt after the items are set.

Implementation

void setAsHistoryItems(Object key, List<DropdownItem<T>> items,
    {bool rebuild = false}) {
  _addHistory(key, items.map((e) => e.value).toList());

  if (rebuild) {
    rebuildMenu();
  }
}