Flutter WebSocket教程



Flutter有一个WebSocket库,您可以使用它连接Websocket API进行通信。在本教程中,我们将学习如何在Flutter应用程序中使用WebSocket。有关更多教程,请查看:https://flutterbook.net/

代码:https://git.io/Je4sy

我的应用程序:http://ithinkdiff.net
我的Udemy课程:https://www.udemy.com/user/mahmudahsan/
免费的Flutter和Dart教程:
https://www.youtube.com/playlist?list=PLlMOodDAsO4xrTgVEkKXfVf7sSVEsmWKQ。

6 comments
  1. Thanks for this cool tutorial. Keep more coming. Two questions:
    1-Why do we create the websocket in the main class and pass it to the state class instead of creating it in the state class?
    2-Why don't we do the listening inside initState() instead of the class constructor?

  2. thank you for publishing such great video
    i was using websocket in MVC using SignalR it's really revolutionary considering time consuming and fast communication unlike http
    in this example i couldn't pass the streambuilder with success
    i added <uses-permission android:name="android.permission.INTERNET"/>
    but still no response from ws://echo.websocket.org
    i use OS : Windows 10 , VSCode , android avd

    anyone help..

Comments are closed.