ContactService class

Service for managing WhatsApp contacts and recipient information.

Constructors

ContactService.new({required ApiClient apiClient, required String phoneNumberId, required Logger logger})
Creates a new contact service.

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

buildContact({required String firstName, String? lastName, required String phoneNumber, String? email}) Contact
Builds a full contact object.
getContactInfo(String phoneNumber) Future<Contact?>
Gets contact information from a phone number.
getProfileName(String phoneNumber) Future<String?>
Gets the profile name for a phone number.
isRegisteredOnWhatsApp(String phoneNumber) Future<bool>
Checks if a phone number is registered on WhatsApp.
isValidPhoneNumber(String phoneNumber) bool
Validates a phone number format for WhatsApp.
normalizePhoneNumber(String phoneNumber) String
Normalizes a phone number for WhatsApp API.
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