Skip to content

Commit c507fac

Browse files
committed
🔖 ## 2.1.0
1 parent bee2d83 commit c507fac

File tree

4 files changed

+38
-7
lines changed

4 files changed

+38
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 2.1.0
8+
9+
- Add `shouldLockPortrait` to fit orientation for the device.
10+
- Fix exposure offset issue when reset the exposure point after adjust the exposure offset manually.
11+
712
## 2.0.0
813

914
### New Features

README-ZH.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ Language: [English](README.md) | 中文简体
1515

1616
## 目录 🗂
1717

18-
* [特性](#特性-)
19-
* [截图](#截图-)
20-
* [准备工作](#准备工作-)
21-
* [使用方法](#使用方法-)
18+
- [Flutter WeChat Camera Picker](#flutter-wechat-camera-picker)
19+
- [目录 🗂](#目录-)
20+
- [特性 ✨](#特性-)
21+
- [截图 📸](#截图-)
22+
- [准备工作 🍭](#准备工作-)
23+
- [使用方法 📖](#使用方法-)
24+
- [简单的使用方法](#简单的使用方法)
25+
- [常见问题 💭](#常见问题-)
26+
- [`shouldLockPortrait` 为 false 时为何有缩放问题?](#当-shouldLockPortrait-为-false-时为何有缩放问题-)
27+
2228

2329
## 特性 ✨
2430

@@ -62,7 +68,7 @@ Flutter SDK:`>=2.0.0` 。
6268
| enablePullToZoomInRecord | `bool` | 用户是否可以在录制视频时上拉缩放 | `true` |
6369
| shouldDeletePreviewFile | `bool` | 返回页面时是否删除预览文件 | `false` |
6470
| maximumRecordingDuration | `Duration` | 录制视频最长时长 | `const Duration(seconds: 15)` |
65-
| theme | `ThemeData` | 选择器的主题 | `CameraPicker.themeData(C.themeColor)` |
71+
| theme | `ThemeData?` | 选择器的主题 | `CameraPicker.themeData(C.themeColor)` |
6672
| textDelegate | `CameraPickerTextDelegate?` | 控制部件中的文字实现 | `DefaultCameraPickerTextDelegate` |
6773
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.max` |
6874
| cameraQuarterTurns | `int` | 摄像机视图顺时针旋转次数,每次90度 | `0` |
@@ -74,3 +80,11 @@ Flutter SDK:`>=2.0.0` 。
7480
```dart
7581
final AssetEntity? entity = await CameraPicker.pickFromCamera(context);
7682
```
83+
84+
## 常见问题 💭
85+
86+
### `shouldLockPortrait` 为 false 时为何有缩放问题?
87+
88+
当前旋转同步尚未支持。
89+
当用户在旋转设备时,来自 `CameraValue``DeviceOrientation` 与 Flutter 的不同。
90+
在两者匹配时,缩放问题会消失。

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ This project follows the [all-contributors](https://github.com/all-contributors/
4444
- [Preparing for use 🍭](#preparing-for-use-)
4545
- [Usage 📖](#usage-)
4646
- [Simple usage](#simple-usage)
47+
- [Frequent asked question 💭](#frequent-asked-question-)
48+
- [Why there are over-scaled issue when `shouldLockPortrait` set to false ?](#why-there-are-over-scales-issue-when-shouldLockPortrait-set-to-false-)
4749

4850
## Features ✨
4951

@@ -86,8 +88,9 @@ Flutter SDK: `>=2.0.0` .
8688
| enablePinchToZoom | `bool` | Whether users can zoom the camera by pinch. | `true` |
8789
| enablePullToZoomInRecord | `bool` | Whether users can zoom by pulling up when recording video. | `true` |
8890
| shouldDeletePreviewFile | `bool` | Whether the preview file will be delete when pop. | `false` |
91+
| shouldLockPortrait | `bool` | Whether the orientation should be set to portrait | `true` |
8992
| maximumRecordingDuration | `Duration` | The maximum duration of the video recording process. | `const Duration(seconds: 15)` |
90-
| theme | `ThemeData` | Theme data for the picker. | `CameraPicker.themeData(C.themeColor)` |
93+
| theme | `ThemeData?` | Theme data for the picker. | `CameraPicker.themeData(C.themeColor)` |
9194
| textDelegate | `CameraPickerTextDelegate?` | Text delegate that controls text in widgets. | `DefaultCameraPickerTextDelegate` |
9295
| resolutionPreset | `ResolutionPreset` | Present resolution for the camera. | `ResolutionPreset.max` |
9396
| cameraQuarterTurns | `int` | The number of clockwise quarter turns the camera view should be rotated. | `0` |
@@ -99,3 +102,12 @@ Flutter SDK: `>=2.0.0` .
99102
```dart
100103
final AssetEntity? entity = await CameraPicker.pickFromCamera(context);
101104
```
105+
106+
## Frequent asked question 💭
107+
108+
### Why there are over-scaled issue when `shouldLockPortrait` set to false?
109+
110+
Currently the rotate synchronization is not supported.
111+
The `DeviceOrientation` from the `CameraValue` is different from the one
112+
comes from flutter when the user is rotating devices.
113+
The preview widget is synchronized when both orientation is the same.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: wechat_camera_picker
22
description: A camera picker which is an extension to wechat_assets_picker, but can be run separately.
3-
version: 2.0.0
3+
version: 2.1.0
44
homepage: https://github.com/fluttercandies/flutter_wechat_camera_picker
55

66
environment:

0 commit comments

Comments
 (0)