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

Unified Diff: sky/sdk/lib/framework/components2/input.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/ink_well.dart ('k') | sky/sdk/lib/framework/components2/material.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/input.dart
diff --git a/sky/sdk/lib/framework/components2/input.dart b/sky/sdk/lib/framework/components2/input.dart
index 951e2bde117a2e0186a7e74ac987fd946005168c..c8a5477fb728d2d0aa85a027cc70faae2f72de92 100644
--- a/sky/sdk/lib/framework/components2/input.dart
+++ b/sky/sdk/lib/framework/components2/input.dart
@@ -50,10 +50,17 @@ class Input extends Component {
// padding: 7px;
// border-bottom: 2px solid ${Blue[500]};''';
- ValueChanged onChanged;
String placeholder;
+ ValueChanged onChanged;
bool focused = false;
+ void syncFields(Input source) {
+ placeholder = source.placeholder;
+ onChanged = source.onChanged;
+ focused = source.focused;
+ super.syncFields(source);
+ }
+
String _value = '';
bool _isAttachedToKeyboard = false;
EditableString _editableValue;
« no previous file with comments | « sky/sdk/lib/framework/components2/ink_well.dart ('k') | sky/sdk/lib/framework/components2/material.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698