GoRouter là routing package được Flutter chính thức khuyến nghị.
- Cung cấp URL-based declarative routing với path/query parameter.
- Tự động xử lý deep linking, hỗ trợ nested navigation với
ShellRoute, thêm redirect logic cho auth guard, và cho phép type-safe route với code generation. - Thay vì quản lý Navigator stack thủ công, bạn khai báo tất cả route trước và để GoRouter xử lý navigation.
GoRouter is the officially recommended routing package for Flutter.
It provides URL-based declarative routes with path/query parameters, handles deep linking automatically, supports nested navigation with ShellRoute, and adds redirect logic for auth guards.