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

Unified Diff: sky/sdk/lib/framework/components2/radio.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
Index: sky/sdk/lib/framework/components2/radio.dart
diff --git a/sky/sdk/lib/framework/components2/radio.dart b/sky/sdk/lib/framework/components2/radio.dart
index 4a4781cd72efb586727a1677c1018e065091fda8..5e4be29be2d15079681122eda551275497f231e1 100644
--- a/sky/sdk/lib/framework/components2/radio.dart
+++ b/sky/sdk/lib/framework/components2/radio.dart
@@ -16,15 +16,22 @@ class Radio extends ButtonBase {
Radio({
Object key,
- this.onChanged,
this.value,
- this.groupValue
+ this.groupValue,
+ this.onChanged
}) : super(key: key);
Object value;
Object groupValue;
ValueChanged onChanged;
+ void syncFields(Radio source) {
+ value = source.value;
+ groupValue = source.groupValue;
+ onChanged = source.onChanged;
+ super.syncFields(source);
+ }
+
UINode buildContent() {
// TODO(jackson): This should change colors with the theme
Color color = highlight ? colors.Purple[500] : const Color(0x8A000000);
« no previous file with comments | « sky/sdk/lib/framework/components2/popup_menu_item.dart ('k') | sky/sdk/lib/framework/components2/scrollable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698