Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Imgkl/davinci

A flutter package to convert any widget to an Image.
https://github.com/Imgkl/davinci

flutter flutter-package flutter-plugin image widgets

Last synced: 3 months ago
JSON representation

A flutter package to convert any widget to an Image.

Awesome Lists containing this project

README

        



Davinci is a powerful package that allows you to convert any widget into an image, which can be saved locally or shared across apps and chats. Perfect for creating snapshots of your UI! 📸

## 🛠ī¸ Supported Platforms
| Platform | Status |
| -------- | ------- |
| Android | ✅ |
| iOS | ✅ |
| Web | ✅ |

*Feel free to test it on other platforms and report back with your findings!* 🚀

## 📹 Preview

## Prerequisites

**For iOS**
Add the following keys to your _Info.plist_ file, located in `/ios/Runner/Info.plist`:
- `NSPhotoLibraryUsageDescription` - Describe why your app needs permission for the photo library. This is called _Privacy - Photo Library Usage Description_ in the visual editor.

**For Android**
Add the following permission to your `AndroidManifest.xml`:
- `android.permission.WRITE_EXTERNAL_STORAGE` - Permission for usage of external storage.

## ℹī¸ Usage

### Imports
```dart
import 'package:davinci/core/davinci_capture.dart';
import 'package:davinci/davinci.dart';
```

### Code

#### If the widget is in the widget tree, use the `click` method:

#### If the widget is not in the widget tree, use the `offStage` method:


## 🎨 Customization

ℹī¸ All the parameters in the `click` method are present in the `offStage` method except the `brandTag` prop.

## 🛎ī¸ Note:
- **If you wish to save the generated images locally, do remember to add the necessary permissions in `Info.plist` and `AndroidManifest.xml`.**