davinci 1.0.4 copy "davinci: ^1.0.4" to clipboard
davinci: ^1.0.4 copied to clipboard

outdated

A package to convert any widget to an image which can be used to share to other apps and chats.

Davinci Pub version Codacy Badge #


A package to convert any widget to an image which can be used to share to other apps and chats.

๐Ÿ“น Preview #

โ„น๏ธ Usage #

If the widget, you are trying to capture is rendered in a way that you have to scroll to see the entire widget, then wrap the entire widget with SingleChildScrollView and then call DavinciCapture.click method.

Imports

import 'package:davinci/davinci.dart';
import 'package:davinci/core/davinci_capture.dart';

Pseudo code


By default the generated image name will be "davinci". But if you wish to change it, you can pass the image name in DavinciCapture.click method.
await DavinciCapture.click(imageKey, fileName: "Hello");

When the image is captured, you can either open the image preview or get the image in Uint8List.
await DavinciCapture.click(imageKey, fileName: "Hello", openFilePreview = false, returnImageUint8List = true);

If the captured image is pixelated, calculate the pixel ratio dynamically based on the device and pass it to the DavinciCapture.click method.
double pixelRatio = MediaQuery.of(context).devicePixelRatio;

await DavinciCapture.click(imageKey, fileName: "Hello", pixelRatio: pixelRatio);

๐Ÿ›Ž๏ธ Note : #

169
likes
0
pub points
89%
popularity

Publisher

verified publishergokula.dev

A package to convert any widget to an image which can be used to share to other apps and chats.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, open_file, path_provider

More

Packages that depend on davinci