Imgkl/davinci
모든 위젯을 이미지로 변환하는 Flutter 패키지입니다.
- Stars
- 51
- Forks
- 25
- 최근 푸시(UTC)
- 2024. 10. 7.
- 프로젝트 상태
- 활성
언어C++CMakeDartRubyHTMLCSwiftKotlinObjective-C
기술 주제
사용 중인 의존성
의존성 목록 5 개
- flutter
{"sdk":"flutter"} - path_provider
^2.1.3 - open_filex
^4.4.0 - gal
^2.3.0 - flutter_test개발 의존성
{"sdk":"flutter"}
원본 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! 📸
If the widget is in the widget tree, use the
https://i.ibb.co/tqzgRKt/click.png
If the widget is not in the widget tree, use the
https://i.ibb.co/MCjW4zM/offstage.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.gifPrerequisites
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.plistandAndroidManifest.xml.