# flutter_wechat_camera_picker **Repository Path**: sbsuwei666/flutter_wechat_camera_picker ## Basic Information - **Project Name**: flutter_wechat_camera_picker - **Description**: clone from https://github.com/ihpcoder/flutter_wechat_camera_picker.git and custom changed - **Primary Language**: Dart - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2022-03-29 - **Last Updated**: 2022-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Flutter WeChat Camera Picker [![pub package](https://img.shields.io/pub/v/wechat_camera_picker?logo=dart&label=stable&style=flat-square)](https://pub.dev/packages/wechat_camera_picker) [![pub package](https://img.shields.io/pub/v/wechat_camera_picker?color=42a012&include_prereleases&label=dev&logo=dart&style=flat-square)](https://pub.dev/packages/wechat_camera_picker) [![GitHub stars](https://img.shields.io/github/stars/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/stargazers) [![GitHub forks](https://img.shields.io/github/forks/fluttercandies/flutter_wechat_camera_picker?logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/network) [![Build status](https://img.shields.io/github/workflow/status/fluttercandies/flutter_wechat_camera_picker/Build%20test?label=CI&logo=github&style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/actions?query=workflow%3A%22Build+test%22) [![CodeFactor](https://img.shields.io/codefactor/grade/github/fluttercandies/flutter_wechat_camera_picker?logo=codefactor&logoColor=%23ffffff&style=flat-square)](https://www.codefactor.io/repository/github/fluttercandies/flutter_wechat_camera_picker) [![GitHub license](https://img.shields.io/github/license/fluttercandies/flutter_wechat_camera_picker?style=flat-square)](https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/master/LICENSE) FlutterCandies Language: English | [ä¸­æ–‡įŽ€äŊ“](README-ZH.md) A **camera picker** which is an extension for [wechat_assets_picker](https://pub.dev/packages/wechat_assets_picker). Based on `camera` for camera functions and `photo_manager` for asset implementation. ## Category 🗂 - [Flutter WeChat Camera Picker](#flutter-wechat-camera-picker) - [Category 🗂](#category-) - [Features ✨](#features-) - [Screenshots 📸](#screenshots-) - [Preparing for use 🍭](#preparing-for-use-) - [Usage 📖](#usage-) - [Simple usage](#simple-usage) - [Frequent asked question 💭](#frequent-asked-question-) - [Why there are over-scaled issue when `shouldLockPortrait` set to false ?](#why-there-are-over-scaled-issue-when-shouldlockportrait-set-to-false) - [Contributors ✨](#contributors-) ## Features ✨ - [x] 🔐 Non-nullable by default - [x] 💚 99% similar to WeChat style - [x] 📷 Picture taking support - [x] â˜€ī¸ Exposure adjust support - [x] đŸ”ī¸ Scale with pinch support - [x] đŸŽĨ Video recording support - [x] ⏱ Duration limitation support - [x] 🔍 Scale when recording support - [x] 🖾 Foreground custom widget builder support ## Screenshots 📸 | ![](https://tva1.sinaimg.cn/large/007S8ZIlgy1ggtt6yrdqej30u01t017w.jpg) | ![](https://tva1.sinaimg.cn/large/007S8ZIlgy1ggtt6yh3x4j30u01t0wuo.jpg) | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | | ![](https://tva1.sinaimg.cn/large/007S8ZIlgy1ggtt6z1h7xj30u01t01kx.jpg) | ![](https://tva1.sinaimg.cn/large/007S8ZIlgy1ggtt6zarvhj30u01t0x5f.jpg) | ## Preparing for use 🍭 ### Version constraints Flutter SDK: `>=2.0.0` . ### Setup - [wechat_assets_picker#preparing-for-use](https://github.com/fluttercandies/flutter_wechat_assets_picker#preparing-for-use-) - [camera#installation](https://pub.dev/packages/camera#installation) ## Usage 📖 | Name | Type | Description | Default Value | | ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------- | | enableRecording | `bool` | Whether the picker can record video. | `false` | | onlyEnableRecording | `bool` | Whether the picker can only record video. Only available when `enableRecording` is `true `. | `false` | | enableAudio | `bool` | Whether Whether the picker should record audio. Only available with recording. | `true` | | enableSetExposure | `bool` | Whether users can set the exposure point by tapping. | `true` | | enableExposureControlOnPoint | `bool` | Whether users can adjust exposure according to the set point. | `true` | | enablePinchToZoom | `bool` | Whether users can zoom the camera by pinch. | `true` | | enablePullToZoomInRecord | `bool` | Whether users can zoom by pulling up when recording video. | `true` | | shouldDeletePreviewFile | `bool` | Whether the preview file will be delete when pop. | `false` | | shouldLockPortrait | `bool` | Whether the orientation should be set to portrait | `true` | | maximumRecordingDuration | `Duration` | The maximum duration of the video recording process. | `const Duration(seconds: 15)` | | theme | `ThemeData?` | Theme data for the picker. | `CameraPicker.themeData(C.themeColor)` | | textDelegate | `CameraPickerTextDelegate?` | Text delegate that controls text in widgets. | `DefaultCameraPickerTextDelegate` | | resolutionPreset | `ResolutionPreset` | Present resolution for the camera. | `ResolutionPreset.max` | | cameraQuarterTurns | `int` | The number of clockwise quarter turns the camera view should be rotated. | `0` | | imageFormatGroup | `ImageFormatGroup` | Describes the output of the raw image format. | `ImageFormatGroup.unknown` | | foregroundBuilder | `Widget Function(CameraValue)?` | The foreground widget builder which will cover the whole camera preview. | null | | onEntitySaving | `SaveEntityCallback?` | The callback type define for saving entity in the viewer. | null | ### Simple usage ```dart final AssetEntity? entity = await CameraPicker.pickFromCamera(context); ``` ## Frequent asked question 💭 ### Why there are over-scaled issue when `shouldLockPortrait` set to false? Currently the rotate synchronization is not supported. The `DeviceOrientation` from the `CameraValue` is different from the one comes from flutter when the user is rotating devices. The preview widget is synchronized when both orientation is the same. Issue: https://github.com/flutter/flutter/issues/78685 ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Alex Li

đŸ’ģ 🎨 📖 💡 🤔 🚧 đŸ’Ŧ 👀

Caijinglong

💡 🤔

Lael

📖

mjl0602

đŸ’ģ 🤔

AliasWang

đŸ’ģ 🤔
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!