Available parameters
Now that you've successfully implemented the component, you’re probably excited to discover everything it can do! Below you'll find a breakdown of all the available parameters you can tweak to make the Powerful File Uploader fit your exact needs.
📦File uploader Main Component Parameters
maxFileCount
Type: int
Description: Specifies the maximum number of files a user is allowed to upload. Set to 0
to completely disable uploads, 1
to allow only a single file, or leave it unset to allow unlimited uploads.
onErrorAction
Type: Callback action
Description: This callback is triggered whenever an error occurs during the upload process. You can use the provided errorCode
and fileName
values inside "callback parameters" to display custom error messages or perform specific logic based on the issue. See all error codes here.
allowedFormats
Type: String
Description: A comma-separated list of file extensions that are allowed for upload (e.g., pdf,jpg
). Use this or blockedFormats
, but not both. Leave empty to allow all formats.
blockedFormats
Type: String
Description: A comma-separated list of file extensions that should be rejected (e.g., exe,mp4
). Use this or allowedFormats
, but not both. Leave empty to allow all formats.
maxFileSizeKb
Type: double
Description: Sets the maximum allowed size for each file in kilobytes (KB). Files exceeding this limit will be rejected. Keep in mind that some systems calculate 1 MB as 1000 KB while others use 1024 KB, so it's recommended to allow a small buffer above your intended limit to avoid unintended rejections due to this difference.
componentWidth
Type: double
Description: Defines the maximum width of the uploader widget, including the dropzone and the uploaded files list. You can set this to a fixed value for precise control, or use the infinity
constant to let the widget expand and fill all available horizontal space. This makes the component fully responsive. However, be aware that this behavior depends on the parent layout, if the widget is placed inside a scrollable row or another constrained container, using infinity
may break the layout or cause rendering issues.
dropzoneHeight
Type: double
Description: Specifies the height of the dropzone area where users can drag and drop their files. Adjust this to create a compact or more prominent upload area.
onFileReceivedCustomAction
Type: Callback Action
Description: This callback is triggered after a file is successfully uploaded. It provides two parameters: uploadedFile
, which contains the raw file data (bytes), and fileInfo
, a custom data type that includes useful metadata such as the file name, size in KB, MIME type, file extension, and a temporary URL. You can use this information to display custom previews depending on the file type, run additional validations, store the file, or perform any other logic required by your app. If you prefer, you can handle the entire file processing externally—using this component purely as a powerful file receiver with a customizable dropzone UI. The callback is called once per file if multiple uploads are allowed.
maxUploadedFilesListHeight
Type: double
Description: Sets a maximum height for the list of uploaded files shown below the dropzone. If the content exceeds this height, the list becomes scrollable. Leave it unset to allow the list to expand freely.
dropzoneContent
Type: Component
Description: Customize the content displayed within the dropzone. You can make it responsive using the dropzoneIsActive
and fileIsLoading
sub-parameters to reflect UI states like active hover or loading progress.
fileInListComponent
Type: Component
Description: Widget displayed for each uploaded file in the file list below the dropzone. Receives a FileInfo Data Type containing the uploaded file's information, allowing you to fully customize how each file appears.
hideUploadFromUrlSection
Type: bool
Description: When set to true
, the “Upload from URL” section will be completely hidden. Use this if you want to allow only local file uploads.
mainColor
Type: Color
Description: Defines the primary color used throughout the component, such as for buttons and highlights. Use it to align with your app’s brand or theme.
primaryTextColor
Type: Color
Description: Sets the color for the main text elements, including headings and actionable labels, ensuring readability and consistency with your app’s design.
secondaryTextColor
Type: Color
Description: Specifies the color for supporting or decorative text, helping you define visual hierarchy and style.
uploadFromUrlTitle
Type: String
Description: Sets the title text for the "Upload from URL" section. Use it to localize or customize the label based on your audience.
orText
Type: String
Description: The text shown between upload options (e.g., "or"). Customize it to match your app’s tone, branding, or language.
uploadButtonText
Type: String
Description: Defines the label of the button used in the "Upload from URL" section. You can personalize or localize the text as needed.
userHandlesUploadsExternally
Type: bool
Description: If set to true
, the widget will not store or display the uploaded files list, nor manage any internal upload logic. You are fully responsible for handling the uploaded files through your own code and using the onFileReceivedCustomAction
callback. Note that the widget will still enforce validations such as file size and allowed formats. However, since file metadata (FileInfo
) is not stored internally, you must decide how to process each upload: whether to save it, allow duplicates, replace existing files, or implement any other custom logic required by your app.
onDeleteFileCustomAction
Type: Callback Action
Description: Called when a file is deleted from the uploaded files list. Use it to execute custom cleanup operations. Its main purpose is to let you trigger actions after a file is removed—for example, displaying a confirmation message, logging the deletion, or updating other parts of your UI. This gives you full control over what should happen when a user deletes a file from the list. This callback receives the fileInfo
data type of the deleted file, allowing you to access its metadata for any custom logic you need.
mainBorderRadius
Type: double
Description: Controls the base border radius applied to all UI elements in the uploader. This helps maintain visual consistency with your app’s styling.
mobileGalleryText
Type: String
Description: Label for the button that opens the image gallery on iPhone devices. This button appears only if the widget determines that the allowed file formats can come from multiple sources (e.g., images and documents or videos). If the allowed formats are exclusively image types (like JPG or PNG), the widget skips the menu and opens the gallery directly.
mobileFileExplorerText
Type: String?
Description: Label for the button that opens the file explorer on iPhone devices. Similar to the gallery button, this option appears only if multiple sources are possible. If the allowed formats include only document-based files (like PDF), the file explorer is opened automatically without showing a menu.
mobileCancelText
Type: String
Description: Label for the cancel button shown when the file selection menu appears on iPhone. This menu, which includes options for the gallery and file explorer, is shown only when the widget detects that the file could logically come from either source (e.g., videos, which exist in both the gallery and file system). If there is only one valid source, this menu—and the cancel button—will not be shown.
existingFileCount
Type: int
Description: Indicates how many files have already been uploaded outside of this component. This property should only be used if userHandlesUploadsExternally
is set to true
. In that case, the widget does not internally track uploaded files, so you're responsible for manually providing the current file count from your own storage or logic. This enables the component to continue enforcing the maximum file count validation. If userHandlesUploadsExternally
is false, you do not need to set this value—the widget manages it automatically as part of its internal logic.
🎨Dropzone Content Component Parameters
The Powerful File Uploader with Dropzone allows you to design your own widget to place above the dropzone area, giving you full control over its appearance. However, the included Dropzone Content Component is fully customizable and ready to use. You can personalize it using the following parameters:
dropZoneTitle
Type: String
Description: Title text shown at the top of the dropzone. To hide it, pass an empty string constant.
dropZoneSubtitle
Type: String
Description: Subtitle displayed below the title, providing context or instructions. To hide it, pass an empty string constant.
dropZoneNote
Type: String
Description: Optional note text shown at the bottom of the dropzone content, often used for tips or restrictions. To hide it, pass an empty string constant.
dropzoneIsActive
Type: bool
Description: Becomes true
while a file is being dragged over the dropzone.
onHoverTitle
Type: String
Description: Title that replaces dropZoneTitle
temporarily when the user hovers a file over the dropzone. This gives immediate feedback, like “Release to upload.”
primaryTextColor
Type: Color
Description: Sets the main text color used for titles and primary instructions.
secondaryTextColor
Type: Color
Description: Sets the color for subtitles and notes, helping to distinguish them from primary messages.
fileIsLoading
Type: bool
Description: Indicates whether a file is currently being uploaded.
📄 File in List Component Parameters
The Powerful File Uploader with Dropzone allows you to insert your own custom component to display each uploaded file in the list exactly as you want. However, the included File in List component is fully customizable using the following parameters:
fileInfo
Type: Data Type
Description: Contains the uploaded file’s metadata, including the file name, size in KB, MIME type, file extension, and a temporary URL.
primaryTextColor
Type: Color
Description: Sets the main text color, typically used for the file name or title.
secondaryTextColor
Type: Color
Description: Sets the color for secondary information such as file size.
backgroundColor
Type: Color
Description: Changes the background color of the file item container.
borderRadius
Type: double
Description: Rounds the corners of the file container. Use this to match your app’s visual style.
overrideIconColor
Type: Color
Description: If provided, this color overrides the default icon color used for file types.
hideIcon
Type: bool
Description: If set to true
, the file type icon will be hidden.
maxCharacters
Type: int
Description: Limits the number of characters shown in the file name. Useful for preventing long names from breaking the layout, leave empty for no character limit.
Last updated