Summary Share Overlay
Component Detail
Description
Bottom sheet or full-screen overlay that presents sharing options: copy to clipboard, save as image, or share via the system share sheet. Triggers screenshot capture of the current summary slide and handles platform permissions for saving to photo library.
summary-share-overlay
Summaries
The Summary Share Overlay enables peer mentors to share their annual achievement summaries directly from the app as images, extending programme visibility beyond the platform itself. When mentors share milestones on personal networks or with coordinators, they organically promote the programme and reinforce their own sense of contribution. This increases word-of-mouth recruitment potential and strengthens the emotional connection mentors feel to the programme — both significant factors in long-term volunteer retention. The feature requires no additional infrastructure cost and leverages native platform sharing capabilities.
Medium complexity driven primarily by platform permission handling for photo library access on iOS and Android, which requires careful UX design for denial and first-time request flows. The dependency on screenshot-capture-utility must be resolved and stable before this component can be fully tested. Key risks include OS-version-specific permission API differences and share sheet behaviour variance across Android manufacturers. Testing must cover permission grant, denial, and re-request flows; clipboard copy verification; gallery save confirmation; and share sheet invocation on both platforms.
Allocate buffer time for platform edge cases.
showShareOverlay() renders as a modal bottom sheet or full-screen overlay using BuildContext. It calls screenshot-capture-utility to capture the provided slideWidget as a Uint8List before presenting options. copyImageToClipboard() uses the Clipboard API with image MIME type support. saveImageToGallery() invokes the photo library permission plugin (e.g., permission_handler) and writes via image_gallery_saver or equivalent, returning a bool success indicator.
openSystemShareSheet() uses share_plus with XFile wrapping the Uint8List. dismiss() calls Navigator.pop(). All async paths must handle exceptions and surface user-facing error states gracefully.
Responsibilities
- Present share action options to the user
- Trigger screenshot capture of the active summary slide
- Invoke system share sheet with captured image
- Handle photo library permission requests gracefully
Interfaces
showShareOverlay(context: BuildContext, slideWidget: Widget): void
copyImageToClipboard(image: Uint8List): Future<void>
saveImageToGallery(image: Uint8List): Future<bool>
openSystemShareSheet(image: Uint8List): Future<void>
dismiss(): void
Relationships
Used Integrations (1)
External integrations and APIs this component relies on