Skip to content

TextField Picker

The text field piker allows the user to select file.

Danger

This component on development, if you use the component please follow this documentation.

TextField picker

TextFieldPicker(
  title: 'Image',
  fileType: FileType.image,
  fileExtension: const [FileExtension.png, FileExtension.svg],
  onDone: (PlatformFile files) {},
),

Warning

Default Field picker maximum 5mb.

Constructors

  • title defines the title on top field (optional)
  • onDone On web the path will always be null as web always use fake paths, you should use the bytes instead to retrieve the picked file data.
  • fileExtension if you using value [fileExtension] please chenge value [fileType] to [FileType.custom].
  • fileType default is [FileType.image] used for extension image.

Support Packages

Info

  • The File Picker uses the file_picker package to call FilePicker.platform. For more can be learned in Pub Dev.
  • The Drop Picker uses the desktop_drop package to call desktop_drop. This Package work for web and desktop. For more can be learned in Pub Dev.
Authors: Nanang Prasetya