PageRegistry class

Registry that maps Flint page names to component builders.

Implementers

Constructors

PageRegistry([Map<String, FlintPageBuilder>? pages, Iterable<FlintPageRoute>? routes])
Creates a registry with optional initial pages and routes.
PageRegistry.flavored(Map<String, PageRegistry> flavors, {String defaultFlavor, String? activeFlavor, bool fallbackToDefault})
Factory constructor to create a multi-flavor registry.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
pages → Map<String, FlintPageBuilder>
Registered page builders keyed by page name.
no setter
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
only(Iterable<String> names) → PageRegistry
Returns a registry containing only the requested names.
register(String name, FlintPageBuilder builder) → void
Registers a page builder for name.
registerAll(Map<String, FlintPageBuilder> pages) → void
Registers all page builders from pages.
registerRoute<TProps extends FlintProps>(FlintPageRoute<TProps> route) → void
Registers a shared FlintPageRoute definition.
registerRoutes(Iterable<FlintPageRoute> routes) → void
Registers multiple shared FlintPageRoute definitions.
registerTyped<TProps>(String name, {required TProps fromJson(Map<String, dynamic> json), required FlintComponent builder(TProps props)}) → void
Registers a strongly-typed page builder for name with automatic JSON deserialization via fromJson.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String name) → FlintPageBuilder?
Returns the page builder registered for name.