MediaPicker constructor

MediaPicker({
  1. required BuildContext context,
  2. int maxLimit = 1,
  3. String cancelText = "Cancel",
  4. String doneText = "Done",
  5. String moreText = "Select more",
  6. String openSettingText = "open settings",
  7. String emptyText = "No file found.This may be because storage is empty or the app doesn’t have permission to access them.",
  8. 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 to 1.
  • mediaType: The type of media to pick. Defaults to MediaType.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,
});