widget_capture_share 0.0.7 copy "widget_capture_share: ^0.0.7" to clipboard
widget_capture_share: ^0.0.7 copied to clipboard

A new flutter package is alternative of screenshot that can help to convert widget to png. Converted image can easily save to gallery and also share to social account.

WidgetCaptureShare #

A flutter package that provides you to capture any widget to image. The features is:

  1. Preview image
  2. Save image locally
  3. share image

Installation #

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  widget_capture_share: ^0.0.6
  1. Import the package and use it in your Flutter App.
import 'package:widget_capture_share/process.dart';

Example #

// definig global key of widget
 GlobalKey? key1; 
 
  WidgetCapture(
        builder: (key) {
          key1 = key;
          return const Sample1Screen();
        }),
//function
Future<bool> shareImage(GlobalKey? key,String filename) async{
      await WidgetCaptureShare.capture(key!,saveToDevice: true,albumName: "Test",openFilePreview: false,fileName: filename,isShare: true);
        return true;

  }

//calling function
shareImage(key!, "Invitation card");
1
likes
130
points
4
downloads

Publisher

unverified uploader

Weekly Downloads

A new flutter package is alternative of screenshot that can help to convert widget to png. Converted image can easily save to gallery and also share to social account.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, gallery_saver, open_file, path_provider, share_plus

More

Packages that depend on widget_capture_share