maybeOf static method

DevToolsFind? maybeOf(
  1. BuildContext context, {
  2. bool listen = true,
})

The find controller of the nearest panel, or null outside one, where text renders without highlights.

Implementation

static DevToolsFind? maybeOf(BuildContext context, {bool listen = true}) {
  if (listen) {
    return context
        .dependOnInheritedWidgetOfExactType<DevToolsFindScope>()
        ?.notifier;
  }
  return context.getInheritedWidgetOfExactType<DevToolsFindScope>()?.notifier;
}