UFilePicker constructor

const UFilePicker({
  1. Key? key,
  2. UFilePickerController? controller,
  3. ValueChanged<List<UFileData>>? onFilesChanged,
  4. List<UFileData> initialFiles = const <UFileData>[],
  5. bool allowMultipleSelection = true,
  6. String? selectFileTitle,
  7. String? subtitle,
  8. List<String> imageTypes = const <String>["jpg", "jpeg", "png", "gif", "bmp", "webp"],
  9. List<String> videoTypes = const <String>["mp4", "mov", "avi", "mkv", "webm"],
  10. List<String> documentTypes = const <String>["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt"],
  11. List<String>? allowedExtensions,
  12. FileType fileType = FileType.custom,
  13. List<UFilePickerCategory> categories = const <UFilePickerCategory>[],
  14. String? categoryTitle,
  15. bool selectCover = false,
  16. bool enabled = true,
  17. double tileExtent = 140,
  18. IconData icon = Icons.cloud_upload_outlined,
})

Implementation

const UFilePicker({
  super.key,
  this.controller,
  this.onFilesChanged,
  this.initialFiles = const <UFileData>[],
  this.allowMultipleSelection = true,
  this.selectFileTitle,
  this.subtitle,
  this.imageTypes = const <String>["jpg", "jpeg", "png", "gif", "bmp", "webp"],
  this.videoTypes = const <String>["mp4", "mov", "avi", "mkv", "webm"],
  this.documentTypes = const <String>["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt"],
  this.allowedExtensions,
  this.fileType = FileType.custom,
  this.categories = const <UFilePickerCategory>[],
  this.categoryTitle,
  this.selectCover = false,
  this.enabled = true,
  this.tileExtent = 140,
  this.icon = Icons.cloud_upload_outlined,
});