Waapi Flutter
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
Installation
Add waapi_flutter to your pubspec.yaml:
dependencies:
waapi_flutter: ^0.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
Senior Flutter Developer with 4+ years of experience specializing in Tracking Apps, E-learning, and Flutter Web. Currently working at DomApp on building inspection compliance apps for Saudi Arabia. Key projects include Elmazoon (13k+ students) and 6+ freelance apps serving 20k+ users.
- 🌐 Portfolio: elsapagh.octopusteam.net
- 💼 Role: Co-founder & Mobile Lead at Octopus Team
- 🎓 Instructor: Flutter Developer & Tech Content Creator
License
MIT License - see LICENSE for details.
Libraries
- waapi_flutter
- Support for doing something awesome.