Merge pull request #2530 from abarth/to_string

Improve InputValue#toString
This commit is contained in:
Adam Barth 2016-03-09 13:56:53 -08:00
commit 778c3a05b1
2 changed files with 3 additions and 3 deletions

View File

@ -66,6 +66,7 @@ class TextRange {
end.hashCode end.hashCode
); );
String toString() => 'TextRange(start: $start, end: $end)';
} }
/// A range of text that represents a selection. /// A range of text that represents a selection.

View File

@ -101,7 +101,7 @@ class InputValue {
static const InputValue empty = const InputValue(); static const InputValue empty = const InputValue();
String toString() => '$runtimeType(text: $text, selection: $selection, composing: $composing)'; String toString() => '$runtimeType(text: \u2524$text\u251C, selection: $selection, composing: $composing)';
bool operator ==(dynamic other) { bool operator ==(dynamic other) {
if (identical(this, other)) if (identical(this, other))
@ -207,9 +207,8 @@ class RawInputLineState extends ScrollableState<RawInputLine> {
void didUpdateConfig(RawInputLine oldConfig) { void didUpdateConfig(RawInputLine oldConfig) {
if (_keyboardClient.inputValue != config.value) { if (_keyboardClient.inputValue != config.value) {
_keyboardClient.inputValue = config.value; _keyboardClient.inputValue = config.value;
if (_isAttachedToKeyboard) { if (_isAttachedToKeyboard)
_keyboardHandle.setEditingState(_keyboardClient.editingState); _keyboardHandle.setEditingState(_keyboardClient.editingState);
}
} }
} }