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

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

Issue 1207373005: Add some dartdoc comments (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 | « no previous file | sky/sdk/lib/widgets/checkbox.dart » ('j') | sky/sdk/lib/widgets/dialog.dart » ('J')
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 '../theme/colors.dart' as colors; 5 import '../theme/colors.dart' as colors;
6 import 'basic.dart'; 6 import 'basic.dart';
7 import 'material.dart'; 7 import 'material.dart';
8 import "theme.dart"; 8 import "theme.dart";
9 9
10 /// A material design card
11 ///
12 /// <https://www.google.com/design/spec/components/cards.html>
10 class Card extends Component { 13 class Card extends Component {
11 Card({ String key, this.child, this.color }) : super(key: key); 14 Card({ String key, this.child, this.color }) : super(key: key);
12 15
13 final Widget child; 16 final Widget child;
14 final Color color; 17 final Color color;
15 18
16 Widget build() { 19 Widget build() {
17 return new Container( 20 return new Container(
18 margin: const EdgeDims.all(4.0), 21 margin: const EdgeDims.all(4.0),
19 child: new Material( 22 child: new Material(
20 color: color, 23 color: color,
21 type: MaterialType.card, 24 type: MaterialType.card,
22 level: 2, 25 level: 2,
23 child: new ClipRRect( 26 child: new ClipRRect(
24 xRadius: edges[MaterialType.card], 27 xRadius: edges[MaterialType.card],
25 yRadius: edges[MaterialType.card], 28 yRadius: edges[MaterialType.card],
26 child: child 29 child: child
27 ) 30 )
28 ) 31 )
29 ); 32 );
30 } 33 }
31 } 34 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/checkbox.dart » ('j') | sky/sdk/lib/widgets/dialog.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698