A Flutter plugin for sharing file & text with other applications.
Your flutter's iOS code needs to be in swift. Otherwise you will get error:
=== BUILD TARGET flutter_inappbrowser OF PROJECT Pods WITH CONFIGURATION Debug === The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.
Instead, if you have already a non-swift project, you can check this issue to solve the problem: Friction adding swift plugin to objective-c project.
Your android support libraries needs to be of androidx. If you want to migrate your android project to androidx, you can take help from Migrating to AndroidX
WcFlutterShare.share( sharePopupTitle: 'Share', subject: 'This is subject', text: 'This is text', mimeType: 'text/plain');
final ByteData bytes = await rootBundle.load('assets/wisecrab.png'); await WcFlutterShare.share( sharePopupTitle: 'share', fileName: 'share.png', mimeType: 'image/png', bytesOfFile: bytes.buffer.asUint8List());
final ByteData bytes = await rootBundle.load('assets/wisecrab.png'); await WcFlutterShare.share( sharePopupTitle: 'share', subject: 'This is subject', text: 'This is text', fileName: 'share.png', mimeType: 'image/png', bytesOfFile: bytes.buffer.asUint8List());
NOTE: You won't be able to share image and text simultaneously on some applications. It is not a bug of this plugin. Some applications don't support this. I have tested this on Skype, on which is working fine.
Check out the example app in the Repository for further information.
Demonstrates how to use the wc_flutter_share plugin.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies: wc_flutter_share: ^0.1.1
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.
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 Jul 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.