BuildContext class abstract

An opaque handle to location in the widget tree.

Available extensions

Constructors

BuildContext()

Properties

hashCode int
The hash code for this object.
no setterinherited
maybeTheme Theme?

Available on BuildContext, provided by the ThemeContext extension

Returns the nearest theme from context, if any.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme Theme

Available on BuildContext, provided by the ThemeContext extension

Returns the nearest theme from context, or the global theme.
no setter
widget Widget
The widget currently associated with this context.
no setter

Methods

dependOnInheritedWidgetOfExactType<T extends InheritedWidget>() → T?
Returns the nearest inherited widget of type T and registers this context as a dependent.
findAncestorStateOfType<T extends State<StatefulWidget>>() → T?
Returns the nearest ancestor State of type T, or null.
findAncestorWidgetOfExactType<T extends Widget>() → T?
Returns the nearest ancestor widget of type T, or null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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