$BuildContext class

dart_eval wrapper for BuildContext

Implemented types

Constructors

$BuildContext.wrap(BuildContext $value)
const

Properties

$reified BuildContext
Fully reify the underlying value so it can be used in a Dart context. For example, recursively transform collections into their underlying $values.
no setter
$value BuildContext
The backing Dart value of this $Value
final
debugDoingBuild bool
Whether the widget is currently updating the widget or render tree.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
mounted bool
Whether the Widget this context is associated with is currently mounted in the widget tree.
no setteroverride
owner BuildOwner?
The BuildOwner for this context. The BuildOwner is in charge of managing the rendering pipeline for this context.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size?
The size of the RenderBox returned by findRenderObject.
no setteroverride
widget Widget
The current configuration of the Element that is this BuildContext.
no setteroverride

Methods

$getProperty(Runtime runtime, String identifier) → $Value?
Get a property by identifier on this instance
$getRuntimeType(Runtime runtime) int
$setProperty(Runtime runtime, String identifier, $Value value) → void
Set a property by identifier on this instance to value
dependOnInheritedElement(InheritedElement ancestor, {Object? aspect}) InheritedWidget
Registers this build context with ancestor such that when ancestor's widget changes this build context is rebuilt.
override
dependOnInheritedWidgetOfExactType<T extends InheritedWidget>({Object? aspect}) → T?
Returns the nearest widget of the given type T and creates a dependency on it, or null if no appropriate widget is found.
override
describeElement(String name, {DiagnosticsTreeStyle style = DiagnosticsTreeStyle.errorProperty}) DiagnosticsNode
Returns a description of the Element associated with the current build context.
override
describeMissingAncestor({required Type expectedAncestorType}) List<DiagnosticsNode>
Adds a description of a specific type of widget missing from the current build context's ancestry tree.
override
describeOwnershipChain(String name) DiagnosticsNode
Adds a description of the ownership chain from a specific Element to the error report.
override
describeWidget(String name, {DiagnosticsTreeStyle style = DiagnosticsTreeStyle.errorProperty}) DiagnosticsNode
Returns a description of the Widget associated with the current build context.
override
dispatchNotification(Notification notification) → void
Start bubbling this notification at the given build context.
override
findAncestorRenderObjectOfType<T extends RenderObject>() → T?
Returns the RenderObject object of the nearest ancestor RenderObjectWidget widget that is an instance of the given type T.
override
findAncestorStateOfType<T extends State<StatefulWidget>>() → T?
Returns the State object of the nearest ancestor StatefulWidget widget that is an instance of the given type T.
override
findAncestorWidgetOfExactType<T extends Widget>() → T?
Returns the nearest ancestor widget of the given type T, which must be the type of a concrete Widget subclass.
override
findRenderObject() RenderObject?
The current RenderObject for the widget. If the widget is a RenderObjectWidget, this is the render object that the widget created for itself. Otherwise, it is the render object of the first descendant RenderObjectWidget.
override
findRootAncestorStateOfType<T extends State<StatefulWidget>>() → T?
Returns the State object of the furthest ancestor StatefulWidget widget that is an instance of the given type T.
override
getElementForInheritedWidgetOfExactType<T extends InheritedWidget>() InheritedElement?
Obtains the element corresponding to the nearest widget of the given type T, which must be the type of a concrete InheritedWidget subclass.
override
getInheritedWidgetOfExactType<T extends InheritedWidget>() → T?
Returns the nearest widget of the given InheritedWidget subclass T or null if an appropriate ancestor is not found.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
visitAncestorElements(bool visitor(Element element)) → void
Walks the ancestor chain, starting with the parent of this build context's widget, invoking the argument for each ancestor.
override
visitChildElements(ElementVisitor visitor) → void
Walks the children of this widget.
override

Operators

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

Constants

$declaration → const BridgeClassDef
Compile-time bridge declaration for $BuildContext
$type → const BridgeTypeRef
Compile-time type reference for $BuildContext