of static method
Returns BrowserState of the ancestor.
Useful for navigation buttons and other parts of the browser UI.
The methods also makes the context depend on the browser URL.
Implementation
static BrowserState of(BuildContext context) {
context.dependOnInheritedWidgetOfExactType<_BrowserInherited>();
return context.findAncestorStateOfType<BrowserState>()!;
}