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

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

Issue 1232313002: Use package:sky imports consistently (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix BUILD.gn 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/button_base.dart ('k') | sky/sdk/lib/widgets/checkbox.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 'basic.dart'; 5 import 'package:sky/widgets/basic.dart';
6 import 'material.dart'; 6 import 'package:sky/widgets/material.dart';
7 7
8 /// A material design card 8 /// A material design card
9 /// 9 ///
10 /// <https://www.google.com/design/spec/components/cards.html> 10 /// <https://www.google.com/design/spec/components/cards.html>
11 class Card extends Component { 11 class Card extends Component {
12 Card({ String key, this.child, this.color }) : super(key: key); 12 Card({ String key, this.child, this.color }) : super(key: key);
13 13
14 final Widget child; 14 final Widget child;
15 final Color color; 15 final Color color;
16 16
17 Widget build() { 17 Widget build() {
18 return new Container( 18 return new Container(
19 margin: const EdgeDims.all(4.0), 19 margin: const EdgeDims.all(4.0),
20 child: new Material( 20 child: new Material(
21 color: color, 21 color: color,
22 type: MaterialType.card, 22 type: MaterialType.card,
23 level: 2, 23 level: 2,
24 child: new ClipRRect( 24 child: new ClipRRect(
25 xRadius: edges[MaterialType.card], 25 xRadius: edges[MaterialType.card],
26 yRadius: edges[MaterialType.card], 26 yRadius: edges[MaterialType.card],
27 child: child 27 child: child
28 ) 28 )
29 ) 29 )
30 ); 30 );
31 } 31 }
32 } 32 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/button_base.dart ('k') | sky/sdk/lib/widgets/checkbox.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698