of static method

StackRouterScope? of(
  1. BuildContext context, {
  2. bool watch = false,
})

Implementation

static StackRouterScope? of(BuildContext context, {bool watch = false}) {
  if (watch) {
    return context.dependOnInheritedWidgetOfExactType<StackRouterScope>();
  }
  return context.findAncestorWidgetOfExactType<StackRouterScope>();
}