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

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: git pull 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..84415805811b4be45bbcd71ed3a527d9be7bbf44 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('''
@@ -102,4 +100,10 @@ class Input extends Component {
);
}
+ void didUnmount() {
+ if (_isAttachedToKeyboard)
+ keyboard.hide();
+ super.didUnmount();
+ }
+
}

Powered by Google App Engine
This is Rietveld 408576698