SlottedChildView class

A component that takes over existing DOM nodes and renders its slots into parts of them.

The view hydrates only those parts while keeping a single component tree. For example, ClientApp uses a view to hydrate each @client component between its markers, leaving the rest of the server-rendered page untouched.

A Component.apply above the view also applies to the matching elements in its nodes.

Inheritance

Constructors

SlottedChildView({required List<ChildSlot> slots, Key? key})
Creates a view that takes over the remaining unhydrated nodes of its parent element.
SlottedChildView.withNodes({required List<Node> nodes, required List<ChildSlot> slots, Key? key})
Creates a view that takes over nodes, which must share a parent.

Properties

hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
nodes → List<Node>?
The DOM nodes this view takes over, or null to take over the remaining unhydrated nodes of its parent element.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slots → List<ChildSlot>
The slots that render components into parts of this view's nodes.
final

Methods

createElement() → Element
Inflates this configuration to a concrete instance.
override
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