Fixed "AppBar actions are vertically centered" test (#8333)

This commit is contained in:
Hans Muller 2017-02-22 11:06:31 -08:00 committed by GitHub
parent 7a7f9b68ec
commit 52c7a123fc

View File

@ -223,10 +223,7 @@ void main() {
);
// The vertical center of the widget with key, in global coordinates.
double yCenter(Key key) {
RenderBox box = tester.renderObject(find.byKey(appBarKey));
return box.localToGlobal(new Point(0.0, box.size.height / 2.0)).y;
}
double yCenter(Key key) => tester.getCenter(find.byKey(key)).y;
expect(yCenter(appBarKey), equals(yCenter(leadingKey)));
expect(yCenter(appBarKey), equals(yCenter(titleKey)));