wouter 0.0.5
wouter: ^0.0.5 copied to clipboard
Supercharge your routering with wouter, simple yet advanced and fully customizable routing package.
wouter #
Supercharge your routering with wouter, simple yet advanced and fully customizable routing package.
BETA Release - Docs WIP #
this package is using path_to_regexp in order to match route pattern to a path
simple example:
class MyApp extends StatelessWidget {
final delegate = WouterRouterDelegate(
child: WouterSwitch(
routes: {
"/": (context, arguments) => MaterialPage(
child: HomeScreen(),
),
"/people": (context, arguments) => MaterialPage(
child: PeopleScreen(),
),
},
),
);
@override
Widget build(BuildContext context) => MaterialApp.router(
routerDelegate: delegate,
routeInformationParser: WouterRouteInformationParser(),
backButtonDispatcher: WouterBackButtonDispatcher(
delegate: delegate,
),
);
}