flutter_share_me 0.1.2

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

flutter_share_me #

Flutter Plugin for sharing contents to social media.

You can use it share to Facebook , WhatsApp , Twitter And System Share UI. Support Url and Text.

Only Android because I don't have a Mac.

Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!

Getting Started #

add flutter_share_me as a dependency in your pubspec.yaml file.

Please check the latest version before installation.

dependencies:
  flutter:
    sdk: flutter
  # add flutter_ScreenUtil
  flutter_share_me: ^0.1.2

Usage #

Add the following imports to your Dart code: #

import 'package:flutter_share_me/flutter_share_me.dart';

Methods #

shareToFacebook({String url, String msg}) share to facebook #

shareToTwitter({String url, String msg}) share to twitter #

shareToWhatsApp({String msg}) share to whatsapp #

shareToSystem({String msg}) use system share ui #

These methods will return "success" if they successfully jump to the corresponding app.

ParameterDescription
String msgText message
String urlUrl url

example #

 Column(
          children: <Widget>[
            RaisedButton(
              child: Text('share to twitter'),
              onPressed: () async {
                var response = await FlutterShareMe().shareToTwitter(
                    url: 'https://github.com/lizhuoyuan',
                    msg: 'hello flutter! ');
                if (response == 'success') {
                  print('navigate success');
                }
              },
            ),
            RaisedButton(
              child: Text('share to shareWhatsApp'),
              onPressed: () {
                FlutterShareMe().shareToWhatsApp(
                    msg:
                        'hello,this is my github:https://github.com/lizhuoyuan');
              },
            ),
            RaisedButton(
              child: Text('share to shareFacebook'),
              onPressed: () {
                FlutterShareMe().shareToFacebook(
                    url: 'https://github.com/lizhuoyuan', msg: 'Hello Flutter');
              },
            ),
            RaisedButton(
              child: Text('share to System'),
              onPressed: () async {
                var response =
                    await FlutterShareMe().shareToSystem(msg: 'Hello Flutter');
                if (response == 'success') {
                  print('navigate success');
                }
              },
            ),
          ],
        ),

0.0.1 #

  • TODO: Describe initial release.

example/README.md

flutter_share_me_example #

Demonstrates how to use the flutter_share_me plugin.

Getting Started #

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.

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_share_me: ^0.1.2

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:flutter_share_me/flutter_share_me.dart';
  
Version Uploaded Documentation Archive
0.2.1 May 23, 2019 Go to the documentation of flutter_share_me 0.2.1 Download flutter_share_me 0.2.1 archive
0.2.0 May 23, 2019 Go to the documentation of flutter_share_me 0.2.0 Download flutter_share_me 0.2.0 archive
0.1.3 Dec 13, 2018 Go to the documentation of flutter_share_me 0.1.3 Download flutter_share_me 0.1.3 archive
0.1.2 Dec 13, 2018 Go to the documentation of flutter_share_me 0.1.2 Download flutter_share_me 0.1.2 archive
0.1.1 Dec 13, 2018 Go to the documentation of flutter_share_me 0.1.1 Download flutter_share_me 0.1.1 archive
0.1.0 Dec 13, 2018 Go to the documentation of flutter_share_me 0.1.0 Download flutter_share_me 0.1.0 archive
0.0.2 Dec 12, 2018 Go to the documentation of flutter_share_me 0.0.2 Download flutter_share_me 0.0.2 archive
0.0.1 Dec 12, 2018 Go to the documentation of flutter_share_me 0.0.1 Download flutter_share_me 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
86
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
92
Learn more about scoring.

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

  • Dart: 2.3.1
  • pana: 0.12.16
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

7 out of 7 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/flutter_share_me.dart. (-1.99 points)

Analysis of lib/flutter_share_me.dart reported 4 hints:

line 6 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 13 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 20 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 26 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

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