MockBuildContext class
Implemented types
Available Extensions
Methods
dependOnInheritedElement (InheritedElement ancestor , {Object ? aspect })
→ InheritedWidget
Registers this build context with ancestor
such that when
ancestor
's widget changes this build context is rebuilt.
inherited
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.
inherited
describeElement (String name , {DiagnosticsTreeStyle style = DiagnosticsTreeStyle.errorProperty })
→ DiagnosticsNode
Returns a description of the Element associated with the current build context.
inherited
describeMissingAncestor ({required Type expectedAncestorType })
→ List <DiagnosticsNode >
Adds a description of a specific type of widget missing from the current
build context's ancestry tree.
inherited
describeOwnershipChain (String name )
→ DiagnosticsNode
Adds a description of the ownership chain from a specific Element
to the error report.
inherited
describeWidget (String name , {DiagnosticsTreeStyle style = DiagnosticsTreeStyle.errorProperty })
→ DiagnosticsNode
Returns a description of the Widget associated with the current build context.
inherited
dispatchNotification (Notification notification )
→ void
Start bubbling this notification at the given build context.
inherited
findAncestorRenderObjectOfType <T extends RenderObject > ()
→ T?
Returns the RenderObject object of the nearest ancestor RenderObjectWidget widget
that is an instance of the given type T
.
inherited
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
.
inherited
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.
inherited
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 .
inherited
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
.
inherited
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.
inherited
getInheritedWidgetOfExactType <T extends InheritedWidget > ()
→ T?
Returns the nearest widget of the given InheritedWidget subclass T
or
null if an appropriate ancestor is not found.
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
visitAncestorElements (ConditionalElementVisitor visitor )
→ void
Walks the ancestor chain, starting with the parent of this build context's
widget, invoking the argument for each ancestor.
inherited
visitChildElements (ElementVisitor visitor )
→ void
Walks the children of this widget.
inherited
inqvine_core_simulate 2.1.1