MovaPatch class sealed
A pending mutation to apply to a component tree via applyPatches.
Patches are data, not actions — applyPatches is the only place that interprets them, keeping tree mutation a pure, testable function.
待应用到组件树的一次变更,通过 applyPatches 生效。
补丁只是数据而非动作——只有 applyPatches 会解释它们,从而让树的变更 保持为一个纯函数、便于测试。
- Implementers
Constructors
- MovaPatch.add(MovaSlot slot, MovaComponent component, {int order})
-
Appends a brand-new top-level
componentto the tree, tagged withslotand sorted byorderwithin that slot.constfactory - MovaPatch.insertAfter(String path, MovaComponent component)
-
Inserts
componentas a new sibling immediately after the node atpath, at the same nesting level as that anchor.constfactory - MovaPatch.remove(String path)
-
Removes the component found at
path.constfactory - MovaPatch.replace(String path, MovaComponent component)
-
Replaces the component found at
pathwithcomponent.constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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