capture_and_share 0.0.1+2

Flutter Android iOS

A Flutter plugin to take a screenshot using native code and share it via the platform's share image dialog.

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        resizeToAvoidBottomInset: false,
        resizeToAvoidBottomPadding: false,
        body: Container(
          color: Colors.red,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Container(
                height: 200,
                width: 200,
                color: Colors.blue,
              ),
              Container(
                height: 100,
                width: 300,
                color: Colors.green,
              ),
              Container(
                height: 150,
                width: 400,
                color: Colors.pink,
              ),
              Center(
                child: RaisedButton(
                  onPressed: () {
                    CaptureAndShare.shareIt(
                      sizeWidth: 300,
                      sizeHeight: 300,
                      xMode: 'center',
                      yMode: 'center',
                    );
                  },
                  child: Text('Click'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
90
pub points
57%
popularity

A Flutter plugin to take a screenshot using native code and share it via the platform's share image dialog.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

toonztudio@gmail.com

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on capture_and_share