Well, now sockets actually detach from events, when changing screens
This commit is contained in:
parent
e7e052e3a1
commit
8a586f0fe6
2 changed files with 23 additions and 4 deletions
|
|
@ -92,6 +92,17 @@ class _GamePageState extends State<GamePage> {
|
|||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
socket.off("hello");
|
||||
socket.off("gameStatus");
|
||||
socket.off("leaveGameResponse");
|
||||
socket.off("chatResponse");
|
||||
socket.off("guessResponse");
|
||||
socket.off("guess");
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue