Skip to content

[CP] Fix assertion when a WidgetSpan is scaled by certain textScaleFactor values #131004

@LongCatIsLooong

Description

@LongCatIsLooong

Issue Link

#130588

Commit Hash

0d1cc33

Target

beta

PR Link

#130648

Changelog Description

Apps that use WidgetSpans in text widgets may throw an assertion when the text scale factor is set to certain values.

Impacted Users

WidgetSpan users

Impact Description

Apps that use WidgetSpans in text widgets may throw an assertion when the text scale factor is set to certain values, due to floating point precision.

Workaround

No easy workaround available

Risk

low

Test Coverage

yes

Validation Steps

Follow the repro steps in #130588, or run this test: https://github.com/flutter/flutter/pull/130648/files#diff-9fccc94ba0e90a5fb4c5b90761fe59995a5cf7bad0d580c6c2ff3cceafb495e5

Metadata

Metadata

Assignees

Labels

cp: approvedApproved cherry-pick requestcp: merge-to-betaCherry-picks that should be merged to betacp: mergedCherry-pick has been merged to the release branch.cp: reviewCherry-picks in the review queue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions