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

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

Issue 1235443002: Support for icon theming (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix analyzer warning 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/stocks/lib/main.dart ('k') | sky/sdk/example/widgets/tabs.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 9d581f0ce5e52efc88b53838e0c5f5f89e5bd198..0868fd1f68e7947b457f2ea55067aa3c2a53cc84 100644
--- a/sky/sdk/example/stocks/lib/stock_home.dart
+++ b/sky/sdk/example/stocks/lib/stock_home.dart
@@ -6,6 +6,7 @@ import 'package:sky/editing/input.dart';
import 'package:sky/animation/animation_performance.dart';
import 'package:sky/widgets/animated_component.dart';
import 'package:sky/widgets/animated_container.dart';
+import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets/basic.dart';
import 'package:sky/widgets/drawer.dart';
import 'package:sky/widgets/drawer_header.dart';
@@ -60,12 +61,21 @@ class StockHome extends AnimatedComponent {
AnimatedContainer _snackbarTransform;
void _handleSearchBegin() {
+ navigator.pushState("/search", (_) {
+ setState(() {
+ _isSearching = false;
+ _searchQuery = null;
+ });
+ });
setState(() {
_isSearching = true;
});
}
void _handleSearchEnd() {
+ assert(navigator.currentRoute.name == '/search');
+ navigator.pop();
+ assert(navigator.currentRoute.name == '/');
setState(() {
_isSearching = false;
_searchQuery = null;
@@ -181,15 +191,15 @@ class StockHome extends AnimatedComponent {
Widget buildToolBar() {
return new ToolBar(
left: new IconButton(
- icon: 'navigation/menu_white',
+ icon: "navigation/menu",
onPressed: _handleOpenDrawer),
center: new Text('Stocks'),
right: [
new IconButton(
- icon: 'action/search_white',
+ icon: "action/search",
onPressed: _handleSearchBegin),
new IconButton(
- icon: 'navigation/more_vert_white',
+ icon: "navigation/more_vert",
onPressed: _handleMenuShow)
]
);
@@ -241,7 +251,7 @@ class StockHome extends AnimatedComponent {
Widget buildSearchBar() {
return new ToolBar(
left: new IconButton(
- icon: 'navigation/arrow_back_grey600',
+ icon: "navigation/arrow_back",
onPressed: _handleSearchEnd),
center: new Input(
focused: true,
@@ -280,7 +290,8 @@ class StockHome extends AnimatedComponent {
Widget buildFloatingActionButton() {
var widget = new FloatingActionButton(
- child: new Icon(type: 'content/add_white', size: 24),
+ child: new Icon(type: 'content/add', size: 24),
+ backgroundColor: colors.RedAccent[200],
onPressed: _handleStockPurchased
);
if (_snackbarTransform != null)
« no previous file with comments | « sky/sdk/example/stocks/lib/main.dart ('k') | sky/sdk/example/widgets/tabs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698