refactor: Fix the navigation after user navigate back to the level list

This commit is contained in:
Naresh Pratista 2024-11-06 14:02:19 +07:00
parent a1c271408a
commit 4f4893375c
2 changed files with 9 additions and 9 deletions

View File

@ -203,7 +203,7 @@ class _FeedbackScreenState extends State<FeedbackScreen> {
backgroundColor: Colors.transparent,
borderColor: AppColors.blueColor,
onPressed: () {
Navigator.pushReplacement(
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) => LevelListScreen(
@ -211,7 +211,7 @@ class _FeedbackScreenState extends State<FeedbackScreen> {
topicTitle: widget.topicTitle,
),
),
);
(Route<dynamic> route) => route.isFirst);
},
)
],

View File

@ -150,7 +150,7 @@ class _TopicsListScreenState extends State<TopicsListScreen> {
description: topic.description,
isCompleted: topic.isCompleted,
onTap: () {
Navigator.pushReplacement(
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LevelListScreen(