[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:
홍종표
2022-09-29 03:11:15 +09:00
committed by GitHub
parent dc3052dcf1
commit edb2367cf8
5 changed files with 8 additions and 10 deletions

View File

@ -1,3 +1,7 @@
## 5.0.3
- Changes examples to use the routerConfig API
## 5.0.2
- Fixes missing code example in ShellRoute documentation.

View File

@ -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,
);

View File

@ -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,
),
);

View File

@ -89,9 +89,7 @@ class ShellRouteExampleApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
routeInformationParser: _router.routeInformationParser,
routerDelegate: _router.routerDelegate,
routeInformationProvider: _router.routeInformationProvider,
routerConfig: _router,
);
}
}

View File

@ -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