BloomIslandRegistry class
Registry storing client-side island builders keyed by name.
Allows registering interactive island components prior to DOM readiness or hydration orchestration. Applications typically register islands at entry point boot time before calling orchestrateIslands.
final registry = BloomIslandRegistry();
registry.register('like-button', (props) {
return Button(text: 'Like');
});
Constructors
- BloomIslandRegistry()
- Creates an empty island registry.
Properties
-
definitions
→ Map<
String, BloomIslandDefinition> -
An unmodifiable view of all registered island definitions.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clears all registered island definitions from this registry.
-
get(
String name) → BloomIslandDefinition? -
Looks up the BloomIslandDefinition registered under
name, or returnsnullif not found. -
has(
String name) → bool -
Returns
trueif an island builder is registered undername. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
String name, BloomIslandBuilder builder, {HydrationStrategy defaultStrategy = HydrationStrategy.immediate}) → void -
Registers an island builder under
namewith an optional fallbackdefaultStrategy. -
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
String name) → bool -
Removes the definition for
namefrom the registry.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → BloomIslandRegistry
-
The default singleton registry instance used by top-level registerIsland and orchestrateIslands.
final