sortWith static method
Sort with custom comparator
Implementation
static List<AdItem> sortWith(List<AdItem> items, int Function(AdItem, AdItem) comparator) {
final sorted = List<AdItem>.from(items);
sorted.sort(comparator);
return sorted;
}
Sort with custom comparator
static List<AdItem> sortWith(List<AdItem> items, int Function(AdItem, AdItem) comparator) {
final sorted = List<AdItem>.from(items);
sorted.sort(comparator);
return sorted;
}