From 44300dbe237e913cc392d776881c44c9ce08f497 Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 11 Jan 2024 10:14:48 -0700 Subject: [PATCH] WonderDetails: Switch wonderButton from pop() to /home, helps to clear the queryParams when going back. --- lib/ui/screens/editorial/editorial_screen.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/screens/editorial/editorial_screen.dart b/lib/ui/screens/editorial/editorial_screen.dart index 6c746da1..9a9e5956 100644 --- a/lib/ui/screens/editorial/editorial_screen.dart +++ b/lib/ui/screens/editorial/editorial_screen.dart @@ -63,6 +63,8 @@ class _WonderEditorialScreenState extends State { _scrollPos.value = _scroller.position.pixels; } + void _handleBackPressed() => context.go(ScreenPaths.home); + @override Widget build(BuildContext context) { return LayoutBuilder(builder: (_, constraints) { @@ -181,7 +183,7 @@ class _WonderEditorialScreenState extends State { alignment: backBtnAlign, child: Padding( padding: EdgeInsets.all($styles.insets.sm), - child: BackBtn(icon: AppIcons.north), + child: BackBtn(icon: AppIcons.north, onPressed: _handleBackPressed), ), ), )