Enable dependency injection of Window instead of using static property (#27389)

This commit is contained in:
Matt Carroll
2019-02-04 16:46:04 -08:00
committed by GitHub
parent 3ba97da9f5
commit 92125ed38f
26 changed files with 702 additions and 92 deletions

View File

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