TabBarSelectionState of(BuildContext context)

The state from the closest instance of this class that encloses the given context.

Typical usage is as follows:

TabBarSelectionState<Foo> tabState = TabBarSelection.of/*<Foo>*/(context);

Source

static TabBarSelectionState<dynamic/*=T*/> of/*<T>*/(BuildContext context) {
  return context.ancestorStateOfType(const TypeMatcher<TabBarSelectionState<dynamic/*=T*/>>());
}