OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import '../editing/editable_string.dart'; | 5 import '../editing/editable_string.dart'; |
6 import '../editing/editable_text.dart'; | 6 import '../editing/editable_text.dart'; |
7 import '../editing/keyboard.dart'; | 7 import '../editing/keyboard.dart'; |
8 import '../fn.dart'; | 8 import '../fn.dart'; |
9 import '../theme/colors.dart'; | 9 import '../theme/colors.dart'; |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 Node build() { | 68 Node build() { |
69 if (focused && !_isAttachedToKeyboard) { | 69 if (focused && !_isAttachedToKeyboard) { |
70 keyboard.show(_editableValue.stub); | 70 keyboard.show(_editableValue.stub); |
71 _isAttachedToKeyboard = true; | 71 _isAttachedToKeyboard = true; |
72 } | 72 } |
73 | 73 |
74 List<Node> children = []; | 74 List<Node> children = []; |
75 | 75 |
76 if (placeholder != null && _value.isEmpty) { | 76 if (placeholder != null && _value.isEmpty) { |
77 children.add(new Container( | 77 children.add(new Container( |
78 style: _placeholderStyle, | 78 styles: [_placeholderStyle], |
79 children: [new Text(placeholder)] | 79 children: [new Text(placeholder)] |
80 )); | 80 )); |
81 } | 81 } |
82 | 82 |
83 children.add(new EditableText(value: _editableValue, focused: focused)); | 83 children.add(new EditableText(value: _editableValue, focused: focused)); |
84 | 84 |
85 return new Container( | 85 return new Container( |
86 style: _style, | 86 styles: [_style], |
87 inlineStyle: focused ? _focusedInlineStyle : null, | 87 inlineStyle: focused ? _focusedInlineStyle : null, |
88 children: children | 88 children: children |
89 ); | 89 ); |
90 } | 90 } |
91 } | 91 } |
OLD | NEW |