Despite it looks intimidating at first glance, the evolved Flutter navigation system could solve more issues than it seems to create

During the second half of 2020, the Flutter team introduced a revamped navigation and routing system called  Navigator 2.0. The reception by the developer community has not been great so far:  principal criticisms regard the API complexity and the absence of an extra abstraction layer for common scenarios.

Image for post

The great article written by John Ryan deeply analyzes the complexity and the completeness of Navigator 2.0

Besides, the naming has been terrible: Navigator 2.0 sounds like a technology the trumps the predecessor — Navigator 1.0 — while that’s simply not true. You can still use Navigator.push as long as you want. This doesn’t mean that you wouldn’t lose many advantages given by the new API, such as:

  • a more Flutterish-reactive declarative style;
  • better support for screen replacing;
  • better support for multiple pushes and pops;
  • full support to incoming URLs (e.g.: Flutter Web and/or app deep linking);
  • full support to browser history while using Flutter Web.

A pragmatic approach

I don’t want to spend too much time on  technicalities but I’d like to dive directly into a convenient solution. For study purposes, I want to create an app with bottom tabs and a potentially infinite series of pages.

Image for post

#flutter-app-development #flutter #navigation

Flutter: An Easy and Pragmatic Approach to Navigator 2.0
2.95 GEEK