Connect to the echo WebSocket server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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