-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Add multi-line flag to semantics #36297
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
|
You'll also need to update: https://github.com/flutter/flutter/blob/master/packages/flutter_test/lib/src/matchers.dart#L397 |
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.
Why is null allowed at all?
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.
Same as other text-related fields. Not all semantics nodes are about text editing.
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.
nit: when you say "in combination with" do you mean that textField must also be set to true? If so, I'd spell it out.
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.
A comment in proxy_box.dart implies that null is a valid value for this field. Let's document what null means vs others.
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.
How are flags matched? Does this make sure that isMultiline flag is off? It is a little surprising that only one flag is on. For example, I'd expect isEnabled to also be on.
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.
RenderEditable doesn't set the isEnabled flag.
50414ff to
c004059
Compare
5ae1720 to
886fbad
Compare
yjbanov
left a comment
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.

Description
This flag is currently only used in the web engine to decide whether to create an
<input>or<textarea>element.This PR depends on the engine PR: flutter/engine#9850
Related Issues
Fixes #34265
Tests
I added the following tests:
test/widgets/editable_text_test.dart: "EditableText sets multi-line flag in semantics"Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?