framework library
Framework-facing internals that kaisel_core exposes to the kaisel Flutter
package.
Not part of the public API. Application code should import
package:kaisel_core/kaisel_core.dart (or package:kaisel/kaisel.dart) instead.
These symbols — the identity-keyed stack entries, the nested-router host
contracts, and the pure-Dart change-notifier — are the seam the kaisel
widgets build on; they live here, rather than in the public barrel, so the
app-facing surface stays small.
Classes
-
ConfigCodecWithModules<
R extends KaiselRoute> - A KaiselConfigCodec that composes a base codec with one or more module mounts.
-
KaiselActiveFlow<
R extends KaiselRoute> - A read-only view of one entry in the active modal flow stack.
- KaiselBranchSnapshot
- One branch of a shell: its index, whether it is built, route-type hint, and stack.
- KaiselChangeNotifier
-
Minimal pure-Dart re-implementation of
ChangeNotifier. -
KaiselCodec<
R extends KaiselRoute> - Bidirectional mapping between a route and a URL.
-
KaiselConfig<
R extends KaiselRoute> - The configuration that flows between the URL bar and the router.
-
KaiselConfigCodec<
R extends KaiselRoute> - Maps URLs to and from a full KaiselConfig.
- KaiselEntrySnapshot
- One stack entry: its identity-stable id, route type, props, and label.
- KaiselFlowSnapshot
- An active modal flow: its nesting depth, type, result-type hint, and the flow's own sub-stack.
-
KaiselGuardRun<
R extends KaiselRoute> - A recorded run of the guard pipeline, retained for debugging.
-
KaiselGuardStep<
R extends KaiselRoute> - One guard's effect within a KaiselGuardRun.
- KaiselGuardStepSnapshot
- One guard's effect within a pipeline run.
- KaiselGuardTraceSnapshot
- The last guard-pipeline run: the proposed stack in, each guard's effect, and the final stack out. Populated only when guard tracing is retained.
- KaiselInspectable
- What a root (the delegate) exposes to the KaiselInspector.
- KaiselInspector
- Debug-only registry that aggregates live roots and publishes navigation snapshots to DevTools over the VM service.
- KaiselListenable
-
Pure-Dart equivalent of Flutter's
Listenable. -
KaiselModalRoute<
T> -
Marker interface for routes that present a modal sub-flow returning
a value of type
T. - KaiselModuleConfig
-
Configuration for a mounted
RouteModule. - KaiselModuleSnapshot
- A mounted module: its optional URL prefix, route-type hint, and stack.
- Non-generic view of a KaiselRouter's navigation primitives.
- A full navigation snapshot: the schema version plus one entry per live root (usually exactly one delegate).
- KaiselNestedConfig
- State of a nested router (shell, module, future kinds) at the moment a URL is captured. Sealed so KaiselConfig.nestedState can carry at most one kind, statically.
- KaiselNestedHandle
-
Non-generic handle a nested router (branched shell or module
mount) exposes to the surrounding
KaiselRouterDelegateso the URL can describe the nested router's state. - KaiselNestedHost
-
Interface implemented by
KaiselRouterDelegateso a mounted nested router (shell or module) can register itself as the URL-addressable nested handle. - KaiselNoOp
- A recorded no-op navigation, retained for debugging.
- KaiselOriginFrame
- One app call frame behind a navigation, for the "who navigated" view: a display line plus the parsed uri / line / column when the frame could be located, so a DevTools host can open it in an editor.
- KaiselProblemSnapshot
- A detected problem in the navigation state, surfaced in the Problems panel.
- KaiselRootSnapshot
- One root's navigation state: its main stack plus any shells, modules, active flows, the last guard run, and the encoded URL.
- KaiselRoute
- Base marker for application route types.
-
KaiselRouter<
R extends KaiselRoute> - The navigation stack as observable state.
- KaiselShellConfig
-
Configuration for a
BranchedShellRouter. Describes which branch is active and the active branch's stack only. - KaiselShellSnapshot
- A branched shell: the active branch and every branch's own stack.
-
KaiselSingleStackCodec<
R extends KaiselRoute> - Adapts a single-route KaiselCodec to the multi-route KaiselStackCodec interface. Useful for migrating without rewriting your codec.
-
KaiselStackCodec<
R extends KaiselRoute> - Maps URLs to and from full route stacks.
-
KaiselStackEntry<
R extends KaiselRoute> - Identity-stable wrapper for a route on the stack.
- KaiselStackSnapshot
- A single router's stack: its depth, whether it can pop, and its entries.
-
ModuleMount<
HostR extends KaiselRoute> - A module mount declaration: the host's marker route, the URL prefix the module answers to, and the module's URL codec.
-
ModuleStackCodec<
R extends KaiselRoute> - Codec for a module's URL structure, relative to whatever prefix the host mounts the module at.
-
StackToConfigCodec<
R extends KaiselRoute> - Adapter so a KaiselStackCodec (stack-only URLs) works wherever a KaiselConfigCodec is required.
- UntypedModuleStackCodec
-
Type-erased view of ModuleStackCodec. Module authors implement
the typed ModuleStackCodec subclass; the composer
(ConfigCodecWithModules) uses this untyped interface so a single
List<ModuleMount>can hold codecs for modules with different internal route types.
Functions
-
kaiselNextOriginSeq(
) → int -
Issues the next monotonic stamp for a navigation origin, shared across
every router and shell so a DevTools host can order transitions by
recency. Debug-only bookkeeping; exposed via
kaisel_core/framework.dart. -
kaiselOriginFrames(
StackTrace? trace, {int limit = 5}) → List< KaiselOriginFrame> -
Reduces a captured navigation origin to the app call frames behind it —
dropping kaisel, Flutter, and SDK frames plus async-suspension markers, and
keeping the closest
limit. Each frame keeps its display line and, when the location parses, the source uri/line/column (so a host can open it in an editor). Empty for a null trace. Exposed viakaisel_core/framework.dart.
Typedefs
-
KaiselGuard<
R extends KaiselRoute> = FutureOr< List< Function(List<R> >R> current, List<R> proposed) - A guard transforms a proposed navigation stack before it is applied.