DVRoutePreviews class

Route builders, so a link can show what it points at.

Every route can have a preview. A route with parameters is registered by its pattern (/articles/:slug) and previews any path it matches, with the parameters in its DartvelRouteState. A guarded route is registered with registerGuarded and previews only what is public about it -- its title and that it needs signing in -- so hovering a link never shows a signed-out reader what the guard protects.

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

count → int
no setter

Static Methods

clear() → void
Forget everything, for tests and for a router being replaced.
forPath(String location) → WidgetBuilder?
The preview for a concrete path, or null when no route answers it.
register(String path, WidgetBuilder builder) → void
Register the builder for a path or pattern. Called by the generated router.
registerForLocation(String pattern, DVLocationPreviewBuilder builder) → void
Register a builder for a pattern that is given the concrete location a link names and the parameters taken from it.
registerGuarded(String path, {String? title}) → void
Mark a path or pattern as guarded: its preview is a card naming title, never the page. Wins over any builder registered for it.