Skip to content

Commit 3a6d661

Browse files
authored
Update basic_test.dart for M3 compliance (#129714)
## Description This PR fixes two test failures in `basic_test.dart` which surfaced when switching to M3 (see flutter/flutter#127501) Those failures are related to M3 typography which sets line height to 1.43. Forcing line height to 1.0 seems reasonable for these particular tests. With this change these two test are successful for both M2 and M3. ## Related Issue fixes flutter/flutter#129713 ## Tests Updates 2 tests.
1 parent 7b85956 commit 3a6d661

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/flutter/test/widgets/basic_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ void main() {
471471
children: <Widget>[
472472
Text('big text',
473473
key: key1,
474-
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1),
474+
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1, height: 1.0),
475475
),
476476
Text('one\ntwo\nthree\nfour\nfive\nsix\nseven',
477477
key: key2,
478-
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2),
478+
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2, height: 1.0),
479479
),
480480
],
481481
),
@@ -526,11 +526,11 @@ void main() {
526526
children: <Widget>[
527527
Text('big text',
528528
key: key1,
529-
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1),
529+
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1, height: 1.0),
530530
),
531531
Text('one\ntwo\nthree\nfour\nfive\nsix\nseven',
532532
key: key2,
533-
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2),
533+
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2, height: 1.0),
534534
),
535535
const FlutterLogo(size: 250),
536536
],

0 commit comments

Comments
 (0)