File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ that can be found in the LICENSE file. -->
4
4
5
5
# Changelog
6
6
7
+ ## 3.5.0-dev.3
8
+
9
+ ### Improvements
10
+
11
+ - Prevent switching cameras when taking picture or recording video. (#120 )
12
+
7
13
## 3.5.0-dev.2
8
14
9
15
### Improvements
Original file line number Diff line number Diff line change @@ -349,6 +349,10 @@ class CameraPickerState extends State<CameraPicker>
349
349
/// of cameras, start from the beginning.
350
350
/// 按顺序切换相机。当达到相机数量时从头开始。
351
351
void switchCameras () {
352
+ // Skip switching when taking picture or recording video.
353
+ if (controller.value.isTakingPicture || controller.value.isRecordingVideo) {
354
+ return ;
355
+ }
352
356
++ currentCameraIndex;
353
357
if (currentCameraIndex == cameras.length) {
354
358
currentCameraIndex = 0 ;
Original file line number Diff line number Diff line change 1
1
name : wechat_camera_picker
2
2
description : A camera picker which is an extension to wechat_assets_picker, but can be run separately.
3
- version : 3.5.0-dev.2
3
+ version : 3.5.0-dev.3
4
4
homepage : https://github.com/fluttercandies/flutter_wechat_camera_picker
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments