image_gallery_saver 패키지는 Android 및 iOS 양쪽에서 디바이스의 갤러리에 이미지를 저장할 수 있는 Flutter 플러그인입니다. 이는 시스템의 사진 라이브러리에 바이트 데이터 또는 파일 경로를 이미지로 저장하기 위한 간단한 API를 제공합니다. iOS에서는 사용자가 액세스 권한을 부여하기 위해 Info.plist 파일에 특정 키를 추가해야 합니다. 이 플러그인은 이미지를 생성하거나 다운로드하는 앱에서 '갤러리에 저장' 기능을 제공해야 하는 경우에 적합합니다. 로컬 파일과 원시 이미지 데이터 모두를 지원하여 다양한 용도에 유연하게 대응할 수 있습니다.
사용 사례
캡처된 스크린샷 저장
생성된 예술 작품 저장
사용자가 만든 이미지 내보내기
앱 콘텐츠에서 이미지 공유하기
다운로드한 미디어 저장
주요 기능
간단한 저장 API
Android 및 iOS를 지원합니다
바이트 데이터와 파일 경로를 처리합니다
iOS에서 Info.plist 구성이 필요합니다
크로스 플랫폼 호환성
적합한 대상
이미지 편집 앱
소셜 미디어 공유 도구
사진 생성 유틸리티
사용자 생성 콘텐츠를 포함한 앱
오프라인 이미지 저장이 필요한 도구
고려 사항
iOS는 Info.plist 항목이 필요합니다
권한은 플랫폼에 따라 달라질 수 있습니다
큰 파일은 성능에 영향을 줄 수 있습니다
제한된 사용자 정의 옵션
내장된 진행 상황 피드백 없음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
image_gallery_saver
We use the image_picker plugin to select images from the Android and iOS image library, but it can't save images to the gallery. This plugin can provide this feature.
Usage
To use this plugin, add image_gallery_saver as a dependency in your pubspec.yaml file. For example:
dependencies:image_gallery_saver:'^2.0.3'
iOS
Your project need create with swift.
Add the following keys to your Info.plist file, located in /ios/Runner/Info.plist:
NSPhotoLibraryAddUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Additions Usage Description in the visual editor
Android
You need to ask for storage permission to save an image to the gallery. You can handle the storage permission using flutter_permission_handler.
In Android version 10, Open the manifest file and add this line to your application tag