getLastSelected method

  1. @override
DropdownItem<T>? getLastSelected()
override

The last selected item, for SingleSelectionDropdownController, it would be the current selected item; for MultiSelectionDropdownController, it would be the last selected item.

Implementation

@override
DropdownItem<T>? getLastSelected() => _selectedItemValue != null
    ? DropdownItem(value: _selectedItemValue as T, selected: true)
    : null;