MediaPicker constructor
MediaPicker({
- required BuildContext context,
- int maxLimit = 1,
- String cancelText = "Cancel",
- String doneText = "Done",
- String moreText = "Select more",
- String openSettingText = "open settings",
- String emptyText = "No file found.This may be because storage is empty or the app doesn’t have permission to access them.",
- MediaType mediaType = MediaType.image,
Creates a MediaPicker instance.
context
: The BuildContext of the screen where the picker is used.maxLimit
: The maximum number of media items to select. Defaults to1
.mediaType
: The type of media to pick. Defaults toMediaType.image
.
Implementation
MediaPicker({
required this.context,
this.maxLimit = 1,
this.cancelText = "Cancel",
this.doneText = "Done",
this.moreText = "Select more",
this.openSettingText = "open settings",
this.emptyText =
"No file found.This may be because storage is empty or the app doesn’t have permission to access them.",
this.mediaType = MediaType.image,
});