Aspect<A, T> class

Inheritance
Mixed in types
Available Extensions

Constructors

Aspect(A fn(T), [Key? key])
Create an InheritableAspect of T that depends on Inheritable of T for any changes of A produced by fn.
const
Aspect.patchable({required AspectPatch<A, T> patch, required A transform(T), Key? key})
Create an aspect A of T using transform, which can optionaly be later patched using patch.
const

Properties

debugLabel String?
Debug-mode label for this aspect
finalinherited
didUpdateWidgetImpl DidUpdateWidget<T>
no setter
hashCode int
The hash code for this object.
no setterinherited
key Key?
Uniquely identifying local key for this aspect. This used by hashCode and ==. This allows InheritableAspect implementations to accept and hold closures in object instances and still have a unique object identity.
final
mapper → A Function(T)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone({Key? key, A mapper(T)?, AspectPatch<A, T>? patch, DidUpdateWidget<T>? didUpdateWidget, DefaultInheritableAspectOfContext<A>? defaultValue}) Aspect<A, T>
Create a new instance of this aspect with the specified fields replaced.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
didUpdateWidget({required Inheritable<T> prev, required Inheritable<T> next}) bool
Called by Inheritable of T when it decides to notify it's dependents. This is only called after Inheritable of T has been updated at least once. For the first time, aka "init" phase, satisfiedBy is called instead.
override
ensureHasKey({Key? fallback}) InheritableAspect<T>
Ensure that this InheritableAspect has a valid key. This is to make sure aspects that are intended to behave differently using for same BuildContext don't override each other.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
of(BuildContext context, {bool rebuild = true, A? defaultValue}) → A?
Convenience method for when an InheritableAspect is already known.
override
patch(T value, A next) → T
Given a new A of T, return the patched T
override
satisfiedBy(Inheritable<T> inheritable) bool
Specify whether given inheritable satisfies this aspect.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
transform(T value) → A
Given value, transform it into usable form
override

Operators

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