Align TextEditingValue and InputValue (#8922)

This patch prepares us to remove InputValue in favor of TextEditingValue.
This commit is contained in:
Adam Barth
2017-03-20 17:18:35 -07:00
committed by GitHub
parent d35a9db6fe
commit d443d598c2
14 changed files with 111 additions and 116 deletions

View File

@@ -38,14 +38,14 @@ class TestTextInput {
}
}
void updateEditingState(TextEditingState state) {
void updateEditingValue(TextEditingValue value) {
expect(_client, isNonZero);
PlatformMessages.handlePlatformMessage(
SystemChannels.textInput.name,
SystemChannels.textInput.codec.encodeMethodCall(
new MethodCall(
'TextInputClient.updateEditingState',
<dynamic>[_client, state.toJSON()],
<dynamic>[_client, value.toJSON()],
),
),
(_) {},
@@ -53,10 +53,9 @@ class TestTextInput {
}
void enterText(String text) {
updateEditingState(new TextEditingState(
updateEditingValue(new TextEditingValue(
text: text,
composingBase: 0,
composingExtent: text.length,
composing: new TextRange(start: 0, end: text.length),
));
}
}