From b66cfe82bd60c1015efe0f46c2e2d69099c14cfc Mon Sep 17 00:00:00 2001 From: Allison Ryan Date: Wed, 20 Apr 2022 10:19:25 -0500 Subject: [PATCH] refactor: use loadAll --- packages/pinball_components/test/helpers/test_game.dart | 2 +- test/helpers/test_games.dart | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pinball_components/test/helpers/test_game.dart b/packages/pinball_components/test/helpers/test_game.dart index 07744d12..1faf75e8 100644 --- a/packages/pinball_components/test/helpers/test_game.dart +++ b/packages/pinball_components/test/helpers/test_game.dart @@ -11,7 +11,7 @@ class TestGame extends Forge2DGame { @override Future onLoad() async { if (_assets != null) { - await Future.wait(_assets!.map(images.load)); + await images.loadAll(_assets!); } await super.onLoad(); } diff --git a/test/helpers/test_games.dart b/test/helpers/test_games.dart index d3f78484..10caa768 100644 --- a/test/helpers/test_games.dart +++ b/test/helpers/test_games.dart @@ -29,7 +29,7 @@ class PinballTestGame extends PinballGame { @override Future onLoad() async { if (_assets != null) { - await Future.wait(_assets!.map(images.load)); + await images.loadAll(_assets!); } await super.onLoad(); } @@ -50,7 +50,7 @@ class DebugPinballTestGame extends DebugPinballGame { @override Future onLoad() async { if (_assets != null) { - await Future.wait(_assets!.map(images.load)); + await images.loadAll(_assets!); } await super.onLoad(); } @@ -62,7 +62,7 @@ class EmptyPinballTestGame extends PinballTestGame { @override Future onLoad() async { if (_assets != null) { - await Future.wait(_assets!.map(images.load)); + await images.loadAll(_assets!); } } }