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

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

Issue 1030963005: Remove the |style| parameter from Material (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: type fix 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
« no previous file with comments | « sky/framework/components/drawer.dart ('k') | sky/framework/components/material.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 '../fn.dart'; 5 import '../fn.dart';
6 import '../theme/colors.dart';
7 import 'ink_well.dart';
6 import 'material.dart'; 8 import 'material.dart';
7 import '../theme/colors.dart';
8 9
9 class FloatingActionButton extends Component { 10 class FloatingActionButton extends Component {
10 // TODO(abarth): We need a better way to become a container for absolutely 11 // TODO(abarth): We need a better way to become a container for absolutely
11 // positioned elements. 12 // positioned elements.
12 static final Style _style = new Style(''' 13 static final Style _style = new Style('''
13 transform: translateX(0); 14 transform: translateX(0);
14 width: 56px; 15 width: 56px;
15 height: 56px; 16 height: 56px;
16 background-color: ${Red[500]}; 17 background-color: ${Red[500]};
17 border-radius: 28px;''' 18 border-radius: 28px;'''
(...skipping 16 matching lines...) Expand all
34 FloatingActionButton({ Object key, this.content, this.level: 0 }) 35 FloatingActionButton({ Object key, this.content, this.level: 0 })
35 : super(key: key); 36 : super(key: key);
36 37
37 Node build() { 38 Node build() {
38 List<Node> children = []; 39 List<Node> children = [];
39 40
40 if (content != null) 41 if (content != null)
41 children.add(content); 42 children.add(content);
42 43
43 return new Container( 44 return new Container(
44 key: "Container",
45 style: level > 0 ? _style.extend(Material.shadowStyle[level]) : _style, 45 style: level > 0 ? _style.extend(Material.shadowStyle[level]) : _style,
46 children: [ 46 children: [new StyleNode(new InkWell(children: children), _clipStyle)]
47 new Material(
48 key: "Clip",
49 style: _clipStyle,
50 children: children
51 )
52 ]
53 ); 47 );
54 } 48 }
55 } 49 }
OLDNEW
« no previous file with comments | « sky/framework/components/drawer.dart ('k') | sky/framework/components/material.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698