Skip to content

Commit f7b996c

Browse files
committed
Navigation Query Parameter #2
- Navigate home correctly.
1 parent c346f9a commit f7b996c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/components/blog.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,10 @@ class MinimalMenuBar extends StatelessWidget {
348348
hoverColor: Colors.transparent,
349349
highlightColor: Colors.transparent,
350350
splashColor: Colors.transparent,
351-
onTap: () => Navigator.popUntil(
352-
context, ModalRoute.withName(Navigator.defaultRouteName)),
351+
onTap: () => Navigator.pushNamedAndRemoveUntil(
352+
context,
353+
Navigator.defaultRouteName,
354+
ModalRoute.withName(Navigator.defaultRouteName)),
353355
child: Text("MINIMAL",
354356
style: GoogleFonts.montserrat(
355357
color: textPrimary,
@@ -373,7 +375,9 @@ class MinimalMenuBar extends StatelessWidget {
373375
child: Wrap(
374376
children: [
375377
TextButton(
376-
onPressed: () => Navigator.popUntil(context,
378+
onPressed: () => Navigator.pushNamedAndRemoveUntil(
379+
context,
380+
Navigator.defaultRouteName,
377381
ModalRoute.withName(Navigator.defaultRouteName)),
378382
style: menuButtonStyle,
379383
child: const Text(

0 commit comments

Comments
 (0)