File Picker
The File Picker action allows users to select a file from their device. This action supports filtering by file type, setting size limits, and optionally showing a toast after selection.
Properties
File Type
Dropdown
No
Select allowed file type: "audio", "pdf", or any for any file type.
Size Limit
number
No
Maximum file size allowed in KB. Files exceeding this limit are filtered out.
Show Toast
boolean
No
Whether to show a toast notification for files exceeding size limit. Defaults to true.
File Variable
Dropdown
No
Select variable where the selected file will be stored.
Use Cases
Document Upload: Allow users to upload PDFs, documents, or certificates
Audio Files: Select music files, voice recordings, or podcasts
Form Attachments: Attach files to forms, applications, or messages
Media Libraries: Build collections of user-uploaded content
Data Import: Allow users to import data files for processing
Default Behavior
By default:
File Types
All file types allowed if File Type not specified
Selection Mode
Single file selection
Size Limits
No size restrictions if Size Limit not specified
Toast Display
Shows size limit warnings unless Show Toast is false
File Storage
Selected file stored in specified File Variable variable
User Cancellation
Action completes without error if user cancels picker
How to Use

Attach the action to a widget event (button tap, icon press, etc.)
Select File Picker from the action list
Optionally specify
File Typeto restrict file typesSet
Size Limitin KB to restrict file sizesSpecify
File Variablevariable to store selected file
Implementation Details
The action uses the file_picker package to access device file systems. Selected files are converted to AdaptedFile objects containing file data, metadata, and size information.
Size limits are enforced in KB (converted to bytes internally). Files exceeding the limit are automatically filtered out, and users see toast notifications when Show Toast is enabled.
Related Actions
Image Picker - Select images and videos with camera/gallery options
Upload - Upload selected files to a server
Set State - Update UI state with selected files
Last updated