Mostly working websocket stuff, some message weirdness at the moment...
This commit is contained in:
@@ -30,16 +30,14 @@ class _JoinRoomHomeState extends ConsumerState<JoinRoomHome> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final jwtAsync = ref.watch(jwtNotifierProvider);
|
||||
final jwtBody = ref.watch(jwtBodyProvider);
|
||||
|
||||
jwtAsync.whenData((jwt) {
|
||||
logger.fine('Got jwt: ${jwt == null ? 'NULL' : jwt.toString().substring(10)}');
|
||||
if (jwt == null) return;
|
||||
if (jwtBody != null) {
|
||||
logger.fine('Navigating to game room screen');
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) => context.go('/room/${jwt.roomUuid}'),
|
||||
(_) => context.go('/room/${jwtBody.roomUuid}'),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
body: Padding(
|
||||
|
||||
Reference in New Issue
Block a user