native_share 1.0.0

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

native_share #

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.

iOS support Title,Url,Image(local & remote)

Android support Title,Url,Image(local & remote)

Usage #

To use this plugin, add native_share as a dependency in your pubspec.yaml file.

Example #

Import the library via

import 'package:native_share/native_share.dart';

Then invoke the static share method anywhere in your Dart code

NativeShare.share({'title':'Plugin example app','url':'https://github.com/persenlee/native_share','image':null});

Others #

for http image resource

In iOS Info.plist should add NSAppTransportSecurity for ATS

example

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsForMedia</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
    <key>NSAllowsLocalNetworking</key>
    <true/>
</dict>

0.0.1 #

  • TODO: Describe initial release.

example/README.md

native_share_example #

Demonstrates how to use the native_share plugin.

Getting Started #

import 'package:native_share/native_share.dart';
NativeShare.share({'title':'Plugin example app','url':'https://github.com/persenlee/native_share',
            'image' : 'http://imgsrc.baidu.com/imgad/pic/item/908fa0ec08fa513de63a3ec7376d55fbb2fbd913.jpg'});

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  native_share: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ 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:


import 'package:native_share/native_share.dart';
  
Version Uploaded Documentation Archive
1.0.0 Mar 12, 2019 Go to the documentation of native_share 1.0.0 Download native_share 1.0.0 archive
0.1.0 Mar 12, 2019 Go to the documentation of native_share 0.1.0 Download native_share 0.1.0 archive
0.0.1 Mar 11, 2019 Go to the documentation of native_share 0.0.1 Download native_share 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
67
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
82
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/native_share.dart.

Run flutter format to format lib/native_share.dart.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

Dependencies

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