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

Unified Diff: sky/sdk/lib/widgets/README.md

Issue 1231873007: Make changing themes work again. (Closed) Base URL: https://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/rendering/README.md ('k') | sky/sdk/lib/widgets/material.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/README.md
diff --git a/sky/sdk/lib/widgets/README.md b/sky/sdk/lib/widgets/README.md
index 478b64393227c545f2cf1a9711d7e3d824bd5c81..70df5f226cfcf46509e01b4c3023defa2c4dd3dc 100644
--- a/sky/sdk/lib/widgets/README.md
+++ b/sky/sdk/lib/widgets/README.md
@@ -355,6 +355,10 @@ Let's walk through the differences in `MyDialog` caused by its being stateful:
variables because those represent the internal state of the object and `this`
is the authoritative source of that state.
+ When implementing a `StatefulComponent`, make sure to call
+ `super.syncFields(source)` from within your `syncFields()` method,
+ unless you are extending `StatefulComponent` directly.
+
Finally, when the user taps on the "Save" button, `MyDialog` follows the same
pattern as `MyCheckbox` and calls a function passed in by its parent component
to return the final value of the checkbox up the hierarchy.
@@ -427,6 +431,20 @@ copies of a particular widget to fill its visible region:
stateful subcomponents will remain attached to the same semantic entry rather
than the entry in the same numerical position in the viewport.
+Useful debugging tools
+----------------------
+
+This is a quick way to dump the entire widget tree to the console.
+This can be quite useful in figuring out exactly what is going on when
+working with the widgets system. For this to work, you have to have
+launched your app with `runApp()`.
+
+```dart
+import 'package:sky/widget/widget.dart';
+
+debugDumpApp();
+```
+
Dependencies
------------
« no previous file with comments | « sky/sdk/lib/rendering/README.md ('k') | sky/sdk/lib/widgets/material.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698