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

Side by Side Diff: sky/sdk/lib/widgets/drawer_item.dart

Issue 1233983002: Rename MenuItem to DrawerItem (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/widgets/drawer_divider.dart ('k') | sky/sdk/lib/widgets/menu_divider.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:sky' as sky; 5 import 'dart:sky' as sky;
6 6
7 import 'package:sky/painting/text_style.dart'; 7 import 'package:sky/painting/text_style.dart';
8 import 'package:sky/theme/colors.dart' as colors; 8 import 'package:sky/theme/colors.dart' as colors;
9 import 'package:sky/widgets/basic.dart'; 9 import 'package:sky/widgets/basic.dart';
10 import 'package:sky/widgets/button_base.dart'; 10 import 'package:sky/widgets/button_base.dart';
11 import 'package:sky/widgets/default_text_style.dart'; 11 import 'package:sky/widgets/default_text_style.dart';
12 import 'package:sky/widgets/icon.dart'; 12 import 'package:sky/widgets/icon.dart';
13 import 'package:sky/widgets/ink_well.dart'; 13 import 'package:sky/widgets/ink_well.dart';
14 import 'package:sky/widgets/theme.dart'; 14 import 'package:sky/widgets/theme.dart';
15 import 'package:sky/widgets/widget.dart'; 15 import 'package:sky/widgets/widget.dart';
16 16
17 class MenuItem extends ButtonBase { 17 class DrawerItem extends ButtonBase {
18 MenuItem({ String key, this.icon, this.children, this.onPressed, this.selected : false }) 18 DrawerItem({ String key, this.icon, this.children, this.onPressed, this.select ed: false })
19 : super(key: key); 19 : super(key: key);
20 20
21 String icon; 21 String icon;
22 List<Widget> children; 22 List<Widget> children;
23 Function onPressed; 23 Function onPressed;
24 bool selected; 24 bool selected;
25 25
26 void syncFields(MenuItem source) { 26 void syncFields(DrawerItem source) {
27 icon = source.icon; 27 icon = source.icon;
28 children = source.children; 28 children = source.children;
29 onPressed = source.onPressed; 29 onPressed = source.onPressed;
30 selected = source.selected; 30 selected = source.selected;
31 super.syncFields(source); 31 super.syncFields(source);
32 } 32 }
33 33
34 TextStyle _getTextStyle(ThemeData themeData) { 34 TextStyle _getTextStyle(ThemeData themeData) {
35 TextStyle result = themeData.text.body2; 35 TextStyle result = themeData.text.body2;
36 if (selected) 36 if (selected)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 child: new Container( 89 child: new Container(
90 height: 48.0, 90 height: 48.0,
91 decoration: new BoxDecoration(backgroundColor: _getBackgroundColor(theme Data)), 91 decoration: new BoxDecoration(backgroundColor: _getBackgroundColor(theme Data)),
92 child: new InkWell( 92 child: new InkWell(
93 child: new Flex(flexChildren) 93 child: new Flex(flexChildren)
94 ) 94 )
95 ) 95 )
96 ); 96 );
97 } 97 }
98 } 98 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/drawer_divider.dart ('k') | sky/sdk/lib/widgets/menu_divider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698