of<T extends Object> static method
Returns the nearest typed router controller.
Implementation
static RouterController<T> of<T extends Object>(BuildContext context) {
final scope = context.getInheritedWidgetOfExactType<RouterScope>();
assert(scope != null, 'No generated router found in context.');
return scope!.controller as RouterController<T>;
}