ShowNode class
Conditional rendering primitive.
Mounts child when when evaluates to true, and optional fallback
when when evaluates to false.
DOM Mounting and Sentinels
In the browser, ShowNode mounts between sentinel comments:
<!-- bloom:show --> and <!-- /bloom:show -->.
Evaluates when inside a signal effect. When the boolean result transitions
between true and false, the previous branch's scoped region is disposed
and the active branch (child or fallback) is mounted between the sentinels.
If fallback is null and when is false, an empty fragment is mounted.
SSR Behavior
During SSR (renderToHtml), when is evaluated once synchronously. If true,
child is rendered; if false, fallback is rendered (or nothing if null).
Usually created using the DSL sugar Show.
Constructors
Properties
- child → BloomNode
-
The descriptor tree rendered when when evaluates to
true.final - fallback → BloomNode?
-
Optional descriptor tree rendered when when evaluates to
false.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- when → bool Function()
-
Reactive predicate — called inside a signals effect (browser) or once (SSR).
final
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