FLUTTER ECOSYSTEM

Imgkl/davinci

一個將任何組件轉換為影像的 Flutter 套件。

達文西 專案封面
Stars
51
Forks
25
最近推送(UTC)
2024年10月7日
專案狀態
未封存
Sai Gokula Krishnan GitHub avatar
GITHUB User

Sai Gokula Krishnan ↗

Ask MyFiSol III
語言C++CMakeDartRubyHTMLCSwiftKotlinObjective-C

技術主題

使用的依賴

依賴清單 5 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README
https://i.ibb.co/wJMkxM5/Oakbridge-Middle-School.png
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

https://i.ibb.co/3c4MkNK/screen-20241007-171726-ezgif-com-video-to-gif-converter.gif

Prerequisites

For iOS
Add the following keys to your Info.plist file, located in <project root>/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
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:
https://i.ibb.co/tqzgRKt/click.png
If the widget is not in the widget tree, use the offStage method:
https://i.ibb.co/MCjW4zM/offstage.png

🎨 Customization

https://i.ibb.co/48byC4m/props.png

ℹ️ 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.