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.
Then invoke the static
share method anywhere in your Dart code.
Share.share('check out my website https://example.com');
share method also takes an optional
subject that will be used when
sharing to email.
Share.share('check out my website https://example.com', subject: 'Look what I made!');
- Remove the deprecated
author:field from pubspec.yaml
- Migrate the plugin to the pubspec platforms manifest.
- Require Flutter SDK 1.10.0 or greater.
- Fix pedantic lints. This shouldn't affect existing functionality.
- README update.
- Remove AndroidX warnings.
- Include lifecycle dependency as a compileOnly one on Android to resolve potential version conflicts with other transitive libraries.
- Support the v2 Android embedder.
- Update to AndroidX.
- Migrate to using the new e2e test binding.
- Add a e2e test.
- Define clang module for iOS.
- Fix iOS crash when setting subject to null.
- Update and migrate iOS example project.
- 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.3+5
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 Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5