ImagePickerPlatform class Null safety
The interface that implementations of image_picker must implement.
Platform implementations should extend this class rather than implement it as image_picker
does not consider newly added methods to be breaking changes. Extending this class
(using extends
) ensures that the subclass will get the default implementation, while
platform implementations that implements
this interface will be broken by newly added
ImagePickerPlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- ImagePickerPlatform
Constructors
- ImagePickerPlatform()
- Constructs a ImagePickerPlatform.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
getImage(
{required ImageSource source, double? maxWidth, double? maxHeight, int? imageQuality, CameraDevice preferredCameraDevice = CameraDevice.rear}) → Future< XFile?> - This method is deprecated in favor of getImageFromSource and will be removed in a future update.
-
getImageFromSource(
{required ImageSource source, ImagePickerOptions options = const ImagePickerOptions()}) → Future< XFile?> -
Returns an
XFile
with the image that was picked. -
getLostData(
) → Future< LostDataResponse> - Retrieves any previously picked files, that were lost due to the MainActivity being destroyed. (Android only)
-
getMultiImage(
{double? maxWidth, double? maxHeight, int? imageQuality}) → Future< List< XFile> ?> - This method is deprecated in favor of getMultiImageWithOptions and will be removed in a future update.
-
getMultiImageWithOptions(
{MultiImagePickerOptions options = const MultiImagePickerOptions()}) → Future< List< XFile> > -
Returns a
List<XFile>
with the images that were picked. -
getVideo(
{required ImageSource source, CameraDevice preferredCameraDevice = CameraDevice.rear, Duration? maxDuration}) → Future< XFile?> -
Returns a
XFile
containing the video that was picked. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
pickImage(
{required ImageSource source, double? maxWidth, double? maxHeight, int? imageQuality, CameraDevice preferredCameraDevice = CameraDevice.rear}) → Future< PickedFile?> -
Returns a
PickedFile
with the image that was picked. -
pickMultiImage(
{double? maxWidth, double? maxHeight, int? imageQuality}) → Future< List< PickedFile> ?> -
Returns a
List<PickedFile>
with the images that were picked. -
pickVideo(
{required ImageSource source, CameraDevice preferredCameraDevice = CameraDevice.rear, Duration? maxDuration}) → Future< PickedFile?> -
Returns a
PickedFile
containing the video that was picked. -
retrieveLostData(
) → Future< LostData> - Retrieves any previously picked file, that was lost due to the MainActivity being destroyed. In case multiple files were lost, only the last file will be recovered. (Android only).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ ImagePickerPlatform
-
The default instance of ImagePickerPlatform to use.
read / write