flutter_share_file 1.1.4+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 89

flutter_share_file #

A new flutter plugin to share files. Only Image sharing for Now.

Usage Example #

import toggle_button.dart

import 'package:flutter_share_file/flutter_share_file.dart';

For Toggle Button. #

    FlutterShareFile.shareImage(path, 'image.png');

1.0.0 #

  • Supports image Sharing.

1.0.2 #

  • bug fix

1.1.1 #

  • Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.

1.1.2 #

1.1.3+1 #

  • Text can be Shared with Image for Android.

  • bugs fix

1.1.4+1 #

  • ios: include message in share list


import 'package:flutter/material.dart';
import 'dart:io';
import 'package:flutter_share_file/flutter_share_file.dart';

void main() => runApp(new MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => new _MyAppState();

class _MyAppState extends State<MyApp> {
  void initState() {

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin example app'),
        body: new Center(
            child: new Column(
          children: <Widget>[
            new RaisedButton(
              onPressed: () async {
                Directory dir = await getApplicationDocumentsDirectory();
                File testFile = new File("${dir.path}/image.png");
                FlutterShareFile.shareImage(dir.path, "image.png");
              child: new Text("share image"),

Use this package as a library

1. Depend on it

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

  flutter_share_file: ^1.1.4+1

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_file/flutter_share_file.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 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.

Format lib/flutter_share_file.dart.

Run flutter format to format lib/flutter_share_file.dart.


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 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8