Skip to content

Flutter Package to capture image from camera and pick image from gallery. This Package supports both the feature at a same time or individually.

License

Notifications You must be signed in to change notification settings

ebsangam/camera_gallery_image_picker

 
 

Repository files navigation

Camera Gallery Image Picker

A Flutter package that provides a simple and customizable way to capture images from the camera and pick image from gallery and both from camera and gallery at the same time.

Pub Star on Github License: MIT

Platform Support

Android iOS macOS Web Linux Windows

Installation

Add the following dependency to your pubspec.yaml file:

dependencies:
  camera_gallery_image_picker: ^0.0.4

Then, run flutter pub get to install the package.

IOS

Add following keys to your info.plist file:

 <key>NSCameraUsageDescription</key>
 <string>Describe why yo need camera permission</string>
 <key>NSPhotoLibraryUsageDescription</key>
 <string>Describe why you need photo library permission</string>

Android

No any configuration is required.

Usage

Import the package:

import 'package:camera_gallery_image_picker/camera_gallery_image_picker.dart';

Screenshots

Example

import 'package:camera_gallery_image_picker/camera_gallery_image_picker.dart';

/// CAPTURE AND PICK IMAGE FROM CAMERA
final File? _imageFile = await CameraGalleryImagePicker.pickImageFromCamera(
   context: context,
   source: ImagePickerSource.camera,
);

/// PICK IMAGE FROM GALLERY
final File? _imageFile = await CameraGalleryImagePicker.pickImageFromGallery(
   context: context,
   source: ImagePickerSource.gallery,
);

/// OPTIONS TO PICK IMAGE FROM BOTH CAMERA AND GALLERY
final File? _imageFile = await CameraGalleryImagePicker.pickImageFromGallery(
   context: context,
   source: ImagePickerSource.both,
);

/// PICK MULTIPLE IMAGES FROM GALLERY
final List<File> = await CameraGalleryImagePicker pickMultiImage();

About

Flutter Package to capture image from camera and pick image from gallery. This Package supports both the feature at a same time or individually.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 36.2%
  • CMake 31.8%
  • Dart 14.8%
  • Ruby 4.2%
  • C 3.2%
  • HTML 3.0%
  • Other 6.8%