selectable_region_test.dart failure when switching to M3 #129626
Labels
f: material design
flutter/packages/flutter/material repository.
f: selection
SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs
found in release: 3.12
Found to occur in 3.12
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
P2
Important issues not at the top of the work list
r: fixed
Issue is closed as already fixed in a newer version
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
Is there an existing issue for this?
Steps to reproduce
When switching to Material 3 the following existing test fails:
flutter/packages/flutter/test/widgets/selectable_region_test.dart
Lines 1245 to 1286 in 7dbdacf
(This test was introduced in #127478).
M3 typography (
Typography.material2021
) setsTextStyle.height
to1.43
, M2 typography does not set line height.This particular test is broken because
textOffsetToPosition
returns the wrong vertical position (probably related to line height).Visually the line height also affects the rendering (issue is described in #97262).
Expected results
Test succeeds
Actual results
Test fails
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: