image_share 0.1.0+4 copy "image_share: ^0.1.0+4" to clipboard
image_share: ^0.1.0+4 copied to clipboard

A plugin to share an image using the system actions from your Flutter app.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:image_share/image_share.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();
  }

  Future<void> didPressActionButton() async {
    await ImageShare.shareImage(filePath: "assets/image.jpg");
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin example app'),
        ),
        body: new Center(
          child: Image.asset("assets/image.jpg"),
        ),
        floatingActionButton: FloatingActionButton(
            onPressed: () => didPressActionButton(),
            child: Icon(Icons.share)
        ),
      ),
    );
  }
}
5
likes
30
pub points
44%
popularity

Publisher

unverified uploader

A plugin to share an image using the system actions from your Flutter app.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, path_provider

More

Packages that depend on image_share