Expose TextHeightBehavior in Text, RichText, and DefaultTextStyle.#48346
Expose TextHeightBehavior in Text, RichText, and DefaultTextStyle.#48346GaryQian merged 12 commits intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Tests will fail until manual roll of engine with engine-side landed. |
packages/flutter/lib/painting.dart
Outdated
There was a problem hiding this comment.
I think you meant to remove TextHeightBehavior here.
There was a problem hiding this comment.
I am trying to expose this as part of the painting library so that users do not have to import dart:ui to use this. Does that make sense?
There was a problem hiding this comment.
Oh right sorry, I see. I guess I don't see why not 👍
|
In manual roll process. Engine autoroller is stopped until this lands. |
|
@GaryQian - CI is still failing on this PR because it's missing some changes in tests that assert on I'm going to revert the upstream change in the engine and re-enable the roller - autorollers are getting behind and it's an issue for the Skia team. |
|
Also, I'm pretty sure this will have to count as a breaking change... Not sure how we count things like |
|
The golden failure is a new golden test. The toString test failure was a typo on my part, these particular tests for web don't run on engine until we roll into framework. |
e548dfe to
f735a0a
Compare
|
Will let #49742 land first, which will remove need for an engine roll to be in the PR. |
|
Just received a crash from then when I removed textHeightBehavior property from a Text widget and performed a hot-reload. Checked the source and you have a assertion for null in the setter in TextPaitner, even though null in is a perfectly valid value for this variable. In fact the constructors default value is to have this variable null. |
|
Thanks for the catch, let me see if I can get this sorted quickly! |
|
I just posted a quick PR to fix this. Thanks for bringing this to my attention! #50603 |
|
Hey, I don't see this property in any theme. Are we expected to add it to every Text widget? |
|
It should be set in DefaultTextStyle. |
Description
Adds support for TextHeightBehavior in Text, RichText, and DefaulttextStyle.
Depends on flutter/engine#15087.
Related Issues
Adds features to resolve #47175
Tests
Golden tests added. Additional tests in engine-side PR performs unit tests.
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
Did any tests fail when you ran them? Please read [Handling breaking changes].