-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/engine
#8706Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Description
Currently we expose Paragraph.width, which is the incoming max width constraint when the text wraps. This is the right width to expose for consistent rendering of paragraphs. We also expose Paragraph.intrinsicWidth, which is useful for some effects. But one width we don't expose is the width of the longest line, that is, the actual width that the paragraph was wrapped to. I propose we add this as Paragraph.longestLine, assuming we can compute it with minimal overhead over our current computation.
This is Paragraph.longestLine:

Once we have this, we can then add features to the framework to switch whether a particular paragraph is sized based on the width or the longestLine.
freezy, sroddy and arvid220u
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
