|
1 |
| -# wechat_camera_picker |
| 1 | +# Flutter WeChat Camera Picker |
2 | 2 |
|
3 |
| -A new Flutter package project. |
| 3 | +[](https://pub.dev/packages/wechat_camera_picker) |
| 4 | +[](https://pub.dev/packages/wechat_camera_picker) |
| 5 | +[](https://github.com/fluttercandies/flutter_wechat_camera_picker/stargazers) |
| 6 | +[](https://github.com/fluttercandies/flutter_wechat_camera_picker/network) |
| 7 | +[](https://github.com/fluttercandies/flutter_wechat_camera_picker/actions?query=workflow%3A%22Build+test%22) |
| 8 | +[](https://www.codefactor.io/repository/github/fluttercandies/flutter_wechat_camera_picker) |
| 9 | +[](https://github.com/fluttercandies/flutter_wechat_camera_picker/blob/master/LICENSE) |
| 10 | +<a target="_blank" href="https://jq.qq.com/?_wv=1027&k=5bcc0gy"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="FlutterCandies" title="FlutterCandies"></a> |
4 | 11 |
|
5 |
| -## Getting Started |
| 12 | +Language: English | [中文简体](README-ZH.md) |
6 | 13 |
|
7 |
| -This project is a starting point for a Dart |
8 |
| -[package](https://flutter.dev/developing-packages/), |
9 |
| -a library module containing code that can be shared easily across |
10 |
| -multiple Flutter or Dart projects. |
| 14 | +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. |
11 | 15 |
|
12 |
| -For help getting started with Flutter, view our |
13 |
| -[online documentation](https://flutter.dev/docs), which offers tutorials, |
14 |
| -samples, guidance on mobile development, and a full API reference. |
| 16 | + |
| 17 | +## Contributors ✨ |
| 18 | + |
| 19 | +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): |
| 20 | +<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> |
| 21 | +<!-- ALL-CONTRIBUTORS-LIST:END --> |
| 22 | +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! |
| 23 | + |
| 24 | +## Category 🗂 |
| 25 | + |
| 26 | +* [Features](#features-) |
| 27 | +* [Screenshots](#screenshots-) |
| 28 | +* [Preparing for use](#preparing-for-use-) |
| 29 | +* [Usage](#usage-) |
| 30 | + |
| 31 | +## Features ✨ |
| 32 | + |
| 33 | +- [x] 💚 99% simillar to WeChat style. |
| 34 | +- [x] 📷 Picture taking support |
| 35 | +- [x] 🎥 Video recording support |
| 36 | + - [x] ⏱ Duration limitation support |
| 37 | + |
| 38 | +## Screenshots 📸 |
| 39 | + |
| 40 | +|  |  | |
| 41 | +|-----------------|------------------| |
| 42 | +|  |  | |
| 43 | + |
| 44 | +## Preparing for use 🍭 |
| 45 | + |
| 46 | +Reference: [wechat_assets_picker#preparing-for-use](https://github.com/fluttercandies/flutter_wechat_assets_picker#preparing-for-use-) |
| 47 | + |
| 48 | +## Usage 📖 |
| 49 | + |
| 50 | +| Name | Type | Description | Default Value | |
| 51 | +| ------------------------ | -------------------------- | ---------------------------------------------------- | -------------------------------------- | |
| 52 | +| isAllowRecording | `bool` | Whether the picker can record video. | `false` | |
| 53 | +| maximumRecordingDuration | `Duration` | The maximum duration of the video recording process. | `const Duration(seconds: 15)` | |
| 54 | +| theme | `ThemeData` | Theme data for the picker. | `CameraPicker.themeData(C.themeColor)` | |
| 55 | +| textDelegate | `CameraPickerTextDelegate` | Text delegate that controls text in widgets. | `DefaultCameraPickerTextDelegate` | |
| 56 | + |
| 57 | +### Simple usage |
| 58 | + |
| 59 | +```dart |
| 60 | +final AssetEntity entity = await CameraPicker.pickFromCamera(context); |
| 61 | +``` |
| 62 | + |
| 63 | +After called and the picker displayed, plus `isAllowRecording` is `true`, tap the shooting button to take a picture, long press the shooting button to record a video. |
0 commit comments