getSortedItems static method
Get a sorted list of items by name
Implementation
static List<SearchableItem> getSortedItems(List<SearchableItem> items) {
final sortedItems = List<SearchableItem>.from(items);
sortedItems.sort(
(a, b) => a.name.toLowerCase().compareTo(b.name.toLowerCase()),
);
return sortedItems;
}