# Flutter - Wyatt Go Router
GoRouter Enhancements for Flutter This package provides a set of utilities to help you use the [GoRouter](https://pub.dev/packages/go_router) package. ## Features * PageProtection extension to add a protection to a page * currentRoute method to get the current route anywhere in the app * GoRouterRefreshStream to refresh the router when needed * RouteBase flattenization to get a list of all the routes in the router ## Usage If you want to protect a page, you can use the PageProtection extension: ```dart GoRoute( path: '/sign_in', ... )..setPublic(), ``` If you want to get the current route, you can use the currentRoute method: ```dart final route = GoRouter.of(context).currentRoute; // or final route = context.currentRoute; ``` If you want to refresh the router, you can use the GoRouterRefreshStream: ```dart GoRouterRefreshStream( context.read