NiceViewRegistry class

A registry for mapping NiceViewComponentType (or custom string keys) to builder functions. Allows dynamic registration of new component types without modifying the core enum.

Properties

hashCode int
The hash code for this object.
no setterinherited
registeredTypes List<String>
List all registered type keys.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, NiceViewComponent component, {Widget fallback(NiceViewComponent)?}) Widget
Build a widget for the given component using its registered builder. Falls back to fallback if no builder is registered.
isRegistered(String typeKey) bool
Check if a type is registered.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(NiceViewComponentType type, NiceComponentBuilder builder) → void
Register a builder for a NiceViewComponentType enum value.
registerCustom(String typeKey, NiceComponentBuilder builder) → void
Register a builder for a custom component type key (beyond the enum).
toString() String
A string representation of this object.
inherited
unregister(String typeKey) → void
Remove a registered builder.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance NiceViewRegistry
final