Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Connect to the echo WebSocket server
class MyHomePage extends StatefulWidget {
WebSocketChannel channel = IOWebSocketChannel.connect("wss://ws.ifelse.io/");
@override
MyHomePageState createState() {
return MyHomePageState();
}
}
class MyHomePageState extends State<MyHomePage> {
TextEditingController _controller = TextEditingController();
@override
Widget build(BuildContext context) {
//.....same code as gist (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment