fluttercommunity / flutter_contacts

Contacts Service - A Flutter plugin to retrieve and manage contacts on Android and iOS devices. Maintainer: @lukasgit
https://pub.dev/packages/contacts_service
MIT License
153 stars 69 forks source link

Feature: Support Fax as a label for Phone #58

Closed yokiran closed 5 years ago

yokiran commented 5 years ago

Besides Work, Mobile and Home, can Fax be added as label please.

gotgot1995 commented 5 years ago

Hi.

Every other labels would be greatly appreciated as well. Maybe a Map<String,String> to check if the field is present?

Personally, I need to loop over the "labels" (from Android contact). Any idea of how to do that ?

trinqk commented 5 years ago

@gotgot1995 I'm working on support for more labels, but updating contacts is a higher priority at the moment so this particular request may be delayed. PRs are definitely welcome. Also, perhaps you could try something like this to loop over the "labels".

contacts.phones.map((i) {
    print("Label: ${i.label}");
    print("Value: ${i.value}");
});
trinqk commented 5 years ago

Added via PR #73. Please use the latest version contacts_service: ^0.2.4