From 9f34e2e4c270bb803dd7f09d3305c0399f54ed41 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Wed, 12 Apr 2017 15:54:50 -0700 Subject: [PATCH] Point to Offset (#9355) --- packages/flutter/test/material/app_bar_test.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter/test/material/app_bar_test.dart b/packages/flutter/test/material/app_bar_test.dart index 51b97671f5c..53b2cbd7b8b 100644 --- a/packages/flutter/test/material/app_bar_test.dart +++ b/packages/flutter/test/material/app_bar_test.dart @@ -46,8 +46,8 @@ bool appBarIsVisible(WidgetTester tester) { } double appBarHeight(WidgetTester tester) => tester.getSize(find.byType(AppBar)).height; -double appBarTop(WidgetTester tester) => tester.getTopLeft(find.byType(AppBar)).y; -double appBarBottom(WidgetTester tester) => tester.getBottomLeft(find.byType(AppBar)).y; +double appBarTop(WidgetTester tester) => tester.getTopLeft(find.byType(AppBar)).dy; +double appBarBottom(WidgetTester tester) => tester.getBottomLeft(find.byType(AppBar)).dy; double tabBarHeight(WidgetTester tester) => tester.getSize(find.byType(TabBar)).height; @@ -492,7 +492,7 @@ void main() { // Drag the scrollable up and down. The app bar should not snap open, its // height should just track the the drag offset. - TestGesture gesture = await tester.startGesture(const Point(50.0, 256.0)); + TestGesture gesture = await tester.startGesture(const Offset(50.0, 256.0)); await gesture.moveBy(const Offset(0.0, 128.0)); // drag the appbar all the way open await tester.pump(); expect(appBarTop(tester), 0.0); @@ -523,7 +523,7 @@ void main() { // Now that the app bar is open, perform the same drag scenario // in reverse: drag the appbar up and down and then trigger the // snap closed animation. - gesture = await tester.startGesture(const Point(50.0, 256.0)); + gesture = await tester.startGesture(const Offset(50.0, 256.0)); await gesture.moveBy(const Offset(0.0, -128.0)); // drag the appbar closed await tester.pump(); expect(appBarBottom(tester), 0.0); @@ -575,7 +575,7 @@ void main() { // Drag the scrollable up and down. The app bar should not snap open, the // bottof of the appbar should just track the drag offset. - TestGesture gesture = await tester.startGesture(const Point(50.0, 200.0)); + TestGesture gesture = await tester.startGesture(const Offset(50.0, 200.0)); await gesture.moveBy(const Offset(0.0, 100.0)); await tester.pump(); expect(appBarHeight(tester), 100.0); @@ -609,7 +609,7 @@ void main() { // Now that the appbar is fully expanded, Perform the same drag // scenario in reverse: drag the appbar up and down and then trigger // the snap closed animation. - gesture = await tester.startGesture(const Point(50.0, 256.0)); + gesture = await tester.startGesture(const Offset(50.0, 256.0)); await gesture.moveBy(const Offset(0.0, -128.0)); await tester.pump(); expect(appBarBottom(tester), kTextTabBarHeight);