native_share 1.0.0 copy "native_share: ^1.0.0" to clipboard
native_share: ^1.0.0 copied to clipboard

A Flutter plugin to share content from your Flutter app via the platform's share dialog.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:native_share/native_share.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text(''),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: 
          (){
            NativeShare.share({'title':'Plugin example app','url':'https://github.com/persenlee/native_share',
            'image' : 'http://imgsrc.baidu.com/imgad/pic/item/908fa0ec08fa513de63a3ec7376d55fbb2fbd913.jpg'});
          },
        ),
      ),
    );
  }
}
8
likes
40
pub points
14%
popularity

Publisher

unverified uploader

A Flutter plugin to share content from your Flutter app via the platform's share dialog.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on native_share