Skip to content
pubscout

kaisel

1.3.1, released 9 days ago by an unverified publisher

A Dart 3-native Flutter router using sealed routes and pattern matching.

WASM-ready
$ flutter pub add kaisel
Source repository

What it does

Provides type-safe navigation for Flutter applications using Dart 3 sealed classes, exhaustive pattern matching, and a stack-as-state model instead of string paths or code generation.

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

Use it when

  • You want compile-time type safety for routes and parameters without code generation.
  • You prefer a stack-as-state navigation model driven by sealed classes.
  • You need modular or deep-linkable routing with guarded pipelines.

Skip it when

  • Your project must rely strictly on URL string paths as the primary source of truth.
  • You are not using Dart 3 sealed classes.

Strengths

  • Compile-time type safety and exhaustiveness checking for route switches.
  • No code generation or manual equality boilerplate required.
  • Built-in support for shells, lazy branches, and guards.

Weaknesses

  • Requires adherence to sealed class route hierarchies.
  • Differs significantly from traditional path-based routers like go_router.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
3

None required beyond adding the package and setting up the router configuration in MaterialApp.router.

sealed class AppRoute extends KaiselRoute {
  const AppRoute();
}

final class Home extends AppRoute { const Home(); }

final _config = KaiselRouterConfig<AppRoute>(
  initial: const Home(),
  builder: (context, route) => switch (route) {
    Home() => const HomeScreen(),
  },
);

void main() => runApp(MaterialApp.router(routerConfig: _config));

Alternatives

Packages that do the same job and could replace kaisel.

  • go_router

    If you prefer traditional string paths and URL-centric navigation.

  • auto_route

    If you prefer code-generated route management with builder configurations.

Works with

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