BuildContextExtension extension

An extension for BuildContext.

on

Methods

findDescendantElementBFS<T extends Object>(T? checker(Element element)) → T?
Visits descendant child element and find the only non-null object using given checker and BFS algorithm. This method returns null if nothing found.
findDescendantElementDFS<T extends Object>(T? checker(Element element)) → T?
Visits descendant child element and find the only non-null object using given checker and DFS algorithm. This method returns null if nothing found.
findDescendantElementsBFS<T extends Object>(int count, T? checker(Element element)) List<T>
Visits descendant child element and finds some non-null objects using given checker and BFS algorithm. Note that this method will return all found objects if given non-positive count.
findDescendantElementsDFS<T extends Object>(int count, T? checker(Element element)) List<T>
Visits descendant child element and finds some non-null objects using given checker and DFS algorithm. Note that this method will return all found objects if given non-positive count.
findRenderBox() RenderBox?
Finds the current RenderBox which inherits from RenderObject for the widget.
toElement() Element?
Casts the BuildContext to Element.