File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ See the [Migration Guide](guides/migration_guide.md) for breaking changes betwee
29
29
### Fixes
30
30
31
31
- Fix preview file delete predication.
32
+ - Avoid potential null operations when saving the entity.
32
33
33
34
## 4.3.3
34
35
Original file line number Diff line number Diff line change @@ -966,15 +966,19 @@ class CameraPickerState extends State<CameraPicker>
966
966
}
967
967
wrapControllerMethod <void >(
968
968
'setFocusMode' ,
969
- () => controller.setFocusMode (FocusMode .auto),
969
+ () async {
970
+ await innerController? .setFocusMode (FocusMode .auto);
971
+ },
970
972
);
971
973
if (previousExposureMode != ExposureMode .locked) {
972
974
wrapControllerMethod <void >(
973
975
'setExposureMode' ,
974
- () => controller.setExposureMode (previousExposureMode),
976
+ () async {
977
+ await innerController? .setExposureMode (previousExposureMode);
978
+ },
975
979
);
976
980
}
977
- await controller .resumePreview ();
981
+ await innerController ? .resumePreview ();
978
982
} catch (e, s) {
979
983
handleErrorWithHandler (e, s, pickerConfig.onError);
980
984
} finally {
@@ -1092,13 +1096,13 @@ class CameraPickerState extends State<CameraPicker>
1092
1096
);
1093
1097
if (entity != null ) {
1094
1098
if (pickerConfig.onPickConfirmed case final onPickConfirmed? ) {
1095
- await controller .resumePreview ();
1099
+ await innerController ? .resumePreview ();
1096
1100
onPickConfirmed (entity);
1097
1101
} else {
1098
1102
Navigator .of (context).pop (entity);
1099
1103
}
1100
1104
} else {
1101
- await controller .resumePreview ();
1105
+ await innerController ? .resumePreview ();
1102
1106
}
1103
1107
} catch (e, s) {
1104
1108
recordCountdownTimer? .cancel ();
You can’t perform that action at this time.
0 commit comments