sortSuggestions static method
Implementation
static void sortSuggestions(List<AddressSuggestion> suggestions) {
// Sorts the suggestions based on the isSelected property.
// The selected suggestions will be at the top of the list.
suggestions.sort((a, b) {
if (a.isSelected == true && b.isSelected != true) {
return -1;
} else if (a.isSelected != true && b.isSelected == true) {
return 1;
}
return 0;
});
}