-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Verify EditableText fires update on replaced controller #12276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds test to cover #12154. |
cursorColor: Colors.blue, | ||
selectionControls: materialTextSelectionControls, | ||
keyboardType: TextInputType.text, | ||
onChanged: (String value) {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial nit: style guide says to use {}
for empty maps and { }
for empty code blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
final MethodCall setStateCall = log.firstWhere((MethodCall methodCall) { | ||
return methodCall.method == 'TextInput.setEditingState'; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to be more precise about what should be in the log? e.g. that it only has one entry, or whatnot? What if there were two calls, one saying Wobble and one saying Wibble?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Was worried about testing some assumptions we don't care about here but the result is under-testing, and if someone's going to tweak this code, we should probably force them to check these tests anyway :-)
Adds a test that verifies that EditableText sends a TextInput.setEditingState message to the engine when the associated TextEditingController is replaced.
d13c670
to
780522f
Compare
Adds a test that verifies that EditableText sends a
TextInput.setEditingState message to the engine when the associated
TextEditingController is replaced.