Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 1014 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 1014 Bytes

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