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: 7 months ago
JSON representation
A flutter package to convert any widget to an Image.
- Host: GitHub
- URL: https://github.com/Imgkl/davinci
- Owner: Imgkl
- License: mit
- Created: 2021-05-02T18:07:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T11:55:37.000Z (about 1 year ago)
- Last Synced: 2024-11-16T03:27:10.166Z (12 months ago)
- Topics: flutter, flutter-package, flutter-plugin, image, widgets
- Language: C++
- Homepage: https://pub.dev/packages/davinci
- Size: 343 KB
- Stars: 48
- Watchers: 4
- Forks: 25
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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`.**