image_picker Flutter Package (iOS UIImagePickerController / Android Camera2)
Third Party Library Integration by Flutter Team / Google
Description
The image_picker Flutter package wraps the native iOS UIImagePickerController and Android camera and gallery APIs for receipt photo capture during expense registration. Expense claims over 100 NOK require a receipt photo (HLF requirement), and the package enables both camera capture and gallery selection with configurable image quality compression before Supabase Storage upload.
Detailed Analysis
The image_picker package enables a key compliance requirement: HLF mandates that expense claims above 100 NOK include a receipt photo, and this integration delivers that capability natively on both iOS and Android without a third-party cloud scanning service. This protects the organisation against fraudulent expense submissions and satisfies audit requirements, while the automatic image compression and Exif metadata stripping ensure that receipt images containing personally identifiable information — such as names on receipts — are handled responsibly and stored securely in a private Supabase Storage bucket. The integration is free and maintained by the Flutter team, eliminating vendor risk. The only cost implication is Supabase Storage spend for receipt images, which scales predictably with expense submission volume.
The fallback to gallery selection when the camera is unavailable ensures near-universal device compatibility across the membership.
image_picker (>=1.0.0) requires platform-specific permission configuration on both iOS (NSCameraUsageDescription and NSPhotoLibraryUsageDescription in Info.plist) and Android (CAMERA and READ_EXTERNAL_STORAGE in AndroidManifest.xml), which must be completed before QA testing on real devices. Eight components depend on this integration (276-receipt-image-picker-integration, 268-receipt-camera-sheet, 089-receipt-capture-widget, 269-receipt-thumbnail-preview, 273-receipt-image-compressor, 417-attachment-picker-ui, 418-attachment-thumbnail-grid, 419-attachment-preview-modal), making permission handling and error state design critical path items. Delivery risk includes Apple App Review delays if permission strings are missing or insufficient. The 100 NOK threshold logic (allow submission without receipt below the threshold) must be tested as a business rule.
Ongoing maintenance is minimal, but iOS and Android OS updates occasionally change camera API behaviour, requiring regression testing on major OS releases.
image_picker (^1.0.0) wraps UIImagePickerController on iOS 11+ and Camera2/MediaStore on Android 5.0+. Permission strings must be present in platform manifests before the picker can be invoked — runtime permission denial is handled with a plain-language explanation and a deep link to device settings. Image quality compression (0.0–1.0 scale) and max width/height are configurable via ImagePicker options; the 273-receipt-image-compressor component applies compression before Supabase Storage upload to reduce both storage cost and transmission time. Exif metadata is stripped pre-upload to remove GPS and device identifiers from receipt images, which may contain PII.
Camera unavailability falls back to gallery selection; expense submission without a receipt is permitted below the 100 NOK threshold. Upload success rate and capture-vs-gallery ratio are tracked as product metrics. The integration is purely inbound (device → app) with no external API calls from the package itself.
Using Components (8)
Dependencies (4)
Authentication
| Type | None |
| Requirements | NSCameraUsageDescription in iOS Info.plist, NSPhotoLibraryUsageDescription in iOS Info.plist, CAMERA and READ_EXTERNAL_STORAGE permissions in Android Manifest |
| Scopes | cameraphoto_library |
Configuration
Error Handling
Monitoring
Performance
| Latency | < 500ms to open camera sheet; < 2s for image compression |
| Availability | Camera unavailability falls back to gallery selection |
Cost Implications
| Pricing Model | Free open-source package |