ContactsBridge class
Main plugin class that provides a clean API for contact operations
This class follows the Facade pattern and provides a simplified interface to the complex contact management system underneath.
Constructors
- ContactsBridge.new()
-
Gets the singleton instance of ContactsBridge
factory
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
-
createContact(
Contact contact) → Future< Result< Contact> > - Creates a new contact
-
deleteContact(
String id) → Future< Result< void> > - Deletes a contact by ID
-
getAllContacts(
{bool withProperties = false, bool withThumbnail = false, bool withPhoto = false, bool sorted = true}) → Future< Result< List< >Contact> > - Fetches all contacts from the device
-
getContact(
String id, {bool withProperties = true, bool withThumbnail = false, bool withPhoto = false}) → Future< Result< Contact?> > - Fetches a single contact by ID
-
getPermissionStatus(
) → Future< Result< PermissionStatus> > - Gets the current permission status
-
getPlatformVersion(
) → Future< String?> - Gets the platform version for debugging purposes
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observeContacts(
) → Stream< List< Contact> > - Observes changes to contacts Returns a stream that emits when contacts are modified
-
pickContact(
) → Future< Result< Contact?> > - Opens the native contact picker Returns the selected contact or null if cancelled
-
requestPermission(
{bool readOnly = false}) → Future< Result< PermissionStatus> > - Requests permission to access contacts
-
searchContacts(
String query, {bool withProperties = false, bool sorted = true}) → Future< Result< List< >Contact> > - Searches for contacts by query string
-
toString(
) → String -
A string representation of this object.
inherited
-
updateContact(
Contact contact) → Future< Result< Contact> > - Updates an existing contact
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited