Skip to content
pubscout

routefly

3.1.3, released 2 years ago by flutterando.com.br

Folder-based route manager inspired by NextJS for Flutter applications.

WASM-ready
$ flutter pub add routefly
Source repository

What it does

Automatically creates and manages routes in your Flutter app by organizing files and folders within specific directories. It provides navigation methods, nested navigation through layouts, dynamic routes, route groups, and middleware support.

AI-written summary of version 3.1.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You prefer a folder-based file structure for defining routes inspired by NextJS.
  • You want automated route generation based on your project directory layout.
  • You need nested navigation, custom transitions, and route guards/middlewares.

Skip it when

  • You prefer a purely declarative or code-first routing approach without file-system mapping.
  • Your project relies on an existing router configuration from the given alternatives like go_router or auto_route.

Strengths

  • Intuitive file-system based routing.
  • Object notation support via `routePaths` for type-safe route access.
  • Built-in support for route groups, layouts with `RouterOutlet`, and middleware.

Weaknesses

  • Requires running a generator command (`dart run routefly`) when adding new pages.
  • Strictly tied to a specific folder layout structure.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Add the package, annotate the main widget with `@Main('lib/app')`, configure `MaterialApp.router` with `Routefly.routerConfig`, and run `dart run routefly` to generate routes.

MaterialApp.router(
  routerConfig: Routefly.routerConfig(
    routes: routes,
  ),
);

Alternatives

Packages that do the same job and could replace routefly.

  • go_router

    Provides a declarative routing package officially backed and widely adopted in the Flutter ecosystem.

  • auto_route

    Offers powerful code-generated routing with strong typing for parameters and deep linking.

  • beamer

    Focuses on URI-based navigation and delegate-based routing for complex multi-screen apps.

Works with

Packages commonly used together with routefly: ones it builds on, ones built on it, and its own family.