ImagePicker class

Provides an easy way to pick an image/video from the image library, or to take a picture/video with the camera.

Constructors

ImagePicker()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickImage({required ImageSource source, double? maxWidth, double? maxHeight, int? imageQuality, CameraDevice preferredCameraDevice = CameraDevice.rear, bool requestFullMetadata = true}) → Future<XFile?>
Returns an XFile object wrapping the image that was picked.
pickMedia({double? maxWidth, double? maxHeight, int? imageQuality, bool requestFullMetadata = true}) → Future<XFile?>
Returns an XFile of the image or video that was picked.
pickMultiImage({double? maxWidth, double? maxHeight, int? imageQuality, int? limit, bool requestFullMetadata = true}) → Future<List<XFile>>
Returns a List<XFile> object wrapping the images that were picked.
pickMultipleMedia({double? maxWidth, double? maxHeight, int? imageQuality, int? limit, bool requestFullMetadata = true}) → Future<List<XFile>>
Returns a List<XFile> with the images and/or videos that were picked.
pickVideo({required ImageSource source, CameraDevice preferredCameraDevice = CameraDevice.rear, Duration? maxDuration}) → Future<XFile?>
Returns an XFile object wrapping the video that was picked.
retrieveLostData() → Future<LostDataResponse>
Retrieve the lost XFile when pickImage, pickMultiImage or pickVideo failed because the MainActivity is destroyed. (Android only)
supportsImageSource(ImageSource source) → bool
Returns true if the current platform implementation supports source.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

platform → ImagePickerPlatform
The platform interface that drives this plugin
no setter