@@ -269,27 +269,27 @@ void main() {
269
269
);
270
270
271
271
// Ensure the text field has not yet scrolled.
272
- var textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
273
- var viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
274
- expect (textBottom, lessThanOrEqualTo (viewportBottom ));
272
+ var textTop = tester.getTopRight (find.byType (SuperTextField )).dy;
273
+ var viewportTop = tester.getTopRight (find.byType (SuperText )).dy;
274
+ expect (textTop, moreOrLessEquals (viewportTop ));
275
275
276
276
// Scroll down to reveal the last line of text.
277
277
await tester.drag (find.byType (SuperTextField ), const Offset (0 , - 1000.0 ));
278
278
await tester.pumpAndSettle ();
279
279
280
280
// Ensure the text field has scrolled to the bottom.
281
- textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
282
- viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
281
+ var textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
282
+ var viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
283
283
expect (textBottom, moreOrLessEquals (viewportBottom));
284
284
285
285
// Scroll back up to the top of the text field.
286
286
await tester.drag (find.byType (SuperTextField ), const Offset (0 , 1000.0 ));
287
287
await tester.pumpAndSettle ();
288
288
289
289
// Ensure the text field has scrolled back to the top.
290
- textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
291
- viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
292
- expect (textBottom, lessThanOrEqualTo (viewportBottom ));
290
+ textTop = tester.getTopRight (find.byType (SuperTextField )).dy;
291
+ viewportTop = tester.getTopRight (find.byType (SuperText )).dy;
292
+ expect (textTop, moreOrLessEquals (viewportTop ));
293
293
});
294
294
295
295
testWidgetsOnDesktop ("multi-line is vertically scrollable when text spans more lines than maxLines" , (tester) async {
@@ -311,9 +311,9 @@ void main() {
311
311
);
312
312
313
313
// Ensure the text field has not yet scrolled.
314
- var textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
315
- var viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
316
- expect (textBottom, lessThanOrEqualTo (viewportBottom ));
314
+ var textTop = tester.getTopRight (find.byType (SuperTextField )).dy;
315
+ var viewportTop = tester.getTopRight (find.byType (SuperText )).dy;
316
+ expect (textTop, moreOrLessEquals (viewportTop ));
317
317
318
318
// Scroll down to reveal the last line of text.
319
319
await tester.drag (
@@ -324,8 +324,8 @@ void main() {
324
324
await tester.pumpAndSettle ();
325
325
326
326
// Ensure the text field has scrolled to the bottom.
327
- textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
328
- viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
327
+ var textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
328
+ var viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
329
329
expect (textBottom, moreOrLessEquals (viewportBottom));
330
330
331
331
// Scroll back up to the top of the text field.
@@ -337,9 +337,9 @@ void main() {
337
337
await tester.pumpAndSettle ();
338
338
339
339
// Ensure the text field has scrolled back to the top.
340
- textBottom = tester.getBottomRight (find.byType (SuperTextField )).dy;
341
- viewportBottom = tester.getBottomRight (find.byType (SuperText )).dy;
342
- expect (textBottom, lessThanOrEqualTo (viewportBottom ));
340
+ textTop = tester.getTopRight (find.byType (SuperTextField )).dy;
341
+ viewportTop = tester.getTopRight (find.byType (SuperText )).dy;
342
+ expect (textTop, moreOrLessEquals (viewportTop ));
343
343
});
344
344
});
345
345
}
0 commit comments