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

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

Issue 1172173002: Clean up a bunch of our Dart code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: upstream merge 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 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()
);
}
+
}
« 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