share_extend 1.0.8

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 95

Language: English | 中文简体

ShareExtend #

pub package

调用系统分享的Flutter组件,支持分享文本、图片、视频和文件

安装 #

dependencies:
  share_extend: "^1.0.8"

iOS #

添加下面的key到工程的info.plist文件,路径 <project root>/ios/Runner/Info.plist,用于将分享的图片保存到相册

<key>NSPhotoLibraryAddUsageDescription</key>
<string>这里填写为什么需要相写入册权限的描述语句</string>

Android #

暂无特殊配置

导入 #

import 'package:share_extend/share_extend.dart';

使用 #


//分享文本
ShareExtend.share("share text", "text");

//分享图片 (例子中使用了一个image_picker的插件来实现图片的选择)
File f =
    await ImagePicker.pickImage(source: ImageSource.gallery);
ShareExtend.share(f.path, "image");

//分享视频
File f = await ImagePicker.pickVideo(
        source: ImageSource.gallery);
ShareExtend.share(f.path, "video");

//分享文件
Directory dir = await getApplicationDocumentsDirectory();
File testFile = new File("${dir.path}/flutter/test.txt");
if (!await testFile.exists()) {
  await testFile.create(recursive: true);
  testFile.writeAsStringSync("test for share documents file");
}
ShareExtend.share(testFile.path, "file"); 

1.0.7 #

  • Android端修改了FileProvider的authorities,继承FileProvider,防止FileProvider冲突

1.0.6 #

  • 修复了android端分享应用沙盒内文件可能出错的bug
  • 优化了android端分享时的权限请求逻辑

1.0.5 #

  • Fix bugs when sharing videos to some apps like WeChat.

1.0.4 #

  • Updated to Support Latest Android Dependencies

0.0.1 #

  • TODO: Describe initial release.

example/README.md

share_extend_example #

Demonstrates how to use the share_extend 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_extend: ^1.0.8

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:share_extend/share_extend.dart';
  
Version Uploaded Documentation Archive
1.0.8 Mar 31, 2019 Go to the documentation of share_extend 1.0.8 Download share_extend 1.0.8 archive
1.0.7 Mar 29, 2019 Go to the documentation of share_extend 1.0.7 Download share_extend 1.0.7 archive
1.0.6 Mar 29, 2019 Go to the documentation of share_extend 1.0.6 Download share_extend 1.0.6 archive
1.0.5 Mar 25, 2019 Go to the documentation of share_extend 1.0.5 Download share_extend 1.0.5 archive
1.0.4 Feb 21, 2019 Go to the documentation of share_extend 1.0.4 Download share_extend 1.0.4 archive
1.0.3 Dec 17, 2018 Go to the documentation of share_extend 1.0.3 Download share_extend 1.0.3 archive
1.0.2 Dec 3, 2018 Go to the documentation of share_extend 1.0.2 Download share_extend 1.0.2 archive
1.0.1 Oct 28, 2018 Go to the documentation of share_extend 1.0.1 Download share_extend 1.0.1 archive
1.0.0 Oct 28, 2018 Go to the documentation of share_extend 1.0.0 Download share_extend 1.0.0 archive
0.0.1 Oct 9, 2018 Go to the documentation of share_extend 0.0.1 Download share_extend 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
91
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
95
Learn more about scoring.

We analyzed this package on Apr 23, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
meta ^1.0.5 1.1.6 1.1.7
Transitive dependencies
collection 1.14.11
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8