of static method

Standard getter of the class.

Note: there is a standard limitation:

  • context should be inside of AppBarWithSearchSwitch(belong to one of it children).

Implementation

static AppBarWithSearchSwitch? of(BuildContext context) {
  return (context
      .dependOnInheritedWidgetOfExactType<AppBarWithSearchSwitch>());
}