File tree Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Expand file tree Collapse file tree 5 files changed +11
-8
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+1
8
+
9
+ ### Fixes
10
+
11
+ - Fix the too early ` widget ` access in ` CameraPickerState ` . (#124 )
12
+
7
13
## 3.5.0
8
14
9
15
### New features
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.5.0+14
3
+ version : 3.5.0+15
4
4
publish_to : none
5
5
6
6
environment :
Original file line number Diff line number Diff line change @@ -31,11 +31,6 @@ const Duration _kDuration = Duration(milliseconds: 300);
31
31
32
32
class CameraPickerState extends State <CameraPicker >
33
33
with WidgetsBindingObserver {
34
- CameraPickerState ({Locale ? locale}) {
35
- Constants .textDelegate = widget.pickerConfig.textDelegate ??
36
- cameraPickerTextDelegateFromLocale (locale);
37
- }
38
-
39
34
/// The [Duration] for record detection. (200ms)
40
35
/// 检测是否开始录制的时长 (200毫秒)
41
36
final Duration recordDetectDuration = const Duration (milliseconds: 200 );
@@ -164,6 +159,8 @@ class CameraPickerState extends State<CameraPicker>
164
159
void initState () {
165
160
super .initState ();
166
161
ambiguate (WidgetsBinding .instance)? .addObserver (this );
162
+ Constants .textDelegate = widget.pickerConfig.textDelegate ??
163
+ cameraPickerTextDelegateFromLocale (widget.locale);
167
164
168
165
// TODO(Alex): Currently hide status bar will cause the viewport shaking on Android.
169
166
/// Hide system status bar automatically when the platform is not Android.
Original file line number Diff line number Diff line change @@ -111,5 +111,5 @@ class CameraPicker extends StatefulWidget {
111
111
@override
112
112
CameraPickerState createState () =>
113
113
// ignore: no_logic_in_create_state
114
- createPickerState? .call () ?? CameraPickerState (locale : locale );
114
+ createPickerState? .call () ?? CameraPickerState ();
115
115
}
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
3
+ version : 3.5.0+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