Skip to content

Instantly share code, notes, and snippets.

@vibalijoshi
Created October 12, 2021 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vibalijoshi/faf62d551190a46d67bad7ea8f427aa5 to your computer and use it in GitHub Desktop.
Save vibalijoshi/faf62d551190a46d67bad7ea8f427aa5 to your computer and use it in GitHub Desktop.
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