Share plugin #
A Flutter plugin to share content from your Flutter app via the platform's share dialog.
Wraps the ACTION_SEND Intent on Android and UIActivityViewController on iOS.
To use this plugin, add
share as a dependency in your pubspec.yaml file.
Import the library via
Then invoke the static
share method anywhere in your Dart code
Share.share('check out my website https://example.com');
- Specify explicit type for
- Updated minimum Flutter SDK to 1.6.0.
- Add optional subject to fill email subject in case user selects email app.
- Update Dart code to conform to current Dart formatter.
- Fix analyzer warnings about
const Rectin tests.
- Updated Android compileSdkVersion to 28 to match other plugins.
- Log a more detailed warning at build time about the previous AndroidX migration.
- Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.
- Added missing test package dependency.
- Bumped version of mockito package dependency to pick up Dart 2 support.
- Fixes iOS sharing
- Updated Gradle tooling to match Android Studio 3.1.2.
- Breaking change. Namespaced the
sharemethod inside a
- Fixed crash when sharing on iPad.
- Added functionality to specify share sheet origin on iOS.
- Breaking change. Set SDK constraints to match the Flutter beta release.
- Fixed Dart 2 type error.
- Simplified and upgraded Android project template to Android SDK 27.
- Updated package description.
- Breaking change. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in order to use this version of the plugin. Instructions can be found here.
- Added FLT prefix to iOS types
- Updated README
- Bumped buildToolsVersion to 25.0.3
- Upgrade to new plugin registration. (https://groups.google.com/forum/#!topic/flutter-dev/zba1Ynf2OKM)
- Initial Open Source release.
Demonstrates how to use the share plugin.
Getting Started #
For help getting started with Flutter, view our online documentation.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: share: ^0.6.2+1
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Sep 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.0
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.2
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.