SlugRouter class
Centralized slug resolution with parallel Firestore queries.
Inspired by go_router patterns:
- Declarative registry: routes defined once, not scattered if/else
- Parallel resolution: all queries fire simultaneously via Future.wait
- Priority-based: when multiple matches exist, highest priority wins
- Single source of truth: used by both SlugResolverPage and DeeplinkUtilities
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
registeredTypes
→ List<
String> -
Get all registered content types.
no setter
Static Methods
-
resolve(
String slug) → Future< SlugMatch?> - Resolve a vanity slug — fires ALL queries in parallel, returns the highest-priority match.
-
resolveBlog(
String slugOrId) → Future< SlugMatch?> - Resolve a prefixed blog slug/ID — tries slug first, then ID.
-
resolveProfile(
String slug) → Future< SlugMatch?> - Resolve a profile by slug — used for /p/{slug} short URLs.