WhatsappDirectSend class
A Flutter plugin to send text messages and/or images directly to a WhatsApp contact on Android.
Uses Intent.ACTION_SEND under the hood and automatically picks
WhatsApp or WhatsApp Business if installed, falling back to the
system share sheet otherwise.
Usage
// Share text + image to a known contact
await WhatsappDirectSend.shareToChat(
phone: '1234567890',
text: 'Check this out',
filePath: '/data/user/0/com.example/cache/report.png',
);
// Open chat with any number (text only)
await WhatsappDirectSend.openChat(
phone: '1234567890',
text: 'Hello from Flutter!',
);
Constructors
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