Skip to content

Conversation

@Sanket-Kurle
Copy link
Contributor

The red check indicator was not visible when watching other players' games.
This is because gameData is null in spectator mode, and the Chessboard widget was not receiving any check information. As a result, spectators had no feedback that the king was under attack.
So I Updated Board.dart to manually detect check state when gameData == null.
It is using circular shape, not the exact internal check highlighting as we are not passing gameData.

image

@Sanket-Kurle Sanket-Kurle deleted the fix-check-indicator-for-spectator branch September 18, 2025 09:57
@HaonRekcef
Copy link
Contributor

Hi @Sanket-Kurle
Thanks for looking into this issue. I think, however this approach might not be the right one.

This is because gameData is null in spectator mode, and the Chessboard widget was not receiving any check information. As a result, spectators had no feedback that the king was under attack.

As you pointed out gameData of the board Widget in the TV Screen is null, so instead of adding a workaround in board.dart I think the better approach is to pass gameData to the board Widget. To do this I think you need to pass interactiveBoardParams to the gameLayout in tv-screen.dart .

@Sanket-Kurle
Copy link
Contributor Author

@HaonRekcef i tried way passing gameData to board and doing this i got correct highlight effect to but got some error in test files
Screenshot 2025-09-18 at 2 01 02 PM
Screenshot 2025-09-18 at 3 59 55 PM

you can see where the PR got failed

@HaonRekcef
Copy link
Contributor

@Sanket-Kurle As I said, you should not change board.dart at all. The change should be in tv_screen.dart where you will pass interactiveBoardParams to the gameLayout .

@Sanket-Kurle
Copy link
Contributor Author

ooh got it
thanks

@Sanket-Kurle
Copy link
Contributor Author

@HaonRekcef check #2208
i made changes as you suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants