capture_and_share 0.0.1+1 copy "capture_and_share: ^0.0.1+1" to clipboard
capture_and_share: ^0.0.1+1 copied to clipboard

outdated

A Flutter plugin to take a screenshot using native code and share it via the platform's share image dialog. You can specify width, height and x, y position of the cropped screenshot. For now this plug [...]

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'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
5
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A Flutter plugin to take a screenshot using native code and share it via the platform's share image dialog. You can specify width, height and x, y position of the cropped screenshot. For now this plugin only works on ios.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on capture_and_share