Skip to content

Commit 1f7cffe

Browse files
committed
recoding app: fix bug out app
1 parent a5d1991 commit 1f7cffe

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

lib/home_page.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,19 @@ class CameraPageState extends State<CameraPage> with WidgetsBindingObserver {
2020

2121
@override
2222
void initState() {
23-
print("chung initState");
2423
checkUserConnection();
2524
super.initState();
2625
WidgetsBinding.instance.addObserver(this);
2726
}
2827

2928
@override
3029
void dispose() {
31-
print("chung dispose");
3230
super.dispose();
3331
WidgetsBinding.instance.removeObserver(this);
3432
}
3533

3634
@override
3735
void didChangeAppLifecycleState(AppLifecycleState state) {
38-
print(" chung didChangeAppLifecycleState");
3936
super.didChangeAppLifecycleState(state);
4037
if (state == AppLifecycleState.inactive || state == AppLifecycleState.detached) {
4138
return;

lib/section/custom_camera.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class _CustomCameraState extends State<CustomCamera> with WidgetsBindingObserver
9898
return Container();
9999
}
100100
return PopScope(
101-
canPop: false,
101+
canPop: true,
102102
onPopInvoked: (didPop) {
103103
SystemNavigator.pop();
104104
},
@@ -113,7 +113,7 @@ class _CustomCameraState extends State<CustomCamera> with WidgetsBindingObserver
113113

114114
void captureImage() {
115115
controller!.takePicture().then((value) {
116-
Navigator.pop(context);
116+
// Navigator.pop(context);
117117
widget.onImageCaptured!(value);
118118
});
119119
}
@@ -453,7 +453,7 @@ class _CustomCameraState extends State<CustomCamera> with WidgetsBindingObserver
453453
} else {
454454
///Stop video recording
455455
controller!.stopVideoRecording().then((value) {
456-
Navigator.pop(context);
456+
// Navigator.pop(context);
457457
widget.onVideoRecorded!(value);
458458
});
459459
_isRecording = false;

lib/section/image_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class _ImagePageState extends State<ImagePage> {
3636
return PopScope(
3737
canPop: false,
3838
onPopInvoked: (didPop) {
39-
print("chung PopScope");
4039
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const SplashScreen()));
4140
},
4241
child: Scaffold(

0 commit comments

Comments
 (0)