Remove single view assumption from TestViewConfiguration (#122352)

Remove single view assumption from TestViewConfiguration
This commit is contained in:
Michael Goderbauer
2023-03-09 17:54:00 -08:00
committed by GitHub
parent 47922979c6
commit 927289fb4e
3 changed files with 26 additions and 15 deletions

View File

@@ -31,13 +31,13 @@ Future<void> main() async {
await tester.pump(); // Start drawer animation
await tester.pump(const Duration(seconds: 1)); // Complete drawer animation
final TestViewConfiguration big = TestViewConfiguration(
final TestViewConfiguration big = TestViewConfiguration.fromView(
size: const Size(360.0, 640.0),
window: tester.view,
view: tester.view,
);
final TestViewConfiguration small = TestViewConfiguration(
final TestViewConfiguration small = TestViewConfiguration.fromView(
size: const Size(355.0, 635.0),
window: tester.view,
view: tester.view,
);
final RenderView renderView = WidgetsBinding.instance.renderView;
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.benchmark;