diff --git a/lib/crossword/game/crossword_game.dart b/lib/crossword/game/crossword_game.dart index af8d3b7d8..1c5bd9b52 100644 --- a/lib/crossword/game/crossword_game.dart +++ b/lib/crossword/game/crossword_game.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:ui'; import 'package:flame/components.dart'; import 'package:flame/debug.dart'; @@ -59,15 +60,22 @@ class CrosswordGame extends FlameGame with PanDetector { _updateVisibleSections(); if (showDebugOverlay) { - await addAll( - [ - FpsComponent(), - FpsTextComponent(), - ChildCounterComponent( - position: Vector2(0, 30), - target: world, + await add( + RectangleComponent( + size: Vector2( + 200, + 50, ), - ], + paint: Paint()..color = const Color(0xFF000000), + children: [ + FpsComponent(), + FpsTextComponent(), + ChildCounterComponent( + position: Vector2(0, 30), + target: world, + ), + ], + ), ); } } diff --git a/test/crossword/game/crossword_game_test.dart b/test/crossword/game/crossword_game_test.dart index d0675a857..dd8cc59dc 100644 --- a/test/crossword/game/crossword_game_test.dart +++ b/test/crossword/game/crossword_game_test.dart @@ -86,10 +86,12 @@ void main() { mockState(state); await game.ready(); - expect(game.firstChild(), isNotNull); - expect(game.firstChild(), isNotNull); + expect(game.descendants().whereType(), isNotEmpty); + expect(game.descendants().whereType(), isNotNull); expect( - game.firstChild>(), + game + .descendants() + .whereType>(), isNotNull, ); },