パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v4.0.1

whatsapp

WhatsApp Business API との統合に使用できる Flutter パッケージ。Flutter アプリからメッセージ、製品、メディア、場所を直接送信できます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
196
いいね数
212
Pub ポイント
140

パッケージをインストール

flutter pub add whatsapp

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutterパッケージで、WhatsApp Business APIとの統合を可能にし、開発者がFlutterアプリからメッセージ、製品カタログ、メディアファイル、場所データを直接送信できるようにします。シームレスなクロスプラットフォーム通信を目的としており、Android、iOS、Web、macOS、Windows、Linuxをサポートしています。このパッケージは、WhatsAppを通じた豊富なコンテンツの送信を簡素化し、顧客エンゲージメント、注文確認、自動通知に最適です。公式のWhatsApp Business APIに基づいて構築されており、信頼性とセキュリティを確保したメッセージングを実現しています。

用途

  • 注文確認の送信
  • 自動顧客通知
  • 製品カタログの共有
  • 場所の更新を送信する
  • メディアファイルの共有
  • カスタマーサポートメッセージ

主な機能

  • テキスト、メディア、場所などのメッセージタイプをサポートしています
  • WhatsApp Business API と統合
  • クロスプラットフォーム互換性
  • Flutter pub で簡単なセットアップ
  • リアルタイムメッセージ配信
  • 製品カタログの共有

適している対象

  • ECアプリ
  • カスタマーサービスプラットフォーム
  • ビジネスコミュニケーションツール
  • 自動通知システム
  • WhatsAppの統合を必要とするモバイルアプリ

注意事項

  • WhatsApp Business API アクセスが必要です
  • 適切な認証設定が必要です
  • 事業者アカウントの確認が必要になる場合があります
  • レート制限が適用されます
  • 安定したインターネット接続に依存します
  • WhatsAppのポリシーに準拠する

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

WhatsApp Flutter Banner

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.

Pub Likes Pub Points Pub Monthly Downloads GitHub Issues GitHub PRs GitHub Forks

Rohit Chouhan Sponsor


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:


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 WhatsAppException handling 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

chouhan-rahul

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.

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。