Add multi-line flag to semantics#36297
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.
Why is null allowed at all?
There was a problem hiding this comment.
Same as other text-related fields. Not all semantics nodes are about text editing.
There was a problem hiding this comment.
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.
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.
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.
RenderEditable doesn't set the isEnabled flag.
50414ff to
c004059
Compare
5ae1720 to
886fbad
Compare

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?