flutter_share_plugin 0.1.3+3 copy "flutter_share_plugin: ^0.1.3+3" to clipboard
flutter_share_plugin: ^0.1.3+3 copied to clipboard

discontinuedreplaced by: share_plus

Flutter plugin for sharing any files and text to other apps.

flutter_share_plugin #

pub package License: MIT

Easily share content like text, image or any file to other apps.

Both Android and iOS platforms are supported, no additional changes are required in native code or projects. Except, the Specific permissions (like Storage Access permission), you'll need to add that in your project manually.

Install plugin: #

Visit https://pub.dev/packages/flutter_share_plugin#-installing-tab-

Import library: #

import 'package:flutter_share_plugin/flutter_share_plugin.dart';

That's it. Now, you are ready to go.

Usage Examples: #

Share only text: #

String text = "Check out this plugin: https://pub.dev/packages/flutter_share_plugin ";
FlutterShare.shareText(text);

Share only file: #

Example 1:

String filePath = bohemianRhapsodySong.absolute.path;

// pass the string as `filePath` parameter
FlutterShare.shareFile(filePath: filePath);

Example 2:

Uint8List bytes = bohemianRhapsodySong.readAsBytes();

// pass the Uint8List data as `bytes` parameter
FlutterShare.shareFile(bytes: bytes);

Share file and text content: #

Example 1:

// use preferred method here to get URI string of the file
String uri = screenshot.absolute.path;
String text = "Transaction Screenshot";

FlutterShare.shareFileWithText(
    textContent: text, filePath: uri);

Example 2:

// use preferred method here to get bytes of the files
Uint8List bytes = screenshot.readAsBytes();
String text = "Transaction Screenshot";

FlutterShare.shareFileWithText(
    textContent: text, bytes: bytes);

Screenshots: #

Share text only #

Share a file with text #

6
likes
40
pub points
45%
popularity

Publisher

unverified uploader

Flutter plugin for sharing any files and text to other apps.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, path_provider

More

Packages that depend on flutter_share_plugin