Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: sky/sdk/example/stocks/lib/stock_home.dart

Issue 1231753008: Support for anonymous state routes (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: re-upload Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/example/fitness/lib/home.dart ('k') | sky/sdk/lib/widgets/drawer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/stocks/lib/stock_home.dart
diff --git a/sky/sdk/example/stocks/lib/stock_home.dart b/sky/sdk/example/stocks/lib/stock_home.dart
index 5ee1905edeb3a2948022b57b27d9f63e80937cae..7e83be1c43eeb6bff96b9fa564c3d15a6e69ac08 100644
--- a/sky/sdk/example/stocks/lib/stock_home.dart
+++ b/sky/sdk/example/stocks/lib/stock_home.dart
@@ -57,7 +57,7 @@ class StockHome extends AnimatedComponent {
AnimationBuilder _snackbarTransform;
void _handleSearchBegin() {
- navigator.pushState("/search", (_) {
+ navigator.pushState(this, (_) {
setState(() {
_isSearching = false;
_searchQuery = null;
@@ -69,9 +69,8 @@ class StockHome extends AnimatedComponent {
}
void _handleSearchEnd() {
- assert(navigator.currentRoute.name == '/search');
+ assert(navigator.currentRoute.key == this);
navigator.pop();
- assert(navigator.currentRoute.name == '/');
setState(() {
_isSearching = false;
_searchQuery = null;
@@ -95,9 +94,6 @@ class StockHome extends AnimatedComponent {
}
void _handleDrawerStatusChange(DrawerStatus status) {
- if (status == DrawerStatus.inactive && navigator.currentRoute.name == "/drawer") {
- navigator.pop();
- }
setState(() {
_drawerStatus = status;
});
« no previous file with comments | « sky/sdk/example/fitness/lib/home.dart ('k') | sky/sdk/lib/widgets/drawer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698