Slide 17
Slide 17 text
RouterDelegate
A delegate that is used by the Router widget to
build and configure a navigating widget.
class AppRouterDelegate extends
RouterDelegate
with ChangeNotifier {
@override
Widget build(BuildContext context) {
var browserState = routerState.browserState!;
return AuthGuard(
child: Navigator(
pages: [...],
onPopPage: (...) {...},
),
);
}
}
Defines app-specific behavior of how
the Router learns about changes in
app state and how it responds to
them.