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

getImage({required ImageSource source, double? maxWidth, double? maxHeight, int? imageQuality, CameraDevice preferredCameraDevice = CameraDevice.rear}) Future<PickedFile?>
Returns a PickedFile object wrapping the image that was picked.
getLostData() Future<LostData>
Retrieve the lost PickedFile when selectImage or selectVideo failed because the MainActivity is destroyed. (Android only)
getVideo({required ImageSource source, CameraDevice preferredCameraDevice = CameraDevice.rear, Duration? maxDuration}) Future<PickedFile?>
Returns a PickedFile object wrapping the video that was picked.
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

Static Properties

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