Portal class

DSL sugar for PortalNode.

Renders overlays, modals, and tooltips directly into document.body or a custom container while preserving lexical state and reactive lifecycle.

BloomNode modalDialog(bool isOpen) => Show(
  () => isOpen,
  child: Portal(
    targetSelector: 'body',
    child: Div(
      className: 'modal-backdrop',
      children: [
        Div(className: 'modal-card', text: 'Modal dialog content'),
      ],
    ),
  ),
);
Inheritance

Constructors

Portal({required BloomNode child, String targetSelector = 'body'})
Creates a portal descriptor for child with destination targetSelector.
const

Properties

child BloomNode
The descriptor tree to render into the target container.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetSelector String
The CSS selector identifying the destination container element (e.g. 'body', '#modal-root').
finalinherited

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