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

Unified Diff: sky/sdk/lib/widgets/dialog.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/widgets/checkbox.dart ('k') | sky/sdk/lib/widgets/widget.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/dialog.dart
diff --git a/sky/sdk/lib/widgets/dialog.dart b/sky/sdk/lib/widgets/dialog.dart
index fc20694e529578cf9379b6ed5a58237cbcfba605..20e8650cbf3467dea34145d5d483af8f95a7409e 100644
--- a/sky/sdk/lib/widgets/dialog.dart
+++ b/sky/sdk/lib/widgets/dialog.dart
@@ -8,6 +8,9 @@ import 'default_text_style.dart';
import 'material.dart';
import "theme.dart";
+/// A material design dialog
+///
+/// <https://www.google.com/design/spec/components/dialogs.html>
class Dialog extends Component {
Dialog({
String key,
@@ -17,12 +20,22 @@ class Dialog extends Component {
this.onDismiss
}) : super(key: key);
+ /// The (optional) title of the dialog is displayed in a large font at the top
Hixie 2015/07/08 15:10:57 This is an interesting convention (putting the doc
abarth-chromium 2015/07/08 15:29:29 I was just experimenting with different approaches
+ /// of the dialog.
final Widget title;
+
+ /// The (optional) content of the dialog is displayed in the center of the
+ /// dialog in a lighter font.
final Widget content;
+
+ /// The (optional) set of actions that are displayed at the bottom of the
+ /// dialog.
final List<Widget> actions;
+
+ /// An (optional) callback that is called when the dialog is dismissed.
final Function onDismiss;
- Color get color {
+ Color get _color {
switch (Theme.of(this).brightness) {
case ThemeBrightness.light:
return colors.White;
@@ -73,7 +86,7 @@ class Dialog extends Component {
constraints: new BoxConstraints(minWidth: 280.0),
child: new Material(
level: 4,
- color: color,
+ color: _color,
child: new ShrinkWrapWidth(
child: new Block(children)
)
« no previous file with comments | « sky/sdk/lib/widgets/checkbox.dart ('k') | sky/sdk/lib/widgets/widget.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698