camera_avfoundation
0.11.1, released 4 weeks ago by flutter.dev
iOS implementation of the Flutter camera plugin providing preview, photo, and video capture.
What it does
Implements the camera plugin for iOS, adding features like zero‑shutter‑lag still capture, custom video output paths, and video rotation handling. It works behind the scenes when you use the federated `camera` package on iOS.
AI-written summary of version 0.11.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need iOS‑specific camera capabilities
- You require zero‑shutter‑lag photos or custom video file paths
- You are using the federated `camera` plugin and want the iOS implementation
Skip it when
- Your app targets only Android/Web and doesn't need iOS support
- You don't need advanced iOS camera features and prefer a single cross‑platform package
Strengths
- Full iOS support with latest iOS 17 features
- Endorsed federated plugin – automatically included with `camera`
- Allows custom video output paths and zero‑shutter‑lag capture
Weaknesses
- iOS‑only – no effect on Android or Web
- Requires manual Info.plist changes for file‑browser visibility
- Depends on the main `camera` package for a complete solution
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
If using custom video output paths, add LSSupportsOpeningDocumentsInPlace and UISupportsDocumentBrowser keys (set to true) in ios/Runner/Info.plist.
import 'package:camera/camera.dart';
Future<void> record() async {
final cameras = await availableCameras();
final controller = CameraController(cameras.first, ResolutionPreset.max);
await controller.initialize();
await controller.startVideoRecording();
// ...
await controller.stopVideoRecording();
}Alternatives
Packages that do the same job and could replace camera_avfoundation.
- barcode_scan2
A flutter plugin for scanning 2D barcodes and QRCodes via camera.
93Compare - cunning_document_scanner
Scan paper documents and convert them to images or PDFs with auto-cropping.
92Compare - flutter_genius_scan
Flutter plugin for the Genius Scan SDK for iOS and Android. It allows scanning paper documents using a smartphone camera.
89Compare - ai_barcode_scanner
Full-screen or embedded barcode and QR code scanner for Flutter built on mobile_scanner
89Compare
Works with
Packages commonly used together with camera_avfoundation: ones it builds on, ones built on it, and its own family.
- stream_transformcamera_avfoundation depends on itExtension methods adding common stream transform operators
- camera_android_cameraxSame familyAndroid camera implementation using CameraX library
- camera_webSame familyWeb platform implementation for the Flutter camera plugin.
- camera_androidSame familyAndroid implementation of the camera plugin using the Camera2 library.
- camera_windowsSame familyWindows implementation of the camera plugin for getting info and controlling cameras
- cameraBuilt on camera_avfoundationFlutter plugin to preview, capture photos/video and stream camera images.