Skip to content

johnwcassidy/flutter_navigation_2_0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building A Stack Navigator with Navigation 2.0

This project demonstrates a simple stack navigator using Navigation 2.0.

A more detailed explanation can be found here

The key concepts that this project demonstrates:

  • The RouterDelegate implementation is responsible for building the Navigation Widget with the appropriates pages in the stack. Therefore, it is responsible to maintain the state of what is currently in the stack.
  • A Data Structure, PathStack, is a great way to preserve state while notifying the MaterialApp.router of changes to build.
  • Providing pages of the Navigator with an interface to interact with the Stack is nicely one by using a Provider. I present a delegate pattern here that allows you to nicely receive all events within the RouterDelegate implementation.

Getting Started

This project is a starting point for a Flutter application.

flutter run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published