ImagePickerConfigs class

Global configuration for flutter app using advance_image_picker plugin Call once inside application before using image picker functions

Sample usage Calling in build function of app widget at main.dart

var configs = ImagePickerConfigs();
configs.appBarTextColor = Colors.black;
configs.translateFunc = (name, value) => Intl.message(value, name: name);

Constructors

ImagePickerConfigs()
The default constructor is a factory that returns the configuration singleton of the picker configuration.
factory

Properties

adjustFeatureEnabled bool
Enable image adjusting function.
getter/setter pair
albumGridCount int
Grid count for photo album grid view.
getter/setter pair
albumPickerModeEnabled bool
Enable device image album as image source.
getter/setter pair
albumThumbHeight int
Thumbnail image height inside album grid view.
getter/setter pair
albumThumbWidth int
Thumbnail image width inside album grid view.
getter/setter pair
appBarBackgroundColor Color?
The background color of the AppBar in the image picker.
getter/setter pair
appBarDoneButtonColor Color?
The background color of the image selection completed button.
getter/setter pair
appBarTextColor Color?
The text or foreground color of the AppBar in the image picker.
getter/setter pair
backgroundColor Color
Background color of the camera and image picker.
getter/setter pair
bottomPanelColor Color
Background color of the bottom section of the camera.
getter/setter pair
bottomPanelColorInFullscreen Color
Background color of the bottom section of the camera when it is used in full screen mode.
getter/setter pair
cameraLensDirection int?
Camera direction setting.
getter/setter pair
cameraPickerModeEnabled bool
Enable camera as image source.
getter/setter pair
compressQuality int
Quality for output.
getter/setter pair
cropFeatureEnabled bool
Enable image crop/rotation/scale function.
getter/setter pair
customStickerOnly bool
Custom sticker only flag
getter/setter pair
customStickers List<String>
Custom sticker paths
getter/setter pair
doneButtonDisabledBehavior DoneButtonDisabledBehavior
Used to define the type of of behavior the done button has when no images have been selected that will be returned.
getter/setter pair
doneButtonIcon IconData
IconData used by the done button when doneButtonStyle is DoneButtonStyle.iconButton.
getter/setter pair
doneButtonStyle DoneButtonStyle
The type of button used on the image picker to select images and close the image picker.
getter/setter pair
externalImageEditors Map<String, EditorParams>
Allow add custom image editors from external call.
getter/setter pair
filterFeatureEnabled bool
Enable image filter function.
getter/setter pair
flashMode FlashMode
Set the default flash mode.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
imagePreProcessingBeforeEditingEnabled bool
Enable this option to allow image pre-processing, such as cropping, after editing.
getter/setter pair
imagePreProcessingEnabled bool
Enable this option allow image pre-processing, such as cropping, ... after inputting
getter/setter pair
labelDetectFunc ↔ (Future<List<DetectObject>> Function(String path)?)
Detect labels from image function
getter/setter pair
labelDetectMaxCount int
Max count for label detection
getter/setter pair
labelDetectThreshold double
Threshold for label detection
getter/setter pair
maxHeight int
Max height for output.
getter/setter pair
maxWidth int
Max width for output.
getter/setter pair
ocrExtractFunc ↔ (Future<String> Function(String path, {bool? isCloudService})?)
Detect OCR from image function
getter/setter pair
resolutionPreset ↔ ResolutionPreset
Resolution setting for camera, such as high, max, medium, low.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDeleteButtonOnSelectedList bool
Show delete button on selected list.
getter/setter pair
showFlashMode bool
Show the flash mode icon button.
getter/setter pair
showLensDirection bool
Show the lens direction toggle icon button.
getter/setter pair
showNonSelectedAlert bool
Show confirm alert if exiting with selected image.
getter/setter pair
showRemoveImageAlert bool
Show confirm alert if removing an already selected image.
getter/setter pair
stickerFeatureEnabled bool
Enable sticker adding function.
getter/setter pair
textAlbumTitle String
Get localized text for label "image_picker_album_title".
no setter
textBrightness String
Get localized text for label "image_picker_image_edit_brightness".
no setter
textCameraTitle String
Get localized text for label "image_picker_camera_title".
no setter
textClear String
Get localized text for label "clear".
no setter
textConfirm String
Get localized text for label "image_picker_confirm".
no setter
textConfirmDelete String
Get localized text for label "image_picker_confirm_delete".
no setter
textConfirmExitWithoutSelectingImages String
Get localized text for label "image_picker_exit_without_selecting".
no setter
textConfirmResetChanges String
Get localized text for label "image_picker_confirm_reset_changes".
no setter
textContrast String
Get localized text for label "image_picker_image_edit_contrast".
no setter
textEditText String
Get localized text for label "image_picker_edit_text".
no setter
textExposure String
Get localized text for label "image_picker_exposure_title".
no setter
textExposureAuto String
Get localized text for label "image_picker_exposure_auto_title".
no setter
textExposureLocked String
Get localized text for label "image_picker_exposure_locked_title".
no setter
textImageAddTextTitle String
Get localized text for label "image_picker_image_addtext_title".
no setter
textImageCropTitle String
Get localized text for label "image_picker_image_crop_title".
no setter
textImageEditTitle String
Get localized text for label "image_picker_image_edit_title".
no setter
textImageFilterTitle String
Get localized text for label "image_picker_image_filter_title".
no setter
textImageStickerGuide String
Get localized text for label "image_picker_image_sticker_guide".
no setter
textImageStickerTitle String
Get localized text for label "image_picker_image_sticker_title".
no setter
textNo String
Get localized text for label "no".
no setter
textNoImages String
Get localized text for label "image_picker_no_images".
no setter
textOCR String
Get localized text for label "image_picker_ocr".
no setter
textPreviewTitle String
Get localized text for label "image_picker_preview_title".
no setter
textRequestCameraPermission String
Get localized text for label "image_picker_request_camera_permission".
no setter
textRequestGalleryPermission String
Get localized text for label "image_picker_request_gallery_permission".
no setter
textRequestPermission String
Get localized text for label "image_picker_request_permission".
no setter
textSaturation String
Get localized text for label "image_picker_image_edit_saturation".
no setter
textSave String
Get localized text for label "save".
no setter
textSelectButtonTitle String
Get localized text for label "image_picker_select_button_title".
no setter
textSelectedImagesGuide String
Get localized text for label "image_picker_select_images_guide".
no setter
textSelectedImagesTitle String
Get localized text for label "image_picker_select_images_title".
no setter
textYes String
Get localized text for label "yes".
no setter
thumbHeight int
Thumbnail image height.
getter/setter pair
thumbWidth int
Thumbnail image width.
getter/setter pair
translateFunc String Function(String, String)
UI labels translated function with 2 parameters name and defaultValue Declare name for what label needs to be translated in localization file, such as image_picker_select_images_title. Confirm "UI label strings (for localization)" section below for understanding usage.
getter/setter pair

Methods

getTranslatedString(String name, String defaultValue) String
Translate string by translateFunc.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited