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

<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>

You need add in app/build.gradle

minSdkVersion 21

IOS

You need add in info.plist

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

Mode Photo

Enable Photo


Camera(
 orientationEnablePhoto: CameraOrientation.landscape,)

Camera(
 orientationEnablePhoto: CameraOrientation.portrait,)

Camera(
 orientationEnablePhoto: CameraOrientation.all,) // isDefault

Mask Camera

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


Camera(
 imageMask: Widget
)

Screen Mode


Camera(
 
 mode: CameraMode.normal or CameraMode.fullscreen
)

Mode Focus

You can add Rectangle , Circle or Square Focus

Camera(
       mode: CameraMode.normal,
      imageMask: CameraFocus.rectangle(
                color: Colors.black.withOpacity(0.5),
                ),
     )

You can take a photo and edit.


yourFunction () async {

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

})

Other mode getFile


Camera(
  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

MIT

Libraries

bloc_camera
bloc_video
camera
camera_camera
focus_widget
orientation_icon
rotate_icon
video