Skip to content

Commit

Permalink
fix: migrated location parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodev01 committed Jul 3, 2023
1 parent 123a36f commit 8df8349
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions examples/chapter_13/13.3.2/lib/router_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class MyRouteInformationParser extends RouteInformationParser<AppRoutePath> {
Future<AppRoutePath> parseRouteInformation(
RouteInformation routeInformation,
) async {
if (routeInformation.uri.path == AppRoutePath.home.path) {
if (routeInformation.location == AppRoutePath.home.path) {
return AppRoutePath.home;
}

if (routeInformation.uri.path == AppRoutePath.random.path) {
if (routeInformation.location == AppRoutePath.random.path) {
return AppRoutePath.random;
}

Expand All @@ -25,15 +25,15 @@ class MyRouteInformationParser extends RouteInformationParser<AppRoutePath> {
@override
RouteInformation? restoreRouteInformation(AppRoutePath configuration) {
if (configuration.isError) {
return RouteInformation(uri: Uri.parse(AppRoutePath.error.path));
return RouteInformation(location: AppRoutePath.error.path);
}

if (configuration.isHomePage) {
return RouteInformation(uri: Uri.parse(AppRoutePath.home.path));
return RouteInformation(location: AppRoutePath.home.path);
}

if (configuration.isRandomPage) {
return RouteInformation(uri: Uri.parse(AppRoutePath.random.path));
return RouteInformation(location: AppRoutePath.random.path);
}

return null;
Expand Down
12 changes: 6 additions & 6 deletions examples/chapter_13/13.3.2/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "586678f20e112219ed0f73215f01bcdf1d769824ba2ebae45ad918a9bfde9bdb"
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "0.2.0"
meta:
dependency: transitive
description:
Expand All @@ -108,10 +108,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.9.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -148,10 +148,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.5.2"
version: "0.5.1"
vector_math:
dependency: transitive
description:
Expand Down

0 comments on commit 8df8349

Please sign in to comment.