camera_camera 1.0.24

Camera_Camera #

That is plugin contains native access camera your device, Android and iOS. You can take a photo or record video. Return file.

Android #

You need add in AndroidManifest.xml


You need add in app/build.gradle

minSdkVersion 21


You need add in info.plist

      <string>Can I use the camera please?</string>
      <string>Can I use the mic please?</string>

Mode Photo #

Enable Photo #

 orientationEnablePhoto: CameraOrientation.landscape,)

 orientationEnablePhoto: CameraOrientation.portrait,)

 orientationEnablePhoto: CameraOrientation.all,) // isDefault

Mask Camera #

You can add widget top stack camera, Container, Images.png.

 imageMask: Widget

Screen Mode #

 mode: CameraMode.normal or CameraMode.fullscreen

Mode Focus #

You can add Rectangle , Circle or Square Focus

       mode: CameraMode.normal,
      imageMask: CameraFocus.rectangle(

You can take a photo and edit.

yourFunction () async {

File file = await  Navigator.push(context, MaterialPageRoute(builder: (context) => Camera()));


Other mode getFile #

  onFile: (File file) => file;

Mode Video #

You cand record video and preview.

yourFunction () async {

File file = await  Navigator.push(context, MaterialPageRoute(builder: (context) => Video()));


Installation #

Add package in pubspec.yaml

camera_camera: current_version

Usage #

Import this in your page

import  'package:camera_camera/camera_camera.dart';

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License #


1.0.24 #

  • Update interval for use path_provider


example #

A new Flutter project.

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:

  camera_camera: ^1.0.24

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:camera_camera/camera_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 Sep 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/page/camera.dart. (-1.49 points)

Analysis of lib/page/camera.dart reported 3 hints:

line 9 col 8: Unused import: 'dart:math'.

line 193 col 31: The for, if, and spread elements weren't supported until version 2.2.2, but this code is required to be able to run on earlier versions.

line 202 col 17: The for, if, and spread elements weren't supported until version 2.2.2, but this code is required to be able to run on earlier versions.

Format lib/page/bloc/bloc_camera.dart.

Run flutter format to format lib/page/bloc/bloc_camera.dart.

Format lib/page/bloc/bloc_video.dart.

Run flutter format to format lib/page/bloc/bloc_video.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/page/video.dart (Run flutter format to format lib/page/video.dart.)
  • lib/shared/widgets/focus_widget.dart (Run flutter format to format lib/shared/widgets/focus_widget.dart.)
  • lib/shared/widgets/orientation_icon.dart (Run flutter format to format lib/shared/widgets/orientation_icon.dart.)
  • lib/shared/widgets/rotate_icon.dart (Run flutter format to format lib/shared/widgets/rotate_icon.dart.)

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (camera).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
camera ^0.4.3+2 0.4.3+2 0.5.4+1
flutter 0.0.0
image_cropper ^1.0.0 1.0.2
native_device_orientation ^0.2.0 0.2.0
path_provider >=1.0.0 <2.0.0 1.3.0
rxdart ^0.22.0 0.22.2
screen ^0.0.5 0.0.5
video_player ^0.10.0+4 0.10.2+1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
platform 2.2.1
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies