of static method

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

Implementation

static TabsRouter of(BuildContext context, {bool watch = false}) {
  var scope = TabsRouterScope.of(context, watch: watch);
  assert(() {
    if (scope == null) {
      throw FlutterError(
          'AutoTabsRouter operation requested with a context that does not include an AutoTabsRouter.\n'
          'The context used to retrieve the AutoTabsRouter must be that of a widget that '
          'is a descendant of an AutoTabsRouter widget.');
    }
    return true;
  }());
  return scope!.controller;
}