File Attachment Widget
Component Detail
User Interface
medium complexity
mobile
2
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
A Flutter widget that wraps image_picker and file_picker plugins to allow users to select images and PDF files from their device. Provides in-app preview of selected attachments with deletion capability before submission, enforcing client-side MIME type and size validation with WCAG 2.2 AA accessible labels and error announcements.
file-attachment-widget
Responsibilities
- Render file picker trigger button with accessible Semantics label
- Display inline previews of selected attachments before upload
- Allow removal of individual attachments before submission
- Show validation errors for unsupported file types or oversized files
Interfaces
onAttachmentsChanged(List<AttachmentFile>)
onValidationError(String message)
removeAttachment(String localId)
openFilePicker()
openImagePicker()
getSelectedAttachments()
clearAttachments()
Relationships
Dependencies (2)
Components this component depends on