You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ravikinharavi bro did you resolve it ?
i am unable to emit any event and getting any event. my connection is stablished with socket but events are not emiting .
import 'package:flutter/material.dart';
import 'package:socket_io_client/socket_io_client.dart' as IO;
class checking extends StatefulWidget {
const checking({Key? key}) : super(key: key);
@OverRide
State createState() => _checkingState();
}
class _checkingState extends State {
late IO.Socket socket;
@OverRide
void initState() {
super.initState();
initSocket();
}
var k = "click";
Future initSocket() async {
socket = IO.io("http://13.126.94.67:1000", <String, dynamic>{
'autoConnect': true,
'transports': ['websocket'],
});
var test =socket;
// Connect to the server
socket.connect();
}
@OverRide
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () {
print(socket.connected);
}
}
The text was updated successfully, but these errors were encountered: