Skip to content
pubscout

whatsapp_bot_flutter

2.1.2, released a year ago by rohitsangwan.in

A Flutter/Dart library to control WhatsApp Web via Puppeteer for sending messages and handling events.

WASM-ready
$ flutter pub add whatsapp_bot_flutter
Source repository

What it does

It connects to WhatsApp Web using a headless Chromium instance and provides a client API to send texts, files, and other media. It also streams connection and chat events for reactive handling.

AI-written summary of version 2.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to automate WhatsApp messaging from a Flutter or Dart app
  • You want to integrate WhatsApp interactions without using official APIs
  • You are building desktop or web automation tools that require WhatsApp access

Skip it when

  • Official, supported WhatsApp integration is required
  • You need a solution that works on iOS/Android without extra setup
  • You cannot tolerate potential account bans from unofficial clients

Strengths

  • Supports desktop, web and mobile via separate package
  • Rich set of WhatsApp features (media, contacts, groups)
  • Event streams for real‑time handling

Weaknesses

  • Relies on web scraping; may break with WhatsApp updates
  • Requires Chromium download or external browserless service
  • Not officially supported by WhatsApp, risk of bans

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
2

Desktop: first run downloads Chromium; Mobile: add flutter_inappwebview and follow its setup; Web: use whatsapp_bot_flutter_web or provide a browserless endpoint.

await WhatsappBotFlutter.connect(
  onQrCode: (qr, img) => print(qr),
  onConnectionEvent: (e) => print(e),
);
await whatsappClient.chat.sendTextMessage(phone: '1234567890', message: 'Hello');

Works with

Packages commonly used together with whatsapp_bot_flutter: ones it builds on, ones built on it, and its own family.