ContactComparator top-level property
Implementation
Comparator<ISunnyContact> ContactComparator = (ISunnyContact a, ISunnyContact b) {
if (a.isFavorite != b.isFavorite) {
return b.isFavorite == true ? 1 : -1;
}
final fullA = Contacts.contactString(a);
final fullB = Contacts.contactString(b);
return fullA?.compareTo(fullB ?? "") ?? 1;
};