flutter_share_file 1.2.1+6 copy "flutter_share_file: ^1.2.1+6" to clipboard
flutter_share_file: ^1.2.1+6 copied to clipboard

discontinued

This plugin is for sharing contents using Flutter. Supports only PNG image sharing for Now.

example/lib/main.dart

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 {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  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", ShareFileType.image);
              },
              child: new Text("share image"),
            ),
          ],
        )),
      ),
    );
  }
}
9
likes
40
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

This plugin is for sharing contents using Flutter. Supports only PNG image sharing for Now.

Repository (GitHub)

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_share_file