Knowledgebase

Flutter Navigation and Routing Print

  • mobiledevelopment, mobile, restore, guide, howto, solution, zillionkinghost, hosting
  • 0

Moving between screens.

WHAT THE BASIC MECHANISM IS

A stack of routes, pushed and popped.

WHAT THAT SUITS

Simple applications with straightforward flows.

WHAT DECLARATIVE ROUTING PROVIDES

Navigation state described as data, rather than imperative pushes.

WHY THAT MATTERS

Deep linking, browser addresses on web, and state restoration all become possible.

WHAT TO DEFINE

Named routes with parameters What each route requires What happens for unknown routes

WHAT TO HANDLE

The system back gesture and button Entering a deep route directly Returning after termination

WHAT TO BE CAREFUL WITH

Passing large objects between routes Losing state on navigation Nested navigators, which complicate back behaviour

WHAT TO PASS BETWEEN ROUTES

Identifiers, and load the data at the destination.

WHY

It makes deep linking work, since a link carries only identifiers.

WHAT TO TEST

Every screen entered directly Back from every screen Rapid navigation

WHAT TO PROVIDE

A sensible destination for unknown routes.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot