PickerConfig class
Configuration options for the PHPicker
Constructors
- PickerConfig({int selectionLimit = 1, PickerFilter filter = PickerFilter.images, AssetRepresentationMode preferredAssetRepresentationMode = AssetRepresentationMode.current, double compressionQuality = 1.0, String? destinationDirectory})
Properties
- compressionQuality → double
-
Quality of JPEG compression (0.0 to 1.0)
Only applicable when converting images to JPEG
Default is 1.0 (no compression, maximum quality)
final
- destinationDirectory → String?
-
Optional directory path where selected photos should be saved.
If provided, photos will be copied to this directory with their original names.
Duplicate file names will be handled by appending a counter (e.g., "Image (1).jpg").
If null, photos will be saved to a temporary directory.
final
- filter → PickerFilter
-
Filter for the types of assets to display
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- preferredAssetRepresentationMode → AssetRepresentationMode
-
Preferred asset representation mode
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionLimit → int
-
Maximum number of photos that can be selected
Set to 0 for unlimited selection
final
Methods
-
copyWith(
{int? selectionLimit, PickerFilter? filter, AssetRepresentationMode? preferredAssetRepresentationMode, double? compressionQuality, String? destinationDirectory}) → PickerConfig - Creates a copy of this config with the given fields replaced
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the PickerConfig instance to a JSON map
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited