InheritedModelSeed<T extends Object, A extends Object> class

Provides an ambient value of type T whose dependents may subscribe to a single ASPECT of it — the InheritedModel analogue.

A dependent subscribes with context.dependOnInheritedSeedOfExactType<T>(aspect: someAspect) and is invalidated only when updateShouldNotifyDependent reports the change as affecting one of the aspects it asked for. A dependent that omits the aspect depends on the whole value, exactly as under InheritedSeed.

Lookup is unchanged — the parent walk still matches the nearest provider of exact value-type T — so a plain dependOnInheritedSeedOfExactType<T>() finds an InheritedModelSeed<T, A> too and gets a whole-value dependency.

The house shape for a consumer is its own static of:

static Environment? of(TreeContext context, {Lane? aspect}) =>
    context.dependOnInheritedSeedOfExactType<Environment>(aspect: aspect);
Inheritance

Constructors

InheritedModelSeed({required T value, required Seed child, Key? key})
Creates an aspect-scoped provider of value over child.
const

Properties

child → Seed
The subtree within which value is visible.
finalinherited
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
value → T
The provided value.
finalinherited

Methods

createBranch() → InheritedModelBranch<T, A>
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
updateShouldNotify(InheritedSeed<T> oldSeed) → bool
Returns true when oldSeed's value differs from the new value. Subclasses may override for custom equality.
inherited
updateShouldNotifyDependent(covariant InheritedModelSeed<T, A> oldSeed, Set<A> dependencies) → bool
Whether a dependent that subscribed to dependencies must rebuild now that this seed has replaced oldSeed.

Operators

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