FlavoredPageRegistry class

A multi-flavor page registry that maps flavors (e.g. 'stokash', 'FarmsBenefit') to their respective PageRegistry instances, with automatic fallback to default flavor.

Inheritance

Constructors

FlavoredPageRegistry(Map<String, PageRegistry> flavors, {String defaultFlavor = 'default', String? activeFlavor, bool fallbackToDefault = true})
Creates a flavored registry with initial flavors.

Properties

activeFlavor → String
Gets the currently active flavor, defaulting to defaultFlavor.
no setter
defaultFlavor ↔ String
getter/setter pair
fallbackToDefault → bool
final
hashCode → int
The hash code for this object.
no setterinherited
pages → Map<String, FlintPageBuilder>
Registered page builders keyed by page name.
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
only(Iterable<String> names) → PageRegistry
Returns a registry containing only the requested names.
inherited
register(String name, FlintPageBuilder builder) → void
Registers a page builder for name.
inherited
registerAll(Map<String, FlintPageBuilder> pages) → void
Registers all page builders from pages.
inherited
registerFlavor(String flavor, PageRegistry registry) → void
Registers a registry for flavor.
registerFlavors(Map<String, PageRegistry> flavors) → void
Registers multiple flavor registries.
registerRoute<TProps extends FlintProps>(FlintPageRoute<TProps> route) → void
Registers a shared FlintPageRoute definition.
inherited
registerRoutes(Iterable<FlintPageRoute> routes) → void
Registers multiple shared FlintPageRoute definitions.
inherited
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.
inherited
registryFor([String? flavor]) → PageRegistry
Resolves the underlying PageRegistry for flavor.
resolveForFlavor(String name, [String? flavor]) → FlintPageBuilder?
Resolves a page builder for name with flavor precedence:
setActiveFlavor(String flavor) → void
Sets the currently active flavor.
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.
override