SingleFilePicker.simple constructor

const SingleFilePicker.simple({
  1. Key? key,
  2. dynamic defaultFile,
  3. MediaProFileType fileType = MediaProFileType.any,
  4. List<String>? allowedExtensions,
  5. ApiRequest? apiUpload,
  6. required dynamic setFileUrlFromResponse(
    1. dynamic response
    ),
  7. Widget? loading,
  8. Function? onError,
  9. bool canUpdate = true,
  10. double? maxSize,
  11. List<String>? allowedMimeTypes,
})

Implementation

const SingleFilePicker.simple(
    {super.key,
    this.defaultFile,
    this.fileType = MediaProFileType.any,
    this.allowedExtensions,
    this.apiUpload,
    required this.setFileUrlFromResponse,
    this.loading,
    this.onError,
    this.canUpdate = true,
    this.maxSize,
    this.allowedMimeTypes})
    : style = const SimpleFilePickerStyle(),
      assert(fileType != MediaProFileType.custom || allowedExtensions != null,
          "allowedExtensions is required when fileType is MediaProFileType.custom");