route_definer library

A flexible routing system for Flutter with support for guards, dynamic paths, and authorization.

This library provides RouteDefiner, RouteGuard, and AppRouter to build modular and testable navigation flows.

Classes

AppRouter
A central router class that manages app navigation, route matching, authorization checks, redirects, and unknown route handling.
CurrentRoute
Contextual information about a navigation action, passed to guards and loaders to make decisions about the current route.
GlobalRouteDefiner
Defines global route-related settings and behaviors for the app router.
RouteDefiner
Defines a single route in the app with its path, widget builder, authorization requirement, and optional guards.
RouteGuard
Interface for defining route guards that control access or redirect based on the current route state.
RouteLoaderWidget
Widget that handles route guards and optional authentication before displaying the final page to the user.
RouteOptions
Configuration options for customizing MaterialPageRoute behavior.
RouteState
Represents the current state of a route during navigation, including path, parameters, query strings, fragment, and arguments.
TitleObserver
A NavigatorObserver that updates the browser title whenever navigation occurs, using either a custom title generator or a default implementation.

Functions

updateBrowserTitle(String title) → void
Stub implementation for platforms that do not support updating the browser title.