Flutter Camera は、Android、iOS、Web でデバイスのカメラにアクセスして動画を記録できる、Flutter用のクロスプラットフォームプラグインです。画像の撮影、ライブカメラプレビューのストリーミング、高品質な動画の録画を行うためのシンプルなAPIを提供しています。シンプルさとパフォーマンスを重視して設計されており、フォーカス、フラッシュ制御、解像度選択などの一般的なカメラ操作をサポートしています。写真共有、ビデオ通話、拡張現実機能など、リアルタイムでのカメラ統合が必要なアプリケーションに最適です。
The camera plugin functionality works on iOS 10.0 or higher. If compiling for any version lower than 10.0,
make sure to programmatically check the version of iOS running on the device before using any camera plugin features.
The device_info_plus plugin, for example, can be used to check the iOS version.
Add two rows to the ios/Runner/Info.plist:
one with the key Privacy - Camera Usage Description and a usage description.
and one with the key Privacy - Microphone Usage Description and a usage description.
Or in text format add the key:
<key>NSCameraUsageDescription</key><string>Can I use the camera please?</string><key>NSMicrophoneUsageDescription</key><string>Can I use the mic please?</string>
Android
Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.
minSdkVersion 21
Example
Here is a small example flutter app displaying a full screen camera preview with video recording.