MetaRoute<T> class
Typed definition of an SSR page route.
Constructors
-
MetaRoute({required String pattern, required MetaMantleDataProvider<
T> dataProvider, required RouteMetadataBuilder<T> metadataBuilder, required RouteHtmlBuilder<T> htmlBuilder, CachePolicy cachePolicy = const CachePolicy(), bool includeFlutterBootstrap = false, String? artifactRouteId, ArtifactMissPolicy artifactMissPolicy = ArtifactMissPolicy.renderImmediately})
Properties
- artifactMissPolicy → ArtifactMissPolicy
-
Per-route behavior when a safe artifact lookup misses.
final
- artifactRouteId → String?
-
Optional stable ID stored with an on-demand generated artifact.
Defaults to pattern when omitted.
final
- cachePolicy → CachePolicy
-
Route-specific caching rules.
final
-
dataProvider
→ MetaMantleDataProvider<
T> -
Underlying data provider.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
htmlBuilder
→ RouteHtmlBuilder<
T> -
Builds semantic HTML nodes from resolved data.
final
- includeFlutterBootstrap → bool
-
Whether to embed the Flutter Web bootstrap script for progressive enhancement.
final
-
metadataBuilder
→ RouteMetadataBuilder<
T> -
Builds metadata from resolved data.
final
- pattern → String
-
Path pattern (e.g.
/,/about,/products/:slug).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildHtml(
dynamic data, RouteDataContext context) → List< HtmlNode> - Invokes htmlBuilder with typed casting to prevent generic variance errors.
-
buildMetadata(
dynamic data, RouteDataContext context) → WebMetadata - Invokes metadataBuilder with typed casting to prevent generic variance errors.
-
match(
String path) → Map< String, String> ? -
Attempts to match
pathagainst this route's pattern. Returns a map of extracted parameters if matched, ornullif no match. -
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