| 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 68a1018810d8869abd4c0b1c9084e3e7e567b269..951e2bde117a2e0186a7e74ac987fd946005168c 100644
|
| --- a/sky/sdk/lib/framework/components2/input.dart
|
| +++ b/sky/sdk/lib/framework/components2/input.dart
|
| @@ -14,6 +14,20 @@ import 'dart:sky' as sky;
|
| typedef void ValueChanged(value);
|
|
|
| class Input extends Component {
|
| +
|
| + Input({Object key,
|
| + this.placeholder,
|
| + this.onChanged,
|
| + this.focused})
|
| + : super(key: key, stateful: true) {
|
| + _editableValue = new EditableString(text: _value,
|
| + onUpdated: _handleTextUpdated);
|
| + onDidUnmount(() {
|
| + if (_isAttachedToKeyboard)
|
| + keyboard.hide();
|
| + });
|
| + }
|
| +
|
| // static final Style _style = new Style('''
|
| // transform: translateX(0);
|
| // margin: 8px;
|
| @@ -44,19 +58,6 @@ class Input extends Component {
|
| bool _isAttachedToKeyboard = false;
|
| EditableString _editableValue;
|
|
|
| - Input({Object key,
|
| - this.placeholder,
|
| - this.onChanged,
|
| - this.focused})
|
| - : super(key: key, stateful: true) {
|
| - _editableValue = new EditableString(text: _value,
|
| - onUpdated: _handleTextUpdated);
|
| - onDidUnmount(() {
|
| - if (_isAttachedToKeyboard)
|
| - keyboard.hide();
|
| - });
|
| - }
|
| -
|
| void _handleTextUpdated() {
|
| scheduleBuild();
|
| if (_value != _editableValue.text) {
|
| @@ -93,4 +94,5 @@ class Input extends Component {
|
| onPointerDown: (sky.Event e) => keyboard.showByRequest()
|
| );
|
| }
|
| +
|
| }
|
|
|