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

Unified Diff: sky/sdk/lib/widgets/checkbox.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
Index: sky/sdk/lib/widgets/checkbox.dart
diff --git a/sky/sdk/lib/widgets/checkbox.dart b/sky/sdk/lib/widgets/checkbox.dart
index 524d26d9531376b7378fa3f592c89770d47a1ba9..f52cafa23bcc82743a5a8e0b86b9552c3c0ba559 100644
--- a/sky/sdk/lib/widgets/checkbox.dart
+++ b/sky/sdk/lib/widgets/checkbox.dart
@@ -16,8 +16,21 @@ const sky.Color _kDarkUncheckedColor = const sky.Color(0xB2FFFFFF);
const double _kEdgeSize = 20.0;
const double _kEdgeRadius = 1.0;
+/// A material design checkbox
+///
+/// The checkbox itself does not maintain any state. Instead, when the state of
+/// the checkbox changes, the component calls the `onChange` callback. Most
+/// components that use a checkbox will listen for the `onChange` callback and
+/// rebuild the checkbox with a new `value` to update the visual appearance of
+/// the checkbox.
+///
+/// <https://www.google.com/design/spec/components/lists-controls.html#lists-controls-types-of-list-controls>
class Checkbox extends Toggleable {
+ /// Constructs a checkbox
+ ///
+ /// * `value` determines whether the checkbox is checked.
+ /// * `onChanged` is called whenever the state of the checkbox should change.
Checkbox({
String key,
bool value,

Powered by Google App Engine
This is Rietveld 408576698