of static method

FocusController? of(
  1. BuildContext context
)

Returns the nearest FocusController from the widget tree.

Implementation

static FocusController? of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<_FocusScopeProvider>()
      ?.controller;
}