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.