Created
October 12, 2021 15:25
-
-
Save vibalijoshi/faf62d551190a46d67bad7ea8f427aa5 to your computer and use it in GitHub Desktop.
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