orderContacts method

Future<List<Contact>> orderContacts(
  1. List<Contact> contacts
)

Implementation

Future<List<Contact>> orderContacts(List<Contact> contacts) async {
  return List<Contact>.from(contacts)..sort(
    (a, b) => (a.displayName).toLowerCase().compareTo(
      (b.displayName).toLowerCase(),
    ),
  );
}