From 704845068f300f18711d29fcd971f272121a022c Mon Sep 17 00:00:00 2001 From: hsd2747 <47204887+hsd2747@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:49:39 +0900 Subject: [PATCH 1/4] Update tutorial_view.dart --- lib/src/tutorial_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/tutorial_view.dart b/lib/src/tutorial_view.dart index 0eb3040..d7a736e 100644 --- a/lib/src/tutorial_view.dart +++ b/lib/src/tutorial_view.dart @@ -62,7 +62,7 @@ class _TutorialViewState extends State { behavior: HitTestBehavior.opaque, onTap: () { controller.dismiss(); - setState(() {}); + if (mounted) setState(() {}); }, child: PopScope( canPop: false, From c6fe1af5d321b9a8cfe6be23c701a8a6916582cc Mon Sep 17 00:00:00 2001 From: hsd2747 <47204887+hsd2747@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:52:29 +0900 Subject: [PATCH 2/4] Update tutorial_view.dart --- lib/src/tutorial_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/tutorial_view.dart b/lib/src/tutorial_view.dart index d7a736e..ab16924 100644 --- a/lib/src/tutorial_view.dart +++ b/lib/src/tutorial_view.dart @@ -47,7 +47,7 @@ class _TutorialViewState extends State { @override Widget build(BuildContext context) { - if (messages.isEmpty) { + if (messages.isEmpty && mounted) { Navigator.pop(context); return const SizedBox.shrink(); } From 416fede76dd573609fc7af831049285ece2c420a Mon Sep 17 00:00:00 2001 From: hsd2747 <47204887+hsd2747@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:28:18 +0900 Subject: [PATCH 3/4] Update tutorial_view.dart --- lib/src/tutorial_view.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/tutorial_view.dart b/lib/src/tutorial_view.dart index ab16924..a2ea7a3 100644 --- a/lib/src/tutorial_view.dart +++ b/lib/src/tutorial_view.dart @@ -47,8 +47,10 @@ class _TutorialViewState extends State { @override Widget build(BuildContext context) { - if (messages.isEmpty && mounted) { - Navigator.pop(context); + if (messages.isEmpty) { + WidgetsBinding.instance.addPostFrameCallback((_) { + if (mounted) Navigator.pop(context); + }); return const SizedBox.shrink(); } From 930c3ea0b51f1d1c766f4e614bbd1acadd03fdfa Mon Sep 17 00:00:00 2001 From: hanbit <67232509+wolru@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:58:20 +0900 Subject: [PATCH 4/4] =?UTF-8?q?EGG-2207=20pop=20=EC=A0=84=EC=97=90=20contr?= =?UTF-8?q?oller=20dispose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/tutorial_view.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/tutorial_view.dart b/lib/src/tutorial_view.dart index a2ea7a3..cea3006 100644 --- a/lib/src/tutorial_view.dart +++ b/lib/src/tutorial_view.dart @@ -48,9 +48,8 @@ class _TutorialViewState extends State { @override Widget build(BuildContext context) { if (messages.isEmpty) { - WidgetsBinding.instance.addPostFrameCallback((_) { - if (mounted) Navigator.pop(context); - }); + controller.dispose(); + Navigator.pop(context); return const SizedBox.shrink(); }