Fixed "AppBar actions are vertically centered" test (#8333)
This commit is contained in:
parent
7a7f9b68ec
commit
52c7a123fc
@ -223,10 +223,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// The vertical center of the widget with key, in global coordinates.
|
// The vertical center of the widget with key, in global coordinates.
|
||||||
double yCenter(Key key) {
|
double yCenter(Key key) => tester.getCenter(find.byKey(key)).y;
|
||||||
RenderBox box = tester.renderObject(find.byKey(appBarKey));
|
|
||||||
return box.localToGlobal(new Point(0.0, box.size.height / 2.0)).y;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(yCenter(appBarKey), equals(yCenter(leadingKey)));
|
expect(yCenter(appBarKey), equals(yCenter(leadingKey)));
|
||||||
expect(yCenter(appBarKey), equals(yCenter(titleKey)));
|
expect(yCenter(appBarKey), equals(yCenter(titleKey)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user