router library

Redus Router - Web-framework-style reactive routing for Flutter.

Import this for just the router functionality:

import 'package:redus_flutter/router.dart';

Or import everything via:

import 'package:redus_flutter/redus_flutter.dart';

Classes

GuardAllow
Allow navigation to proceed.
GuardBlock
Block navigation silently.
GuardRedirect
Redirect to a different path.
GuardResult
Result of a guard check.
RedusRouter
Router interface for navigation.
RedusRouterConfig
Router configuration for use with MaterialApp.router.
RouteConfig
Configuration for a single route.
RouteGuard
Abstract base class for route guards.
RouteLocation
Represents the current route location with all parsed URL components.
RouteMatch
Result of matching a route against a path.
RouteMatcher
Matches paths against route configurations.
RouterOutlet
Widget that renders child routes for nested routing.
RouterOutletProvider
Provides child route config to RouterOutlet descendants.
RouteTransition
Defines the transition animation for a route.

Enums

SlideDirection
Direction for slide transitions.

Functions

useRoute() RouteLocation
Get the current route location.
useRouter() RedusRouter
Get the router for navigation.

Typedefs

InitialRouteRedirect = String Function(String initialRoute)
Signature for redirect function based on initial route.
NotFoundBuilder = Widget Function(RouteLocation location)
Signature for the not found page builder.
RouteLayoutBuilder = Widget Function(BuildContext context, Widget child)
Signature for the route layout builder function.
SimpleGuard = Future<String?> Function(RouteLocation to, RouteLocation from)
Simple navigation guard function.