https://github.com/yanshouwang/camerax
A camera plugin for flutter, which use CameraX on Android, native API on iOS, supports camera preview, capture and analyze.
https://github.com/yanshouwang/camerax
camera camerax flutter ml
Last synced: 23 days ago
JSON representation
A camera plugin for flutter, which use CameraX on Android, native API on iOS, supports camera preview, capture and analyze.
- Host: GitHub
- URL: https://github.com/yanshouwang/camerax
- Owner: yanshouwang
- License: mit
- Created: 2021-01-24T09:10:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-08-01T10:09:54.000Z (2 months ago)
- Last Synced: 2025-08-03T08:41:56.767Z (2 months ago)
- Topics: camera, camerax, flutter, ml
- Language: Dart
- Homepage:
- Size: 303 KB
- Stars: 27
- Watchers: 1
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- License: LICENSE
Awesome Lists containing this project
README
# CameraX
A camera plugin for flutter, which use CameraX on Android, native API on iOS, supports camera preview, capture and analyze.
*Note*: This plugin is inspired by the official [camera](https://pub.dev/packages/camera) project but more simple to use, and use [MLKit](https://developers.google.cn/ml-kit) in native for image analyze.
## Features
- [x] CameraView widget.
- [x] Control the torch.
- [ ] Access to a text stream.
- [ ] Access to a face stream.
- [ ] Access to a pose stream.
- [x] Access to a barcode stream.
- [ ] Access to image labels stream.
- [ ] Access to a object detection and tracking stream.
- [ ] Access to a digital ink recoginition stream.
- [ ] Access to custom models stream.
- [ ] Detect barcode from an image.
- [ ] Photo capture ability.
- [ ] Video record ability.## Getting Started
Add `camerax` as a [dependency in your pubspec.yaml file](https://flutter.dev/using-packages/).
```
dependencies:
camerax: ^
```### Android
Make sure you have a `miniSdkVersion` with 21 or higher in your `android/app/build.gradle` file, because the camera2 API which CameraX used only support Android 5.0 or above.
*Note*: You can run the example on a device emulator with Android 11 or higher and physical devices, CameraX doesn't work when running on emulators with Android 10 or lower. See https://developer.android.google.cn/codelabs/camerax-getting-started#5
### iOS
Make sure you have a minimum deployment target of 10.0, because the `MLKit` only support iOS 10.0 or above, you can uncomment the first line `platform :ios, '10.0'` in your iOS project's `Podfile`
## Issues
- Doesn't work with horizontal orientation.
- No tests for now.## Screenshots

