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. -->
44
55# Changelog
66
7+ ## 3.5.0+1
8+
9+ ### Fixes
10+
11+ - Fix the too early ` widget ` access in ` CameraPickerState ` . (#124 )
12+
713## 3.5.0
814
915### New features
Original file line number Diff line number Diff line change 11name : wechat_camera_picker_demo
22description : A new Flutter project.
3- version : 3.5.0+14
3+ version : 3.5.0+15
44publish_to : none
55
66environment :
Original file line number Diff line number Diff line change @@ -31,11 +31,6 @@ const Duration _kDuration = Duration(milliseconds: 300);
3131
3232class CameraPickerState extends State <CameraPicker >
3333 with WidgetsBindingObserver {
34- CameraPickerState ({Locale ? locale}) {
35- Constants .textDelegate = widget.pickerConfig.textDelegate ??
36- cameraPickerTextDelegateFromLocale (locale);
37- }
38-
3934 /// The [Duration] for record detection. (200ms)
4035 /// 检测是否开始录制的时长 (200毫秒)
4136 final Duration recordDetectDuration = const Duration (milliseconds: 200 );
@@ -164,6 +159,8 @@ class CameraPickerState extends State<CameraPicker>
164159 void initState () {
165160 super .initState ();
166161 ambiguate (WidgetsBinding .instance)? .addObserver (this );
162+ Constants .textDelegate = widget.pickerConfig.textDelegate ??
163+ cameraPickerTextDelegateFromLocale (widget.locale);
167164
168165 // TODO(Alex): Currently hide status bar will cause the viewport shaking on Android.
169166 /// 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 {
111111 @override
112112 CameraPickerState createState () =>
113113 // ignore: no_logic_in_create_state
114- createPickerState? .call () ?? CameraPickerState (locale : locale );
114+ createPickerState? .call () ?? CameraPickerState ();
115115}
Original file line number Diff line number Diff line change 11name : wechat_camera_picker
22description : 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
44homepage : https://github.com/fluttercandies/flutter_wechat_camera_picker
55
66environment :
You can’t perform that action at this time.
0 commit comments