FilePicker constructor

const FilePicker({
  1. Key? key,
  2. required BuildContext context,
  3. required FileData fileData,
  4. required dynamic onSelected(
    1. FileData fileData
    ),
  5. dynamic onOtherDeviceSelected(
    1. FileData fileData
    )?,
  6. dynamic onCancel(
    1. String message,
    2. int messageCode
    )?,
  7. dynamic onDeleted(
    1. FileData fileData
    )?,
  8. dynamic onView(
    1. FileData fileData
    )?,
  9. bool camera = true,
  10. bool gallery = true,
  11. bool document = true,
  12. bool otherDevice = false,
  13. bool view = true,
  14. bool delete = true,
  15. bool crop = true,
  16. int? maxFileSizeInMb,
  17. bool cropOnlySquare = false,
  18. String cropperToolbarTitle = Files.cropperToolbarTitle,
  19. Color cropperToolbarColor = Files.cropperToolbarColor,
  20. Color cropperToolbarWidgetsColor = Files.cropperToolbarWidgetsColor,
  21. List<String>? allowedExtensions,
  22. double? width,
  23. double? height,
  24. Widget? child,
})

Implementation

const FilePicker(
    {super.key,
    required this.context,
    required this.fileData,
    required this.onSelected,
    this.onOtherDeviceSelected,
    this.onCancel,
    this.onDeleted,
    this.onView,
    this.camera = true,
    this.gallery = true,
    this.document = true,
    this.otherDevice = false,
    this.view = true,
    this.delete = true,
    this.crop = true,
    this.maxFileSizeInMb,
    this.cropOnlySquare = false,
    this.cropperToolbarTitle = Files.cropperToolbarTitle,
    this.cropperToolbarColor = Files.cropperToolbarColor,
    this.cropperToolbarWidgetsColor = Files.cropperToolbarWidgetsColor,
    this.allowedExtensions,
    this.width,
    this.height,
    this.child});