waapi_flutter 1.0.1
waapi_flutter: ^1.0.1 copied to clipboard
A Flutter package for the Waapi WhatsApp Gateway API. Send text, media, stickers, voice notes, locations, contacts, and templates.
Waapi Flutter #
[Waapi Logo]
A production-ready Flutter package for the Waapi WhatsApp Gateway API.
Send text, media, stickers, voice notes, locations, contacts, and templates with ease.
Platform Support #
| Android | iOS | Web | macOS | Windows | Linux |
|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Features #
- Messaging: Send text, media, stickers, voice notes, locations, contacts, and templates.
- Device Management: Check device status and get QR codes.
- Strongly Typed: Includes models for
WaapiResponse,WaapiLocation,WaapiContact. - Error Handling: Centralized
WaapiExceptionhandling.
Screenshot #
[Waapi Screenshot]
Installation #
Add waapi_flutter to your pubspec.yaml:
dependencies:
waapi_flutter: ^1.0.1
Then run:
flutter pub get
Usage #
Initialization #
import 'package:waapi_flutter/waapi_flutter.dart';
final client = WaapiClient(
baseUrl: 'https://waapi.octopusteam.net',
appKey: 'YOUR_APP_KEY',
authKey: 'YOUR_AUTH_KEY',
);
Messaging #
Send Text
try {
final response = await client.sendText(
chatId: '201xxxxxxxxx@c.us',
message: 'Hello from Flutter!',
);
print('Status: ${response.status}');
} catch (e) {
print('Error: $e');
}
Send Media
await client.sendMedia(
chatId: '201xxxxxxxxx@c.us',
mediaUrl: 'https://example.com/image.png',
caption: 'Check this out!',
);
Send Location
await client.sendLocation(
chatId: '201xxxxxxxxx@c.us',
location: WaapiLocation(
latitude: 30.0444,
longitude: 31.2357,
name: 'Cairo Tower',
address: 'Cairo, Egypt'
),
);
Send Contact
await client.sendContact(
chatId: '201xxxxxxxxx@c.us',
contact: WaapiContact(
name: 'John Doe',
phoneNumber: '+1234567890',
),
);
Device Management #
final status = await client.getDeviceStatus(deviceId: 'YOUR_DEVICE_ID');
print(status.data);
Contributing #
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Author #
[Eng Ahmed Mohamed Elsapagh]
Eng Ahmed Mohamed Elsapagh
- 🌐 Portfolio: elsapagh.octopusteam.net
- 💼 Role: Co-founder & Mobile Lead at Octopus Team
License #
MIT License - see LICENSE for details.