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

Side by Side Diff: sky/framework/components/floating_action_button.dart

Issue 1006053002: Allow Effen Styles to be extendable (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: sdfsd Created 5 years, 9 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
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 '../fn.dart'; 5 import '../fn.dart';
6 import 'material.dart'; 6 import 'material.dart';
7 import '../theme/colors.dart'; 7 import '../theme/colors.dart';
8 8
9 class FloatingActionButton extends Component { 9 class FloatingActionButton extends Component {
10 static final Style _style = new Style(''' 10 static final Style _style = new Style('''
(...skipping 25 matching lines...) Expand all
36 36
37 FloatingActionButton({ Object key, this.content, this.level: 0 }) 37 FloatingActionButton({ Object key, this.content, this.level: 0 })
38 : super(key: key); 38 : super(key: key);
39 39
40 Node build() { 40 Node build() {
41 List<Node> children = []; 41 List<Node> children = [];
42 42
43 if (content != null) 43 if (content != null)
44 children.add(content); 44 children.add(content);
45 45
46 List<Style> containerStyle = [_style];
47 if (level > 0)
48 containerStyle.add(Material.shadowStyle[level]);
49
50 return new Container( 46 return new Container(
51 key: "Container", 47 key: "Container",
52 styles: containerStyle, 48 style: level > 0 ? _style.extend(Material.shadowStyle[level]) : _style,
53 children: [ 49 children: [
54 new Material( 50 new Material(
55 key: "Clip", 51 key: "Clip",
56 styles: [_clipStyle], 52 style: _clipStyle,
57 children: children 53 children: children
58 ) 54 )
59 ] 55 ]
60 ); 56 );
61 } 57 }
62 } 58 }
OLDNEW
« no previous file with comments | « sky/framework/components/fixed_height_scrollable.dart ('k') | sky/framework/components/icon.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698