What's New?
WhatsApp API support upgraded to v27.0
Version 4.2.0 targets the latest Graph API release, removes all runtime dependencies, and adds webhook verification, media downloads and full template components.
✨ New in 4.2.0
Zero runtime dependencies
- Removed
httpandhttp_parser. The package is now pure Dart and usesdart:ioon native platforms and the browser HTTP stack on the web. - Removed the Flutter SDK dependency, so the same client works in plain Dart servers.
- Uploads accept
File,XFile, native paths,Uint8ListandList<int>.
Webhooks
- Verify
X-Hub-Signature-256with a built-in HMAC-SHA256 implementation. - Handle the GET verification handshake.
- Parse incoming messages, statuses, contacts, media, reactions, reply buttons, Flow responses and errors with typed models.
Media
- Download media bytes with
downloadMediaordownloadMediaById. - Access the MIME type, file name, status code and raw bytes.
Templates
- Send media headers, named body parameters, URL/quick-reply buttons and carousels with
sendTemplateMessage. - Existing
sendTemplatecalls keep working.
Phone number details
- Get the display number, verified name, quality rating, throughput and official
business account status with
getPhoneNumber().
Reliability
- Configurable timeouts, any
2xxresponse accepted, and an injectable transport. - Typed authentication, validation, rate-limit and server exceptions with error codes,
subcodes and
fbtrace_id. - Fixed resumable uploads, registration data-localization, request/verify code formats,
catalog headers,
Reply.text(previewUrl: true), webhook parsing and MIME detection. - Unit tests split by feature, with opt-in live API tests and GitHub Actions CI.
Notes
- The public
WhatsAppmethods and parameters are unchanged. - Advanced code that used the internal
Requestmethods now receivesWhatsAppHttpResponseinstead ofpackage:http'sResponse.
4.0.1 and earlier
- Upgraded to API v25.0 and refactored 15 services onto
BaseService. - Fixed business profile address mapping, token whitespace parsing and example code.
- 4.0.0 introduced
replynaming, web support, Flow messages, catalog/product messages, typing indicators, user blocking and resumable uploads.