devtools/find/find library

Classes

DevToolsFind
Searches every tab and picks the current match; views bring it on screen themselves through FindAware and FindText.
DevToolsFindBar
The one search box for the whole panel: Enter / Shift+Enter or the arrows step through matches, Esc clears.
DevToolsFindScope
Shares a panel's DevToolsFind with every view below it; read it with DevToolsFind.maybeOf.
FindHit
One occurrence of the search text.
FindListView
A lazily built list with separators that scrolls to the row holding the current match, even one it hasn't built yet.
FindSource
A tab's searchable text, read from its data rather than its widgets, so off-screen rows, closed details and other tabs all count.
FindTarget
One piece of text a DevTools tab can show, as handed to the find bar.
FindText
A drop-in for Text or SelectableText with find highlights; pass the id its FindSource uses so it can show and scroll to the current match.

Mixins

FindAware<T extends StatefulWidget>
For a view that can hide content (a tab, a detail screen, a folded JSON node): onFindReveal opens it when the current match is inside.

Constants

findMatchColor → const Color
Background of every find match.
findMatchTextColor → const Color
Text on a match, dark so it stays readable in both themes.

Functions

findMatches(String text, String needle) → List<int>
Start offsets of every case-insensitive, non-overlapping match of needle (already lowercase) in text.
revealListRow(DevToolsFind find, ScrollController controller, {required int index, required int count}) → Future<void>
A lazy list can't jump to a row it hasn't laid out, so this homes in over a few frames until the row's FindText has built and revealed itself.