Skip to content
pubscout

whatsapp_share2

2.1.1, released a year ago by solusibejo.com

Share text, links or files to a specific WhatsApp contact from Flutter.

WASM-ready
$ flutter pub add whatsapp_share2
Source repository

What it does

The plugin checks if WhatsApp (or Business) is installed, then lets you share a message, URL or local files to a given phone number. It works on Android and iOS via native intents.

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

Use it when

  • You need to send content directly to a WhatsApp contact
  • You want a null‑safe, simple API for WhatsApp sharing
  • You target Android and iOS only

Skip it when

  • You need to share to apps other than WhatsApp
  • You prefer a fully cross‑platform share sheet without native setup
  • You require advanced UI or fallback handling

Strengths

  • Simple, focused API
  • Supports specific contact numbers
  • Null‑safe and works on both platforms

Weaknesses

  • Requires manual Android FileProvider and iOS podfile changes
  • Limited to WhatsApp only
  • No automatic fallback if WhatsApp is missing

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Add FileProvider entry and provider_paths.xml in AndroidManifest; modify ios/Podfile to use_frameworks; no extra Dart tooling required

import 'package:whatsapp_share2/whatsapp_share2.dart';

Future<void> share() async {
  await WhatsappShare.share(
    text: 'Hello from Flutter',
    linkUrl: 'https://flutter.dev',
    phone: '91xxxxxxxxxx',
  );
}

Alternatives

Packages that do the same job and could replace whatsapp_share2.

  • share_plus

    Provides generic sharing to any installed app without platform‑specific configuration

  • url_launcher

    Can open WhatsApp URL schemes for simple text sharing without native plugins