Skip to content

Commit

Permalink
Return only when pop.
Browse files Browse the repository at this point in the history
  • Loading branch information
yujunetee committed Sep 9, 2024
1 parent a175e0f commit cb6440a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/src/states/camera_picker_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -927,12 +927,10 @@ class CameraPickerState extends State<CameraPicker>
);
if (entity != null) {
if (pickerConfig.onPickConfirmed case final onPickConfirmed?) {
await controller.resumePreview();
onPickConfirmed(entity);
} else {
Navigator.of(context).pop(entity);
return Navigator.of(context).pop(entity);
}
return;
}
wrapControllerMethod<void>(
'setFocusMode',
Expand Down

0 comments on commit cb6440a

Please sign in to comment.