FlutterContacts class

Constructors

FlutterContacts()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

config FlutterContactsConfig
Plugin configuration.
getter/setter pair

Static Methods

addListener(void listener()) → void
Listens to contact database changes.
deleteContact(Contact contact) Future<void>
Deletes one contact from the database.
deleteContacts(List<Contact> contacts) Future<void>
Deletes contacts from the database.
deleteGroup(Group group) Future<void>
Deletes a group (or label on Android).
getContact(String id, {bool withProperties = true, bool withThumbnail = true, bool withPhoto = true, bool withGroups = false, bool withAccounts = false, bool deduplicateProperties = true}) Future<Contact?>
Fetches one contact.
getContacts({bool withProperties = false, bool withThumbnail = false, bool withPhoto = false, bool withGroups = false, bool withAccounts = false, bool sorted = true, bool deduplicateProperties = true}) Future<List<Contact>>
Fetches all contacts.
getGroups() Future<List<Group>>
Fetches all groups (or labels on Android).
insertContact(Contact contact) Future<Contact>
Inserts a new contact in the database and returns it.
insertGroup(Group group) Future<Group>
Inserts a new group (or label on Android).
openExternalEdit(String id) Future<Contact?>
Opens external contact app to edit an existing contact.
openExternalInsert([Contact? contact]) Future<Contact?>
Opens external contact app to insert a new contact.
openExternalPick() Future<Contact?>
Opens external contact app to pick an existing contact.
openExternalView(String id) Future<void>
Opens external contact app to view an existing contact.
removeListener(void listener()) → void
Removes a listener to contact database changes.
requestPermission({bool readonly = false}) Future<bool>
Requests permission to read or read/write contacts. Returns true if granted, false in any other case. Note: read-only mode is only applicable to Android.
updateContact(Contact contact, {bool withGroups = false}) Future<Contact>
Updates existing contact and returns it.
updateGroup(Group group) Future<Group>
Updates a group (or label on Android).