Skip to content
pubscout

octopus

0.0.9, released 2 years ago by experimental.plugfox.dev

A declarative router for Flutter with focus on state and nested navigation.

WASM-ready
$ flutter pub add octopus
Source repository

What it does

Octopus is a cross-platform declarative router for Flutter that handles navigation through state mutations and a tree structure of nodes. It supports nested navigation, state history, guards, and representing the entire navigation tree in URLs and deep links.

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

Use it when

  • You need complex nested navigation of arbitrary depth.
  • You want a truly declarative router driven by state mutations rather than push/pop commands.
  • You need to persist and represent the entire navigation tree in URLs and deep links.

Skip it when

  • You prefer conventional imperative navigation or path-templating routers.
  • You want code-generated routes and typed arguments out of the box.

Strengths

  • Dynamic navigation through state mutations
  • Preserves and displays the entire navigation tree in URLs
  • Built-in guard system for intercepting navigation and handling authentication
  • Supports declarative dialogs

Weaknesses

  • Requires learning a custom state mutation approach rather than standard path templating
  • Young library with potential ecosystem changes

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3
router = Octopus(
  routes: Routes.values,
  defaultRoute: Routes.home,
);

MaterialApp.router(
  routerConfig: router.config,
)

Alternatives

Packages that do the same job and could replace octopus.

  • go_router

    More widely adopted declarative router with standard path-templating and official Flutter team support.

  • auto_route

    Strong focus on strongly-typed arguments and code generation for nested navigation.

  • beamer

    Declarative routing based on location-based delegates for nested navigation.

Works with

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