FilePickerHelper class

A helper class for picking files, images, and videos, with options for cropping and compression.

Constructors

FilePickerHelper(NexFilePickerState callback)
Constructor for FilePickerHelper.

Properties

callback NexFilePickerState
getter/setter pair
cropAspectRatioPreset ↔ CropAspectRatioPreset?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
picker → ImagePicker
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getFileExtension(String filePath) String
Extracts the file extension from a given file path.
getImageCompressed(XFile imageFile, String type) Future<void>
Compresses the given image file.
getImageWithCropping(ImageSource imageSource, String type) Future<void>
Opens a bottom sheet to pick an image from the camera or gallery. Picks an image from the given source and crops it if cropping is enabled.
getImageWithoutCropping(ImageSource imageSource, String type) Future<void>
Picks an image from the given source without cropping.
getVideo(String type) Future<void>
Picks a video and compresses it if necessary.
getVideoCompressed(XFile imageFile, String type) Future<void>
Compresses the given video file.
isCameraEnabled() Future<bool>
Checks if camera permissions are granted.
isStorageEnabled() Future<bool>
Checks if storage permissions are granted.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAttachmentDialog({List<String>? type, required String fileType}) → void
Opens a dialog to pick a file with specific extensions.
setCropping(CropAspectRatioPreset cropAspectRatioPreset) → void
Sets the aspect ratio preset for cropping images.
toString() String
A string representation of this object.
inherited

Operators

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