@@ -380,7 +380,7 @@ void main() {
380
380
381
381
expect (
382
382
tester.getSize (find.byType (CupertinoTextField )),
383
- const Size (200 , 31 ), // 31 is the height of the default font + padding etc.
383
+ const Size (200 , 29 ), // 29 is the height of the default font + padding etc.
384
384
);
385
385
},
386
386
);
@@ -401,7 +401,7 @@ void main() {
401
401
402
402
expect (
403
403
tester.getSize (find.byType (CupertinoTextField )),
404
- const Size (200 , 31 ), // 31 is the height of the default font (17) + decoration (12).
404
+ const Size (200 , 29 ), // 29 is the height of the default font (17) + decoration (12).
405
405
);
406
406
},
407
407
);
@@ -508,7 +508,7 @@ void main() {
508
508
509
509
expect (
510
510
tester.getSize (find.byType (CupertinoTextField )),
511
- const Size (200 , 65 ), // 65 is the height of the default font (17) * maxlines (3) + decoration height (12).
511
+ const Size (200 , 63 ), // 63 is the height of the default font (17) * maxlines (3) + decoration height (12).
512
512
);
513
513
},
514
514
);
@@ -529,7 +529,7 @@ void main() {
529
529
530
530
expect (
531
531
tester.getSize (find.byType (CupertinoTextField )),
532
- const Size (200 , 65 ),
532
+ const Size (200 , 63 ),
533
533
);
534
534
},
535
535
);
@@ -556,7 +556,7 @@ void main() {
556
556
557
557
expect (
558
558
tester.getSize (find.byType (CupertinoTextField )),
559
- const Size (200 , 38 ),
559
+ const Size (200 , 36 ),
560
560
);
561
561
},
562
562
// TODO(mdebbar): Strut styles support.
@@ -586,7 +586,7 @@ void main() {
586
586
587
587
expect (
588
588
tester.getSize (find.byType (CupertinoTextField )),
589
- const Size (200 , 68 ),
589
+ const Size (200 , 66 ),
590
590
);
591
591
},
592
592
// TODO(mdebbar): Strut styles support.
@@ -686,7 +686,7 @@ void main() {
686
686
687
687
expect (
688
688
tester.getTopLeft (find.text ('initial' )) - tester.getTopLeft (find.byType (CupertinoTextField )),
689
- const Offset (7 .0 , 7 .0 ),
689
+ const Offset (6 .0 , 6 .0 ),
690
690
);
691
691
},
692
692
);
@@ -913,15 +913,15 @@ void main() {
913
913
);
914
914
915
915
expect (
916
- tester.getTopRight (find.byIcon (CupertinoIcons .add)).dx + 7 .0 , // 7px standard padding around input.
916
+ tester.getTopRight (find.byIcon (CupertinoIcons .add)).dx + 6 .0 , // 6px standard padding around input.
917
917
tester.getTopLeft (find.byType (EditableText )).dx,
918
918
);
919
919
920
920
expect (
921
921
tester.getTopLeft (find.byType (EditableText )).dx,
922
922
tester.getTopLeft (find.byType (CupertinoTextField )).dx
923
923
+ tester.getSize (find.byIcon (CupertinoIcons .add)).width
924
- + 7 .0 ,
924
+ + 6 .0 ,
925
925
);
926
926
},
927
927
);
@@ -944,7 +944,7 @@ void main() {
944
944
// The position should just be the edge of the whole text field plus padding.
945
945
expect (
946
946
tester.getTopLeft (find.byType (EditableText )).dx,
947
- tester.getTopLeft (find.byType (CupertinoTextField )).dx + 7 .0 ,
947
+ tester.getTopLeft (find.byType (CupertinoTextField )).dx + 6 .0 ,
948
948
);
949
949
950
950
await tester.enterText (find.byType (CupertinoTextField ), 'text input' );
@@ -958,7 +958,7 @@ void main() {
958
958
tester.getTopLeft (find.byType (EditableText )).dx,
959
959
tester.getTopLeft (find.byType (CupertinoTextField )).dx
960
960
+ tester.getSize (find.byIcon (CupertinoIcons .add)).width
961
- + 7 .0 ,
961
+ + 6 .0 ,
962
962
);
963
963
},
964
964
);
@@ -979,15 +979,15 @@ void main() {
979
979
);
980
980
981
981
expect (
982
- tester.getTopRight (find.byType (EditableText )).dx + 7 .0 ,
983
- tester.getTopLeft (find.byIcon (CupertinoIcons .add)).dx, // 7px standard padding around input.
982
+ tester.getTopRight (find.byType (EditableText )).dx + 6 .0 ,
983
+ tester.getTopLeft (find.byIcon (CupertinoIcons .add)).dx, // 6px standard padding around input.
984
984
);
985
985
986
986
expect (
987
987
tester.getTopRight (find.byType (EditableText )).dx,
988
988
tester.getTopRight (find.byType (CupertinoTextField )).dx
989
989
- tester.getSize (find.byIcon (CupertinoIcons .add)).width
990
- - 7 .0 ,
990
+ - 6 .0 ,
991
991
);
992
992
},
993
993
);
@@ -1170,7 +1170,7 @@ void main() {
1170
1170
1171
1171
expect (
1172
1172
tester.getTopRight (find.byType (EditableText )).dx,
1173
- 800.0 - 30.0 /* size of button */ - 7 .0 /* padding */ ,
1173
+ 800.0 - 30.0 /* size of button */ - 6 .0 /* padding */ ,
1174
1174
);
1175
1175
1176
1176
await tester.pumpWidget (
@@ -1188,7 +1188,7 @@ void main() {
1188
1188
expect (find.byIcon (CupertinoIcons .clear_thick_circled), findsNothing);
1189
1189
expect (
1190
1190
tester.getTopRight (find.byType (EditableText )).dx,
1191
- 800.0 - 7 .0 /* padding */ ,
1191
+ 800.0 - 6 .0 /* padding */ ,
1192
1192
);
1193
1193
1194
1194
await tester.enterText (find.byType (CupertinoTextField ), 'text input' );
@@ -1198,7 +1198,7 @@ void main() {
1198
1198
expect (find.text ('text input' ), findsOneWidget);
1199
1199
expect (
1200
1200
tester.getTopRight (find.byType (EditableText )).dx,
1201
- 800.0 - 30.0 - 7 .0 ,
1201
+ 800.0 - 30.0 - 6 .0 ,
1202
1202
);
1203
1203
1204
1204
await tester.pumpWidget (
@@ -1302,7 +1302,7 @@ void main() {
1302
1302
1303
1303
expect (
1304
1304
tester.getTopRight (find.byType (EditableText )).dx,
1305
- 800.0 - 30.0 /* size of button */ - 7 .0 /* padding */ ,
1305
+ 800.0 - 30.0 /* size of button */ - 6 .0 /* padding */ ,
1306
1306
);
1307
1307
1308
1308
controller.text = 'non empty text' ;
@@ -1314,7 +1314,7 @@ void main() {
1314
1314
// Still just takes the space of one widget.
1315
1315
expect (
1316
1316
tester.getTopRight (find.byType (EditableText )).dx,
1317
- 800.0 - 24.0 /* size of button */ - 7 .0 /* padding */ ,
1317
+ 800.0 - 24.0 /* size of button */ - 6 .0 /* padding */ ,
1318
1318
);
1319
1319
},
1320
1320
);
@@ -1334,7 +1334,7 @@ void main() {
1334
1334
1335
1335
expect (
1336
1336
tester.getSize (find.byType (CupertinoTextField )).height,
1337
- 31 .0 ,
1337
+ 29 .0 ,
1338
1338
);
1339
1339
1340
1340
await tester.pumpWidget (
@@ -1353,7 +1353,7 @@ void main() {
1353
1353
1354
1354
expect (
1355
1355
tester.getSize (find.byType (CupertinoTextField )).height,
1356
- 64 .0 ,
1356
+ 62 .0 ,
1357
1357
);
1358
1358
},
1359
1359
);
@@ -1371,7 +1371,7 @@ void main() {
1371
1371
1372
1372
expect (
1373
1373
tester.getSize (find.byType (CupertinoTextField )).height,
1374
- 31 .0 ,
1374
+ 29 .0 ,
1375
1375
);
1376
1376
1377
1377
await tester.pumpWidget (
@@ -1389,7 +1389,7 @@ void main() {
1389
1389
1390
1390
expect (
1391
1391
tester.getSize (find.byType (CupertinoTextField )).height,
1392
- 64 .0 ,
1392
+ 62 .0 ,
1393
1393
);
1394
1394
},
1395
1395
);
@@ -1440,15 +1440,15 @@ void main() {
1440
1440
1441
1441
expect (
1442
1442
tester.getSize (find.byType (CupertinoTextField )).height,
1443
- 31 .0 , // Initially one line high.
1443
+ 29 .0 , // Initially one line high.
1444
1444
);
1445
1445
1446
1446
await tester.enterText (find.byType (CupertinoTextField ), '\n ' );
1447
1447
await tester.pump ();
1448
1448
1449
1449
expect (
1450
1450
tester.getSize (find.byType (CupertinoTextField )).height,
1451
- 48 .0 , // Initially one line high.
1451
+ 46 .0 , // Initially one line high.
1452
1452
);
1453
1453
},
1454
1454
);
@@ -1468,15 +1468,15 @@ void main() {
1468
1468
1469
1469
expect (
1470
1470
tester.getSize (find.byType (CupertinoTextField )).height,
1471
- 31 .0 , // Initially one line high.
1471
+ 29 .0 , // Initially one line high.
1472
1472
);
1473
1473
1474
1474
await tester.enterText (find.byType (CupertinoTextField ), '\n ' );
1475
1475
await tester.pump ();
1476
1476
1477
1477
expect (
1478
1478
tester.getSize (find.byType (CupertinoTextField )).height,
1479
- 48 .0 , // Initially one line high.
1479
+ 46 .0 , // Initially one line high.
1480
1480
);
1481
1481
},
1482
1482
);
@@ -3009,14 +3009,14 @@ void main() {
3009
3009
3010
3010
expect (lastCharEndpoint.length, 1 );
3011
3011
// The last character is now on screen.
3012
- expect (lastCharEndpoint[0 ].point.dx, moreOrLessEquals (784 .73 , epsilon: 0.25 ));
3012
+ expect (lastCharEndpoint[0 ].point.dx, moreOrLessEquals (786 .73 , epsilon: 0.25 ));
3013
3013
3014
3014
final List <TextSelectionPoint > firstCharEndpoint = renderEditable.getEndpointsForSelection (
3015
3015
const TextSelection .collapsed (offset: 0 ), // First character's position.
3016
3016
);
3017
3017
expect (firstCharEndpoint.length, 1 );
3018
3018
// The first character is now offscreen to the left.
3019
- expect (firstCharEndpoint[0 ].point.dx, moreOrLessEquals (- 310 .20 , epsilon: 0.25 ));
3019
+ expect (firstCharEndpoint[0 ].point.dx, moreOrLessEquals (- 308 .20 , epsilon: 0.25 ));
3020
3020
}, variant: const TargetPlatformVariant (< TargetPlatform > { TargetPlatform .iOS, TargetPlatform .macOS }));
3021
3021
3022
3022
testWidgets (
@@ -4096,7 +4096,7 @@ void main() {
4096
4096
child: ListView (
4097
4097
controller: scrollController,
4098
4098
children: < Widget > [
4099
- Container (height: 583 ), // Push field almost off screen.
4099
+ Container (height: 585 ), // Push field almost off screen.
4100
4100
CupertinoTextField (controller: controller),
4101
4101
Container (height: 1000 ),
4102
4102
],
@@ -4111,7 +4111,7 @@ void main() {
4111
4111
4112
4112
// The ListView has scrolled to keep the TextField and cursor handle
4113
4113
// visible.
4114
- expect (scrollController.offset, 25 .0 );
4114
+ expect (scrollController.offset, 26 .0 );
4115
4115
});
4116
4116
4117
4117
testWidgets ('disabled state golden' , (WidgetTester tester) async {
@@ -4614,7 +4614,7 @@ void main() {
4614
4614
4615
4615
// The EditableText is at the top.
4616
4616
expect (tester.getTopLeft (find.byType (CupertinoTextField )).dy, moreOrLessEquals (size.height, epsilon: .0001 ));
4617
- expect (tester.getTopLeft (find.byType (EditableText )).dy, moreOrLessEquals (207 .0 , epsilon: .0001 ));
4617
+ expect (tester.getTopLeft (find.byType (EditableText )).dy, moreOrLessEquals (206 .0 , epsilon: .0001 ));
4618
4618
});
4619
4619
4620
4620
testWidgets ('align center' , (WidgetTester tester) async {
@@ -4708,7 +4708,7 @@ void main() {
4708
4708
4709
4709
// The EditableText is at the bottom.
4710
4710
expect (tester.getTopLeft (find.byType (CupertinoTextField )).dy, moreOrLessEquals (size.height, epsilon: .0001 ));
4711
- expect (tester.getTopLeft (find.byType (EditableText )).dy, moreOrLessEquals (376 .0 , epsilon: .0001 ));
4711
+ expect (tester.getTopLeft (find.byType (EditableText )).dy, moreOrLessEquals (377 .0 , epsilon: .0001 ));
4712
4712
});
4713
4713
4714
4714
testWidgets ('align as a double' , (WidgetTester tester) async {
@@ -4755,7 +4755,7 @@ void main() {
4755
4755
4756
4756
// The EditableText is near the bottom.
4757
4757
expect (tester.getTopLeft (find.byType (CupertinoTextField )).dy, moreOrLessEquals (size.height, epsilon: .0001 ));
4758
- expect (tester.getTopLeft (find.byType (EditableText )).dy, moreOrLessEquals (354.875 , epsilon: .0001 ));
4758
+ expect (tester.getTopLeft (find.byType (EditableText )).dy, moreOrLessEquals (355.625 , epsilon: .0001 ));
4759
4759
});
4760
4760
});
4761
4761
0 commit comments