flow_routing 1.0.1 copy "flow_routing: ^1.0.1" to clipboard
flow_routing: ^1.0.1 copied to clipboard

The next-generation Flutter router. Typed routes, pipeline guards, first-class web support, and performance built from first principles.

Flow Routing #

The next-generation Flutter router — typed, fast, and built from first principles.

Published on pub.dev as flow_routing.

version flutter

context.go(HomeRoute());
context.push(UserRoute(id: 42, tab: UserTab.profile));
context.pop();

UserRoute(id: 5).location; // → "/users/5?tab=profile"

Why Flow? #

Feature Flow GoRouter AutoRoute
Typed routes ✅ First-class ⚠️ Codegen ✅ Codegen required
No code generation
Separated nav stacks ⚠️
Pipeline guards ⚠️
Web-first URLs ⚠️
Optional middleware

Features #

  • Typed routesUserRoute(id: 42) not '/users/42'
  • Reverse routing — URLs generated automatically via .location
  • Pipeline guards — composable auth, roles, async validation
  • Middleware — logging, analytics, localization hooks
  • Separated stacks — declarative go vs imperative push overlays
  • Web support — clean URLs, browser history, refresh-safe parsing
  • Transitions — material, fade, slide, none
  • Shell routes — nested navigation and tab branches
  • TestingFakeFlowRouter, engine unit tests, widget tests
  • Migration — helpers for GoRouter, Navigator, AutoRoute, Beamer

Quick Start #

dependencies:
  flow_routing: ^1.0.0
import 'package:flow_routing/flow_routing.dart';

final router = FlowRouter(
  routes: [
    FlowLeafNode(FlowRouteDefinition<HomeRoute>(
      name: 'home',
      pathTemplate: '/',
      builder: (context, route) => const HomePage(),
      factory: (_) => const HomeRoute(),
    )),
  ],
);

void main() => runApp(FlowApp.router(router: router));

See Getting Started for the full guide.

Example App #

A polished demo showcasing typed navigation, guards, middleware, and web URLs:

cd example
flutter run -d chrome   # Web
flutter run             # Mobile

Documentation #

Guide Description
Getting Started Install and first routes
API Reference Complete public API
Architecture System design
Cookbook Recipes and patterns
Migration From GoRouter, AutoRoute, etc.
GoRouter Issues How Flow addresses 287+ issues

Project Structure #

flow/
├── lib/           # Package source
├── example/       # Demo application
├── docs/          # Documentation
├── test/          # Unit & widget tests
└── benchmark/     # Performance benchmarks

License #

MIT — see LICENSE.

3
likes
0
points
418
downloads

Publisher

unverified uploader

Weekly Downloads

The next-generation Flutter router. Typed routes, pipeline guards, first-class web support, and performance built from first principles.

Repository (GitHub)
View/report issues

Topics

#routing #navigation #deep-linking #web #typed-routes

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flow_routing