This example is for Flutter book.
This project is a comprehensive exploration of navigation techniques in Flutter applications. It demonstrates various navigation strategies, including custom navigation, named routes, and the use of the go_router
package for more advanced routing scenarios. The project aims to provide developers with a robust understanding of how to manage navigation in Flutter apps effectively.
The project is divided into different navigation strategies:
-
Custom Navigator: Demonstrates a custom navigation setup using the
Navigator
widget.- Code Reference:
lib/custom_navigator/main.dart
- Code Reference:
-
Named Routes: Utilizes named routes for navigation, allowing for parameter passing and route management.
- Code Reference:
lib/navigator/main.dart
- Code Reference:
-
Go Router: Implements the
go_router
package for declarative routing, including nested routes and redirection.- Code Reference:
lib/go_router/main.dart
- Code Reference:
lib/go_router/app_router.dart
- Code Reference:
lib/go_router/router_refresh_stream.dart
- Code Reference:
- Custom Navigation: Learn how to implement custom navigation logic with animated transitions.
- Named Routes: Understand how to use named routes for cleaner and more manageable navigation.
- Go Router: Explore advanced routing capabilities with the
go_router
package, including route guards and state management.
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, please reach out:
- Email: [email protected]
- Twitter: @yiichenhi