@@ -14263,81 +14263,69 @@ void main() {
1426314263 );
1426414264 });
1426514265
14266- testWidgets(
14267- 'strut no force large strut',
14268- (WidgetTester tester) async {
14269- await tester.pumpWidget(
14270- MaterialApp(
14271- theme: ThemeData(platform: TargetPlatform.android, useMaterial3: false),
14272- home: const Material(
14273- child: Center(child: TextField(maxLines: 6, strutStyle: StrutStyle(fontSize: 25))),
14274- ),
14266+ testWidgets('strut no force large strut', (WidgetTester tester) async {
14267+ await tester.pumpWidget(
14268+ MaterialApp(
14269+ theme: ThemeData(platform: TargetPlatform.android, useMaterial3: false),
14270+ home: const Material(
14271+ child: Center(child: TextField(maxLines: 6, strutStyle: StrutStyle(fontSize: 25))),
1427514272 ),
14276- );
14273+ ),
14274+ );
1427714275
14278- expect(
14279- tester.getSize(find.byType(TextField)),
14280- // When the strut's height is larger than TextStyle's and forceStrutHeight
14281- // is disabled, then the StrutStyle takes precedence.
14282- const Size(800, 174),
14283- );
14284- },
14285- skip: isBrowser, // TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
14286- );
14276+ expect(
14277+ tester.getSize(find.byType(TextField)),
14278+ // When the strut's height is larger than TextStyle's and forceStrutHeight
14279+ // is disabled, then the StrutStyle takes precedence.
14280+ const Size(800, 174),
14281+ );
14282+ });
1428714283
14288- testWidgets(
14289- 'strut height override',
14290- (WidgetTester tester) async {
14291- await tester.pumpWidget(
14292- MaterialApp(
14293- theme: ThemeData(platform: TargetPlatform.android, useMaterial3: false),
14294- home: const Material(
14295- child: Center(
14296- child: TextField(
14297- maxLines: 3,
14298- strutStyle: StrutStyle(fontSize: 8, forceStrutHeight: true),
14299- ),
14284+ testWidgets('strut height override', (WidgetTester tester) async {
14285+ await tester.pumpWidget(
14286+ MaterialApp(
14287+ theme: ThemeData(platform: TargetPlatform.android, useMaterial3: false),
14288+ home: const Material(
14289+ child: Center(
14290+ child: TextField(
14291+ maxLines: 3,
14292+ strutStyle: StrutStyle(fontSize: 8, forceStrutHeight: true),
1430014293 ),
1430114294 ),
1430214295 ),
14303- );
14296+ ),
14297+ );
1430414298
14305- expect(
14306- tester.getSize(find.byType(TextField)),
14307- // The smaller font size of strut make the field shorter than normal.
14308- const Size(800, 48),
14309- );
14310- },
14311- skip: isBrowser, // TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
14312- );
14299+ expect(
14300+ tester.getSize(find.byType(TextField)),
14301+ // The smaller font size of strut make the field shorter than normal.
14302+ const Size(800, 48),
14303+ );
14304+ });
1431314305
14314- testWidgets(
14315- 'strut forces field taller',
14316- (WidgetTester tester) async {
14317- await tester.pumpWidget(
14318- MaterialApp(
14319- theme: ThemeData(platform: TargetPlatform.android, useMaterial3: false),
14320- home: const Material(
14321- child: Center(
14322- child: TextField(
14323- maxLines: 3,
14324- style: TextStyle(fontSize: 10),
14325- strutStyle: StrutStyle(fontSize: 18, forceStrutHeight: true),
14326- ),
14306+ testWidgets('strut forces field taller', (WidgetTester tester) async {
14307+ await tester.pumpWidget(
14308+ MaterialApp(
14309+ theme: ThemeData(platform: TargetPlatform.android, useMaterial3: false),
14310+ home: const Material(
14311+ child: Center(
14312+ child: TextField(
14313+ maxLines: 3,
14314+ style: TextStyle(fontSize: 10),
14315+ strutStyle: StrutStyle(fontSize: 18, forceStrutHeight: true),
1432714316 ),
1432814317 ),
1432914318 ),
14330- );
14319+ ),
14320+ );
1433114321
14332- expect(
14333- tester.getSize(find.byType(TextField)),
14334- // When the strut fontSize is larger than a provided TextStyle, the
14335- // strut's height takes precedence.
14336- const Size(800, 78),
14337- );
14338- },
14339- skip: isBrowser, // TODO(mdebbar): https://github.com/flutter/flutter/issues/32243
14340- );
14322+ expect(
14323+ tester.getSize(find.byType(TextField)),
14324+ // When the strut fontSize is larger than a provided TextStyle, the
14325+ // strut's height takes precedence.
14326+ const Size(800, 78),
14327+ );
14328+ });
1434114329
1434214330 testWidgets('Caret center position', (WidgetTester tester) async {
1434314331 await tester.pumpWidget(
0 commit comments