share_plugin_plus 0.0.2+2 copy "share_plugin_plus: ^0.0.2+2" to clipboard
share_plugin_plus: ^0.0.2+2 copied to clipboard

PlatformAndroid

A flutter plugin Share to Android System, And return the shared status and shared platform

share_plugin #

A flutter plugin Share to Android System,

Installing #

  • Add share_plugin_plus: ^0.0.2 to your pubspec.yaml

Usage #

  • share Text
  void shareTextImpl() async {
  var text = "This is a piece of text used to test the share function";
  var result = await SharePlugin.share(text, ShareType.TEXT);
  if (kDebugMode) {
    print('share result status is ${result.status},share platform is ${result.platform}');
  }
}
  • share Image

  void shareImageImpl() async {
  var imagePath = "sdcard/image_1.jpg";
  var result = await SharePlugin.share(imagePath, ShareType.IMAGE);
  if (kDebugMode) {
    print('share result status is ${result.status},share platform is ${result.platform}');
  }
}
  • share File

  void shareFileImpl() async {
  var filePath = "sdcard/aaa.pdf";
  var result = await SharePlugin.share(filePath, ShareType.FILE);
  if (kDebugMode) {
    print('share result status is ${result.status},share platform is ${result.platform}');
  }
}
0
likes
120
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin Share to Android System, And return the shared status and shared platform

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on share_plugin_plus

Packages that implement share_plugin_plus