WhatsApp Business API との統合に使用できる Flutter パッケージ。Flutter アプリからメッセージ、製品、メディア、場所を直接送信できます。
WhatsApp ビジネス API 用のパッケージで、Flutter アプリを通じてメッセージ、製品、メディア、場所を送信できます。
- スター
- 43
- フォーク
- 21
- 最終プッシュ(UTC)
- 2026/06/17
- プロジェクト状態
- 公開中
元の README
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

This Flutter package allows you to integrate the WhatsApp Business API into your Flutter applications. It enables sending messages, media, templates, managing business information, creating interactives and flows, sending catalog messages, and more. The package is updated to support the latest WhatsApp Business API v23.0.
Documentation
Full documentation for the WhatsApp Flutter package is available at whatsapp-flutter.github.io.
You can switch the documentation version using the version selector at the top of the page (version:).
Other useful links:
- Official WhatsApp Flutter website
- Initialization Guide
- Return Methods – Learn how to handle API responses
- Method Usage – Detailed usage instructions
New Features in v4
- Performance Improvements – Optimized core methods, now up to 3x faster than previous versions.
- Web Platform Support – Now supports fully compatibility with Flutter Web for most features.
- Service-Specific Methods – Each service now provides dedicated getters for cleaner and more explicit usage.
- Flow Messages – Added support for interactive flow messages to improve user engagement.
- Catalog & Product Messages – Send product details and catalog messages for e-commerce use cases.
- Resumable Uploads – Support for creating and managing resumable upload sessions for large files.
- Error Handling Enhancements – Improved and added
WhatsAppExceptionhandling with detailed error types. - Bug Fixes – Resolved multiple issues affecting stability and reliability.
- API Upgrade – Updated to support
WhatsApp Business API v23.0(stable).
Basic Usage
// Access token provided by Meta for WhatsApp Cloud API
const accessToken = 'YOUR_ACCESS_TOKEN';
// Your WhatsApp Business phone number ID
const fromNumberId = 'YOUR_PHONE_NUMBER_ID';
// Create WhatsApp client instance
final whatsapp = WhatsApp(accessToken, fromNumberId);
try {
// Send a simple text message
var message = await whatsapp.sendMessage(
phoneNumber: 'RECEIPT_NUMBER', // Recipient's phone number in international format
text: 'Hi, how are you?', // Message content
);
// Message sent successfully
// Get and print the unique ID of the sent message
print('Message ID: ${message.getMessageId()}');
// Get and print the recipient number
print('Message sent to: ${message.getContactId()}');
// Get and print the full API response body
print('API Response: ${message.getFullResponse()}');
} on WhatsAppException catch (e) {
// Message failed to send
// Print HTTP error code returned by the API
print('HTTP Code: ${e.statusCode}');
// Print exact error details from WhatsApp Cloud API
print('API Error: ${e.message}');
// Print type of request error (e.g., validation, authorization, etc.)
print('Request Error: ${e.errorType}');
} catch (e) {
print('Unexpected error: $e');
}
📌 Looking for a Better Example?
👉 Check out this working example here:
🔗 pub.dev WhatsApp Example
Contributors
Have you found a bug or have a suggestion of how to enhance WhatsApp Package? Open an issue or pull request and we will take a look at it as soon as possible.
Report bugs or issues
You are welcome to open a ticket on github if any problems arise. New ideas are always welcome.
Copyright and License
Copyright © 2022 Rohit Chouhan. Licensed under the MIT LICENSE.
カテゴリー
このリポジトリが公開するパッケージ
使用している依存関係
依存関係一覧 8 件
- flutter
{"sdk":"flutter"} - http
^1.2.2 - http_parser
^4.0.2 - flutter_test開発用
{"sdk":"flutter"} - flutter_lints開発用
^6.0.0 - mockito開発用
^5.4.4 - build_runner開発用
^2.4.8 - flutter_dotenv開発用
^6.0.0
プロジェクトに合うリポジトリを選ぶには?
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
- 名前・作者・説明で検索し、技術トピックで絞り込みます。
- スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
- 利用前に GitHub で README、ライセンス、Issues を確認します。
情報源と管理
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗