File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Expand file tree Collapse file tree 4 files changed +19
-4
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.3.1
8
+
9
+ ### Improvements
10
+
11
+ - Prevent unnecessary zoom updates. (#107 )
12
+
7
13
## 3.3.0
8
14
9
15
### Breaking Changes
Original file line number Diff line number Diff line change 1
1
name : wechat_camera_picker_demo
2
2
description : A new Flutter project.
3
- version : 3.3.0+11
3
+ version : 3.3.1+12
4
4
publish_to : none
5
5
6
6
environment :
Original file line number Diff line number Diff line change @@ -492,6 +492,12 @@ class CameraPickerState extends State<CameraPicker>
492
492
}
493
493
494
494
Future <void > zoom (double scale) async {
495
+ if (_maxAvailableZoom == _minAvailableZoom) {
496
+ return ;
497
+ }
498
+ if (_recordDetectTimer? .isActive ?? false ) {
499
+ return ;
500
+ }
495
501
final double zoom = (_baseZoom * scale).clamp (
496
502
_minAvailableZoom,
497
503
_maxAvailableZoom,
@@ -500,8 +506,11 @@ class CameraPickerState extends State<CameraPicker>
500
506
return ;
501
507
}
502
508
_currentZoom = zoom;
503
-
504
- await controller.setZoomLevel (_currentZoom);
509
+ try {
510
+ await controller.setZoomLevel (_currentZoom);
511
+ } catch (e, s) {
512
+ handleErrorWithHandler (e, config.onError, s: s);
513
+ }
505
514
}
506
515
507
516
/// Handle when the scale gesture start.
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.3.0
3
+ version : 3.3.1
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