Sprout class abstract

A Seed whose branch holds its state in hooks declared inline in build — the hooks-style alternative to StatefulSeed + State<T>.

Subclass it and override build, calling context.useState / useStream / useEffect / useMemo to declare state. The subclass type is the reconcile tag, so two Sprouts of different subclasses never update into one another; state persists on the branch across config updates, keyed by call order.

Inheritance

Constructors

Sprout({Key? key})
Creates a sprout, optionally keyed.
const

Properties

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

build(SproutContext context) → Seed
Describes the child subtree, reading state inline via context hooks.
createBranch() → SproutBranch
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