MultiChildSeed class abstract

A Seed that carries a fixed, ordered list of child seeds directly in its configuration — the MultiChildRenderObjectWidget analogue, and the multi-child sibling of the single-child component seeds (StatelessSeed/StatefulSeed/Sprout).

A component seed builds one child from a build() method; a MultiChildSeed instead declares its children up front. Its MultiChildBranch keyed-reconciles them against the previous set on every rebuild (Branch.updateChildren): a child matched by key (or, when unkeyed, by position) keeps its branch identity across rebuilds; a child that appears mounts; a child that vanishes unmounts; and the resulting child order follows children. The identical-config fast path is inherited unchanged — a child seed reused by identical instance prunes its subtree at reconcile time.

MultiChildSeed is abstract deliberately: a seed's runtimeType is its reconciliation tag (Seed.canUpdate), so a topology of distinct container kinds (e.g. a Grid of Rigs of Steps) must subclass it once per kind — two kinds sharing this base directly would reconcile into one another. Subclasses pass their children up and may add their own typed fields:

class Grid extends MultiChildSeed {
  const Grid(List<Rig> rigs) : super(children: rigs);
}
Inheritance

Constructors

MultiChildSeed({List<Seed> children = const [], Key? key})
Creates a multi-child seed configured with children (default empty), optionally keyed for keyed reconciliation by its own parent.
const

Properties

children List<Seed>
The ordered child configurations this seed reconciles. Each may carry its own Seed.key for keyed identity; unkeyed children match positionally. A key must be unique among siblings (asserted in debug by Branch.updateChildren).
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Identity Key used by keyed reconciliation (Branch.updateChildren). Null means positional (unkeyed) identity.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createBranch() MultiChildBranch
Creates the mounted Branch for this configuration.
override
debugFillProperties(DiagnosticsBuilder properties) → void
Adds this object's diagnostic properties to properties.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toStringDeep() String
Returns a deterministic multiline description of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited