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!); } } }