Use the debugPrint command so that it does not happen in production.

Pass the board directly rather than with an intermediate variable.
This commit is contained in:
2026-05-21 14:23:13 -07:00
parent a586c712ed
commit 447182c3bf
+2 -4
View File
@@ -11,7 +11,7 @@ class MyLogger {
if (method.isNotEmpty) { if (method.isNotEmpty) {
stdout.write(" - $method"); stdout.write(" - $method");
} }
print(": $output"); debugPrint(": $output");
} }
} }
@@ -291,12 +291,10 @@ class PlayerSpot extends StatefulWidget {
} }
class _PlayerSpotState extends State<PlayerSpot> { class _PlayerSpotState extends State<PlayerSpot> {
List<int> BOARD = [];
int _spot = -2; int _spot = -2;
@override @override
void initState() { void initState() {
BOARD = widget.board;
_spot = widget.spot; _spot = widget.spot;
super.initState(); super.initState();
} }
@@ -307,7 +305,7 @@ class _PlayerSpotState extends State<PlayerSpot> {
w: 50, w: 50,
h: 100, h: 100,
spot: _spot, spot: _spot,
board: BOARD, board: widget.board,
boardUpdate: null, boardUpdate: null,
); );
} }