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

Unified Diff: sky/sdk/lib/framework/components2/checkbox.dart

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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/framework/components2/button_base.dart ('k') | sky/sdk/lib/framework/components2/drawer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/checkbox.dart
diff --git a/sky/sdk/lib/framework/components2/checkbox.dart b/sky/sdk/lib/framework/components2/checkbox.dart
index 706dc6020c09aaaa529d390a217a650ef106707b..2a1df9be1277067ad32a30bbca689891534c704f 100644
--- a/sky/sdk/lib/framework/components2/checkbox.dart
+++ b/sky/sdk/lib/framework/components2/checkbox.dart
@@ -19,6 +19,12 @@ class Checkbox extends ButtonBase {
bool checked;
ValueChanged onChanged;
+ void syncFields(Checkbox source) {
+ checked = source.checked;
+ onChanged = source.onChanged;
+ super.syncFields(source);
+ }
+
void _handleClick(sky.Event e) {
onChanged(!checked);
}
« no previous file with comments | « sky/sdk/lib/framework/components2/button_base.dart ('k') | sky/sdk/lib/framework/components2/drawer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698