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

View File

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