Saad Bash
PostsTagsGuestbookAbout
Published on
Thursday, November 10, 2022

How to remove all routes from the Navigator in Flutter

Authors
  • avatar
    Name
    Saad Bash

Helpful for designing functionality of a Logout button

Navigator.of(context).pushNamedAndRemoveUntil(
    '/desiredNamedRoute',
    (Route<dynamic> route) => false,
  );
View on GitHub

Tags

Flutter

Previous Article

How to add border to a container in Flutter

Next Article

How to get complete path to a file in terminal
← Back to posts
mailMailgithubGitHublinkedinLinkedin
Saad Bash
•
© 2025
•
Saad Bash | Dev Notes & Snippets