This repository demonstrates the use of GoRouter in Flutter for advanced routing scenarios. Each branch in this repository covers a specific aspect of routing, making it easier for developers to understand and implement similar functionalities in their own applications.
Each link below leads directly to a branch showcasing a specific routing concept implemented with GoRouter in Flutter:
- main - The main branch contains the initial setup and configuration for using GoRouter in a Flutter application.
- starter-code - Starter code with basic setup before adding specific routing features.
- declarative-routing - Demonstrates how to implement declarative routing using GoRouter.
- error_handling - Shows how to handle errors and undefined routes gracefully using GoRouter.
- nested_routes - Covers the implementation of nested routes within a Flutter application.
- query_parameters - Focuses on handling query parameters in routes to filter or pass data.
- redirection_and_guards - Demonstrates the use of redirection and guards to manage access to certain parts of the app based on conditions like user authentication.
- type_safety_and_parameters - Showcases type safety and parameter handling in routes to ensure the correct type and existence of required data.
- custom_transition - Demonstrates how to implement custom transitions between routes using GoRouter.
To get started with this project, clone the repository and check out the branch that corresponds to the feature you are interested in:
git clone https://github.com/khkred/flutter_comp_go_router.git
cd flutter_comp_go_router
git checkout [branch-name]```