Skip to content

Commit

Permalink
Navigation Query Parameter Codelessly#2
Browse files Browse the repository at this point in the history
- Navigate home correctly.
  • Loading branch information
rayliverified committed Aug 25, 2024
1 parent c346f9a commit f7b996c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/components/blog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,10 @@ class MinimalMenuBar extends StatelessWidget {
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
onTap: () => Navigator.popUntil(
context, ModalRoute.withName(Navigator.defaultRouteName)),
onTap: () => Navigator.pushNamedAndRemoveUntil(
context,
Navigator.defaultRouteName,
ModalRoute.withName(Navigator.defaultRouteName)),
child: Text("MINIMAL",
style: GoogleFonts.montserrat(
color: textPrimary,
Expand All @@ -373,7 +375,9 @@ class MinimalMenuBar extends StatelessWidget {
child: Wrap(
children: [
TextButton(
onPressed: () => Navigator.popUntil(context,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context,
Navigator.defaultRouteName,
ModalRoute.withName(Navigator.defaultRouteName)),
style: menuButtonStyle,
child: const Text(
Expand Down

0 comments on commit f7b996c

Please sign in to comment.