mirror of
https://github.com/flutter/packages.git
synced 2025-07-01 23:51:55 +08:00
[go_router]CHANGE EXAMPLE Provider, Delegate, Parser to routerConfig (#2649)
* [go_router] CHANGE Provider, Delegate, Parser to routerConfig * Upgrade Verison * Update packages/go_router/CHANGELOG.md Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com> Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
## 5.0.3
|
||||
|
||||
- Changes examples to use the routerConfig API
|
||||
|
||||
## 5.0.2
|
||||
|
||||
- Fixes missing code example in ShellRoute documentation.
|
||||
|
@ -30,9 +30,7 @@ class App extends StatelessWidget {
|
||||
// add the login info into the tree as app state that can change over time
|
||||
@override
|
||||
Widget build(BuildContext context) => MaterialApp.router(
|
||||
routeInformationProvider: _router.routeInformationProvider,
|
||||
routeInformationParser: _router.routeInformationParser,
|
||||
routerDelegate: _router.routerDelegate,
|
||||
routerConfig: _router,
|
||||
title: title,
|
||||
debugShowCheckedModeBanner: false,
|
||||
);
|
||||
|
@ -31,9 +31,7 @@ class Bookstore extends StatelessWidget {
|
||||
Widget build(BuildContext context) => BookstoreAuthScope(
|
||||
notifier: _auth,
|
||||
child: MaterialApp.router(
|
||||
routeInformationProvider: _router.routeInformationProvider,
|
||||
routerDelegate: _router.routerDelegate,
|
||||
routeInformationParser: _router.routeInformationParser,
|
||||
routerConfig: _router,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -89,9 +89,7 @@ class ShellRouteExampleApp extends StatelessWidget {
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.blue,
|
||||
),
|
||||
routeInformationParser: _router.routeInformationParser,
|
||||
routerDelegate: _router.routerDelegate,
|
||||
routeInformationProvider: _router.routeInformationProvider,
|
||||
routerConfig: _router,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: go_router
|
||||
description: A declarative router for Flutter based on Navigation 2 supporting
|
||||
deep linking, data-driven routes and more
|
||||
version: 5.0.2
|
||||
version: 5.0.3
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/go_router
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22
|
||||
|
||||
|
Reference in New Issue
Block a user