Third Party Library Flutter Team / Google Inbound
Sdk
Connection
Inbound
Data Flow
8
Components
4
Dependencies

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.

Dependencies (4)

image_picker Flutter package >=1.0.0 External
iOS 11+ External
Android 5.0+ External
Camera and photo library permissions granted External

Authentication

TypeNone
RequirementsNSCameraUsageDescription in iOS Info.plist, NSPhotoLibraryUsageDescription in iOS Info.plist, CAMERA and READ_EXTERNAL_STORAGE permissions in Android Manifest
Scopescameraphoto_library

Configuration

Required Settings

NSCameraUsageDescription Required
NSPhotoLibraryUsageDescription Required
CAMERA permission in AndroidManifest.xml Required

Optional Settings

Image quality compression level (0.0–1.0) Optional
Max image width/height for receipt images Optional
Preferred camera (front/rear) Optional

Error Handling

Camera permission denied shows plain-language explanation with settings link
Image selection cancelled returns to expense form without error
Oversized images compressed automatically by ReceiptImageCompressor before upload

Monitoring

Metrics

Receipt capture vs gallery selection ratio
Image upload success rate after capture

Performance

Latency< 500ms to open camera sheet; < 2s for image compression
AvailabilityCamera unavailability falls back to gallery selection

Cost Implications

Pricing ModelFree open-source package

Cost Factors

Supabase Storage costs for receipt images

Security Considerations

Receipt images containing PII (names on receipts) treated as sensitive — stored in private Supabase bucket
Images compressed before upload to reduce storage footprint and transmission time
Exif metadata stripped from receipt images before upload

Fallback Mechanisms

Gallery selection fallback when camera unavailable
Expense submission without receipt permitted below 100 NOK threshold