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

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

Issue 1175753003: Kill onDidMount()/onDidUnmount() in favour of just overriding the relevant methods. (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/input.dart
diff --git a/sky/sdk/lib/framework/components2/input.dart b/sky/sdk/lib/framework/components2/input.dart
index c8a5477fb728d2d0aa85a027cc70faae2f72de92..6a858fd186c03758aadb3236dcb15325fba4a2e2 100644
--- a/sky/sdk/lib/framework/components2/input.dart
+++ b/sky/sdk/lib/framework/components2/input.dart
@@ -20,12 +20,10 @@ class Input extends Component {
this.onChanged,
this.focused})
: super(key: key, stateful: true) {
- _editableValue = new EditableString(text: _value,
- onUpdated: _handleTextUpdated);
- onDidUnmount(() {
- if (_isAttachedToKeyboard)
- keyboard.hide();
- });
+ _editableValue = new EditableString(
+ text: _value,
+ onUpdated: _handleTextUpdated
+ );
}
// static final Style _style = new Style('''
@@ -58,7 +56,6 @@ class Input extends Component {
placeholder = source.placeholder;
onChanged = source.onChanged;
focused = source.focused;
- super.syncFields(source);
}
String _value = '';
@@ -102,4 +99,10 @@ class Input extends Component {
);
}
+ void didUnmount() {
+ if (_isAttachedToKeyboard)
+ keyboard.hide();
+ super.didUnmount();
+ }
+
}
« no previous file with comments | « sky/sdk/lib/framework/components2/animated_component.dart ('k') | sky/sdk/lib/framework/components2/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698