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

Side by Side Diff: sky/framework/editing/editable_text.dart

Issue 1003553002: Update Button to be made of Material (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
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 '../fn.dart'; 5 import '../fn.dart';
6 import '../theme/colors.dart'; 6 import '../theme/colors.dart';
7 import 'dart:async'; 7 import 'dart:async';
8 import 'editable_string.dart'; 8 import 'editable_string.dart';
9 9
10 class EditableText extends Component { 10 class EditableText extends Component {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 children.add(new Text(value.text)); 69 children.add(new Text(value.text));
70 } else { 70 } else {
71 String beforeComposing = value.textBefore(value.composing); 71 String beforeComposing = value.textBefore(value.composing);
72 if (!beforeComposing.isEmpty) 72 if (!beforeComposing.isEmpty)
73 children.add(new Text(beforeComposing)); 73 children.add(new Text(beforeComposing));
74 74
75 String composing = value.textInside(value.composing); 75 String composing = value.textInside(value.composing);
76 if (!composing.isEmpty) { 76 if (!composing.isEmpty) {
77 children.add(new Container( 77 children.add(new Container(
78 key: 'composing', 78 key: 'composing',
79 style: _composingStyle, 79 styles: [_composingStyle],
80 children: [new Text(composing)] 80 children: [new Text(composing)]
81 )); 81 ));
82 } 82 }
83 83
84 String afterComposing = value.textAfter(value.composing); 84 String afterComposing = value.textAfter(value.composing);
85 if (!afterComposing.isEmpty) 85 if (!afterComposing.isEmpty)
86 children.add(new Text(afterComposing)); 86 children.add(new Text(afterComposing));
87 } 87 }
88 88
89 if (_showCursor) 89 if (_showCursor)
90 children.add(new Container(key: 'cursor', style: _cusorStyle)); 90 children.add(new Container(key: 'cursor', styles: [_cusorStyle]));
91 91
92 return new Container( 92 return new Container(
93 style: _style, 93 styles: [_style],
94 children: children 94 children: children
95 ); 95 );
96 } 96 }
97 } 97 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698