DealORound / Deal-O-Round

Flutter port of the Deal-O-Round board card game
MIT License
2 stars 0 forks source link

Exception: GameState dispose didn't call super dispose - when the game ends on Android #29

Closed MrCsabaToth closed 10 months ago

MrCsabaToth commented 10 months ago

"GameState dispose didn't call super dispose" - or something along these lines when the game ends. GameState is the GamePage's State object.

What I suspect is that the GamePage's dispose is async and there's an await call in it. Maybe that makes the call too long, and it "hangs" there and doesn't get to the super dispose for real. We'd convert the dispose back to non async and fire the GamesServices.submitScore call without await.

Also do a little refactor about when we call the timer in the _updateTime so we wouldn't keep fiddling with stuff once we start to programmatically navigate away to the GameOver page.