MediaPicker class

A class for handling media selection and capture.

Constructors

MediaPicker.new({required BuildContext context, int maxLimit = 1, MediaType mediaType = MediaType.image})
Creates a MediaPicker instance.

Properties

context BuildContext
The build context where the media picker is used.
final
hashCode int
The hash code for this object.
no setterinherited
maxLimit int
The maximum number of media items that can be selected.
final
mediaType MediaType
The type of media that can be picked (image, video, or document).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

capturedFile({bool? allowRecord}) Future<File?>
Opens the camera screen and returns the captured file path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
picFile() Future<File?>
Opens the system file picker to select a document.
showPicker() Future<List<MediaViewModel>?>
Opens the media picker and returns a list of selected media files.
toString() String
A string representation of this object.
inherited

Operators

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