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.

capture_and_share #

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.

Example #

You can check example code in example folder.


import 'package:capture_and_share/capture_and_share.dart';

body: Center(
  child: RaisedButton(
    onPressed: () {
      CaptureAndShare.shareIt(
        sizeWidth: 300,
        sizeHeight: 300,
        xMode: 'center',
        yMode: 'center',
      );
    },
    child: Text('Click'),
  )

Usage #

It's only works on IOS only for now. I will come back to implement Android code soon.

iOS #

PropertyDescriptionType
sizeWidthdesired cropped area width. if set this to 0 means whole screen width. Default is 0.double
sizeHeightdesired cropped area height. if set this to 0 means whole screen height. Default is 0.double
xModeHorizontal cropped mode. You can choose left, center or right for xMode. Default is center.String
yModeVertical cropped mode. You can choose top, center or bottom for yMode. Default is center.String

Credits #

thanks you screenshot_share_image (https://pub.dev/packages/screenshot_share_image) for inspiring me.

2
likes
90
pub points
55%
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