better_socket 1.0.0 better_socket: ^1.0.0 copied to clipboard
这是一个集成原生iOS的websocket和安卓原生的websocket,力争做一个完美的websocket插件。有人反映dart的websocket配置很麻烦,就是做这个插件的初衷。
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add better_socket
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
better_socket: ^1.0.0
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:better_socket/better_socket.dart';