Calculator Export Infrastructure
Component Detail
Infrastructure
medium complexity
Shared Component
mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Provides low-level utilities for generating image snapshots and PDF exports of the calculator result screen. Uses Flutter's rendering pipeline to capture widget trees as images and the pdf package to compose formatted PDF documents. Integrates with the platform share sheet for distribution.
calculator-export-infrastructure
Responsibilities
- Capture Flutter widget tree as image using RenderRepaintBoundary
- Compose PDF document from benefit breakdown data
- Invoke platform share sheet with generated file
- Write export files to temporary device storage
Interfaces
captureWidgetAsImage(GlobalKey key)
generatePdf(BenefitBreakdown breakdown)
shareFile(File file, String mimeType)
writeToTempStorage(Uint8List bytes, String filename)