Skip to content

Commit 51dd012

Browse files
authored
✨ Add torch flashlight support (#137)
1 parent 52bbcf4 commit 51dd012

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ that can be found in the LICENSE file. -->
44

55
# Changelog
66

7+
## 3.6.1
8+
9+
### New features
10+
11+
- Add torch flashlight support. (#137)
12+
713
## 3.6.0
814

915
### New features

example/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_demo
22
description: A new Flutter project.
3-
version: 3.6.0+16
3+
version: 3.6.1+17
44
publish_to: none
55

66
environment:

lib/src/states/camera_picker_state.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ class CameraPickerState extends State<CameraPicker>
379379
newFlashMode = FlashMode.always;
380380
break;
381381
case FlashMode.always:
382+
newFlashMode = FlashMode.torch;
383+
break;
382384
case FlashMode.torch:
383385
newFlashMode = FlashMode.off;
384386
break;
@@ -851,9 +853,11 @@ class CameraPickerState extends State<CameraPicker>
851853
icon = Icons.flash_auto;
852854
break;
853855
case FlashMode.always:
854-
case FlashMode.torch:
855856
icon = Icons.flash_on;
856857
break;
858+
case FlashMode.torch:
859+
icon = Icons.flashlight_on;
860+
break;
857861
}
858862
return IconButton(
859863
onPressed: switchFlashesMode,

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: 3.6.0
3+
version: 3.6.1
44
homepage: https://github.com/fluttercandies/flutter_wechat_camera_picker
55

66
environment:

0 commit comments

Comments
 (0)