share_plus
13.3.1, released 7 weeks ago by fluttercommunity.dev
Share text, files, or URIs via native share dialogs on mobile, web, and desktop.
Flutter Favorite
What it does
Provides a simple API to invoke the platform’s share sheet, supporting text, files, and URIs. On web it uses the Web Share API or falls back to downloading files.
AI-written summary of version 13.3.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to share content from a Flutter app to other apps or the system share sheet.
- You want a cross‑platform solution without writing native code for each platform.
Skip it when
- You need advanced sharing features like custom share targets or deep integration with specific apps.
- You are targeting Linux only, as file sharing is not supported there.
Strengths
- Cross‑platform API with minimal boilerplate.
- Supports files, text, and URIs on all major platforms.
- Web fallback downloads files if Web Share API is unavailable.
- No code generation required.
Weaknesses
- File sharing not available on Linux.
- Requires Java 17/Kotlin 2.2.0 for Android, which may be a hurdle for older projects.
- Limited customization of the share sheet beyond title and excluded activities.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 12
Add dependency, import package, and call SharePlus.instance.share(). No special permissions needed.
import 'package:share_plus/share_plus.dart';
SharePlus.instance.share(
ShareParams(text: 'Check out this link', files: [XFile('path/to/file.jpg')])
);Works with
Packages commonly used together with share_plus: ones it builds on, ones built on it, and its own family.
- mimeshare_plus depends on itUtilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
- webshare_plus depends on itLightweight bindings for browser APIs via JS interop
- ffishare_plus depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- fileshare_plus depends on itPluggable, mockable file system abstraction for Dart with in-memory support.
- win32share_plus depends on itCall common Windows APIs and COM objects directly from Dart using FFI.
- url_launcher_windowsshare_plus depends on itLaunch URLs, files and app schemes on Windows from Flutter apps.
- cross_fileshare_plus depends on itAn abstraction to allow working with files across multiple platforms.
- talker_flutterBuilt on share_plusAdvanced error handler and logger package for Flutter and Dart applications