PickerOptions class
Complete configuration options for launching image picker sessions.
Constructors
-
PickerOptions({ImageSource source = ImageSource.gallery, List<
ImageSource> sources = const [ImageSource.camera, ImageSource.gallery, ImageSource.url], MediaType mediaType = MediaType.image, int? maxCount, CameraDevice preferredCameraDevice = CameraDevice.rear, CropOptions? cropOptions, CompressionOptions? compressionOptions, PickerTheme? theme, CustomModalBuilder? customModalBuilder, String? modalTitle = 'Select Media Source', String? cameraOptionText = 'Take Photo', String? galleryOptionText = 'Choose from Gallery', String? urlOptionText = 'Import from URL', String? cancelButtonText = 'Cancel'}) -
Creates a new PickerOptions configuration instance.
const
Properties
- cameraOptionText → String?
-
Custom label for the Camera option in the modal.
final
- cancelButtonText → String?
-
Custom label for the Cancel button in the modal.
final
- compressionOptions → CompressionOptions?
-
Optional compression options to automatically process picked files.
final
- cropOptions → CropOptions?
-
Optional cropping options to automatically trigger after picking.
final
- customModalBuilder → CustomModalBuilder?
-
Optional custom builder allowing complete replacement of the bottom sheet UI.
final
- galleryOptionText → String?
-
Custom label for the Gallery option in the modal.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMultiple → bool
-
True if multiple items can be picked.
no setter
- maxCount → int?
-
Maximum number of items allowed to be picked in a single session.
If null or 1, single item picking is used.
final
- mediaType → MediaType
-
Media type filter. Defaults to MediaType.image.
final
- modalTitle → String?
-
Title text for the picker modal bottom sheet.
final
- preferredCameraDevice → CameraDevice
-
Preferred camera lens when source is ImageSource.camera.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → ImageSource
-
The source to pick media from.
final
-
sources
→ List<
ImageSource> -
List of sources to display in the modal bottom sheet.
final
- theme → PickerTheme?
-
Styling and theme configuration for modal bottom sheets.
final
- urlOptionText → String?
-
Custom label for the URL option in the modal.
final
Methods
-
copyWith(
{ImageSource? source, List< ImageSource> ? sources, MediaType? mediaType, int? maxCount, CameraDevice? preferredCameraDevice, CropOptions? cropOptions, CompressionOptions? compressionOptions, PickerTheme? theme, CustomModalBuilder? customModalBuilder, String? modalTitle, String? cameraOptionText, String? galleryOptionText, String? urlOptionText, String? cancelButtonText}) → PickerOptions - Creates a copy of this PickerOptions with specified properties updated.
-
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