Skip to content

Instantly share code, notes, and snippets.

Created October 12, 2021 15:25
What would you like to do?
Connect to the echo WebSocket server
class MyHomePage extends StatefulWidget {
WebSocketChannel channel = IOWebSocketChannel.connect("wss://");
MyHomePageState createState() {
return MyHomePageState();
class MyHomePageState extends State<MyHomePage> {
TextEditingController _controller = TextEditingController();
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