전용 위젯을 사용하여 Flutter 앱에 image_picker 기능을 간편하게 통합할 수 있는 플러터 패키지입니다. 이미지 선택 및 편집을 단순화하여 디자인과 개발의 복잡성을 줄입니다. 이 패키지는 플랫폼 독립적이며 Android와 iOS 모두를 지원하며, 이미지 입력을 처리하기 위한 깔끔하고 재사용 가능한 UI 컴포넌트를 제공합니다. 최소한의 보일러플레이트 코드로 직관적인 이미지 업로드가 필요한 앱에 적합합니다.
사용 사례
양식 내 간단한 이미지 선택
최소 설정으로 이미지 업로드 통합
사용자 프로필 사진 업로드 인터페이스 구축
기존 위젯에 이미지 편집 기능 추가
미디어가 풍부한 모바일 앱 기능 만들기
주요 기능
사전 구축된 이미지 선택기 위젯
image_picker와의 원활한 통합
최소한의 디자인 코드 필요
Android 및 iOS를 지원합니다
정리된 재사용 가능한 UI 컴포넌트
적합한 대상
빠른 이미지 입력 솔루션을 찾는 개발자
경량 이미지 업로드 기능이 필요한 앱
UI 복잡성을 최소화하는 프론트엔드 중심 팀
이미지 기반 워크플로우의 프로토타이핑
개발 일정이 긴 프로젝트
고려 사항
image_picker를 종속성으로 필요로 함
기본 스타일링을 초과한 제한된 사용자 정의
내장된 이미지 처리 도구 없음
기본 image_picker 동작에 따라 다름
파일 유형에 대한 추가 검증이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
image_picker_widget
A new Flutter package to integrate image_picker with a simple Flutter widget, allowing you to edit an image without any problems with design code development
Preview
Modal image type picker
Getting Started
Add the dependency in pubspec.yaml:
dependencies:...# Designimage_picker_widget:'>=2.0.0 <3.0.0
# For pre null-safety, use version 1.0.3'
A Flutter plugin for iOS and Android for picking images from the image library,
and taking new pictures with the camera.
Installation
Since this package requires image_picker, and image_cropper you need to add this requirements bellow.
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.
NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.
NSMicrophoneUsageDescription - describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor.
No configuration required - the plugin should work out of the box.
It is no longer required to add android:requestLegacyExternalStorage="true" as an attribute to the tag in AndroidManifest.xml, as image_picker has been updated to make use of scoped storage.
If specified, the image will be at most maxWidth wide and maxHeight tall. Otherwise the image will be returned at it's original width and height.
int
maxHeight
If specified, the image will be at most maxWidth wide and maxHeight tall. Otherwise the image will be returned at it's original width and height.
int
imageQuality
The imageQuality argument modifies the quality of the image, ranging from 0-100 where 100 is the original/max quality. If imageQuality is null, the image with the original quality will be returned. Compression is only supported for certain image types such as JPEG and on Android PNG and WebP, too. If compression is not supported for the image that is picked, a warning message will be logged.
int
preferredCameraDevice
Use preferredCameraDevice to specify the camera to use when the source is [ImageSource.camera]. The preferredCameraDevice is ignored when source is [ImageSource.gallery]. It is also ignored if the chosen camera is not supported on the device. Defaults to [CameraDevice.rear]. Note that Android has no documented parameter for an intent to specify if the front or rear camera should be opened, this function is not guaranteed to work on an Android device.
CameraDevice
Image Cropping Options
Property
Description
Type
maxWidth
maximum cropped image width.
int
maxHeight
maximum cropped image height.
int
aspectRatio
controls the aspect ratio of crop bounds. If this values is set, the cropper is locked and user can't change the aspect ratio of crop bounds.
CropAspectRatio
aspectRatioPresets
controls the list of aspect ratios in the crop menu view. In Android, you can set the initialized aspect ratio when starting the cropper by setting the value of AndroidUiSettings.initAspectRatio.
List
cropStyle
controls the style of crop bounds, it can be rectangle or circle style (default is CropStyle.rectangle).
CropStyle
compressFormat
the format of result image, png or jpg (default is ImageCompressFormat.jpg).
ImageCompressFormat
compressQuality
the value [0 - 100] to control the quality of image compression.