Attachment Picker Widget
Component Detail
Description
Entry-point widget for selecting files to attach to an activity. Wraps the file_picker and image_picker Flutter plugins to expose gallery selection, device file browser access, and camera capture from a single UI trigger. Hidden when the document-attachments module toggle is disabled for the tenant.
attachment-picker-widget
Sources & reasoning
The picker widget is the primary mobile UI entry point for the document attachments workflow. It must unify gallery, camera, and file browser into one surface because NHF's use cases span photo evidence (screenshots, invitation images) and PDF documents. The module toggle check at render time follows the platform design principle for optional capabilities.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Present bottom sheet with three attachment modes: gallery, file browser, camera
- Delegate to file_picker or image_picker plugin based on user selection
- Hand selected file(s) to File Upload Service for validation and upload
- Display upload progress indicator per attachment
Interfaces
onFilesSelected(List<AttachmentFile>)
show()
dismiss()
Relationships
Related Data Entities (1)
Data entities managed by this component