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 https://github.com/flutter/flutter/pull/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 https://github.com/flutter/flutter/issues/129713 ## Tests Updates 2 tests.
This commit is contained in:
@@ -471,11 +471,11 @@ void main() {
|
||||
children: <Widget>[
|
||||
Text('big text',
|
||||
key: key1,
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1),
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1, height: 1.0),
|
||||
),
|
||||
Text('one\ntwo\nthree\nfour\nfive\nsix\nseven',
|
||||
key: key2,
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2),
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2, height: 1.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -526,11 +526,11 @@ void main() {
|
||||
children: <Widget>[
|
||||
Text('big text',
|
||||
key: key1,
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1),
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize1, height: 1.0),
|
||||
),
|
||||
Text('one\ntwo\nthree\nfour\nfive\nsix\nseven',
|
||||
key: key2,
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2),
|
||||
style: const TextStyle(fontFamily: 'FlutterTest', fontSize: fontSize2, height: 1.0),
|
||||
),
|
||||
const FlutterLogo(size: 250),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user