FragmentMorphic class final
A grouping node that produces no DOM element.
FragmentMorphic holds a list of children that are inserted directly as siblings into the parent DOM node. It is the Morphic representation of Fragment — a way to group multiple nodes without introducing a wrapper element in the HTML output.
Example
// Fragment in render() — no extra div wrapper in the DOM
Fragment()([
Span()(['First']),
Span()(['Second']),
])
Diffing
FragmentMorphic is preserved in the resolved tree so that
_patchChildren can diff it correctly against a previous fragment
at the same position, updating only the children that changed.
Constructors
-
FragmentMorphic({required List<
Morphic> children, Object? key}) -
const
Properties
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.
override