setAsHistoryItems method
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();
}
}