open_camera 0.0.5

Open Camera #

Open Camera is a flutter plugin, very light, nice and intuitive, which adds to your application the ability to take photos and record videos.

Get started #

It is very easy to use the plugin Open Camera in your project, it was thought to be like this ;)

For Android systems the minimum version of SDK is 24 and IOS minimum version is 10.0.

Installation #

Installing the plugin in your application is very simple, add in your file pubspec.yaml the plugin reference OpenCamera.

  open_camera: ...
    sdk: flutter

Android #

In the AndroidManifest.xml file add the following permissions.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" android:required="true" />
<uses-permission android:name="android.permission.RECORD_AUDIO" android:required="true" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:required="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="true" />


In IOS it is necessary to edit the following files.


Change the line by uncommenting and changing the minimum version in the ios/PodFile.

platform :ios, '10.0'


In the Info.plist file add the following permissions.

<string>Can I use the camera please?</string>
<string>Can I use the mic please?</string>
<string>Camera App would like to save photos from the app to your gallery</string>
<string>Camera App would like to access your photo gallery for uploading images to the app</string>

How to use #

Settings #

var settings = CameraSettings(
  limitRecord: 15,
  useCompression: true,
  resolutionPreset: ResolutionPreset.ultraHigh

limitRecordintRecording time limit in seconds.
useCompressionboolWhether the plugin should compress the photo or video before returning
resolutionPresetenumCamera resolution quality

Taking a picture #

File file = await openCamera(
  cameraSettings: CameraSettings(
    useCompression: true,
    resolutionPreset: ResolutionPreset.ultraHigh,

Recording a video #

File file = await openCamera(context,
                             cameraSettings: CameraSettings(
                                limitRecord: 15,
                                useCompression: true,
                                resolutionPreset: ResolutionPreset.ultraHigh,


Diogo Luiz Ponce ( / Joelson Santos Cunha (

0.0.3 #

  • Created image compression system

0.0.4 #

  • Dependency compatibility adjustments.

0.0.5 #


open_camera_example #

Demonstrates how to use the open_camera plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  open_camera: ^0.0.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:open_camera/open_camera.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 18, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Maintenance issues and suggestions

Support latest dependencies. (-30 points)

The version constraint in pubspec.yaml does not support the latest published versions for 3 dependencies (native_device_orientation, permission_handler, photo_view).

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
auto_orientation ^1.0.5 1.0.6
camera ^0.5.4+2 0.5.7+3
flutter 0.0.0
flutter_image_compress ^0.6.3 0.6.5+1
image_gallery_saver ^1.2.2 1.2.2
native_device_orientation ^0.2.0 0.2.0 0.3.0
path_provider ^1.1.2 1.6.0
permission_handler ^3.2.0 3.3.0 4.2.0+hotfix.3
photo_view ^0.6.0 0.6.0 0.9.2
video_player ^0.10.2+1 0.10.7
Transitive dependencies
collection 1.14.11 1.14.12
flutter_web_plugins 0.0.0
meta 1.1.8
platform 2.2.1
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
video_player_platform_interface 1.0.4
video_player_web 0.1.2
Dev dependencies